MAIA bb96820c
Multiphysics at AIA
|
#include <dgcartesiansyseqnacousticperturb.h>
Classes | |
struct | CV |
Public Member Functions | |
DgSysEqnAcousticPerturb (MInt solverId) | |
Constructor calls parent constructor & loads all necessary properties for this equation. More... | |
void | calcInitialCondition (const MFloat t, const MFloat *x, MFloat *const nodeVars, MFloat *u) const |
Calculate the initial condition for a certain point in space. More... | |
void | calcFlux (const MFloat *const nodeVars, const MFloat *const q, const MInt noNodes1D, MFloat *const flux) const |
Calculates the physical fluxes in all dimensions for all integrations points within a cell. More... | |
void | calcSource (const MFloat *const nodeVars, const MFloat *const u, const MInt noNodes1D, const MFloat t, const MFloat *const x, MFloat *const src) const |
Calculates the source terms for all integration points within a cell. More... | |
void | calcSpongeSource (const MFloat *nodeVars, const MFloat *u, const MInt noNodes1D, const MFloat *eta, MFloat *src) const |
Calculates the sponge source terms for all integration points within a cell. More... | |
MFloat | getTimeStep (const MFloat *nodeVars, const MFloat *const u, const MInt noNodes1D, const MFloat invJacobian, const MInt sbpMode) const |
Calculate the time step for an explicit time stepping scheme for a given element. More... | |
void | calcRiemann (const MFloat *nodeVarsL, const MFloat *nodeVarsR, const MFloat *stateL, const MFloat *stateR, const MInt noNodes1D, const MInt dirId, MFloat *flux) const |
Calculates the numerical flux at a surface given two states (left and right). More... | |
void | calcRiemannLaxFriedich (const MFloat *nodeVarsL, const MFloat *nodeVarsR, const MFloat *stateL, const MFloat *stateR, const MInt noNodes1D, const MInt dirId, MFloat *flux) const |
Calculate Riemann flux using the local Lax-Friedrichs flux scheme. More... | |
void | calcRiemannRoe (const MFloat *nodeVarsL, const MFloat *nodeVarsR, const MFloat *stateL, const MFloat *stateR, const MInt noNodes1D, const MInt dirId, MFloat *flux) const |
void | primToCons (const MFloat *prim, MFloat *cons) const |
Calculates a set of conservative variables from a set of primitive variables. More... | |
void | consToPrim (const MFloat *cons, MFloat *prim) const |
Calculates a set of primitive variables from a set of conservative variables. More... | |
void | getDefaultNodeVars (MFloat *const nodeVars) const |
Return the default node variables. More... | |
void | getDefaultNodeVarsBody (MFloat *const nodeVars) const |
Return the default node variables inside a body. More... | |
MBool | extendNodeVar (const MInt varId) const |
Return if the given node variable should be extended. More... | |
void | calcRiemannRoe (const MFloat *nodeVarsL, const MFloat *nodeVarsR, const MFloat *stateL, const MFloat *stateR, const MInt noNodes1D, const MInt dirId, MFloat *flux) const |
void | calcRiemannRoe (const MFloat *nodeVarsL, const MFloat *nodeVarsR, const MFloat *stateL, const MFloat *stateR, const MInt noNodes1D, const MInt dirId, MFloat *flux) const |
Public Member Functions inherited from DgSysEqn< nDim, DgSysEqnAcousticPerturb< nDim > > | |
MFloat | cfl () const |
MFloat | cflScaled (const MInt polyDeg) const |
Private Member Functions | |
void | calcFlux1D (const MFloat *const nodeVars, const MFloat *const q, const MInt noNodes1D, const MInt dirId, MFloat *const flux) const |
Calculates the physical fluxes in dimension dirId for all integrations points on an element face. More... | |
MFloat | cflFactor (const MInt polyDeg) const |
const MString | s_consVarNames [] |
const MString | s_primVarNames [] |
const MString | s_nodeVarNames [] |
const MString | s_consVarNames [] |
const MString | s_primVarNames [] |
const MString | s_nodeVarNames [] |
Private Attributes | |
std::array< MFloat, nDim > | m_meanVelocity |
MFloat | m_meanDensity |
MFloat | m_meanSpeedOfSound |
MBool | m_constantSpeedOfSound = false |
MFloat | m_spongePressureInfy |
MFloat | m_spongeSigma |
MBool | m_compressibleSourceTerm = true |
MString | m_dgIntegrationMethod |
MInt | m_dgTimeIntegrationScheme |
std::array< std::array< MFloat, s_maxPolyDeg+1 >, 2 > | m_cflFactor |
Static Private Attributes | |
static const MString | s_sysEqnName = "DG_SYSEQN_ACOUSTICPERTURB" |
static const MInt | s_noVariables = nDim + 1 |
static const MString | s_consVarNames [s_noVariables] |
static const MString | s_primVarNames [s_noVariables] |
static const MInt | s_noNodeVars = 2 * nDim + 2 |
static const MBool | s_hasTimeDependentNodeVars = false |
static const MString | s_nodeVarNames [s_noNodeVars] |
static const MInt | s_maxPolyDeg = 31 |
Friends | |
class | DgSysEqn< nDim, DgSysEqnAcousticPerturb > |
Additional Inherited Members | |
Static Public Member Functions inherited from DgSysEqn< nDim, DgSysEqnAcousticPerturb< nDim > > | |
static constexpr MInt | noVars () |
static constexpr MInt | noNodeVars () |
static constexpr MBool | hasTimeDependentNodeVars () |
static const MString & | sysEqnName () |
static const MString & | consVarNames (MInt i) |
static const MString & | primVarNames (MInt i) |
static const MString & | nodeVarNames (MInt i) |
Public Attributes inherited from DgSysEqn< nDim, DgSysEqnAcousticPerturb< nDim > > | |
MInt | m_initialCondition |
MFloat | m_initialNumberWaves |
MInt | m_sourceTerm |
MInt | m_riemannSolver |
Protected Member Functions inherited from DgSysEqn< nDim, DgSysEqnAcousticPerturb< nDim > > | |
DgSysEqn (MInt solverId) | |
Protected Attributes inherited from DgSysEqn< nDim, DgSysEqnAcousticPerturb< nDim > > | |
const MInt | m_solverId |
Definition at line 27 of file dgcartesiansyseqnacousticperturb.h.
|
explicit |
[in] | solverId | Current solver id. |
Definition at line 164 of file dgcartesiansyseqnacousticperturb.h.
void DgSysEqnAcousticPerturb< nDim >::calcFlux | ( | const MFloat *const | nodeVars, |
const MFloat *const | q, | ||
const MInt | noNodes1D, | ||
MFloat *const | flux | ||
) | const |
[in] | q | Pointer to solution variables (size: noNodes1D^nDim*noVars)). |
[in] | noNodes1D | Number of nodes 1D in the cell. |
[out] | flux | Calculated flux (size: noNodes1D^nDim*noVars*nDim)). |
Definition at line 827 of file dgcartesiansyseqnacousticperturb.h.
|
private |
[in] | q | Pointer to solution variables (size: noNodes1D^(nDim-1)*noVars)). |
[in] | noNodes1D | Number of nodes 1D in the cell. |
[in] | dirId | Orientation of the face (0 - x, 1 - y, 2 - z). |
[out] | flux | Calculated flux (size: noNodes1D^(nDim-1)*noVars)). |
Definition at line 896 of file dgcartesiansyseqnacousticperturb.h.
void DgSysEqnAcousticPerturb< nDim >::calcInitialCondition | ( | const MFloat | t, |
const MFloat * | x, | ||
MFloat *const | nodeVars, | ||
MFloat * | u | ||
) | const |
[in] | t | Time at which the initial condition should be applied. |
[in] | x | A pointer to the node coordinates. |
[out] | u | A pointer to the solution storage. |
Note: If you (for some reason) use nodeVariables information to calculate the initial condition for the conservative variables, you also must set the nodeVariables here, otherwise the calcErrorNorms() method of the DG solver procudes faulty results.
Definition at line 397 of file dgcartesiansyseqnacousticperturb.h.
void DgSysEqnAcousticPerturb< nDim >::calcRiemann | ( | const MFloat * | nodeVarsL, |
const MFloat * | nodeVarsR, | ||
const MFloat * | stateL, | ||
const MFloat * | stateR, | ||
const MInt | noNodes1D, | ||
const MInt | dirId, | ||
MFloat * | flux | ||
) | const |
[in] | nodeVarsL | Surface node variables on the left side of the surface (i.e. in -x/-y/-z-direction). |
[in] | nodeVarsR | Surface node variables on the right side of the surface (i.e. in +x/+y/+z-direction). |
[in] | stateL | Surface variables on the left side of the surface (i.e. in -x/-y/-z-direction). |
[in] | stateR | Surface variables on the right side of the surface (i.e. in +x/+y/+z-direction). |
[in] | noNodes1D | Number of nodes 1D. |
[in] | dirId | Direction (0 = x-direction, 1 = y-direction, 2 = z-direction). |
[out] | flux | Calculated Riemann flux (size: noNodes1D^(nDim-1)*noVars). |
Definition at line 1423 of file dgcartesiansyseqnacousticperturb.h.
void DgSysEqnAcousticPerturb< nDim >::calcRiemannLaxFriedich | ( | const MFloat * | nodeVarsL, |
const MFloat * | nodeVarsR, | ||
const MFloat * | stateL, | ||
const MFloat * | stateR, | ||
const MInt | noNodes1D, | ||
const MInt | dirId, | ||
MFloat * | flux | ||
) | const |
Note: for argument description, see calcRieman(...).
Definition at line 1461 of file dgcartesiansyseqnacousticperturb.h.
void DgSysEqnAcousticPerturb< nDim >::calcRiemannRoe | ( | const MFloat * | nodeVarsL, |
const MFloat * | nodeVarsR, | ||
const MFloat * | stateL, | ||
const MFloat * | stateR, | ||
const MInt | noNodes1D, | ||
const MInt | dirId, | ||
MFloat * | flux | ||
) | const |
|
inline |
Definition at line 1532 of file dgcartesiansyseqnacousticperturb.h.
|
inline |
Definition at line 1606 of file dgcartesiansyseqnacousticperturb.h.
void DgSysEqnAcousticPerturb< nDim >::calcSource | ( | const MFloat *const | nodeVars, |
const MFloat *const | u, | ||
const MInt | noNodes1D, | ||
const MFloat | t, | ||
const MFloat *const | x, | ||
MFloat *const | src | ||
) | const |
[in] | u | Pointer to solution variables (size: noNodes1D^nDim*noVars)). |
[in] | noNodes1D | in the cell. |
[in] | t | Current time. |
[in] | x | Coordinates of the integration points of the current cell. |
[out] | src | Pointer to where source terms are stored (size: noNodes1D^nDim*noVars)). |
Definition at line 978 of file dgcartesiansyseqnacousticperturb.h.
void DgSysEqnAcousticPerturb< nDim >::calcSpongeSource | ( | const MFloat * | nodeVars, |
const MFloat * | u, | ||
const MInt | noNodes1D, | ||
const MFloat * | eta, | ||
MFloat * | src | ||
) | const |
[in] | nodeVars | Pointer to node variables (size: noNodes1D^nDim*noNodeVars) |
[in] | u | Pointer to solution variables (size: noNodes1D^nDim*noVars)). |
[in] | noNodes1D | in the cell. |
[in] | eta | Pointer to eta used for the sponge calculations. |
[out] | src | Pointer to where source terms are stored (size: noNodes1D^nDim*noVars)). |
Definition at line 1328 of file dgcartesiansyseqnacousticperturb.h.
|
private |
Yield an empirically-derived maximum stable CFL number. The user should be able to specify a CFL number of "1.0" in virtually all cases.
[in] | polyDeg | Polynomial degree in the cell. |
[out] | cfl | factor obtained from m_cflFactor. |
Definition at line 942 of file dgcartesiansyseqnacousticperturb.h.
void DgSysEqnAcousticPerturb< nDim >::consToPrim | ( | const MFloat * | cons, |
MFloat * | prim | ||
) | const |
[in] | cons | Conservative variable storage (size: noVars). |
[out] | prim | Primitive variable storage (size: noVars). |
Definition at line 1686 of file dgcartesiansyseqnacousticperturb.h.
MBool DgSysEqnAcousticPerturb< nDim >::extendNodeVar | ( | const MInt | varId | ) | const |
Definition at line 1744 of file dgcartesiansyseqnacousticperturb.h.
void DgSysEqnAcousticPerturb< nDim >::getDefaultNodeVars | ( | MFloat *const | nodeVars | ) | const |
[out] | nodeVars | Contains the default node variables ordered by CV. |
Definition at line 1716 of file dgcartesiansyseqnacousticperturb.h.
void DgSysEqnAcousticPerturb< nDim >::getDefaultNodeVarsBody | ( | MFloat *const | nodeVars | ) | const |
Definition at line 1730 of file dgcartesiansyseqnacousticperturb.h.
MFloat DgSysEqnAcousticPerturb< nDim >::getTimeStep | ( | const MFloat * | nodeVars, |
const MFloat *const | u, | ||
const MInt | noNodes1D, | ||
const MFloat | invJacobian, | ||
const MInt | sbpMode | ||
) | const |
[in] | u | Pointer to element variables. |
[in] | noNodes1D | Current number of nodes 1D. |
[in] | invJacobian | Inverse Jacobian of element. |
Definition at line 1368 of file dgcartesiansyseqnacousticperturb.h.
void DgSysEqnAcousticPerturb< nDim >::primToCons | ( | const MFloat * | prim, |
MFloat * | cons | ||
) | const |
[in] | prim | Primitive variable storage (size: noVars). |
[out] | cons | Conservative variable storage (size: noVars). |
Definition at line 1703 of file dgcartesiansyseqnacousticperturb.h.
|
private |
Definition at line 10 of file dgcartesiansyseqnacousticperturb.cpp.
|
private |
Definition at line 16 of file dgcartesiansyseqnacousticperturb.cpp.
|
private |
Definition at line 14 of file dgcartesiansyseqnacousticperturb.cpp.
|
private |
Definition at line 20 of file dgcartesiansyseqnacousticperturb.cpp.
|
private |
Definition at line 12 of file dgcartesiansyseqnacousticperturb.cpp.
|
private |
Definition at line 18 of file dgcartesiansyseqnacousticperturb.cpp.
|
friend |
Definition at line 1744 of file dgcartesiansyseqnacousticperturb.h.
|
private |
Definition at line 85 of file dgcartesiansyseqnacousticperturb.h.
|
private |
Definition at line 81 of file dgcartesiansyseqnacousticperturb.h.
|
private |
Definition at line 78 of file dgcartesiansyseqnacousticperturb.h.
|
private |
Definition at line 82 of file dgcartesiansyseqnacousticperturb.h.
|
private |
Definition at line 83 of file dgcartesiansyseqnacousticperturb.h.
|
private |
Definition at line 76 of file dgcartesiansyseqnacousticperturb.h.
|
private |
Definition at line 77 of file dgcartesiansyseqnacousticperturb.h.
|
private |
Definition at line 75 of file dgcartesiansyseqnacousticperturb.h.
|
private |
Definition at line 79 of file dgcartesiansyseqnacousticperturb.h.
|
private |
Definition at line 80 of file dgcartesiansyseqnacousticperturb.h.
|
staticprivate |
Definition at line 67 of file dgcartesiansyseqnacousticperturb.h.
|
staticprivate |
Definition at line 72 of file dgcartesiansyseqnacousticperturb.h.
|
staticprivate |
Definition at line 84 of file dgcartesiansyseqnacousticperturb.h.
|
staticprivate |
Definition at line 73 of file dgcartesiansyseqnacousticperturb.h.
|
staticprivate |
Definition at line 71 of file dgcartesiansyseqnacousticperturb.h.
|
staticprivate |
Definition at line 66 of file dgcartesiansyseqnacousticperturb.h.
|
staticprivate |
Definition at line 68 of file dgcartesiansyseqnacousticperturb.h.
|
staticprivate |
Definition at line 64 of file dgcartesiansyseqnacousticperturb.h.