Class to solve the Inviscid compressible fluid flows (Euler equations) for perfect gas in 2-D. More...
Inheritance diagram for ICPG2DT:
Public Types | |
| enum | Method { FIRST_ORDER_METHOD = 0, MULTI_SLOPE_Q_METHOD = 1, MULTI_SLOPE_M_METHOD = 2, M_FORCE_WORD = 0xFFFFFFFF } |
| Enumeration for flux choice. More... | |
| enum | Limiter { MINMOD_LIMITER = 0, VANLEER_LIMITER = 1, SUPERBEE_LIMITER = 2, VANALBADA_LIMITER = 3, MAX_LIMITER = 4, L_FORCE_WORD = 0xFFFFFFFF } |
| 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, FORCE_WORD = 0xFFFFFFFF } |
| Enumeration of various solvers for the Riemann problem. More... | |
Public Member Functions | |
| ICPG2DT (Mesh &ms) | |
| Constructor using mesh instance. | |
| ICPG2DT (Mesh &ms, Vect< double > &r, Vect< double > &v, Vect< double > &p) | |
| Constructor using mesh and initial data. | |
| ~ICPG2DT () | |
| Destructor. | |
| void | setReconstruction () |
| Reconstruct. | |
| double | runOneTimeStep () |
| Advance one time step. | |
| void | Forward (const Vect< double > &Flux, Vect< double > &Field) |
| Add Flux to Field. | |
| double | getFlux () |
| Get flux. | |
| void | setSolver (SolverType s) |
| Choose solver. | |
| void | setGamma (double gamma) |
| Set Gamma value. | |
| void | setCv (double Cv) |
| Set value of heat capacity at constant volume. | |
| void | setCp (double Cp) |
| Set value of heat capacity at constant pressure. | |
| void | setKappa (double Kappa) |
| Set Kappa value. | |
| double | getGamma () const |
| Return value of Gamma. | |
| double | getCv () const |
| Return value of heat capacity at constant volume. | |
| double | getCp () const |
| Return value of heat capacity at constant pressure. | |
| double | getKappa () const |
| Return value of Kappa. | |
| Mesh & | getMesh () |
| Return reference to mesh instance. | |
| void | getMomentum (Vect< double > &m) const |
| Calculate elementwise momentum. | |
| void | getInternalEnergy (Vect< double > &e) const |
| Calculate elementwise internal energy. | |
| void | getTotalEnergy (Vect< double > &e) const |
| Return elementwise total energy. | |
| void | getSoundSpeed (Vect< double > &s) const |
| Return elementwise sound speed. | |
| void | getMach (Vect< double > &m) const |
| Return elementwise Mach number. | |
| void | setBC (const Side &sd, double a) |
| Prescribe a constant boundary condition at given side. | |
| void | setBC (int code, double a) |
| Prescribe a constant boundary condition for a given code. | |
| void | setBC (double u) |
| Prescribe a constant boundary condition on all boundary sides. | |
| void | setBC (const Side &sd, const LocalVect< double, 4 > &u) |
| Prescribe a constant boundary condition at a given side. | |
| void | setBC (int code, const LocalVect< double, 4 > &u) |
| Prescribe a constant boundary condition for a given code. | |
| void | setBC (const LocalVect< double, 4 > &u) |
| Prescribe a constant boundary condition at all boundary sides. | |
| double | getR (size_t i) const |
| Return density at given element label. | |
| double | getV (size_t i, size_t j) const |
| double | getP (size_t i) const |
| Return pressure at given element label. | |
| void | setTimeStep (double dt) |
| Assign time step value. | |
| double | getTimeStep () const |
| Return time step value. | |
| void | setCFL (double CFL) |
| Assign CFL value. | |
| double | getCFL () const |
| Return CFL value. | |
| void | setReferenceLength (double dx) |
| Assign reference length value. | |
| double | getReferenceLength () const |
| Return reference length. | |
| Mesh & | getMesh () const |
| Return reference to Mesh instance. | |
| void | setVerbose (int v) |
| Set verbosity parameter. | |
| bool | setReconstruction (const Vect< double > &U, Vect< double > &LU, Vect< double > &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. | |
Protected Member Functions | |
| void | Initialize () |
| Construction of normals to sides. | |
Detailed Description
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
Member Enumeration Documentation
enum Method [inherited] |
enum Limiter [inherited] |
enum SolverType [inherited] |
Enumeration of various solvers for the Riemann problem.
Constructor & Destructor Documentation
Member Function Documentation
| void setReconstruction | ( | ) |
Reconstruct.
exit(3) if reconstruction fails
Add Flux to Field.
If this function is used, the function getFlux must be called
| void setSolver | ( | SolverType | s | ) |
Choose solver.
- Parameters:
-
[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
Prescribe a constant boundary condition at given side.
- Parameters:
-
[in] sd Reference to Side instance [in] a Value to prescribe
| void setBC | ( | int | code, |
| double | a | ||
| ) |
Prescribe a constant boundary condition for a given code.
- Parameters:
-
[in] code Code for which value is imposed [in] a Value to prescribe
| void setBC | ( | double | u | ) |
Prescribe a constant boundary condition on all boundary sides.
- Parameters:
-
[in] u Value to prescribe
Prescribe a constant boundary condition for a given code.
- Parameters:
-
[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)
Prescribe a constant boundary condition at all boundary sides.
- Parameters:
-
[in] u Vector (instance of class LocalVect) with as components the constant values to prescribe for the four fields (r, vx, vy, p)
| double getV | ( | size_t | i, |
| size_t | j | ||
| ) | const |
Return velocity at given element label
- Parameters:
-
[in] i Element label [in] j component index (1 or 2)
| double getP | ( | size_t | i | ) | const |
Return pressure at given element label.
- Parameters:
-
[in] i Element label
| void Initialize | ( | ) | [protected, inherited] |
Construction of normals to sides.
Convention: for a given side, getPtrElement(1) is the left element and getPtrElement(2) is the right element. The normal goes from left to right. For boundary sides, the normal points outward.
| void setTimeStep | ( | double | dt | ) | [inherited] |
| void setCFL | ( | double | CFL | ) | [inherited] |
| void setReferenceLength | ( | double | dx | ) | [inherited] |
| void setVerbose | ( | int | v | ) | [inherited] |
Set verbosity parameter.
- Parameters:
-
[in] v Value of verbosity parameter
| bool setReconstruction | ( | const Vect< double > & | U, |
| Vect< double > & | LU, | ||
| Vect< double > & | RU, | ||
| size_t | dof | ||
| ) | [inherited] |
Choose a flux solver.
- Parameters:
-
[in] s Solver to choose
| void setLimiter | ( | Limiter | l | ) | [inherited] |
Choose a flux limiter.
- Parameters:
-
[in] l Limiter to choose
- OFELI
- ICPG2DT