LifeV
|
MultiscaleModelFSI1D - Multiscale model for 1D Fluid simulations. More...
#include <MultiscaleModelFSI1D.hpp>
Private Attributes | |
std::shared_ptr< IOFile_Type > | M_exporter |
std::shared_ptr< IOFile_Type > | M_importer |
std::shared_ptr< mesh_Type > | M_exporterMesh |
solutionPtr_Type | M_exporterSolution |
bcPtr_Type | M_linearBC |
solutionPtr_Type | M_linearSolution |
std::vector< std::map< bcSide_Type, std::map< bcType_Type, Real > > > | M_bcPreviousTimeSteps |
bcFunction_Type | M_bcBaseDelta |
Real | M_bcDelta |
bcType_Type | M_bcDeltaType |
bcSide_Type | M_bcDeltaSide |
std::shared_ptr< data_Type > | M_data |
bcInterfacePtr_Type | M_bc |
physicsPtr_Type | M_physics |
fluxPtr_Type | M_flux |
sourcePtr_Type | M_source |
solverPtr_Type | M_solver |
std::shared_ptr< linearSolver_Type > | M_linearSolver |
std::shared_ptr< linearSolver_Type > | M_linearViscoelasticSolver |
std::shared_ptr< feSpace_Type > | M_feSpace |
solutionPtr_Type | M_solution_tn |
solutionPtr_Type | M_solution |
Constructors & Destructor | |
MultiscaleModelFSI1D () | |
Constructor. More... | |
virtual | ~MultiscaleModelFSI1D () |
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 total normal stress (on a specific boundary face) More... | |
Real | boundaryDeltaArea (const multiscaleID_Type &boundaryID, bool &solveLinearSystem) |
Get the variation of the integral of the area (on a specific boundary interface) using the linear model. More... | |
Get Methods | |
bc_Type & | bc () const |
Get the BC handler container of the boundary conditions of the model. More... | |
bcInterface_Type & | bcInterface () const |
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... | |
data_Type & | data () const |
Get the data container of the 1D model. More... | |
physicsPtr_Type | physics () const |
Get the Physics of the 1D model. More... | |
fluxPtr_Type | flux () const |
Get the Flux of the 1D model. More... | |
sourcePtr_Type | source () const |
Get the Source of the 1D model. More... | |
feSpacePtr_Type | feSpace () const |
Get the FESpace of the 1D model. More... | |
solverPtr_Type | solver () const |
Get the Solver of the 1D model. More... | |
const solutionPtr_Type & | solution () const |
Get the solution container of the 1D model. More... | |
const vectorPtr_Type & | solution (const std::string &quantity) const |
Get a specific quantity of the solution container of the 1D model. More... | |
Unimplemented Methods | |
MultiscaleModelFSI1D (const MultiscaleModelFSI1D &model) | |
MultiscaleModelFSI1D & | operator= (const MultiscaleModelFSI1D &model) |
Private Methods | |
void | setupGlobalData (const std::string &fileName) |
Setup the global data of the model. More... | |
void | initializeSolution () |
Initialize the solution. More... | |
void | setupFESpace () |
Setup the FE space for pressure and velocity. More... | |
void | copySolution (const solution_Type &solution1, solution_Type &solution2) |
Copy the solution (solution2 = solution1) More... | |
void | updateBCPhysicalSolverVariables () |
Update BCInterface physical solver variables. More... | |
void | solve (bc_Type &bc, solution_Type &solution, const std::string &solverType=" 1D-") |
Solve the 1D hyperbolic problem. More... | |
bcSide_Type | flagConverter (const multiscaleID_Type &boundaryID) const |
Convert the boundaryID to a bcSide type. More... | |
void | createLinearBC () |
Update linear BC. More... | |
void | updateLinearBC (const solution_Type &solution) |
Update linear BC. 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 | bcFunctionDelta (const Real &t) |
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 |
MultiscaleModelFSI1D - Multiscale model for 1D Fluid simulations.
The MultiscaleModelFSI1D class is an implementation of the multiscaleModel_Type for 1D Fluid problem.
Definition at line 86 of file MultiscaleModelFSI1D.hpp.
typedef OneDFSIPhysics physics_Type |
Definition at line 94 of file MultiscaleModelFSI1D.hpp.
typedef std::shared_ptr< physics_Type > physicsPtr_Type |
Definition at line 95 of file MultiscaleModelFSI1D.hpp.
typedef OneDFSIFlux flux_Type |
Definition at line 97 of file MultiscaleModelFSI1D.hpp.
typedef std::shared_ptr< flux_Type > fluxPtr_Type |
Definition at line 98 of file MultiscaleModelFSI1D.hpp.
typedef OneDFSISource source_Type |
Definition at line 100 of file MultiscaleModelFSI1D.hpp.
typedef std::shared_ptr< source_Type > sourcePtr_Type |
Definition at line 101 of file MultiscaleModelFSI1D.hpp.
typedef OneDFSISolver solver_Type |
Definition at line 103 of file MultiscaleModelFSI1D.hpp.
typedef std::shared_ptr< solver_Type > solverPtr_Type |
Definition at line 104 of file MultiscaleModelFSI1D.hpp.
typedef solver_Type::data_Type data_Type |
Definition at line 106 of file MultiscaleModelFSI1D.hpp.
typedef solver_Type::mesh_Type mesh_Type |
Definition at line 107 of file MultiscaleModelFSI1D.hpp.
typedef solver_Type::vector_Type vector_Type |
Definition at line 108 of file MultiscaleModelFSI1D.hpp.
Definition at line 109 of file MultiscaleModelFSI1D.hpp.
Definition at line 110 of file MultiscaleModelFSI1D.hpp.
Definition at line 111 of file MultiscaleModelFSI1D.hpp.
Definition at line 112 of file MultiscaleModelFSI1D.hpp.
Definition at line 113 of file MultiscaleModelFSI1D.hpp.
Definition at line 115 of file MultiscaleModelFSI1D.hpp.
Definition at line 116 of file MultiscaleModelFSI1D.hpp.
typedef OneDFSIBCHandler bc_Type |
Definition at line 118 of file MultiscaleModelFSI1D.hpp.
typedef std::shared_ptr< bc_Type > bcPtr_Type |
Definition at line 119 of file MultiscaleModelFSI1D.hpp.
typedef BCInterface1D< bc_Type, solver_Type > bcInterface_Type |
Definition at line 120 of file MultiscaleModelFSI1D.hpp.
typedef std::shared_ptr< bcInterface_Type > bcInterfacePtr_Type |
Definition at line 121 of file MultiscaleModelFSI1D.hpp.
typedef OneDFSIFunction bcFunction_Type |
Definition at line 123 of file MultiscaleModelFSI1D.hpp.
typedef OneDFSI::bcType_Type bcType_Type |
Definition at line 125 of file MultiscaleModelFSI1D.hpp.
typedef OneDFSI::bcSide_Type bcSide_Type |
Definition at line 126 of file MultiscaleModelFSI1D.hpp.
typedef OneDFSI::bcLine_Type bcLine_Type |
Definition at line 127 of file MultiscaleModelFSI1D.hpp.
typedef ExporterHDF5< mesh_Type > IOFile_Type |
Definition at line 130 of file MultiscaleModelFSI1D.hpp.
typedef ExporterData< mesh_Type > IOData_Type |
Definition at line 131 of file MultiscaleModelFSI1D.hpp.
|
explicit |
Constructor.
Definition at line 52 of file MultiscaleModelFSI1D.cpp.
|
inlinevirtual |
Destructor.
Definition at line 144 of file MultiscaleModelFSI1D.hpp.
|
private |
|
virtual |
Setup the data of the model.
fileName | Name of data file. |
Reimplemented from MultiscaleModel.
Definition at line 107 of file MultiscaleModelFSI1D.cpp.
|
virtual |
Setup the model.
Implements MultiscaleModel.
Definition at line 181 of file MultiscaleModelFSI1D.cpp.
|
virtual |
Build the initial model.
Implements MultiscaleModel.
Definition at line 239 of file MultiscaleModelFSI1D.cpp.
|
virtual |
Update the model.
Implements MultiscaleModel.
Definition at line 265 of file MultiscaleModelFSI1D.cpp.
|
virtual |
Solve the model.
Implements MultiscaleModel.
Definition at line 285 of file MultiscaleModelFSI1D.cpp.
|
virtual |
Update the solution.
Implements MultiscaleModel.
Definition at line 305 of file MultiscaleModelFSI1D.cpp.
|
virtual |
Save the solution.
Implements MultiscaleModel.
Definition at line 315 of file MultiscaleModelFSI1D.cpp.
|
virtual |
Display some information about the model.
Reimplemented from MultiscaleModel.
Definition at line 342 of file MultiscaleModelFSI1D.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 357 of file MultiscaleModelFSI1D.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 366 of file MultiscaleModelFSI1D.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 375 of file MultiscaleModelFSI1D.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 214 of file MultiscaleModelFSI1D.hpp.
|
inlinevirtual |
Impose the area on a specific boundary interface of the model.
TODO The area can be imposed to the 1-D model: need to be coded
boundaryID | ID of the boundary interface |
function | boundary condition function |
Implements MultiscaleInterface.
Definition at line 226 of file MultiscaleModelFSI1D.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 236 of file MultiscaleModelFSI1D.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 246 of file MultiscaleModelFSI1D.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 256 of file MultiscaleModelFSI1D.hpp.
|
inlinevirtual |
Get the area on a specific boundary interface of the model.
boundaryID | ID of the boundary interface |
Implements MultiscaleInterface.
Definition at line 266 of file MultiscaleModelFSI1D.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 465 of file MultiscaleModelFSI1D.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 471 of file MultiscaleModelFSI1D.cpp.
|
virtual |
Get the variation of the integral of the total normal stress (on a specific boundary face)
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 477 of file MultiscaleModelFSI1D.cpp.
|
virtual |
Get the variation of the integral of the area (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 483 of file MultiscaleModelFSI1D.cpp.
|
inline |
Get the BC handler container of the boundary conditions of the model.
Definition at line 313 of file MultiscaleModelFSI1D.hpp.
|
inline |
Get the BCInterface container of the boundary conditions of the model.
Definition at line 322 of file MultiscaleModelFSI1D.hpp.
|
inline |
Get the density on a specific boundary face of the model.
Definition at line 331 of file MultiscaleModelFSI1D.hpp.
|
inline |
Get the viscosity on a specific boundary face of the model.
Definition at line 340 of file MultiscaleModelFSI1D.hpp.
|
inline |
Get the integral of the pressure (on a specific boundary face)
boundaryID | ID of the boundary interface |
Definition at line 350 of file MultiscaleModelFSI1D.hpp.
|
inline |
Get the data container of the 1D model.
Definition at line 359 of file MultiscaleModelFSI1D.hpp.
|
inline |
Get the Physics of the 1D model.
Definition at line 368 of file MultiscaleModelFSI1D.hpp.
|
inline |
Get the Flux of the 1D model.
Definition at line 377 of file MultiscaleModelFSI1D.hpp.
|
inline |
Get the Source of the 1D model.
Definition at line 386 of file MultiscaleModelFSI1D.hpp.
|
inline |
Get the FESpace of the 1D model.
Definition at line 395 of file MultiscaleModelFSI1D.hpp.
|
inline |
Get the Solver of the 1D model.
Definition at line 404 of file MultiscaleModelFSI1D.hpp.
|
inline |
Get the solution container of the 1D model.
Definition at line 413 of file MultiscaleModelFSI1D.hpp.
|
inline |
Get a specific quantity of the solution container of the 1D model.
quantity | solution quantity. |
Definition at line 423 of file MultiscaleModelFSI1D.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 494 of file MultiscaleModelFSI1D.cpp.
|
private |
Initialize the solution.
Definition at line 541 of file MultiscaleModelFSI1D.cpp.
|
private |
Setup the FE space for pressure and velocity.
Definition at line 587 of file MultiscaleModelFSI1D.cpp.
|
private |
Copy the solution (solution2 = solution1)
NOTE: if the size of the two vector is different due to the presence of ghost nodes the method automatically add/remove them from the resulting vector.
solution1 | solution to be copied. |
solution2 | copy of solution1. |
Definition at line 630 of file MultiscaleModelFSI1D.cpp.
|
private |
Update BCInterface physical solver variables.
Definition at line 645 of file MultiscaleModelFSI1D.cpp.
|
private |
Solve the 1D hyperbolic problem.
bc | BCInterface container. |
solution | solution container. |
solverType | string containing the prefix ID to display when solving the system. |
Definition at line 657 of file MultiscaleModelFSI1D.cpp.
|
inlineprivate |
Convert the boundaryID to a bcSide type.
boundaryID | ID of the boundary interface |
Definition at line 485 of file MultiscaleModelFSI1D.hpp.
|
private |
Update linear BC.
|
private |
Update linear BC.
|
private |
Setup the linear model.
|
private |
Update the linear system matrix and vectors.
|
private |
Solve the linear problem.
|
private |
Impose the coupling perturbation on the correct BC inside the BCHandler.
|
private |
Reset all the coupling perturbations imposed on the BCHandler.
|
private |
Definition at line 537 of file MultiscaleModelFSI1D.hpp.
|
private |
Definition at line 538 of file MultiscaleModelFSI1D.hpp.
|
private |
Definition at line 540 of file MultiscaleModelFSI1D.hpp.
|
private |
Definition at line 541 of file MultiscaleModelFSI1D.hpp.
|
private |
Definition at line 546 of file MultiscaleModelFSI1D.hpp.
|
private |
Definition at line 548 of file MultiscaleModelFSI1D.hpp.
|
private |
Definition at line 551 of file MultiscaleModelFSI1D.hpp.
|
private |
Definition at line 554 of file MultiscaleModelFSI1D.hpp.
|
private |
Definition at line 556 of file MultiscaleModelFSI1D.hpp.
|
private |
Definition at line 557 of file MultiscaleModelFSI1D.hpp.
|
private |
Definition at line 558 of file MultiscaleModelFSI1D.hpp.
|
private |
Definition at line 562 of file MultiscaleModelFSI1D.hpp.
|
private |
Definition at line 563 of file MultiscaleModelFSI1D.hpp.
|
private |
Definition at line 564 of file MultiscaleModelFSI1D.hpp.
|
private |
Definition at line 565 of file MultiscaleModelFSI1D.hpp.
|
private |
Definition at line 566 of file MultiscaleModelFSI1D.hpp.
|
private |
Definition at line 567 of file MultiscaleModelFSI1D.hpp.
|
private |
Definition at line 570 of file MultiscaleModelFSI1D.hpp.
|
private |
Definition at line 571 of file MultiscaleModelFSI1D.hpp.
|
private |
Definition at line 574 of file MultiscaleModelFSI1D.hpp.
|
private |
Definition at line 576 of file MultiscaleModelFSI1D.hpp.
|
private |
Definition at line 577 of file MultiscaleModelFSI1D.hpp.