LifeV
MultiscaleModelWindkessel0D Class Reference

MultiscaleModelWindkessel0D - Multiscale model for Windkessel 0D terminals. More...

#include <MultiscaleModelWindkessel0D.hpp>

+ Inheritance diagram for MultiscaleModelWindkessel0D:
+ Collaboration diagram for MultiscaleModelWindkessel0D:

Private Attributes

std::ofstream M_outputFile
 
bcInterfacePtr_Type M_bc
 
dataPtr_Type M_data
 
Real M_pressureLeft_tn
 
Real M_flowRateLeft_tn
 
Real M_pressureLeft
 
Real M_flowRateLeft
 
Real M_pressureRight
 
Real M_tangentPressureLeft
 
Real M_tangentFlowRateLeft
 
Real M_resistance1
 
Real M_resistance2
 
Real M_capacitance
 

Type definitions

typedef ZeroDimensionalBCHandler bc_Type
 
typedef std::shared_ptr< bc_TypebcPtr_Type
 
typedef ZeroDimensionalData data_Type
 
typedef std::shared_ptr< data_TypedataPtr_Type
 
typedef BCInterface0D< bc_Type, data_TypebcInterface_Type
 
typedef std::shared_ptr< bcInterface_TypebcInterfacePtr_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_TypebcInterface ()
 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)
 
