LifeV
|
NavierStokes Simulation class. More...
#include <navierStokes.hpp>
Data Structures | |
struct | Private |
struct | RESULT_CHANGED_EXCEPTION |
Public Types | |
typedef MeshType | mesh_Type |
typedef Problem | problem_Type |
typedef LifeV::FESpace< mesh_Type, LifeV::MapEpetra > | feSpace_Type |
typedef std::shared_ptr< feSpace_Type > | feSpacePtr_Type |
typedef LifeV::OseenSolver< mesh_Type > | fluid_Type |
typedef fluid_Type::vector_Type | vector_Type |
typedef std::shared_ptr< vector_Type > | vectorPtr_Type |
typedef fluid_Type::matrix_Type | matrix_Type |
typedef RegionMesh< LinearTetra > | mesh_Type |
typedef boost::shared_ptr< mesh_Type > | meshPtr_Type |
typedef FESpace< mesh_Type, MapEpetra > | feSpace_Type |
typedef boost::shared_ptr< feSpace_Type > | feSpacePtr_Type |
typedef OseenSolver< mesh_Type > | fluid_Type |
typedef VectorEpetra | vector_Type |
typedef boost::shared_ptr< vector_Type > | vectorPtr_Type |
typedef boost::shared_ptr< Exporter< mesh_Type > > | exporterPtr_Type |
Public Member Functions | |
NavierStokes (int argc, char **argv, boost::shared_ptr< Epetra_Comm > Comm, const std::string defaultDataName="data", const std::string outputName="result") | |
~NavierStokes () | |
void | run () |
Private Types | |
enum | TestType { None, Accuracy, SpaceConvergence } |
enum | InitializationType { Projection, Interpolation } |
enum | MeshSourceType { File, RegularMesh } |
Private Member Functions | |
void | computeErrors (const vector_Type &velocityAndPressureSolution, LifeV::Real &uL2Error, LifeV::Real &uRelError, feSpacePtr_Type &uFESpace, LifeV::Real &pL2Error, LifeV::Real &pRelError, feSpacePtr_Type &pFESpace, LifeV::Real time) |
Computes the L2 error and the relative L2 error with the exact solution. More... | |
bool | checkConvergenceRate (const std::vector< std::string > &uFELabels, const std::vector< std::vector< LifeV::Real > > &uL2Error, const std::vector< LifeV::UInt > &uConvergenceOrder, const std::vector< std::string > &pFELabels, const std::vector< std::vector< LifeV::Real > > pL2Error, const std::vector< LifeV::UInt > &pConvergenceOrder, const std::vector< LifeV::UInt > &meshDiscretizations, LifeV::Real convTolerance) |
Method to check the convergence rate of the solution. More... | |
Private Attributes | |
std::shared_ptr< Private > | M_data |
std::vector< LifeV::UInt > | M_meshDiscretization |
std::vector< std::string > | M_uFELabels |
std::vector< std::string > | M_pFELabels |
std::vector< LifeV::UInt > | M_uConvergenceOrder |
std::vector< LifeV::UInt > | M_pConvergenceOrder |
TestType | M_test |
LifeV::Real | M_convTol |
LifeV::Real | M_accuracyTol |
bool | M_exportNorms |
std::ofstream | M_outNorm |
bool | M_exportExactSolutions |
InitializationType | M_initMethod |
MeshSourceType | M_meshSource |
std::string | M_outputName |
boost::shared_ptr< Epetra_Comm > | M_comm |
boost::shared_ptr< GetPot > | M_dataFile |
std::string | M_outputFilename |
Constructors, destructor | |
NavierStokes (int argc, char **argv, const std::string defaultDataName="data", const std::string outputName="navierStokes") | |
Constructor. More... | |
~NavierStokes () | |
Destructor. More... | |
Methods | |
void | run () |
Launches the simulation. More... | |
NavierStokes Simulation class.
This class tests many settings, we propose here a list of the available options.
In the case of a space convergence test the following options are available
In the case of an accuracy test the following options are available
If the mesh source is a file, the file must be specified in
Definition at line 100 of file navierStokes.hpp.
Definition at line 103 of file navierStokes.hpp.
typedef Problem problem_Type |
Definition at line 104 of file navierStokes.hpp.
typedef LifeV::FESpace< mesh_Type, LifeV::MapEpetra > feSpace_Type |
Definition at line 105 of file navierStokes.hpp.
typedef std::shared_ptr<feSpace_Type> feSpacePtr_Type |
Definition at line 106 of file navierStokes.hpp.
typedef LifeV::OseenSolver< mesh_Type > fluid_Type |
Definition at line 107 of file navierStokes.hpp.
typedef fluid_Type::vector_Type vector_Type |
Definition at line 108 of file navierStokes.hpp.
typedef std::shared_ptr<vector_Type> vectorPtr_Type |
Definition at line 109 of file navierStokes.hpp.
typedef fluid_Type::matrix_Type matrix_Type |
Definition at line 110 of file navierStokes.hpp.
typedef RegionMesh<LinearTetra> mesh_Type |
Definition at line 58 of file navier_stokes.hpp.
typedef boost::shared_ptr<mesh_Type > meshPtr_Type |
Definition at line 60 of file navier_stokes.hpp.
typedef FESpace< mesh_Type, MapEpetra > feSpace_Type |
Definition at line 62 of file navier_stokes.hpp.
typedef boost::shared_ptr<feSpace_Type> feSpacePtr_Type |
Definition at line 64 of file navier_stokes.hpp.
typedef OseenSolver< mesh_Type > fluid_Type |
Definition at line 66 of file navier_stokes.hpp.
typedef VectorEpetra vector_Type |
Definition at line 68 of file navier_stokes.hpp.
typedef boost::shared_ptr<vector_Type> vectorPtr_Type |
Definition at line 70 of file navier_stokes.hpp.
typedef boost::shared_ptr< Exporter<mesh_Type > > exporterPtr_Type |
Definition at line 72 of file navier_stokes.hpp.
|
private |
Order of the BDF
Enumerator | |
---|---|
None | |
Accuracy | |
SpaceConvergence |
Definition at line 146 of file navierStokes.hpp.
|
private |
Type of initialization. "Interpolation" just interpolates the value of the exact solution to the DoFs. "Projection" solves an Oseen problem where alpha=0, the convective term is linearized by using the exact solution for beta, and the time derivative is passed to the right hand side and computed from the exact solution.
Enumerator | |
---|---|
Projection | |
Interpolation |
Definition at line 153 of file navierStokes.hpp.
|
private |
Type of mesh source. It can be a "File" or a "RegularMesh" which is generated during the simulation
Enumerator | |
---|---|
File | |
RegularMesh |
Definition at line 158 of file navierStokes.hpp.
NavierStokes | ( | int | argc, |
char ** | argv, | ||
const std::string | defaultDataName = "data" , |
||
const std::string | outputName = "navierStokes" |
||
) |
Constructor.
argc | number of parameter passed through the command line |
argv | char passed through the command line |
Definition at line 310 of file navierStokes.hpp.
|
inline |
Destructor.
Definition at line 127 of file navierStokes.hpp.
NavierStokes | ( | int | argc, |
char ** | argv, | ||
boost::shared_ptr< Epetra_Comm > | Comm, | ||
const std::string | defaultDataName = "data" , |
||
const std::string | outputName = "result" |
||
) |
|
inline |
Definition at line 80 of file navier_stokes.hpp.
void run | ( | ) |
Launches the simulation.
Definition at line 491 of file navierStokes.hpp.
|
private |
Computes the L2 error and the relative L2 error with the exact solution.
velocityAndPressureSolution | number of parameter passed through the command line |
uL2Error | Variable to store the L2 error for the veloctity |
uRelError | Variable to store the Relative L2 error for the velocity |
uFESpace | Variable to store the FE space for the velocity |
pL2Error | Variable to store the L2 error the pressure |
pRelError | Variable to store the Relative L2 error for the pressure |
pFESpace | Variable to store the FE space for the pressure |
time | Actual timestep of the simulation |
Definition at line 408 of file navierStokes.hpp.
|
private |
Method to check the convergence rate of the solution.
For each type of finite elements the method uses the computed errors obtained with the different meshes to check if the order of convergence follows the theory predictions
uFELabels | Vector containing the FE names for the velocity (e.g. P2, P1Bubble, P1) |
uL2Error | Vector containing the computed errors for the velocity |
uConvergenceOrder | Vector containing the convergence order corresponding to uFELabel |
pFELabels | Vector containing the FE names for the pressure (e.g. P2, P1Bubble, P1) |
pL2Error | Vector containing the computed errors for the pressure |
pConvergenceOrder | Vector containing the convergence order corresponding to pFELabel |
meshDiscretization | Vector containing the subdivisions values used to generate the meshes |
convTolerance | Tolerance for the test. The test is passed if (observed convergence)>convTolerance*(theory error prediction) |
Definition at line 428 of file navierStokes.hpp.
void run | ( | ) |
|
private |
Definition at line 208 of file navierStokes.hpp.
|
private |
Definition at line 211 of file navierStokes.hpp.
|
private |
Definition at line 212 of file navierStokes.hpp.
|
private |
Definition at line 213 of file navierStokes.hpp.
|
private |
Definition at line 214 of file navierStokes.hpp.
|
private |
Definition at line 215 of file navierStokes.hpp.
|
private |
Definition at line 218 of file navierStokes.hpp.
|
private |
Definition at line 219 of file navierStokes.hpp.
|
private |
Definition at line 224 of file navierStokes.hpp.
|
private |
Definition at line 227 of file navierStokes.hpp.
|
private |
Definition at line 228 of file navierStokes.hpp.
|
private |
Definition at line 231 of file navierStokes.hpp.
|
private |
Definition at line 234 of file navierStokes.hpp.
|
private |
Definition at line 237 of file navierStokes.hpp.
|
private |
Definition at line 240 of file navierStokes.hpp.
|
private |
Definition at line 86 of file navier_stokes.hpp.
|
private |
Definition at line 87 of file navier_stokes.hpp.
|
private |
Definition at line 88 of file navier_stokes.hpp.