EQUATIONS: Simplify the W guess and pressure in cons2prim_srhd_adi().

The initia guess for enthalphy can be estimated from the total energy
and minimum pressure. In the similar way, the pressure can be obtained
by subtracting the energy from enthalphy.

Signed-off-by: Grzegorz Kowal <grzegorz@amuncode.org>
This commit is contained in:
Grzegorz Kowal 2015-02-15 08:17:51 -02:00
parent d203702254
commit ba470d5ec9

View File

@ -3110,7 +3110,7 @@ module equations
! get the lower bound for W updated by the minimum pressure with assumed Γ = 1
!
wm = sqrt(dn * dn + mm) + pmin / gammaxi
wm = en + pmin
! set the initial W to the minimum value
!
@ -3131,7 +3131,7 @@ module equations
q(ivx,i) = u(imx,i) / w
q(ivy,i) = u(imy,i) / w
q(ivz,i) = u(imz,i) / w
q(ipr,i) = gammaxi * (w * vs - dn) * vs
q(ipr,i) = w - en
end do ! i = 1, n