MultiSpeciesViscousTermsP0P1 class
Viscous terms for multispecies PDEs using the modified-gradient approach.
Contents
Constructors, destructors, conversion operators
- MultiSpeciesViscousTermsP0P1(std::size_t nspec, std::size_t rdof)
- Constructor.
Public functions
- auto localDof(std::size_t) const -> std::size_t
- Return local polynomial order.
-
auto stateAt(const std::vector<inciter::
EOS>& mat_blk, const Fields& U, const Fields& P, std::size_t e, std::size_t ndof, const std::vector<tk:: real>& B) const -> std::vector<tk:: real> - Reconstruct conserved variables and primitives at a face point.
-
void gradientIntElem(const Fields& U,
const Fields& P,
std::size_t elem,
const std::array<std::vector<tk::
real>, 3>& dBdx, std::array<std::array<tk:: real, 3>, 4>& grad) const - Compute gradients of quantities for an interior element.
-
void interiorFlux(const std::vector<inciter::
EOS>& mat_blk, std::size_t ncomp, const std::array<std::vector<tk:: real>, 2>& state, const std::array<std::vector<tk:: real>, 2>& cellAvgState, const std::array<tk:: real, 3>& fn, const std::array<std::array<tk:: real, 3>, 2>& centroid, const std::array<std::array<std::array<tk:: real, 3>, 4>, 2>& grad, std::vector<tk:: real>& fl) const - Compute the multispecies viscous flux at an interior face.
Charm++ pack/unpack serializer member functions
- void pup(PUP::er& p)
- Pack/Unpack serialize member function.
- void operator|(PUP::er& p, MultiSpeciesViscousTermsP0P1& v)
- Pack/Unpack serialize operator|.
Function documentation
tk:: MultiSpeciesViscousTermsP0P1:: MultiSpeciesViscousTermsP0P1(std::size_t nspec,
std::size_t rdof)
Constructor.
| Parameters | |
|---|---|
| nspec in | Number of species in this PDE system |
| rdof in | Maximum number of reconstructed degrees of freedom |
Constructor
std::vector<tk:: real> tk:: MultiSpeciesViscousTermsP0P1:: stateAt(const std::vector<inciter:: EOS>& mat_blk,
const Fields& U,
const Fields& P,
std::size_t e,
std::size_t ndof,
const std::vector<tk:: real>& B) const
Reconstruct conserved variables and primitives at a face point.
| Parameters | |
|---|---|
| mat_blk in | Material EOS block |
| U in | Solution vector at recent time step |
| P in | Vector of primitives at recent time step |
| e in | Element id |
| ndof in | Number of local degrees of freedom |
| B in | Basis functions evaluated at the face point |
| Returns | State vector containing conserved variables followed by multispecies primitives |
void tk:: MultiSpeciesViscousTermsP0P1:: gradientIntElem(const Fields& U,
const Fields& P,
std::size_t elem,
const std::array<std::vector<tk:: real>, 3>& dBdx,
std::array<std::array<tk:: real, 3>, 4>& grad) const
Compute gradients of quantities for an interior element.
| Parameters | |
|---|---|
| U in | Solution vector at recent time step |
| P in | Vector of primitives at recent time step |
| elem in | element id |
| dBdx in | Basis gradients in element |
| grad in/out | Velocity and temperature gradients in element |
Compute gradients of quantities for an interior element
void tk:: MultiSpeciesViscousTermsP0P1:: interiorFlux(const std::vector<inciter:: EOS>& mat_blk,
std::size_t ncomp,
const std::array<std::vector<tk:: real>, 2>& state,
const std::array<std::vector<tk:: real>, 2>& cellAvgState,
const std::array<tk:: real, 3>& fn,
const std::array<std::array<tk:: real, 3>, 2>& centroid,
const std::array<std::array<std::array<tk:: real, 3>, 4>, 2>& grad,
std::vector<tk:: real>& fl) const
Compute the multispecies viscous flux at an interior face.
| Parameters | |
|---|---|
| mat_blk in | Material EOS block |
| ncomp in | Number of components in this system |
| state in | Left and right high-order face states |
| cellAvgState in | Left and right cell-average states |
| fn in | Face normal |
| centroid in | Left and right element centroids |
| grad in | Velocity and temperature gradients in left and right elements |
| fl in/out | Numerical viscous flux using the Modified Gradient approach |
The average gradient is modified according to Weiss et al. to obtain a stable discretization (average results in unstable central central difference). Ref: Weiss, J. M., Maruszewski, J. P., & Smith, W. A. (1999). Implicit solution of preconditioned Navier-Stokes equations using algebraic multigrid. AIAA journal, 37(1), 29-36.
void tk:: MultiSpeciesViscousTermsP0P1:: pup(PUP::er& p)
Pack/Unpack serialize member function.
| Parameters | |
|---|---|
| p in/out | Charm++'s PUP::er serializer object reference |
void tk:: MultiSpeciesViscousTermsP0P1:: operator|(PUP::er& p,
MultiSpeciesViscousTermsP0P1& v)
Pack/Unpack serialize operator|.
| Parameters | |
|---|---|
| p in/out | Charm++'s PUP::er serializer object reference |
| v in/out | Viscous terms object reference |