Repository navigation
Fill the six equation phasic energies in the primitive variables - #2055
aliencaocao wants to merge 2 commits into
Conversation
s_convert_conservative_to_primitive_variables copies the phasic internal energies into their primitive slots, which the serial primitive output writes; they were allocated but never filled. No solver term reads them, so the solution and every golden are unchanged.
|
Claude Code Review Head SHA: 193c9e0 Files changed:
Findings: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2055 +/- ##
=======================================
Coverage 61.90% 61.90%
=======================================
Files 86 86
Lines 22885 22888 +3
Branches 3369 3370 +1
=======================================
+ Hits 14166 14168 +2
Misses 6220 6220
- Partials 2499 2500 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Lines of Code
|
wilfonba
left a comment
There was a problem hiding this comment.
This variable is never used in simulation, but this fix means that anyone plotting results from serial I/O primitive outputs will now get meaningful results. I considered putting species pressures in this slot, but since species pressures are equal after relaxation, it doesn't make much sense to copy the same pressure repeatedly in the primitive output text files. This PR is good to go once it passes everything, which it should.
Fixes #2047.
Change
s_convert_conservative_to_primitive_variablesinsrc/common/m_variables_conversion.fppcopies the phasic internal energies into their primitive slots formodel_eqns = 3:This is the same treatment the routine already gives the volume fractions, the magnetic field, and the color function. Their primitive and conservative forms coincide.
Why this is correct
In the six-equation model equations.md, Section 2.2), the extra variables are the phasic internal energies αₖρₖeₖ. MFC's serial output definition lists them in both the conservative and the primitive output.
post_processalso writes the same quantity asalpha_rho_e.Before and after
The figure shows the shock and helium bubble from the issue, in the six-equation model. It shows the phasic energy of helium from t = 0.2 ms to 1.0 ms.
prim.8andprim.9are 0 in every cell.cons.8andcons.9exactly.Tests and goldens
No golden changes as this does not concern the final solution that the golden files checks for.
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