In fluid domains, the code solves the compressible Navier-Stokes equations in curvilinear coordinates. The basic equations, in a cartesian coordinate space, for the conserved mass density , momentum density , and total energy density are, in index form with summation convention are given as
where is the thermodynamic pressure, is the viscous stress tensor, and is the heat flux in the th direction. , , and are are mass, momentum, and energy density source terms. These equations can be written in the compact form
where is the vector of conserved variables, is the flux vector account for both visicd and invisci terms, and is the source term vector. The so-called RHS is evaluated by the top-level RHS driver function in include/EulerRHS.H.
The viscous stress tensor is defined as
where and are the first and second coefficients of viscosity, respectively; both may be a function of temperature. Note that Stokes' hypothesis is not automatically enforced and that is related to bulk viscosity as .
is computed by ComputeTauBuffer in src/ViscidUtil.C.
The heat flux vector is defined as
where is the thermal conductivity. The heat flux vector, , is computed by ComputeHeatFluxBuffer in src/ViscidUtil.C.
The first viscosity coefficient , bulk viscosity coefficient, , and the thermal conductivity depend on the thermodynamic state of the fluid. Currently, only one implementation is available, although others can be easily implemented in ViscidUtil.C.
The Power Law transport model in implemented in ComputeTVBufferPower.
The power law model gives the dynamic viscosity, as
where and are user specified parameters, typically and for air.
The bulk viscosity is defined as
where is a user specified parameter, typically for air.
Thus the second coefficient of viscosity can be calculated as
The power law model calculates the :w
The equations of state provides closure by relating the intensive state variables, pressure and temperature, to the extensive state variables, specific internal energy and volume. Currently, only one implementation is available, although others can be easily implemented in EulerUtil.C.
The equation of state currently available is that of an ideal gas, assuming constant specific heats. The equations of state are
where is the specific gas constant, defined as with the universal gas constant, and the molecular weight.
The specific heat capacity at constant volume and pressure are defined as
Then, by substitution into the equation of state we get the following relation
By defining the specific heat ratio, , the following expressions give the realtionship between specific energy, pressure, and temperature as implemented by ComputeDVBufferIdeal.
PlasCom2 can run in either a dimensional or non-dimensional mode. The code uses the following variables to define the non-dimensional scaling:
, , , and , a length scale. Where denotes a dimensional value and denotes the reference state. There are two optional non-dimensional spaces available to the user, as shown in the table below.
Standard (nonDimensional=1) | Legacy PlasComCM (nonDimensional=2) |
---|---|
Substitution into the dimensional form of the Navier-Stokes equations yields the non-dimensional equivalent
with the following non-dimensionalization for the source terms
by choosing the following non-dimensionalizations for the transport coefficients
the non-dimensional viscous stress tensor and heat flux vector can be written as
where is defined as the code Reynolds number, and is defined as the Prandtl number, which define the dimensional reference values and respectively.
There are no special modifications to the calorically perfect gas equation of state, with the exception of the specific gas constant. The reference gas constant is calculated and non-dimensionalized as follows
For the standard non-dimensionalization, is exactly 1.0. For the legacy non-dimensionalization, .
It is possible to express the Navier-Stokes equations in any other coordinate system provided the mapping from to is given. The Cartesian coordinates can be mapped to another coordinate system via the time-dependent mappings
where and we only consider non-singular mappings such that exists and is well defined. Moreover we take . The Jacobian of the transformation is defined as and is strictly positive.
Under these conditions and with simple application of the chain rule it can be shown[2] that the vector (compact) form tranforms to
after using the identities
where is the number of dimensions. If we define the weighted metric and contravariant velocity , with similar expressions for the remaining components, then the inviscid fluxes are
in two dimensions and
The inviscid fluxes are computed dimension-at-a-time by Euler::Flux1D in kernels/Euler.f90.
The viscous fluxes may be expressed in a number of forms, depending on the particular goal. The main difference between the particular forms is how second derivatives are taken; namely, either is taken directly or as two repeated derivatives, . The use of is advantageous in that it allows for the most physical dissipation in the code, as determined by the modified wavenumber. (See, e.g., Lele[1] for a discussion of the modified wavenumber and its meaning.) However, it is also expensive, especially in three or more dimensions. Using repeated derivatives in advantageous for two reasons: (i) it keeps the equations in conservative form which is useful for shock capturing and (ii) it is less expensive (by a factor around 2.5 in three dimensions) than the fully expanded form. However, it provides less physical dissipation, especially at the highest wavenumbers, exactly where it is most needed.
Following Anderson, Tanehill, and Pletcher (1984), the strong form of the viscous terms is as follows
This form is much faster than the other forms, but does not have any dissipation at the highest wavenumbers. The viscous flux components are computed dimension-at-a-time by Viscid::StrongFlux1D in kernels/Viscid.f90.
Selected by the user with METRICTYPE = NONORTHOGONAL_STRONGFORM
in .