JWL equation of state: single-material and multi-fluid mixture implementation#1586
Draft
fahnab666 wants to merge 3 commits into
Draft
JWL equation of state: single-material and multi-fluid mixture implementation#1586fahnab666 wants to merge 3 commits into
fahnab666 wants to merge 3 commits into
Conversation
Add Jones-Wilkins-Lee equation of state with four mixture closures (isobaric, Kuhl-Khasainov, p-T equilibrium, Rocflu blend) via jwl_mix_type. New shared m_jwl module, per-fluid eos selector, GPU-resident parameter arrays, example cases, and inverse-function test suite.
Author
|
@claude full review |
added 2 commits
June 12, 2026 13:44
Without this, the device copy of jwl_mix_type was uninitialized; non-zero mixture closures (Kuhl, p-T equil, Rocflu) silently executed the wrong branch on GPU.
… rocflu fix - s_initialize_jwl_module: add f_is_default sentinel checks on all JWL parameters, positivity checks on R1/R2/omega/rho0, n_jwl>1 guard; upgrade cv check with f_is_default; use local use statements (m_mpi_common, m_helper_basic) instead of module-level import - s_jwl_sound_speed_squared: refactor to reuse s_jwl_pcold / s_jwl_dpcold_drho helpers instead of inlining the same algebra - s_jwl_ptequil_pressure_er/energy_pr: add 1e-12 early-exit to both bisection loops; add bracket sign check in energy_pr fallback - s_jwl_rocflu_pressure_er/energy_pr: widen high-Y guard to 1-1e-4 (symmetric with low-Y guard) to close the 0.99 discontinuity - m_variables_conversion: remove dead s_mpi_allreduce_integer_sum import - tests: add golden files for jwl_single_material_shocktube, 1D/2D jwl_mixture_test
73700a5 to
d83068f
Compare
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.
Description
Implements the Jones--Wilkins--Lee (JWL) equation of state in MFC for detonation-products modeling, including:
single-material JWL cases,
multi-fluid JWL/ideal-gas mixtures,
four mixture closures,
GPU-resident JWL parameter tables,
quantitative verification tests.
Closes #.
Type of change
New feature
JWL EOS
The JWL pressure is implemented as a Mie--Gruneisen EOS with a two-exponential cold curve:
where
The isentropic sound speed uses the Rocflu/Stanley form:
This requires only
pandrho, with no explicit temperature evaluation, keeping the EOS inexpensive on the GPU hot path.EOS selection
Each fluid selects its EOS using
fluid_pp(i)%eos.Sub-cold-curve states, where
p < p_cold(rho), are intentionally skipped because the temperature floor clampsT = 0; therefore, exact round-trip identity is not expected.Checklist
I added or updated tests for new behavior.
I updated documentation if user-facing behavior changed.
GPU results match CPU results.
Tested on NVIDIA GPU or AMD GPU.
Description
Implements the Jones--Wilkins--Lee (JWL) equation of state in MFC for detonation-products modeling, including:
single-material JWL cases,
multi-fluid JWL/ideal-gas mixtures,
four mixture closures,
GPU-resident JWL parameter tables,
quantitative verification tests.
Closes #.
Type of change
New feature
JWL EOS
The JWL pressure is implemented as a Mie--Gruneisen EOS with a two-exponential cold curve:
where
The isentropic sound speed uses the Rocflu/Stanley form:
This requires only
pandrho, with no explicit temperature evaluation, keeping the EOS inexpensive on the GPU hot path.EOS selection
Each fluid selects its EOS using
fluid_pp(i)%eos.Sub-cold-curve states, where
p < p_cold(rho), are intentionally skipped because the temperature floor clampsT = 0; therefore, exact round-trip identity is not expected.Checklist
I added or updated tests for new behavior.
I updated documentation if user-facing behavior changed.
GPU results match CPU results.
Tested on NVIDIA GPU or AMD GPU.