MultiscaleModelWindkessel0Doperator= (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 UIntID () const
 Get the global ID of the model. More...
 
const models_Typetype () const
 Get the type of the model. More...
 
const multiscaleID_TypeboundaryFlag (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_TypeglobalData () const
 Get the global data of the model. More...
 
const multiscaleCommPtr_Typecommunicator () 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, NDIMM_geometryScale
 
std::array< Real, NDIMM_geometryRotate
 
std::array< Real, NDIMM_geometryTranslate
 
multiscaleCommPtr_Type M_comm
 

Detailed Description

MultiscaleModelWindkessel0D - Multiscale model for Windkessel 0D terminals.

Author
Cristiano Malossi, Mahmoud Jafargholi
See also
Full description of the Geometrical Multiscale Framework: [15]
Methodology: [12] [13] [14] [2]
Applications: [11] [10] [3]

The MultiscaleModelWindkessel0D class is an implementation of the multiscaleModel_Type for 0D problems.

Definition at line 64 of file MultiscaleModelWindkessel0D.hpp.

Member Typedef Documentation

◆ bc_Type

◆ bcPtr_Type

typedef std::shared_ptr< bc_Type > bcPtr_Type

Definition at line 73 of file MultiscaleModelWindkessel0D.hpp.

◆ data_Type

Definition at line 75 of file MultiscaleModelWindkessel0D.hpp.

◆ dataPtr_Type

typedef std::shared_ptr< data_Type > dataPtr_Type

Definition at line 76 of file MultiscaleModelWindkessel0D.hpp.

◆ bcInterface_Type

◆ bcInterfacePtr_Type

typedef std::shared_ptr< bcInterface_Type > bcInterfacePtr_Type

Definition at line 79 of file MultiscaleModelWindkessel0D.hpp.

Constructor & Destructor Documentation

◆ MultiscaleModelWindkessel0D() [1/2]

Constructor.

Definition at line 48 of file MultiscaleModelWindkessel0D.cpp.

+ Here is the caller graph for this function:

◆ ~MultiscaleModelWindkessel0D()

virtual ~MultiscaleModelWindkessel0D ( )
inlinevirtual

Destructor.

Definition at line 91 of file MultiscaleModelWindkessel0D.hpp.

◆ MultiscaleModelWindkessel0D() [2/2]

Member Function Documentation

◆ setupData()

void setupData ( const std::string &  fileName)
virtual

Setup the data of the model.

Parameters
fileNameName of data file.

Reimplemented from MultiscaleModel.

Definition at line 77 of file MultiscaleModelWindkessel0D.cpp.

◆ setupModel()

void setupModel ( )
virtual

Setup the model.

Implements MultiscaleModel.

Definition at line 109 of file MultiscaleModelWindkessel0D.cpp.

◆ buildModel()

void buildModel ( )
virtual

Build the initial model.

Implements MultiscaleModel.

Definition at line 128 of file MultiscaleModelWindkessel0D.cpp.

◆ updateModel()

void updateModel ( )
virtual

Update the model.

Implements MultiscaleModel.

Definition at line 139 of file MultiscaleModelWindkessel0D.cpp.

+ Here is the caller graph for this function:

◆ solveModel()

void solveModel ( )
virtual

Solve the model.

Implements MultiscaleModel.

Definition at line 156 of file MultiscaleModelWindkessel0D.cpp.

◆ updateSolution()

void updateSolution ( )
virtual

Update the solution.

Implements MultiscaleModel.

Definition at line 190 of file MultiscaleModelWindkessel0D.cpp.

◆ saveSolution()

void saveSolution ( )
virtual

Save the solution.

Implements MultiscaleModel.

Definition at line 200 of file MultiscaleModelWindkessel0D.cpp.

◆ showMe()

void showMe ( )
virtual

Display some information about the model.

Reimplemented from MultiscaleModel.

Definition at line 218 of file MultiscaleModelWindkessel0D.cpp.

◆ checkSolution()

Real checkSolution ( ) const
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.

Returns
reference quantity.

Implements MultiscaleModel.

Definition at line 231 of file MultiscaleModelWindkessel0D.cpp.

◆ imposeBoundaryFlowRate()

void imposeBoundaryFlowRate ( const multiscaleID_Type boundaryID,
const function_Type function 
)
virtual

Impose the flow rate on a specific interface of the model.

Parameters
boundaryIDID of the boundary interface
functionboundary condition function

Implements MultiscaleInterface.

Definition at line 240 of file MultiscaleModelWindkessel0D.cpp.

◆ imposeBoundaryMeanNormalStress()

void imposeBoundaryMeanNormalStress ( const multiscaleID_Type boundaryID,
const function_Type function 
)
virtual

Impose the integral of the mean normal stress on a specific boundary interface of the model.

Parameters
boundaryIDID of the boundary interface
functionboundary condition function

Implements MultiscaleInterface.

Definition at line 249 of file MultiscaleModelWindkessel0D.cpp.

◆ imposeBoundaryMeanTotalNormalStress()

void imposeBoundaryMeanTotalNormalStress ( const multiscaleID_Type ,
const function_Type  
)
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.

Parameters
boundaryIDID of the boundary interface
functionboundary condition function

Implements MultiscaleInterface.

Definition at line 160 of file MultiscaleModelWindkessel0D.hpp.

◆ imposeBoundaryArea()

void imposeBoundaryArea ( const multiscaleID_Type ,
const function_Type  
)
inlinevirtual

Impose the area on a specific boundary interface of the model.

Note: area cannot be imposed at the interfaces of this model.

Parameters
boundaryIDID of the boundary interface
functionboundary condition function

Implements MultiscaleInterface.

Definition at line 172 of file MultiscaleModelWindkessel0D.hpp.

◆ boundaryFlowRate()

Real boundaryFlowRate ( const multiscaleID_Type boundaryID) const
inlinevirtual

Get the flow rate on a specific boundary interface of the model.

Parameters
boundaryIDID of the boundary interface
Returns
flow rate value

Implements MultiscaleInterface.

Definition at line 182 of file MultiscaleModelWindkessel0D.hpp.

◆ boundaryMeanNormalStress()

Real boundaryMeanNormalStress ( const multiscaleID_Type boundaryID) const
inlinevirtual

Get the integral of the mean normal stress on a specific boundary interface of the model.

Parameters
boundaryIDID of the boundary interface
Returns
mean normal stress value

Implements MultiscaleInterface.

Definition at line 192 of file MultiscaleModelWindkessel0D.hpp.

◆ boundaryMeanTotalNormalStress()

Real boundaryMeanTotalNormalStress ( const multiscaleID_Type ) const
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

Parameters
boundaryIDID of the boundary interface
Returns
mean total normal stress value

Implements MultiscaleInterface.

Definition at line 204 of file MultiscaleModelWindkessel0D.hpp.

◆ boundaryArea()

Real boundaryArea ( const multiscaleID_Type ) const
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

Parameters
boundaryIDID of the boundary interface
Returns
area value

Implements MultiscaleInterface.

Definition at line 216 of file MultiscaleModelWindkessel0D.hpp.

◆ boundaryDeltaFlowRate()

Real boundaryDeltaFlowRate ( const multiscaleID_Type boundaryID,
bool &  solveLinearSystem 
)
virtual

Get the variation of the flow rate (on a specific boundary interface) using the linear model.

Parameters
boundaryIDID of the boundary interface
solveLinearSystema flag to which determine if the linear system has to be solved
Returns
variation of the flow rate

Implements MultiscaleInterface.

Definition at line 258 of file MultiscaleModelWindkessel0D.cpp.

◆ boundaryDeltaMeanNormalStress()

Real boundaryDeltaMeanNormalStress ( const multiscaleID_Type boundaryID,
bool &  solveLinearSystem 
)
virtual

Get the variation of the integral of the mean normal stress (on a specific boundary interface) using the linear model.

Parameters
boundaryIDID of the boundary interface
solveLinearSystema flag to which determine if the linear system has to be solved
Returns
variation of the mean normal stress

Implements MultiscaleInterface.

Definition at line 271 of file MultiscaleModelWindkessel0D.cpp.

◆ boundaryDeltaMeanTotalNormalStress()

Real boundaryDeltaMeanTotalNormalStress ( const multiscaleID_Type ,
bool &   
)
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.

Parameters
boundaryIDID of the boundary interface
solveLinearSystema flag to which determine if the linear system has to be solved
Returns
variation of the mean total normal stress

Implements MultiscaleInterface.

Definition at line 245 of file MultiscaleModelWindkessel0D.hpp.

◆ boundaryDeltaArea()

Real boundaryDeltaArea ( const multiscaleID_Type ,
bool &   
)
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.

Parameters
boundaryIDID of the boundary interface
solveLinearSystema flag to which determine if the linear system has to be solved
Returns
variation of the area

Implements MultiscaleInterface.

Definition at line 258 of file MultiscaleModelWindkessel0D.hpp.

◆ bcInterface()

bcInterface_Type& bcInterface ( )
inline

Get the BCInterface container of the boundary conditions of the model.

Returns
BCInterface container

Definition at line 273 of file MultiscaleModelWindkessel0D.hpp.

◆ boundaryPressure()

Real boundaryPressure ( const multiscaleID_Type boundaryID) const
inline

Get the integral of the pressure (on a specific boundary face)

Parameters
boundaryIDID of the boundary interface
Returns
pressure value

Definition at line 283 of file MultiscaleModelWindkessel0D.hpp.

+ Here is the caller graph for this function:

◆ operator=()

MultiscaleModelWindkessel0D& operator= ( const MultiscaleModelWindkessel0D model)
private

◆ setupGlobalData()

void setupGlobalData ( const std::string &  fileName)
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.

Parameters
fileNameFile name of the specific model.

Definition at line 287 of file MultiscaleModelWindkessel0D.cpp.

+ Here is the caller graph for this function:

◆ initializeSolution()

void initializeSolution ( )
private

Initialize the solution.

Definition at line 302 of file MultiscaleModelWindkessel0D.cpp.

+ Here is the caller graph for this function:

◆ setupExporterImporter()

void setupExporterImporter ( )
private

Definition at line 380 of file MultiscaleModelWindkessel0D.cpp.

+ Here is the caller graph for this function:

◆ solveForFlowRate()

Real solveForFlowRate ( )
private

Solving for the flow rate.

TODO ADD THE EQUATIONS

Returns
the computed flow rate

Definition at line 395 of file MultiscaleModelWindkessel0D.cpp.

◆ solveForPressure()

Real solveForPressure ( )
private

Solving for the pressure.

TODO ADD THE EQUATIONS

Returns
the computed pressure

Definition at line 420 of file MultiscaleModelWindkessel0D.cpp.

◆ solveLinearModel()

void solveLinearModel ( bool &  solveLinearSystem)
private

Solve the tangent problem.

Parameters
solveLinearSystemif true the system as already been solved.

Definition at line 445 of file MultiscaleModelWindkessel0D.cpp.

+ Here is the caller graph for this function:

◆ tangentSolveForFlowRate()

Real tangentSolveForFlowRate ( )
private

Solve the tangent problem for the flow rate.

TODO ADD THE EQUATIONS

Returns
$ dQ/dP $

Definition at line 487 of file MultiscaleModelWindkessel0D.cpp.

◆ tangentSolveForPressure()

Real tangentSolveForPressure ( )
private

Solve the tangent problem for the flow rate.

TODO ADD THE EQUATIONS

Returns
$ dP/dQ $

Definition at line 510 of file MultiscaleModelWindkessel0D.cpp.

Field Documentation

◆ M_outputFile

std::ofstream M_outputFile
private

Definition at line 355 of file MultiscaleModelWindkessel0D.hpp.

◆ M_bc

bcInterfacePtr_Type M_bc
private

Definition at line 357 of file MultiscaleModelWindkessel0D.hpp.

◆ M_data

dataPtr_Type M_data
private

Definition at line 359 of file MultiscaleModelWindkessel0D.hpp.

◆ M_pressureLeft_tn

Real M_pressureLeft_tn
private

Definition at line 361 of file MultiscaleModelWindkessel0D.hpp.

◆ M_flowRateLeft_tn

Real M_flowRateLeft_tn
private

Definition at line 362 of file MultiscaleModelWindkessel0D.hpp.

◆ M_pressureLeft

Real M_pressureLeft
private

Definition at line 364 of file MultiscaleModelWindkessel0D.hpp.

◆ M_flowRateLeft

Real M_flowRateLeft
private

Definition at line 365 of file MultiscaleModelWindkessel0D.hpp.

◆ M_pressureRight

Real M_pressureRight
private

Definition at line 367 of file MultiscaleModelWindkessel0D.hpp.

◆ M_tangentPressureLeft

Real M_tangentPressureLeft
private

Definition at line 369 of file MultiscaleModelWindkessel0D.hpp.

◆ M_tangentFlowRateLeft

Real M_tangentFlowRateLeft
private

Definition at line 370 of file MultiscaleModelWindkessel0D.hpp.

◆ M_resistance1

Real M_resistance1
private

Definition at line 372 of file MultiscaleModelWindkessel0D.hpp.

◆ M_resistance2

Real M_resistance2
private

Definition at line 373 of file MultiscaleModelWindkessel0D.hpp.

◆ M_capacitance

Real M_capacitance
private

Definition at line 374 of file MultiscaleModelWindkessel0D.hpp.


The documentation for this class was generated from the following files: