Restore pT equilibrium after phase depletion - #1830
Closed
aliencaocao wants to merge 1 commit into
Closed
Conversation
Member
|
pr no checkmark |
Contributor
Author
|
done. same for the other PRs. |
Contributor
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Pull request overview
This PR restores pressure/temperature equilibrium when one phase becomes depleted during phase-change handling, addressing issue #1820.
Changes:
- Adds a post-PTG-relaxation check for phase depletion (liquid/vapor reaching zero).
- Triggers an additional infinite pT relaxation step when depletion is detected.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| call s_infinite_ptg_relaxation_k(j, k, l, pS, rhoe, q_cons_vf, TS) | ||
|
|
||
| if (q_cons_vf(lp + eqn_idx%cont%beg - 1)%sf(j, k, & | ||
| & l) == 0.0_wp .or. q_cons_vf(vp + eqn_idx%cont%beg - 1)%sf(j, k, l) == 0.0_wp) then |
|
|
||
| if (q_cons_vf(lp + eqn_idx%cont%beg - 1)%sf(j, k, & | ||
| & l) == 0.0_wp .or. q_cons_vf(vp + eqn_idx%cont%beg - 1)%sf(j, k, l) == 0.0_wp) then | ||
| call s_infinite_pt_relaxation_k(j, k, l, 2, pS, p_infpT, q_cons_vf, rhoe, TS) |
Lines of Code
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1820. For context and description of issue and fix, please refer to the issue thread.
Contribution Policy
We do not accept pull requests generated primarily by AI without genuine understanding or real-world usage context.
All contributions are expected to demonstrate:
If these expectations are not met, we would prefer to implement the changes ourselves rather than spend time reviewing low-effort submissions.
Acknowledgement
PR template credit: junegunn