Class to solve the Inviscid compressible fluid flows (Euler equations) for perfect gas in 2-D. More...
#include <ICPG2DT.h>
Public Member Functions | |
| ICPG2DT (Mesh &ms) | |
| Constructor using mesh instance. | |
| ICPG2DT (Mesh &ms, Vect< real_t > &r, Vect< real_t > &v, Vect< real_t > &p) | |
| Constructor using mesh and initial data. | |
| ~ICPG2DT () | |
| Destructor. | |
| void | setReconstruction () |
| Reconstruct. | |
| real_t | runOneTimeStep () |
| Advance one time step. | |
| void | Forward (const Vect< real_t > &Flux, Vect< real_t > &Field) |
| Add Flux to Field. | |
| real_t | getFlux () |
| Get flux. | |
| void | setSolver (SolverType s) |
| Choose solver. | |
| void | setGamma (real_t gamma) |
| Set Gamma value. | |
| void | setCv (real_t Cv) |
| Set value of heat capacity at constant volume. | |
| void | setCp (real_t Cp) |
| Set value of heat capacity at constant pressure. | |
| void | setKappa (real_t Kappa) |
| Set Kappa value. | |
| real_t | getGamma () const |
| Return value of Gamma. | |
| real_t | getCv () const |
| Return value of heat capacity at constant volume. | |
| real_t | getCp () const |
| Return value of heat capacity at constant pressure. | |
| real_t | getKappa () const |
| Return value of Kappa. | |
| Mesh & | getMesh () |
| Return reference to mesh instance. | |
| void | getMomentum (Vect< real_t > &m) const |
| Calculate elementwise momentum. | |
| void | getInternalEnergy (Vect< real_t > &e) const |
| Calculate elementwise internal energy. | |
| void | getTotalEnergy (Vect< real_t > &e) const |
| Return elementwise total energy. | |
| void | getSoundSpeed (Vect< real_t > &s) const |
| Return elementwise sound speed. | |
| void | getMach (Vect< real_t > &m) const |
| Return elementwise Mach number. | |
| void | setInitialConditionShockTube (const LocalVect< real_t, 4 > &BcL, const LocalVect< real_t, 4 > &BcR, real_t x0) |
| Set initial condition for the schock tube problem. | |
| void | setInitialCondition (const LocalVect< real_t, 4 > &u) |
| Set initial condition. | |
| void | setBC (const Side &sd, real_t a) |
| Prescribe a constant boundary condition at given side. | |
| void | setBC (int code, real_t a) |
| Prescribe a constant boundary condition for a given code. | |
| void | setBC (real_t u) |
| Prescribe a constant boundary condition on all boundary sides. | |
| void | setBC (const Side &sd, const LocalVect< real_t, 4 > &u) |
| Prescribe a constant boundary condition at a given side. | |
| void | setBC (int code, const LocalVect< real_t, 4 > &u) |
| Prescribe a constant boundary condition for a given code. | |
| void | setBC (const LocalVect< real_t, 4 > &u) |
| Prescribe a constant boundary condition at all boundary sides. | |
| real_t | getR (size_t i) const |
| Return density at given element label. | |
| real_t | getV (size_t i, size_t j) const |
| real_t | getP (size_t i) const |
| Return pressure at given element label. | |
Public Member Functions inherited from Muscl2DT | |
| Muscl2DT (Mesh &m) | |
| Constructor using mesh. | |
| ~Muscl2DT () | |
| Destructor. | |
| 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. | |
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. | |
| real_t | getTimeStep () const |
| Return time step value. | |
| void | setCFL (real_t CFL) |
| Assign CFL value. | |
| real_t | getCFL () const |
| Return CFL value. | |
| void | setReferenceLength (real_t dx) |
| Assign reference length value. | |
| real_t | getReferenceLength () const |
| Return reference length. | |
| Mesh & | getMesh () const |
| Return reference to Mesh instance. | |
| void | setVerbose (int v) |
| Set verbosity parameter. | |
| 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. | |
| void | setMethod (const Method &s) |
| Choose a flux solver. | |
| 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. | |
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... | |
Protected Member Functions inherited from Muscl2DT | |
| void | Initialize () |
| Construction of normals to sides. | |
Class to solve the Inviscid compressible fluid flows (Euler equations) for perfect gas in 2-D.
Solution method is a second-order MUSCL Finite Volume scheme on triangles
Add Flux to Field.
If this function is used, the function getFlux must be called
| real_t getP | ( | size_t | i | ) | const |
Return pressure at given element label.
| [in] | i | Element label |
| real_t getR | ( | size_t | i | ) | const |
Return density at given element label.
| [in] | i | Element label |
| real_t getV | ( | size_t | i, |
| size_t | j ) const |
Return velocity at given element label
| [in] | i | Element label |
| [in] | j | component index (1 or 2) |
| void setBC | ( | const LocalVect< real_t, 4 > & | u | ) |
Prescribe a constant boundary condition at all boundary sides.
| [in] | u | Vector (instance of class LocalVect) with as components the constant values to prescribe for the four fields (r, vx, vy, p) |
| void setBC | ( | const Side & | sd, |
| real_t | a ) |
Prescribe a constant boundary condition at given side.
| [in] | sd | Reference to Side instance |
| [in] | a | Value to prescribe |
| void setBC | ( | int | code, |
| const LocalVect< real_t, 4 > & | u ) |
Prescribe a constant boundary condition for a given code.
| [in] | code | Code for which value is imposed |
| [in] | u | Vector (instance of class LocalVect) with as components the constant values to prescribe for the four fields (r, vx, vy, p) |
| void setBC | ( | int | code, |
| real_t | a ) |
Prescribe a constant boundary condition for a given code.
| [in] | code | Code for which value is imposed |
| [in] | a | Value to prescribe |
| void setBC | ( | real_t | u | ) |
Prescribe a constant boundary condition on all boundary sides.
| [in] | u | Value to prescribe |
| void setReconstruction | ( | ) |
Reconstruct.
exit(3) if reconstruction fails
| void setSolver | ( | SolverType | s | ) |
Choose solver.
| [in] | s | Index of solver in the enumerated variable SolverType Available values are: ROE_SOLVER, VFROE_SOLVER, LF_SOLVER, RUSANOV_SOLVER, HLL_SOLVER, HLLC_SOLVER, MAX_SOLVER |