38 #ifndef MultiscaleModelWindkessel0D_H 39 #define MultiscaleModelWindkessel0D_H 1
41 #include <lifev/bc_interface/0D/bc/BCInterface0D.hpp> 43 #include <lifev/zero_dimensional/solver/ZeroDimensionalData.hpp> 45 #include <lifev/multiscale/models/MultiscaleModel.hpp> 46 #include <lifev/multiscale/framework/MultiscaleInterface.hpp> 103 void setupData (
const std::string& fileName );
162 multiscaleErrorCheck ( ModelInterface,
"Invalid interface [MeanTotalNormalStress] for model type [" + enum2String ( M_type, multiscaleModelsMap ) +
"]", M_comm->MyPID() == 0 );
174 multiscaleErrorCheck ( ModelInterface,
"Invalid interface [Area] for model type [" + enum2String ( M_type, multiscaleModelsMap ) +
"]", M_comm->MyPID() == 0 );
184 return ( boundaryFlag ( boundaryID ) == 0 ) ? M_flowRateLeft : 0;
285 return ( boundaryFlag ( boundaryID ) == 0 ) ? M_pressureLeft : M_pressureRight;
380 return new MultiscaleModelWindkessel0D();
Real solveForFlowRate()
Solving for the flow rate.
void initializeSolution()
Initialize the solution.
std::function< Real(const Real &, const Real &, const Real &, const Real &, const ID &) > function_Type
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...
virtual ~MultiscaleModelWindkessel0D()
Destructor.
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 ...
flag_Type multiscaleID_Type
ZeroDimensionalBCHandler - A boundary conditions handler for zero-dimensional models.
void setupModel()
Setup the model.
void setupExporterImporter()
Real tangentSolveForPressure()
Solve the tangent problem for the flow rate.
Real boundaryPressure(const multiscaleID_Type &boundaryID) const
Get the integral of the pressure (on a specific boundary face)
void imposeBoundaryArea(const multiscaleID_Type &, const function_Type &)
Impose the area on a specific boundary interface of the model.
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...
void imposeBoundaryFlowRate(const multiscaleID_Type &boundaryID, const function_Type &function)
Impose the flow rate on a specific interface of the model.
Real boundaryMeanNormalStress(const multiscaleID_Type &boundaryID) const
Get the integral of the mean normal stress on a specific boundary interface of the model...
void updateInverseJacobian(const UInt &iQuadPt)
void buildModel()
Build the initial model.
void solveModel()
Solve the model.
Real M_tangentFlowRateLeft
void updateSolution()
Update the solution.
std::shared_ptr< bc_Type > bcPtr_Type
ZeroDimensionalData data_Type
Real boundaryArea(const multiscaleID_Type &) const
Get the area on a specific boundary interface of the model.
Real boundaryDeltaArea(const multiscaleID_Type &, bool &)
Get the variation of the integral of the area (on a specific boundary interface) using the linear mod...
Real boundaryDeltaMeanTotalNormalStress(const multiscaleID_Type &, bool &)
Get the variation of the integral of the mean total normal stress (on a specific boundary interface) ...
MultiscaleModel multiscaleModel_Type
multiscaleModel_Type * createMultiscaleModelWindkessel0D()
Factory create function.
void saveSolution()
Save the solution.
std::shared_ptr< data_Type > dataPtr_Type
Real checkSolution() const
Return a specific scalar quantity to be used for a comparison with a reference value.
Real boundaryDeltaFlowRate(const multiscaleID_Type &boundaryID, bool &solveLinearSystem)
Get the variation of the flow rate (on a specific boundary interface) using the linear model...
Real boundaryMeanTotalNormalStress(const multiscaleID_Type &) const
Get the integral of the mean total normal stress on a specific boundary interface of the model...
void showMe()
Display some information about the model.
MultiscaleModelWindkessel0D - Multiscale model for Windkessel 0D terminals.
double Real
Generic real data.
MultiscaleModelWindkessel0D()
Constructor.
BCInterface0D< bc_Type, data_Type > bcInterface_Type
void setupGlobalData(const std::string &fileName)
Setup the global data of the model.
Real M_tangentPressureLeft
void setupData(const std::string &fileName)
Setup the data of the model.
void solveLinearModel(bool &solveLinearSystem)
Solve the tangent problem.
Real solveForPressure()
Solving for the pressure.
bcInterface_Type & bcInterface()
Get the BCInterface container of the boundary conditions of the model.
BCInterface0D - LifeV interface to load boundary conditions for 0D problems completely from a GetPot ...
Real tangentSolveForFlowRate()
Solve the tangent problem for the flow rate.
ZeroDimensionalBCHandler bc_Type
Data container for 0D model.
MultiscaleInterface - The multiscale interface for fluid problems.
void updateModel()
Update the model.
std::ofstream M_outputFile
MultiscaleModelWindkessel0D(const MultiscaleModelWindkessel0D &model)
std::shared_ptr< bcInterface_Type > bcInterfacePtr_Type
Real boundaryFlowRate(const multiscaleID_Type &boundaryID) const
Get the flow rate on a specific boundary interface of the model.
MultiscaleModelWindkessel0D & operator=(const MultiscaleModelWindkessel0D &model)