LifeV
|
MultiscaleModelFluid3D - Multiscale model for 3D Fluid simulations. More...
#include <MultiscaleModelFluid3D.hpp>
Private Attributes | |
IOFilePtr_Type | M_exporter |
IOFilePtr_Type | M_importer |
std::string | M_fileName |
std::shared_ptr< fluid_Type > | M_fluid |
bcInterfacePtr_Type | M_bc |
std::shared_ptr< bdf_Type > | M_bdf |
std::shared_ptr< data_Type > | M_data |
std::shared_ptr< MeshData > | M_meshData |
std::shared_ptr< MeshPartitioner_Type > | M_mesh |
std::shared_ptr< MapEpetra > | M_map |
fluidVectorPtr_Type | M_solution |
bcPtr_Type | M_linearBC |
bool | M_updateLinearModel |
FESpacePtr_Type | M_uFESpace |
FESpacePtr_Type | M_pFESpace |
UInt | M_lmDOF |
Real | M_alpha |
fluidVectorPtr_Type | M_beta |
fluidVectorPtr_Type | M_rhs |
UInt | M_subiterationsMaximumNumber |
Real | M_tolerance |
NonLinearAitken< fluidVector_Type > | M_generalizedAitken |
Public Types | |
typedef RegionMesh< LinearTetra > | mesh_Type |
typedef MeshPartitioner< mesh_Type > | MeshPartitioner_Type |
typedef OseenSolverShapeDerivative< mesh_Type > | fluid_Type |
typedef fluid_Type::vector_Type | fluidVector_Type |
typedef std::shared_ptr< fluidVector_Type > | fluidVectorPtr_Type |
typedef Exporter< mesh_Type > | IOFile_Type |
typedef std::shared_ptr< IOFile_Type > | IOFilePtr_Type |
typedef ExporterData< mesh_Type > | IOData_Type |
typedef ExporterEnsight< mesh_Type > | ensightIOFile_Type |
typedef ExporterHDF5< mesh_Type > | hdf5IOFile_Type |
typedef BCHandler | bc_Type |
typedef std::shared_ptr< bc_Type > | bcPtr_Type |
typedef BCInterface3D< bc_Type, fluid_Type > | bcInterface_Type |
typedef std::shared_ptr< bcInterface_Type > | bcInterfacePtr_Type |
typedef TimeAdvanceBDFNavierStokes< fluidVector_Type > | bdf_Type |
typedef OseenData | data_Type |
typedef FESpace< mesh_Type, MapEpetra > | FESpace_Type |
typedef std::shared_ptr< FESpace_Type > | FESpacePtr_Type |
Constructors & Destructor | |
MultiscaleModelFluid3D () | |
Constructor. More... | |
virtual | ~MultiscaleModelFluid3D () |
Destructor. More... | |
MultiscaleModel Methods | |
void | setupData (const std::string &fileName) |
Setup the data of the model. More... | |
void | setupModel () |
Setup the model. More... | |
void | buildModel () |
Build the initial model. More... | |
void | updateModel () |
Update the model. More... | |
void | solveModel () |
Solve the model. More... | |
void | updateSolution () |
Update the solution. More... | |
void | saveSolution () |
Save the solution. More... | |
void | showMe () |
Display some information about the model. More... | |
Real | checkSolution () const |
Return a specific scalar quantity to be used for a comparison with a reference value. More... | |
MultiscaleInterface Methods | |
void | imposeBoundaryFlowRate (const multiscaleID_Type &boundaryID, const function_Type &function) |
Impose the flow rate on a specific interface of the model. More... | |
void | imposeBoundaryMeanNormalStress (const multiscaleID_Type &boundaryID, const function_Type &function) |
Impose the integral of the mean normal stress on a specific boundary interface of the model. More... | |
void | imposeBoundaryMeanTotalNormalStress (const multiscaleID_Type &, const function_Type &) |
Impose the integral of the mean total normal stress on a specific boundary interface of the model. More... | |
void | imposeBoundaryArea (const multiscaleID_Type &, const function_Type &) |
Impose the area on a specific boundary interface of the model. More... | |
Real | boundaryFlowRate (const multiscaleID_Type &boundaryID) const |
Get the flow rate on a specific boundary interface of the model. More... | |
Real | boundaryMeanNormalStress (const multiscaleID_Type &boundaryID) const |
Get the integral of the mean normal stress on a specific boundary interface of the model. More... | |
Real | boundaryMeanTotalNormalStress (const multiscaleID_Type &boundaryID) const |
Get the integral of the mean total normal stress on a specific boundary interface of the model. More... | |
Real | boundaryArea (const multiscaleID_Type &boundaryID) const |
Get the area on a specific boundary interface of the model. More... | |
Real | boundaryDeltaFlowRate (const multiscaleID_Type &boundaryID, bool &solveLinearSystem) |
Get the variation of the flow rate (on a specific boundary interface) using the linear model. More... | |
Real | boundaryDeltaMeanNormalStress (const multiscaleID_Type &boundaryID, bool &solveLinearSystem) |
Get the variation of the integral of the mean normal stress (on a specific boundary interface) using the linear model. More... | |
Real | boundaryDeltaMeanTotalNormalStress (const multiscaleID_Type &boundaryID, bool &solveLinearSystem) |
Get the variation of the integral of the mean total normal stress (on a specific boundary interface) using the linear model. More... | |
Real | boundaryDeltaArea (const multiscaleID_Type &, bool &) |
Get the variation of the integral of the area (on a specific boundary interface) using the linear model. More... | |
Set Methods | |
void | setSolution (const fluidVectorPtr_Type &solution) |
Set the solution vector. More... | |
Get Methods | |
bcInterface_Type & | bcInterface () |
Get the BCInterface container of the boundary conditions of the model. More... | |
Real | boundaryDensity () const |
Get the density on a specific boundary face of the model. More... | |
Real | boundaryViscosity () const |
Get the viscosity on a specific boundary face of the model. More... | |
Real | boundaryPressure (const multiscaleID_Type &boundaryID) const |
Get the integral of the pressure (on a specific boundary face) More... | |
Real | boundaryTotalPressure (const multiscaleID_Type &boundaryID) const |
Get the integral of the total pressure (on a specific boundary face) More... | |
const data_Type & | data () const |
Get the data container. More... | |
const fluidVector_Type & | solution () const |
Get the solution vector. More... | |
Unimplemented Methods | |
MultiscaleModelFluid3D (const MultiscaleModelFluid3D &model) | |
MultiscaleModelFluid3D & | operator= (const MultiscaleModelFluid3D &model) |
Private Methods | |
void | setupGlobalData (const std::string &fileName) |
Setup the global data of the model. More... | |
void | initializeSolution () |
Initialize the solution. More... | |
void | setupExporterImporter (const std::string &fileName) |
Setup the exporter and the importer. More... | |
void | setupMesh () |
Setup the mesh for the fluid problem. More... | |
void | setupFEspace () |
Setup the FE space for pressure and velocity. More... | |
void | setupDOF () |
Setup the DOF of the model. More... | |
void | setupBCOffset (const bcPtr_Type &BC) |
Setup the offset for fluxes boundary conditions. More... | |
void | setupLinearModel () |
Setup the linear model. More... | |
void | updateLinearModel () |
Update the linear system matrix and vectors. More... | |
void | solveLinearModel (bool &solveLinearSystem) |
Solve the linear problem. More... | |
void | imposePerturbation () |
Impose the coupling perturbation on the correct BC inside the BCHandler. More... | |
void | resetPerturbation () |
Reset all the coupling perturbations imposed on the BCHandler. More... | |
Real | bcFunctionDeltaZero (const Real &, const Real &, const Real &, const Real &, const UInt &) |
Real | bcFunctionDeltaOne (const Real &, const Real &, const Real &, const Real &, const UInt &) |
Additional Inherited Members | |
Public Types inherited from MultiscaleInterface | |
typedef std::function< Real(const Real &, const Real &, const Real &, const Real &, const ID &) > | function_Type |
Public Member Functions inherited from MultiscaleModel | |
MultiscaleModel () | |
The main constructor. More... | |
virtual | ~MultiscaleModel () |
Destructor. More... | |
void | clearCouplingsList () |
Clear the list of pointers to the couplings. More... | |
void | setID (const UInt &id) |
Set the global ID of the model. More... | |
void | setCouplingsNumber (const UInt &couplingsNumber) |
Set the number of couplings attached to this model. More... | |
void | setCoupling (const UInt &localCouplingID, const multiscaleCouplingPtr_Type &coupling) |
Add a pointer to one of the couplings attached to this model. More... | |
void | addCoupling (const multiscaleCouplingPtr_Type &coupling) |
Add a pointer to one of the couplings which couple the model. More... | |
void | setGlobalData (const multiscaleDataPtr_Type &globalData) |
Setup the global data of the model. More... | |
void | setGeometry (const std::array< Real, NDIM > &scale, const std::array< Real, NDIM > &rotate, const std::array< Real, NDIM > &translate) |
Scale, rotate and translate the Model in the 3D space. More... | |
void | setCommunicator (const multiscaleCommPtr_Type &comm) |
Set the epetra communicator for the model. More... | |
const UInt & | ID () const |
Get the global ID of the model. More... | |
const models_Type & | type () const |
Get the type of the model. More... | |
const multiscaleID_Type & | boundaryFlag (const multiscaleID_Type &boundaryID) const |
Get one available flag by id. More... | |
const std::string & | modelName () const |
Get the name of the model. More... | |
UInt | couplingsNumber () const |
Get the number of couplings connecting the model. More... | |
UInt | couplingLocalID (const UInt &ID) const |
Get the coupling local ID through global ID. More... | |
multiscaleCouplingPtr_Type | coupling (const UInt &localID) const |
Get the coupling through local ID. More... | |
const multiscaleDataPtr_Type & | globalData () const |
Get the global data of the model. More... | |
const multiscaleCommPtr_Type & | communicator () const |
Get the communicator of the model. More... | |
Public Member Functions inherited from MultiscaleInterface | |
MultiscaleInterface () | |
The main constructor. More... | |
virtual | ~MultiscaleInterface () |
Destructor. More... | |
Protected Member Functions inherited from MultiscaleModel | |
void | displayModelStatus (const std::string &tag) const |
Display model ID and name with a user provided tag. More... | |
Protected Attributes inherited from MultiscaleModel | |
UInt | M_ID |
models_Type | M_type |
multiscaleCouplingsContainer_Type | M_couplings |
std::string | M_modelName |
multiscaleIDContainer_Type | M_boundaryFlags |
multiscaleDataPtr_Type | M_globalData |
std::array< Real, NDIM > | M_geometryScale |
std::array< Real, NDIM > | M_geometryRotate |
std::array< Real, NDIM > | M_geometryTranslate |
multiscaleCommPtr_Type | M_comm |
MultiscaleModelFluid3D - Multiscale model for 3D Fluid simulations.
The MultiscaleModelFluid3D class is an implementation of the multiscaleModel_Type for 3D Fluid problem (in particular Oseen with Shape Derivatives).
Definition at line 80 of file MultiscaleModelFluid3D.hpp.
typedef RegionMesh< LinearTetra > mesh_Type |
Definition at line 88 of file MultiscaleModelFluid3D.hpp.
typedef MeshPartitioner< mesh_Type > MeshPartitioner_Type |
Definition at line 89 of file MultiscaleModelFluid3D.hpp.
typedef OseenSolverShapeDerivative< mesh_Type > fluid_Type |
Definition at line 92 of file MultiscaleModelFluid3D.hpp.
Definition at line 93 of file MultiscaleModelFluid3D.hpp.
typedef std::shared_ptr< fluidVector_Type > fluidVectorPtr_Type |
Definition at line 94 of file MultiscaleModelFluid3D.hpp.
typedef Exporter< mesh_Type > IOFile_Type |
Definition at line 96 of file MultiscaleModelFluid3D.hpp.
typedef std::shared_ptr< IOFile_Type > IOFilePtr_Type |
Definition at line 97 of file MultiscaleModelFluid3D.hpp.
typedef ExporterData< mesh_Type > IOData_Type |
Definition at line 98 of file MultiscaleModelFluid3D.hpp.
typedef ExporterEnsight< mesh_Type > ensightIOFile_Type |
Definition at line 100 of file MultiscaleModelFluid3D.hpp.
typedef ExporterHDF5< mesh_Type > hdf5IOFile_Type |
Definition at line 102 of file MultiscaleModelFluid3D.hpp.
Definition at line 105 of file MultiscaleModelFluid3D.hpp.
typedef std::shared_ptr< bc_Type > bcPtr_Type |
Definition at line 106 of file MultiscaleModelFluid3D.hpp.
typedef BCInterface3D< bc_Type, fluid_Type > bcInterface_Type |
Definition at line 107 of file MultiscaleModelFluid3D.hpp.
typedef std::shared_ptr< bcInterface_Type > bcInterfacePtr_Type |
Definition at line 108 of file MultiscaleModelFluid3D.hpp.
typedef TimeAdvanceBDFNavierStokes< fluidVector_Type > bdf_Type |
Definition at line 110 of file MultiscaleModelFluid3D.hpp.
Definition at line 111 of file MultiscaleModelFluid3D.hpp.
typedef FESpace< mesh_Type, MapEpetra > FESpace_Type |
Definition at line 113 of file MultiscaleModelFluid3D.hpp.
typedef std::shared_ptr< FESpace_Type > FESpacePtr_Type |
Definition at line 114 of file MultiscaleModelFluid3D.hpp.
|
explicit |
Constructor.
Definition at line 47 of file MultiscaleModelFluid3D.cpp.
|
inlinevirtual |
Destructor.
Definition at line 126 of file MultiscaleModelFluid3D.hpp.
|
private |
|
virtual |
Setup the data of the model.
fileName | Name of data file. |
Reimplemented from MultiscaleModel.
Definition at line 85 of file MultiscaleModelFluid3D.cpp.
|
virtual |
Setup the model.
Implements MultiscaleModel.
Definition at line 125 of file MultiscaleModelFluid3D.cpp.
|
virtual |
Build the initial model.
Implements MultiscaleModel.
Definition at line 180 of file MultiscaleModelFluid3D.cpp.
|
virtual |
Update the model.
Implements MultiscaleModel.
Definition at line 221 of file MultiscaleModelFluid3D.cpp.
|
virtual |
Solve the model.
Implements MultiscaleModel.
Definition at line 252 of file MultiscaleModelFluid3D.cpp.
|
virtual |
Update the solution.
Implements MultiscaleModel.
Definition at line 306 of file MultiscaleModelFluid3D.cpp.
|
virtual |
Save the solution.
Implements MultiscaleModel.
Definition at line 317 of file MultiscaleModelFluid3D.cpp.
|
virtual |
Display some information about the model.
Reimplemented from MultiscaleModel.
Definition at line 337 of file MultiscaleModelFluid3D.cpp.
|
virtual |
Return a specific scalar quantity to be used for a comparison with a reference value.
This method is meant to be used for night checks.
Implements MultiscaleModel.
Definition at line 359 of file MultiscaleModelFluid3D.cpp.
|
virtual |
Impose the flow rate on a specific interface of the model.
boundaryID | ID of the boundary interface |
function | boundary condition function |
Implements MultiscaleInterface.
Definition at line 368 of file MultiscaleModelFluid3D.cpp.
|
virtual |
Impose the integral of the mean normal stress on a specific boundary interface of the model.
boundaryID | ID of the boundary interface |
function | boundary condition function |
Implements MultiscaleInterface.
Definition at line 377 of file MultiscaleModelFluid3D.cpp.
|
inlinevirtual |
Impose the integral of the mean total normal stress on a specific boundary interface of the model.
Note: mean total normal stress cannot be imposed at the interfaces of this model.
boundaryID | ID of the boundary interface |
function | boundary condition function |
Implements MultiscaleInterface.
Definition at line 195 of file MultiscaleModelFluid3D.hpp.
|
inlinevirtual |
Impose the area on a specific boundary interface of the model.
Note: area cannot be imposed at the interfaces of this model.
boundaryID | ID of the boundary interface |
function | boundary condition function |
Implements MultiscaleInterface.
Definition at line 207 of file MultiscaleModelFluid3D.hpp.
|
inlinevirtual |
Get the flow rate on a specific boundary interface of the model.
boundaryID | ID of the boundary interface |
Implements MultiscaleInterface.
Definition at line 217 of file MultiscaleModelFluid3D.hpp.
|
inlinevirtual |
Get the integral of the mean normal stress on a specific boundary interface of the model.
boundaryID | ID of the boundary interface |
Implements MultiscaleInterface.
Definition at line 227 of file MultiscaleModelFluid3D.hpp.
|
inlinevirtual |
Get the integral of the mean total normal stress on a specific boundary interface of the model.
boundaryID | ID of the boundary interface |
Implements MultiscaleInterface.
Definition at line 237 of file MultiscaleModelFluid3D.hpp.
|
inlinevirtual |
Get the area on a specific boundary interface of the model.
boundaryID | ID of the boundary interface |
Implements MultiscaleInterface.
Definition at line 247 of file MultiscaleModelFluid3D.hpp.
|
virtual |
Get the variation of the flow rate (on a specific boundary interface) using the linear model.
boundaryID | ID of the boundary interface |
solveLinearSystem | a flag to which determine if the linear system has to be solved |
Implements MultiscaleInterface.
Definition at line 386 of file MultiscaleModelFluid3D.cpp.
|
virtual |
Get the variation of the integral of the mean normal stress (on a specific boundary interface) using the linear model.
boundaryID | ID of the boundary interface |
solveLinearSystem | a flag to which determine if the linear system has to be solved |
Implements MultiscaleInterface.
Definition at line 394 of file MultiscaleModelFluid3D.cpp.
|
virtual |
Get the variation of the integral of the mean total normal stress (on a specific boundary interface) using the linear model.
boundaryID | ID of the boundary interface |
solveLinearSystem | a flag to which determine if the linear system has to be solved |
Implements MultiscaleInterface.
Definition at line 402 of file MultiscaleModelFluid3D.cpp.
|
inlinevirtual |
Get the variation of the integral of the area (on a specific boundary interface) using the linear model.
Note: returns always a NaN, since this method is not used by the current interface equations.
boundaryID | ID of the boundary interface |
solveLinearSystem | a flag to which determine if the linear system has to be solved |
Implements MultiscaleInterface.
Definition at line 284 of file MultiscaleModelFluid3D.hpp.
void setSolution | ( | const fluidVectorPtr_Type & | solution | ) |
Set the solution vector.
solution | solution vector |
Definition at line 413 of file MultiscaleModelFluid3D.cpp.
|
inline |
Get the BCInterface container of the boundary conditions of the model.
Definition at line 311 of file MultiscaleModelFluid3D.hpp.
|
inline |
Get the density on a specific boundary face of the model.
Definition at line 320 of file MultiscaleModelFluid3D.hpp.
|
inline |
Get the viscosity on a specific boundary face of the model.
Definition at line 329 of file MultiscaleModelFluid3D.hpp.
|
inline |
Get the integral of the pressure (on a specific boundary face)
boundaryID | ID of the boundary interface |
Definition at line 339 of file MultiscaleModelFluid3D.hpp.
|
inline |
Get the integral of the total pressure (on a specific boundary face)
boundaryID | ID of the boundary interface |
Definition at line 349 of file MultiscaleModelFluid3D.hpp.
|
inline |
Get the data container.
Definition at line 358 of file MultiscaleModelFluid3D.hpp.
|
inline |
Get the solution vector.
Definition at line 367 of file MultiscaleModelFluid3D.hpp.
|
private |
|
private |
Setup the global data of the model.
In particular, it replaces the default local values with the ones in the global container. If a value is already specified in the data file, do not perform the replacement.
fileName | File name of the specific model. |
Definition at line 424 of file MultiscaleModelFluid3D.cpp.
|
private |
Initialize the solution.
Definition at line 448 of file MultiscaleModelFluid3D.cpp.
|
private |
Setup the exporter and the importer.
fileName | File name of the specific model. |
Definition at line 478 of file MultiscaleModelFluid3D.cpp.
|
private |
Setup the mesh for the fluid problem.
Definition at line 516 of file MultiscaleModelFluid3D.cpp.
|
private |
Setup the FE space for pressure and velocity.
Definition at line 530 of file MultiscaleModelFluid3D.cpp.
|
private |
Setup the DOF of the model.
Definition at line 600 of file MultiscaleModelFluid3D.cpp.
|
private |
Setup the offset for fluxes boundary conditions.
Definition at line 611 of file MultiscaleModelFluid3D.cpp.
|
private |
Setup the linear model.
Definition at line 628 of file MultiscaleModelFluid3D.cpp.
|
private |
Update the linear system matrix and vectors.
Definition at line 649 of file MultiscaleModelFluid3D.cpp.
|
private |
Solve the linear problem.
Definition at line 669 of file MultiscaleModelFluid3D.cpp.
|
private |
Impose the coupling perturbation on the correct BC inside the BCHandler.
Definition at line 699 of file MultiscaleModelFluid3D.cpp.
|
private |
Reset all the coupling perturbations imposed on the BCHandler.
Definition at line 719 of file MultiscaleModelFluid3D.cpp.
|
inlineprivate |
Definition at line 434 of file MultiscaleModelFluid3D.hpp.
|
inlineprivate |
Definition at line 438 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 445 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 446 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 448 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 451 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 452 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 453 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 454 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 455 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 456 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 457 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 458 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 461 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 462 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 465 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 466 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 469 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 472 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 473 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 474 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 477 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 478 of file MultiscaleModelFluid3D.hpp.
|
private |
Definition at line 479 of file MultiscaleModelFluid3D.hpp.