Class to solve the Inviscid compressible fluid flows (Euler equations) for perfect gas in 1-D. More...
Inheritance diagram for ICPG1D:
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 | |
| ICPG1D (Mesh &ms) | |
| Constructor using Mesh instance. | |
| ICPG1D (Mesh &ms, Vect< double > &r, Vect< double > &v, Vect< double > &p) | |
| Constructor using mesh and initial data. | |
| ~ICPG1D () | |
| Destructor. | |
| void | setReconstruction () |
| Set reconstruction from class Muscl. | |
| double | runOneTimeStep () |
| Advance one time step. | |
| void | Forward (const Vect< double > &flux, Vect< double > &field) |
| Add flux to field. | |
| void | setSolver (SolverType solver) |
| Choose solver type. | |
| void | setGamma (double gamma) |
| Set value of constant Gamma for gases. | |
| void | setCv (double Cv) |
| Set value of Cv (specific heat at constant volume) | |
| void | setCp (double Cp) |
| Set value of Cp (specific heat at constant pressure) | |
| void | setKappa (double Kappa) |
| Set value of constant Kappa. | |
| double | getGamma () const |
| Return value of constnant Gamma. | |
| double | getCv () const |
| Return value of Cv (specific heat at constant volume) | |
| double | getCp () const |
| Return value of Cp (specific heat at constant pressure) | |
| double | getKappa () const |
| Return value of constant Kappa. | |
| void | getMomentum (Vect< double > &m) const |
| Get vector of momentum at elements. | |
| void | getInternalEnergy (Vect< double > &ie) const |
| Get vector of internal energy at elements. | |
| void | getTotalEnergy (Vect< double > &te) const |
| Get vector of total energy at elements. | |
| void | getSoundSpeed (Vect< double > &s) const |
| Get vector of sound speed at elements. | |
| void | getMach (Vect< double > &m) const |
| Get vector of elementwise Mach number. | |
| void | setInitialCondition_shock_tube (const LocalVect< double, 3 > &BcG, const LocalVect< double, 3 > &BcD, double x0) |
| Initial condition corresponding to the shock tube. | |
| void | setInitialCondition (const LocalVect< double, 3 > &u) |
| A constant initial condition. | |
| void | setBC (const Side &sd, double u) |
| Assign a boundary condition as a constant to a given side. | |
| void | setBC (int code, double a) |
| Assign a boundary condition value. | |
| void | setBC (double a) |
| Assign a boundary condition value. | |
| void | setBC (const Side &sd, const LocalVect< double, 3 > &u) |
| Assign a Dirichlet boundary condition vector. | |
| void | setBC (int code, const LocalVect< double, 3 > &U) |
| Assign a Dirichlet boundary condition vector. | |
| void | setBC (const LocalVect< double, 3 > &u) |
| Assign a Dirichlet boundary condition vector. | |
| void | setInOutflowBC (const Side &sd, const LocalVect< double, 3 > &u) |
| Impose a constant inflow or outflow boundary condition on a given side. | |
| void | setInOutflowBC (int code, const LocalVect< double, 3 > &u) |
| Impose a constant inflow or outflow boundary condition on sides with a given code. | |
| void | setInOutflowBC (const LocalVect< double, 3 > &u) |
| Impose a constant inflow or outflow boundary condition on boundary sides. | |
| double | getMeanLength () const |
| Return mean length. | |
| double | getMaximumLength () const |
| Return maximal length. | |
| double | getMinimumLength () const |
| Return mimal length. | |
| double | getTauLim () const |
| Return mean length. | |
| void | print_mesh_stat () |
| Output mesh information. | |
| 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. | |
Detailed Description
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
Member Enumeration Documentation
enum Method [inherited] |
enum Limiter [inherited] |
enum SolverType [inherited] |
Enumeration of various solvers for the Riemann problem.
Constructor & Destructor Documentation
Constructor using mesh and initial data.
- Parameters:
-
[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
Member Function Documentation
Add flux to field.
If this function is used, the user must call getFlux himself
- Parameters:
-
[in] flux Vector containing fluxes at sides (points) [out] field Vector containing solution vector
| void getMomentum | ( | Vect< double > & | m | ) | const |
Get vector of momentum at elements.
- Parameters:
-
[in,out] m Vect instance that contains on output element momentum
| void getInternalEnergy | ( | Vect< double > & | ie | ) | const |
Get vector of internal energy at elements.
- Parameters:
-
[in,out] ie Vect instance that contains on output element internal energy
| void getTotalEnergy | ( | Vect< double > & | te | ) | const |
Get vector of total energy at elements.
- Parameters:
-
[in,out] te Vect instance that contains on output element total energy
| void getSoundSpeed | ( | Vect< double > & | s | ) | const |
Get vector of sound speed at elements.
- Parameters:
-
[in,out] s Vect instance that contains on output element sound speed
Get vector of elementwise Mach number.
- Parameters:
-
[in,out] m Vect instance that contains on output element Mach number
| void setInitialCondition | ( | const LocalVect< double, 3 > & | u | ) |
A constant initial condition.
- Parameters:
-
[in] u LocalVect instance containing density, velocity and pressure
Assign a boundary condition as a constant to a given side.
- Parameters:
-
[in] sd Side to which the value is assigned [in] u Value to assign
| void setBC | ( | int | code, |
| double | a | ||
| ) |
Assign a boundary condition value.
- Parameters:
-
[in] code Code value to which boundary condition is assigned [in] a Value to assign to sides that have code code
| void setBC | ( | double | a | ) |
Assign a boundary condition value.
- Parameters:
-
[in] a Value to assign to all boundary sides
Assign a Dirichlet boundary condition vector.
- Parameters:
-
[in] u LocalVect instance that contains values to assign to all boundary sides
| void setInOutflowBC | ( | const Side & | sd, |
| const LocalVect< double, 3 > & | u | ||
| ) |
| void setInOutflowBC | ( | int | code, |
| const LocalVect< double, 3 > & | u | ||
| ) |
Impose a constant inflow or outflow boundary condition on sides with a given code.
- Parameters:
-
[in] code Value of code for which the condition is prescribed [in] u LocalVect instance that contains values to assign to the sides
| void setInOutflowBC | ( | const LocalVect< double, 3 > & | u | ) |
Impose a constant inflow or outflow boundary condition on boundary sides.
- Parameters:
-
[in] u LocalVect instance that contains values to assign to the sides
| 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
- ICPG1D