Repository navigation
Conversation
Lines of Code
|
|
Claude Code Review Head SHA: ea9913d Files changed:
Findings:
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2408 +/- ##
=======================================
Coverage 66.14% 66.14%
=======================================
Files 112 112
Lines 31093 31096 +3
Branches 4749 4749
=======================================
+ Hits 20567 20570 +3
Misses 6675 6675
Partials 3851 3851 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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.
Contribution Policy
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.
Summary
s_equilibrate_pressure(src/simulation/m_pressure_relaxation.fpp) includes a phase in the six-equation pressure relaxation whenever its volume fraction exceedssgm_eps. Withmpp_lim = F, a phase that is absent from a cell is carried at round-off, and its partial density can come out negative while its volume fraction sits just abovesgm_eps. The isentrope densityrho_K_s = alpha_rho/alpha * (...)of that phase is then negative, the routine flags the cell as unusable, and the run stops with "Pressure relaxation produced a non-physical phasic density". The phase has no mass to equilibrate, so the abort is spurious.This PR adds
f_phase_active: a phase takes part in the relaxation only if its volume fraction exceedssgm_epsand its partial density is positive. The five existingalpha > sgm_epschecks ins_equilibrate_pressurecall it. An inactive phase contributes nothing to the Newton residual and keeps its volume fraction;s_correct_internal_energiesis unchanged and still resets every phase's internal energy from the relaxed pressure.Where every phase with
alpha > sgm_epshas positive partial density, the new condition equals the old one and results are unchanged. It is a CFD-result change only for runs that master aborts.Verification
examples/1D_kapilashocktube(water at 1e9 Pa against air at 1e5 Pa, pure-fluid patches withalpha = 0/alpha_rho = 0for the absent phase,mpp_lim = F, WENO5-M, HLLC, RK3, 1000 cells, 6025 steps), changed only bymodel_eqns: 6eqand removingalt_soundspeed. Serial CPU, NVHPC 26.3. "Master" is 7982f2d.alpha > sgm_epsbut is not active, first fires at step 2280, the step master aborts on: cell 757 (inside the air region), water,alpha = 1.009e-16,alpha_rho = -1.412e-16. It fires 2338 times over the rest of the run.The interface (
alpha = 0.5) is in the same cell, 816, in both at the final step, and the water and air masses at the final step equal their initial values to the 11 digits printed.Not verified: GPU builds (the change adds one
GPU_ROUTINEseq function called from an existing seq routine, but it was not compiled or run on a GPU); 2D or 3D cases that trigger the guard; cases withmpp_lim = T, wheres_correct_volume_fractionsalready zeroes a phase with negative partial density before the relaxation; state-dependent equations of state in a cell where the guard acts.Type of change
Testing
CPU, NVHPC 26.3: the 28 suite cases that use
model_eqns = 3pass against the committed goldens, none regenerated. 18 of them reach this routine; the other 10 are phase-change cases, which userelax = Tand bypass it. Plus the shock-tube comparison above.Related: split out of #2098, which carries the same change.
This PR was made with Claude Code (AI).
🤖 Generated with Claude Code