Skip to content

IGR silently drops qv (heat of formation) from the pressure, and nothing prohibits qv with igr #1778

Closed

Description

@sbryngelson

src/simulation/m_igr.fpp:412 declares

real(wp) :: qv_igr  !< discarded; IGR carries no heat of formation

and passes it as the output slot of s_compute_mixture_coefficients at ten sites, discarding the
result each time. Consistent with that, the IGR CFL routine computes pressure without qv
(m_igr.fpp:2591-2592, :2605-2606):

pres_L = (E_L - pi_inf_L - 0.5_wp*rho_L*(vel_L(1)**2._wp + vel_L(2)**2._wp))/gamma_L

where the shared operator is f_pressure(e_int, gamma, pi_inf, qv) = (e_int - pi_inf - qv)/gamma.

Nothing enforces the invariant the comment asserts. There is no rule in
toolchain/mfc/case_validator.py linking igr to qv — the IGR prohibitions are only about
igr_pres_lim, igr_order, non_newtonian, num_igr_iters, igr_iter_solver and down_sample.
So a case may set fluid_pp(i)%qv to a non-zero value together with igr = T, and the IGR pressure
will silently omit the heat of formation. Wrong pressure, no warning.

Current exposure is nil — none of the seven examples/*IGR* cases sets qv — but that is luck, not
a guard.

Two ways to close it, and the choice is a physics one:

  1. Enforce the documented invariant: self.prohibit(igr and any(qv != 0), "igr does not support heat of formation (qv)") in case_validator.py, with a PHYSICS_DOCS entry. Minimal, and makes
    the existing comment true.
  2. Support it: thread qv_igr into the IGR pressure (and the corresponding energy), at which
    point qv_igr stops being discarded and the comment goes away.

Found while auditing the last un-centralized equation-of-state expressions for #1762 / #1638: this
routine is the only place left in src/ that writes the stiffened-gas pressure and sound speed
inline rather than calling the shared operators.

Activity

  1. sbryngelson commented on Sep 2, 2026

    @sbryngelson
    MemberAuthor

    Fixed by #1762, merged as c9c8b0f. This issue was listed in that PR's Closes line but GitHub only auto-closes the first reference in a comma-separated list, so it stayed open; closing manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions