vanDerWaalsVariables

This source allows the user to compute specific internal energy (\(\epsilon\)), pressure (\(P\)), density (\(\rho\)), and temperature (\(T\)) from the Van Der Waals gas law,

\[\notag \begin{align} P = \frac{R}{C_V}(\epsilon+\eta_a\rho)\frac{\rho}{1-\eta_b\rho}-\eta_a\rho^2 \end{align}\]

Here \(R\) is the gas constant, \(C_V\) is the specific heat at constant volume and \(\eta_a\) and \(\eta_b\) are constants accounting for the intermolecular forces and the molecular size, respectively.

Parameters

operations (string vector, required)

The operation(s) to be performed. The standard direct operation is “computeEOSFromTemperatureAndDensity” where “EOS” should be replaced by one of the following values (the first word of each option should be used, the remainder offers a brief description and the default units after conversion):

  • energy - (\(J kg^{-1}\))
  • pressure - (\(Pa\))

To compute an inverse operation, simply permute the string to be “computeTemperatureFromEOSAndDensity” or “computeDensityFromTemperatureAndEOS”. The input is not case sensitive.

Rr (float, required)
Specifies the gas constant, \(R\).
Cv (float, required)
Specifies the gas specific heat at constant volume , \(C_V\).
etaA (float, required)
Specifies the intermolecular force constant, \(\eta_a\) in units of \(m^3kg^{-1}\).
etaB (float, required)
Specifies the molecular size constant, \(\eta_b\) in units of \(m^5kg^{-1}s^{-2}\).
speciesMass (float, required)
Specifies the species mass in \(kg\).
kboltz (float, optional)
Specifies the Boltzmann constant. Defaults to \(1.3806 \times 10^{-23}\) (\(J/K\)).
useParticleDensity (int, optional)
Whether to use the particle (true) or mass (false) density. Default is false.
densityConversionCoefficient (float, optional)
Custom density unit conversion factor. Conversion to MKS mass density (\(kg m^{-3}\)) is the default. The default conversion factor is divided by the custom conversion factor. Thus if using alternative units, set the unit conversion factor to to the MKS value that corresponds to unity in the alternative units.
temperatureConversionCoefficient (float, optional)
Custom temperature unit conversion factor. Conversion to MKS temperature (\(K\)) is the default. The default conversion factor is divided by the custom conversion factor. Thus if using alternative units, set the unit conversion factor to to the MKS value that corresponds to unity in the alternative units.
conversionCoefficients (float vector, optional)
Custom unit conversion factors for EOS values. Conversion to MKS units is the default. The default conversion factor is divided by the custom conversion factor. Thus if using alternative units, set the unit conversion factor to to the MKS value that corresponds to unity in the alternative units.

Parent Updater Data

in (string vector, required)

input variables (nodalArray, 1-component each, 2 required)

The specific input variables and order depend on the operations input option. For direct EOS evaluation, the input variables should be in = [temperature, density]. The order is critical where temperature must be the first input and density must be the second input. For inverse operations, the temperature, if an input, must be the first input and the density, if an input, must be the second input. The EOS input should be placed in the correspondingly empty input location. Inputs are of type nodalArray with one component each.

out (string vector, required)

output variables (nodalArray, 1-component each, required)

The number of out variables should be the same as the number of entries into the list of operations. The result of each operation will be placed into the corresponding output variable, respectively. Outputs are of type nodalArray with one component each.

Example

<Updater computeEOS>
  kind=equation2d
  onGrid=domain
  in=[temperature, density]
  out=[energy, pressure]
  <Equation thisGas>
    kind=vanDerWaalsVariables
    Rr=2.0769
    Cv=3.1156
    etaA=0.0346
    etaB=0.0238
    speciesMass=6.64e-27
    operations=["computeEnergyFromDensityAndTemperature", \
                "computePressureFromDensityAndTemperature"]
  </Equation>
</Updater>