This source allows the user to compute specific internal energy (\(\epsilon\)), pressure (\(P\)), density (\(\rho\)), and temperature (\(T\)) from the ideal gas law,
Here \(\Gamma\) is the adiabatic gas index, \(m_i\) is the species mass and \(k_B\) is the Boltzmann constant.
In this updater, the sound speed squared is computed from a formula for the generalized sound speed:
This updater is intended for usage as an example. As many equation updaters in USim assume an ideal gas equation of state use of this updater is redundant and largely unnecessary. Rather, this is updater is used to provide examples of EOS usage when EOS tables are not available.
gasGamma
(float, required)speciesMass
(float, required)kboltz
(float, optional)delta
(float, optional)soundSpeedSquaredFloor
(float, optional)useParticleDensity
(int, optional)densityConversionCoefficient
(float, optional)temperatureConversionCoefficient
(float, optional)conversionCoefficients
(float vector, optional)outputPeRhoInv
(int, optional)in
(string vector, required)
input variables
(nodalArray, 1-component each, 2 required)The input variables (exactly 2) must be the density and the internal energy, in that order. Inputs are of type nodalArray with one component each.
out
(string vector, required)
output variables
(nodalArray, 1-component each, 2 required and 3rd optional)The output variables are the pressure and the sound speed squared, in that order. If outputPeRhoInv is true, a third output variable that is the partial derivative of the pressure with respect to specific energy divided by the density \(\rho^{-1} \partial P / \partial \epsilon\). This output is required to compute the EOS system eigenvectors. Outputs are of type nodalArray with one component each.
<Updater computePressureAndSoundSpeedSquared>
kind=equation2d
onGrid=domain
in=[rho, intEnergy]
out=[pressure, soundSqr]
<Equation thisGas>
kind=idealGasComputeVariables
delta=1.e-5
speciesMass=MI
gasGamma=1.667
</Equation>
</Updater>