Class to solve the Inviscid compressible fluid flows (Euler equations) for perfect gas in 1-D. More...
Public Member Functions | |
ICPG1D (Mesh &ms) | |
Constructor using Mesh instance. | |
ICPG1D (Mesh &ms, Vect< real_t > &r, Vect< real_t > &v, Vect< real_t > &p) | |
Constructor using mesh and initial data. More... | |
~ICPG1D () | |
Destructor. | |
void | setReconstruction () |
Set reconstruction from class Muscl. | |
real_t | runOneTimeStep () |
Advance one time step. | |
void | Forward (const Vect< real_t > &flux, Vect< real_t > &field) |
Add flux to field. More... | |
void | setSolver (SolverType solver) |
Choose solver type. | |
void | setGamma (real_t gamma) |
Set value of constant Gamma for gases. | |
void | setCv (real_t Cv) |
Set value of Cv (specific heat at constant volume) | |
void | setCp (real_t Cp) |
Set value of Cp (specific heat at constant pressure) | |
void | setKappa (real_t Kappa) |
Set value of constant Kappa. | |
real_t | getGamma () const |
Return value of constant Gamma. | |
real_t | getCv () const |
Return value of Cv (specific heat at constant volume) | |
real_t | getCp () const |
Return value of Cp (specific heat at constant pressure) | |
real_t | getKappa () const |
Return value of constant Kappa. | |
void | getMomentum (Vect< real_t > &m) const |
Get vector of momentum at elements. More... | |
void | getInternalEnergy (Vect< real_t > &ie) const |
Get vector of internal energy at elements. More... | |
void | getTotalEnergy (Vect< real_t > &te) const |
Get vector of total energy at elements. More... | |
void | getSoundSpeed (Vect< real_t > &s) const |
Get vector of sound speed at elements. More... | |
void | getMach (Vect< real_t > &m) const |
Get vector of elementwise Mach number. More... | |
void | setInitialCondition_shock_tube (const LocalVect< real_t, 3 > &BcG, const LocalVect< real_t, 3 > &BcD, real_t x0) |
Initial condition corresponding to the shock tube. | |
void | setInitialCondition (const LocalVect< real_t, 3 > &u) |
A constant initial condition. More... | |
void | setBC (const Side &sd, real_t u) |
Assign a boundary condition as a constant to a given side. More... | |
void | setBC (int code, real_t a) |
Assign a boundary condition value. More... | |
void | setBC (real_t a) |
Assign a boundary condition value. More... | |
void | setBC (const Side &sd, const LocalVect< real_t, 3 > &u) |
Assign a Dirichlet boundary condition vector. More... | |
void | setBC (int code, const LocalVect< real_t, 3 > &U) |
Assign a Dirichlet boundary condition vector. More... | |
void | setBC (const LocalVect< real_t, 3 > &u) |
Assign a Dirichlet boundary condition vector. More... | |
void | setInOutflowBC (const Side &sd, const LocalVect< real_t, 3 > &u) |
Impose a constant inflow or outflow boundary condition on a given side. More... | |
void | setInOutflowBC (int code, const LocalVect< real_t, 3 > &u) |
Impose a constant inflow or outflow boundary condition on sides with a given code. More... | |
void | setInOutflowBC (const LocalVect< real_t, 3 > &u) |
Impose a constant inflow or outflow boundary condition on boundary sides. More... | |
Public Member Functions inherited from Muscl1D | |
Muscl1D (Mesh &m) | |
Constructor using mesh instance. | |
~Muscl1D () | |
Destructor. | |
real_t | getMeanLength () const |
Return mean length. | |
real_t | getMaximumLength () const |
Return maximal length. | |
real_t | getMinimumLength () const |
Return mimal length. | |
real_t | getTauLim () const |
Return mean length. | |
void | print_mesh_stat () |
Output mesh information. | |
Public Member Functions inherited from Muscl | |
Muscl (Mesh &m) | |
Constructor using mesh instance. | |
virtual | ~Muscl () |
Destructor. | |
void | setTimeStep (real_t dt) |
Assign time step value. More... | |
real_t | getTimeStep () const |
Return time step value. | |
void | setCFL (real_t CFL) |
Assign CFL value. More... | |
real_t | getCFL () const |
Return CFL value. | |
void | setReferenceLength (real_t dx) |
Assign reference length value. More... | |
real_t | getReferenceLength () const |
Return reference length. | |
Mesh & | getMesh () const |
Return reference to Mesh instance. | |
void | setVerbose (int v) |
Set verbosity parameter. More... | |
bool | setReconstruction (const Vect< real_t > &U, Vect< real_t > &LU, Vect< real_t > &RU, size_t dof) |
Function to reconstruct by the Muscl method. More... | |
void | setMethod (const Method &s) |
Choose a flux solver. More... | |
void | setSolidZoneCode (int c) |
Choose a code for solid zone. | |
bool | getSolidZone () const |
Return flag for presence of solid zones. | |
int | getSolidZoneCode () const |
Return code of solid zone, 0 if this one is not present. | |
void | setLimiter (Limiter l) |
Choose a flux limiter. More... | |
Additional Inherited Members | |
Public Types inherited from Muscl | |
enum | Method { FIRST_ORDER_METHOD = 0, MULTI_SLOPE_Q_METHOD = 1, MULTI_SLOPE_M_METHOD = 2 } |
Enumeration for flux choice. More... | |
enum | Limiter { MINMOD_LIMITER = 0, VANLEER_LIMITER = 1, SUPERBEE_LIMITER = 2, VANALBADA_LIMITER = 3, MAX_LIMITER = 4 } |
Enumeration of flux limiting methods. More... | |
enum | SolverType { ROE_SOLVER = 0, VFROE_SOLVER = 1, LF_SOLVER = 2, RUSANOV_SOLVER = 3, HLL_SOLVER = 4, HLLC_SOLVER = 5, MAX_SOLVER = 6 } |
Enumeration of various solvers for the Riemann problem. More... | |
Class to solve the Inviscid compressible fluid flows (Euler equations) for perfect gas in 1-D.
Solution method is a second-order MUSCL Finite Volume scheme
Constructor using mesh and initial data.
[in] | ms | Reference to Mesh instance |
[in] | r | Vector containing initial (elementwise) density |
[in] | v | Vector containing initial (elementwise) velocity |
[in] | p | Vector containing initial (elementwise) pressure |
Add flux to field.
If this function is used, the user must call getFlux himself
[in] | flux | Vector containing fluxes at sides (points) |
[out] | field | Vector containing solution vector |
Get vector of internal energy at elements.
[in,out] | ie | Vect instance that contains on output element internal energy |
Get vector of elementwise Mach number.
[in,out] | m | Vect instance that contains on output element Mach number |
Get vector of momentum at elements.
[in,out] | m | Vect instance that contains on output element momentum |
Get vector of sound speed at elements.
[in,out] | s | Vect instance that contains on output element sound speed |
Get vector of total energy at elements.
[in,out] | te | Vect instance that contains on output element total energy |
Assign a boundary condition as a constant to a given side.
[in] | sd | Side to which the value is assigned |
[in] | u | Value to assign |
void setBC | ( | int | code, |
real_t | a | ||
) |
Assign a boundary condition value.
[in] | code | Code value to which boundary condition is assigned |
[in] | a | Value to assign to sides that have code code |
void setBC | ( | real_t | a | ) |
Assign a boundary condition value.
[in] | a | Value to assign to all boundary sides |
Assign a Dirichlet boundary condition vector.
[in] | u | LocalVect instance that contains values to assign to all boundary sides |
A constant initial condition.
[in] | u | LocalVect instance containing density, velocity and pressure |
Impose a constant inflow or outflow boundary condition on sides with a given code.
[in] | code | Value of code for which the condition is prescribed |
[in] | u | LocalVect instance that contains values to assign to the sides |