LifeV
|
MultiscaleModelWindkessel0D - Multiscale model for Windkessel 0D terminals. More...
#include <MultiscaleModelWindkessel0D.hpp>
Type definitions | |
typedef ZeroDimensionalBCHandler | bc_Type |
typedef std::shared_ptr< bc_Type > | bcPtr_Type |
typedef ZeroDimensionalData | data_Type |
typedef std::shared_ptr< data_Type > | dataPtr_Type |
typedef BCInterface0D< bc_Type, data_Type > | bcInterface_Type |
typedef std::shared_ptr< bcInterface_Type > | bcInterfacePtr_Type |
Constructors & Destructor | |
MultiscaleModelWindkessel0D () | |
Constructor. More... | |
virtual | ~MultiscaleModelWindkessel0D () |
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 &) const |
Get the integral of the mean total normal stress on a specific boundary interface of the model. More... | |
Real | boundaryArea (const multiscaleID_Type &) 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 &, bool &) |
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... | |
Get Methods | |
bcInterface_Type & | bcInterface () |
Get the BCInterface container of the boundary conditions of the model. More... | |
Real | boundaryPressure (const multiscaleID_Type &boundaryID) const |
Get the integral of the pressure (on a specific boundary face) More... | |
Unimplemented Methods | |
MultiscaleModelWindkessel0D (const MultiscaleModelWindkessel0D &model) | |
MultiscaleModelWindkessel0D & | operator= (const MultiscaleModelWindkessel0D &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 () |
Real | solveForFlowRate () |
Solving for the flow rate. More... | |
Real | solveForPressure () |
Solving for the pressure. More... | |
void | solveLinearModel (bool &solveLinearSystem) |
Solve the tangent problem. More... | |
Real | tangentSolveForFlowRate () |
Solve the tangent problem for the flow rate. More... | |
Real | tangentSolveForPressure () |
Solve the tangent problem for the flow rate. More... | |
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 |
MultiscaleModelWindkessel0D - Multiscale model for Windkessel 0D terminals.
The MultiscaleModelWindkessel0D class is an implementation of the multiscaleModel_Type for 0D problems.
Definition at line 64 of file MultiscaleModelWindkessel0D.hpp.
typedef ZeroDimensionalBCHandler bc_Type |
Definition at line 72 of file MultiscaleModelWindkessel0D.hpp.
typedef std::shared_ptr< bc_Type > bcPtr_Type |
Definition at line 73 of file MultiscaleModelWindkessel0D.hpp.
typedef ZeroDimensionalData data_Type |
Definition at line 75 of file MultiscaleModelWindkessel0D.hpp.
typedef std::shared_ptr< data_Type > dataPtr_Type |
Definition at line 76 of file MultiscaleModelWindkessel0D.hpp.
typedef BCInterface0D< bc_Type, data_Type > bcInterface_Type |
Definition at line 78 of file MultiscaleModelWindkessel0D.hpp.
typedef std::shared_ptr< bcInterface_Type > bcInterfacePtr_Type |
Definition at line 79 of file MultiscaleModelWindkessel0D.hpp.
|
explicit |
Constructor.
Definition at line 48 of file MultiscaleModelWindkessel0D.cpp.
|
inlinevirtual |
Destructor.
Definition at line 91 of file MultiscaleModelWindkessel0D.hpp.
|
private |
|
virtual |
Setup the data of the model.
fileName | Name of data file. |
Reimplemented from MultiscaleModel.
Definition at line 77 of file MultiscaleModelWindkessel0D.cpp.
|
virtual |
Setup the model.
Implements MultiscaleModel.
Definition at line 109 of file MultiscaleModelWindkessel0D.cpp.
|
virtual |
Build the initial model.
Implements MultiscaleModel.
Definition at line 128 of file MultiscaleModelWindkessel0D.cpp.
|
virtual |
Update the model.
Implements MultiscaleModel.
Definition at line 139 of file MultiscaleModelWindkessel0D.cpp.
|
virtual |
Solve the model.
Implements MultiscaleModel.
Definition at line 156 of file MultiscaleModelWindkessel0D.cpp.
|
virtual |
Update the solution.
Implements MultiscaleModel.
Definition at line 190 of file MultiscaleModelWindkessel0D.cpp.
|
virtual |
Save the solution.
Implements MultiscaleModel.
Definition at line 200 of file MultiscaleModelWindkessel0D.cpp.
|
virtual |
Display some information about the model.
Reimplemented from MultiscaleModel.
Definition at line 218 of file MultiscaleModelWindkessel0D.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 231 of file MultiscaleModelWindkessel0D.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 240 of file MultiscaleModelWindkessel0D.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 249 of file MultiscaleModelWindkessel0D.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 160 of file MultiscaleModelWindkessel0D.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 172 of file MultiscaleModelWindkessel0D.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 182 of file MultiscaleModelWindkessel0D.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 192 of file MultiscaleModelWindkessel0D.hpp.
|
inlinevirtual |
Get the integral of the mean total normal stress on a specific boundary interface of the model.
Note: returns always a NaN since the mean total normal stress is not defined in the windkessel model
boundaryID | ID of the boundary interface |
Implements MultiscaleInterface.
Definition at line 204 of file MultiscaleModelWindkessel0D.hpp.
|
inlinevirtual |
Get the area on a specific boundary interface of the model.
Note: returns always a NaN since the area is not defined in the windkessel model
boundaryID | ID of the boundary interface |
Implements MultiscaleInterface.
Definition at line 216 of file MultiscaleModelWindkessel0D.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 258 of file MultiscaleModelWindkessel0D.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 271 of file MultiscaleModelWindkessel0D.cpp.
|
inlinevirtual |
Get the variation of the integral of the mean total normal stress (on a specific boundary interface) using the linear model.
Note: returns always a NaN since the mean total normal stress is not defined in the windkessel 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 245 of file MultiscaleModelWindkessel0D.hpp.
|
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 the area is not defined in the windkessel 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 258 of file MultiscaleModelWindkessel0D.hpp.
|
inline |
Get the BCInterface container of the boundary conditions of the model.
Definition at line 273 of file MultiscaleModelWindkessel0D.hpp.
|
inline |
Get the integral of the pressure (on a specific boundary face)
boundaryID | ID of the boundary interface |
Definition at line 283 of file MultiscaleModelWindkessel0D.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 287 of file MultiscaleModelWindkessel0D.cpp.
|
private |
Initialize the solution.
Definition at line 302 of file MultiscaleModelWindkessel0D.cpp.
|
private |
Definition at line 380 of file MultiscaleModelWindkessel0D.cpp.
|
private |
Solving for the flow rate.
TODO ADD THE EQUATIONS
Definition at line 395 of file MultiscaleModelWindkessel0D.cpp.
|
private |
Solving for the pressure.
TODO ADD THE EQUATIONS
Definition at line 420 of file MultiscaleModelWindkessel0D.cpp.
|
private |
Solve the tangent problem.
solveLinearSystem | if true the system as already been solved. |
Definition at line 445 of file MultiscaleModelWindkessel0D.cpp.
|
private |
Solve the tangent problem for the flow rate.
TODO ADD THE EQUATIONS
Definition at line 487 of file MultiscaleModelWindkessel0D.cpp.
|
private |
Solve the tangent problem for the flow rate.
TODO ADD THE EQUATIONS
Definition at line 510 of file MultiscaleModelWindkessel0D.cpp.
|
private |
Definition at line 355 of file MultiscaleModelWindkessel0D.hpp.
|
private |
Definition at line 357 of file MultiscaleModelWindkessel0D.hpp.
|
private |
Definition at line 359 of file MultiscaleModelWindkessel0D.hpp.
|
private |
Definition at line 361 of file MultiscaleModelWindkessel0D.hpp.
|
private |
Definition at line 362 of file MultiscaleModelWindkessel0D.hpp.
|
private |
Definition at line 364 of file MultiscaleModelWindkessel0D.hpp.
|
private |
Definition at line 365 of file MultiscaleModelWindkessel0D.hpp.
|
private |
Definition at line 367 of file MultiscaleModelWindkessel0D.hpp.
|
private |
Definition at line 369 of file MultiscaleModelWindkessel0D.hpp.
|
private |
Definition at line 370 of file MultiscaleModelWindkessel0D.hpp.
|
private |
Definition at line 372 of file MultiscaleModelWindkessel0D.hpp.
|
private |
Definition at line 373 of file MultiscaleModelWindkessel0D.hpp.
|
private |
Definition at line 374 of file MultiscaleModelWindkessel0D.hpp.