42 #ifndef MultiscaleModelFSI1D_H 43 #define MultiscaleModelFSI1D_H 1
46 #define JACOBIAN_WITH_FINITEDIFFERENCE 49 #define HAVE_MATLAB_POSTPROCESSING 1
51 #include <lifev/one_d_fsi/fem/OneDFSIBCHandler.hpp> 52 #include <lifev/one_d_fsi/solver/OneDFSIPhysicsLinear.hpp> 53 #include <lifev/one_d_fsi/solver/OneDFSIPhysicsNonLinear.hpp> 54 #include <lifev/one_d_fsi/solver/OneDFSIFluxLinear.hpp> 55 #include <lifev/one_d_fsi/solver/OneDFSIFluxNonLinear.hpp> 56 #include <lifev/one_d_fsi/solver/OneDFSISourceLinear.hpp> 57 #include <lifev/one_d_fsi/solver/OneDFSISourceNonLinear.hpp> 58 #include <lifev/one_d_fsi/solver/OneDFSISolver.hpp> 60 #include <lifev/bc_interface/1D/bc/BCInterface1D.hpp> 62 #include <lifev/core/fem/FESpace.hpp> 64 #include <lifev/core/filter/ExporterHDF5.hpp> 67 #include <lifev/multiscale/models/MultiscaleModel.hpp> 68 #include <lifev/multiscale/framework/MultiscaleInterface.hpp> 156 void setupData (
const std::string& fileName );
216 multiscaleErrorCheck ( ModelInterface,
"Invalid interface [MeanTotalNormalStress] for model type [" + enum2String ( M_type, multiscaleModelsMap ) +
"]", M_comm->MyPID() == 0 );
228 multiscaleErrorCheck ( ModelInterface,
"Invalid interface [Area] for model type [" + enum2String ( M_type, multiscaleModelsMap ) +
"]", M_comm->MyPID() == 0 );
238 return M_solver->boundaryValue ( *M_solution, OneDFSI::Q, flagConverter ( boundaryID ) );
248 return M_solver->boundaryValue ( *M_solution, OneDFSI::S, flagConverter ( boundaryID ) );
258 return M_solver->boundaryValue ( *M_solution, OneDFSI::T, flagConverter ( boundaryID ) );
268 return M_solver->boundaryValue ( *M_solution, OneDFSI::A, flagConverter ( boundaryID ) );
315 return * ( M_bc->handler() );
333 return M_data->densityRho();
342 return M_data->viscosity();
352 return M_solver->boundaryValue ( *M_solution, OneDFSI::P, flagConverter ( boundaryID ) );
423 const vectorPtr_Type& solution (
const std::string& quantity)
const 425 return (*M_solution) [quantity];
452 void setupGlobalData (
const std::string& fileName );
467 void copySolution (
const solution_Type& solution1, solution_Type& solution2 );
478 void solve (
bc_Type& bc, solution_Type& solution,
const std::string& solverType =
" 1D-" );
487 return ( boundaryFlag ( boundaryID ) == 0) ? OneDFSI::left : OneDFSI::right;
584 return new MultiscaleModelFSI1D();
std::function< Real(const Real &, const Real &, const Real &, const Real &, const ID &) > function_Type
OneDFSIPhysics physics_Type
bc_Type & bc() const
Get the BC handler container of the boundary conditions of the model.
std::shared_ptr< feSpace_Type > M_feSpace
std::shared_ptr< flux_Type > fluxPtr_Type
BCInterface1D< bc_Type, solver_Type > bcInterface_Type
virtual ~MultiscaleModelFSI1D()
Destructor.
void imposeBoundaryFlowRate(const multiscaleID_Type &boundaryID, const function_Type &function)
Impose the flow rate on a specific interface of the model.
SolverAmesos linearSolver_Type
OneDFSIPhysics - Base class providing physical operations for the 1D model data.
std::shared_ptr< solver_Type > solverPtr_Type
bcType_Type M_bcDeltaType
std::shared_ptr< solution_Type > solutionPtr_Type
void createLinearBC()
Update linear BC.
solutionPtr_Type M_exporterSolution
std::shared_ptr< linearSolver_Type > M_linearViscoelasticSolver
std::shared_ptr< data_Type > M_data
flag_Type multiscaleID_Type
void setupLinearModel()
Setup the linear model.
void updateModel()
Update the model.
Real boundaryDensity() const
Get the density on a specific boundary face of the model.
fluxPtr_Type flux() const
Get the Flux of the 1D model.
#define JACOBIAN_WITH_FINITEDIFFERENCE
std::shared_ptr< vector_Type > vectorPtr_Type
OneDFSISource source_Type
solution_Type::const_iterator solutionConstIterator_Type
OneDFSIFlux - Base class for the flux term of the 1D hyperbolic problem.
void setupFESpace()
Setup the FE space for pressure and velocity.
std::shared_ptr< bc_Type > bcPtr_Type
void solveModel()
Solve the model.
OneDFSISource - Base class for the source term of the 1D hyperbolic problem.
BCInterface1D - LifeV interface to load boundary conditions for 1D problems completely from a GetPot ...
void updateInverseJacobian(const UInt &iQuadPt)
std::vector< std::map< bcSide_Type, std::map< bcType_Type, Real > > > M_bcPreviousTimeSteps
OneDFSIFunction - Base class for 1D BC Functions.
MultiscaleModelFSI1D(const MultiscaleModelFSI1D &model)
MultiscaleModelFSI1D()
Constructor.
physicsPtr_Type M_physics
sourcePtr_Type source() const
Get the Source of the 1D model.
linearSolver_Type::vector_type vector_Type
physicsPtr_Type physics() const
Get the Physics of the 1D model.
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 mod...
Real boundaryMeanTotalNormalStress(const multiscaleID_Type &boundaryID) const
Get the integral of the mean total normal stress on a specific boundary interface of the model...
void updateSolution()
Update the solution.
void copySolution(const solution_Type &solution1, solution_Type &solution2)
Copy the solution (solution2 = solution1)
void updateLinearModel()
Update the linear system matrix and vectors.
Real boundaryDeltaFlowRate(const multiscaleID_Type &boundaryID, bool &solveLinearSystem)
Get the variation of the flow rate (on a specific boundary interface) using the linear model...
MultiscaleModel multiscaleModel_Type
Real boundaryMeanNormalStress(const multiscaleID_Type &boundaryID) const
Get the integral of the mean normal stress on a specific boundary interface of the model...
void initializeSolution()
Initialize the solution.
std::shared_ptr< linearSolver_Type > M_linearSolver
void buildModel()
Build the initial model.
void saveSolution()
Save the solution.
const solutionPtr_Type & solution() const
Get the solution container of the 1D model.
OneDFSIBCHandler - Class featuring methods to handle boundary conditions.
bcInterface_Type & bcInterface() const
Get the BCInterface container of the boundary conditions of the model.
void imposeBoundaryArea(const multiscaleID_Type &, const function_Type &)
Impose the area on a specific boundary interface of the model.
solverPtr_Type solver() const
Get the Solver of the 1D model.
Real bcFunctionDelta(const Real &t)
solutionPtr_Type M_linearSolution
Real boundaryFlowRate(const multiscaleID_Type &boundaryID) const
Get the flow rate on a specific boundary interface of the model.
void solveLinearModel(bool &solveLinearSystem)
Solve the linear problem.
double Real
Generic real data.
std::map< std::string, vectorPtr_Type > solution_Type
void imposePerturbation()
Impose the coupling perturbation on the correct BC inside the BCHandler.
Real checkSolution() const
Return a specific scalar quantity to be used for a comparison with a reference value.
OneDFSIFunction bcFunction_Type
void updateLinearBC(const solution_Type &solution)
Update linear BC.
Real boundaryPressure(const multiscaleID_Type &boundaryID) const
Get the integral of the pressure (on a specific boundary face)
Real boundaryArea(const multiscaleID_Type &boundaryID) const
Get the area on a specific boundary interface of the model.
void showMe()
Display some information about the model.
OneDFSISolver - Solver class for the 1D model.
FESpace< mesh_Type, MapEpetra > feSpace_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...
bcSide_Type M_bcDeltaSide
data_Type & data() const
Get the data container of the 1D model.
bcSide_Type flagConverter(const multiscaleID_Type &boundaryID) const
Convert the boundaryID to a bcSide type.
Real boundaryDeltaMeanTotalNormalStress(const multiscaleID_Type &boundaryID, bool &solveLinearSystem)
Get the variation of the integral of the total normal stress (on a specific boundary face) ...
std::shared_ptr< physics_Type > physicsPtr_Type
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...
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 ...
void setupModel()
Setup the model.
MultiscaleInterface - The multiscale interface for fluid problems.
std::shared_ptr< feSpace_Type > feSpacePtr_Type
void resetPerturbation()
Reset all the coupling perturbations imposed on the BCHandler.
void updateBCPhysicalSolverVariables()
Update BCInterface physical solver variables.
multiscaleModel_Type * createMultiscaleModelFSI1D()
Factory create function.
Real boundaryViscosity() const
Get the viscosity on a specific boundary face of the model.
std::shared_ptr< bcInterface_Type > bcInterfacePtr_Type
OneDFSISolver solver_Type
bcFunction_Type M_bcBaseDelta
solutionPtr_Type M_solution_tn
feSpacePtr_Type feSpace() const
Get the FESpace of the 1D model.
MultiscaleModelFSI1D & operator=(const MultiscaleModelFSI1D &model)
solutionPtr_Type M_solution
std::shared_ptr< source_Type > sourcePtr_Type