Skip to content

T_freeze cant be lower than homogeneous - #501

Open
pdziekan wants to merge 1 commit into
igfuw:masterfrom
pdziekan:min_T_freeze
Open

T_freeze cant be lower than homogeneous#501
pdziekan wants to merge 1 commit into
igfuw:masterfrom
pdziekan:min_T_freeze

Conversation

@pdziekan

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI lite review requested due to automatic review settings August 25, 2026 13:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request clamps sampled mineral-particle freezing temperatures to the homogeneous-freezing threshold of 235.15 K.

Changes:

  • Adds <algorithm>.
  • Applies a 235.15 K lower bound in T_freeze_CDF_inv.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

if (INP_type == INP_t::mineral && A > real_t(1e-20))
{
return real_t(real_t(273.15) + (real_t(8.934) - log(- log(real_t(1.) - rand) / A) ) / real_t(0.517)) * si::kelvin;
return std::max(real_t(235.15), real_t(real_t(273.15) + (real_t(8.934) - log(- log(real_t(1.) - rand) / A) ) / real_t(0.517))) * si::kelvin;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants