You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: Lagrange bubble initial gas pressure omits the qv term from the stiffened-gas inversion #1706
s_locate_bubbles/particle initialization in src/simulation/m_bubbles_EL.fpp open-codes the stiffened-gas pressure inversion and omits the qv (heat of formation) term. The resulting liquid pressure seeds the initial Lagrangian bubble gas pressure, so the error is in the physics, not in output.
The canonical inversion in s_compute_pressure (src/common/m_variables_conversion.fpp:71) is
pres = (energy - dyn_p - pi_inf - qv)/gamma
qv is missing from the m_bubbles_EL expression.
Evidence that this is accidental
qv is an output argument of the s_convert_to_mixture_variables call on the line above, and it is never read anywhere else in that scope. The value is computed and discarded.
Impact
pliq is too large by qv/gamma. It flows directly into the initial bubble gas pressure:
so every Lagrangian bubble starts from a wrong internal pressure whenever qv /= 0.
Dormant when qv = 0, which is the default. It triggers for any case that sets fluid_pp(i)%qv, i.e. the phase-change and reactive-burn configurations — examples/2D_phasechange_bubble, examples/3D_phasechange_bubble, examples/1D_exp_tube_phasechange, examples/2D_shocktube_phasechange, examples/1D_reactive_burn all set it.
Suggested fix
Route the site through s_compute_pressure rather than adding - qv to the open-coded expression, so the definition cannot drift again. See the tracking issue for the broader deduplication.
Activity
Fix missing qv term in the Lagrange bubble initial pressure