47 #include <Epetra_SerialComm.h> 50 #include <lifev/core/filter/GetPot.hpp> 51 #include <lifev/core/fem/TimeData.hpp> 52 #include <lifev/core/mesh/RegionMesh1DBuilders.hpp> 54 #include <lifev/one_d_fsi/solver/OneDFSIDefinitions.hpp> 153 void setup (
const GetPot& dataFile,
const std::string& section =
"1D_Model" );
164 void LIFEV_DEPRECATED ( oldStyleSetup (
const GetPot& dataFile,
const std::string& section =
"1dnetwork" ) );
180 template<
typename VectorType >
233 void showMe ( std::ostream& output = std::cout )
const;
247 M_postprocessingDirectory = directory;
256 M_postprocessingFile = file;
329 M_thickness[i] = thickness;
395 M_dBeta0dz[i] = dBeta0dz;
455 return M_meshPtr->pointList ( M_meshPtr->numVertices() - 1).x() - M_meshPtr->pointList ( 0 ).x();
464 return M_meshPtr->numElements();
473 return M_meshPtr->numPoints();
491 return M_viscoelasticCoefficient[i];
536 return M_postprocessingDirectory;
545 return M_postprocessingFile;
650 return M_thickness[i];
709 return M_dArea0dz[i];
719 return M_dAlphadz[i];
729 return M_dBeta0dz[i];
739 return M_dBeta1dz[i];
789 return M_celerity1[i];
799 return M_celerity2[i];
809 return M_celerity1LeftEigenvector1[i];
819 return M_celerity1LeftEigenvector2[i];
829 return M_celerity2LeftEigenvector1[i];
839 return M_celerity2LeftEigenvector2[i];
849 return M_source10[i];
859 return M_source20[i];
869 return M_source11[i];
879 return M_source12[i];
889 return M_source21[i];
899 return M_source22[i];
920 const std::string& quantity,
921 const Real& defaultValue,
922 const bool& isArea =
false );
1020 template<
typename VectorType >
1026 Real meanH = MeshUtility::MeshStatistics::computeSize (*M_meshPtr).meanH;
1027 switch ( bcFiniteDifferenceOrder )
1034 return ( -vector[0] + vector[1] ) / ( meanH );
1036 else if ( iNode == M_meshPtr->numPoints() - 1 )
1038 return ( vector[iNode] - vector[iNode - 1] ) / ( meanH );
1042 return ( vector[iNode + 1] - vector[iNode - 1] ) / ( 2.0 * meanH );
1052 return ( -1.5 * vector[0] + 2.0 * vector[1] - 0.5 * vector[2] ) / ( meanH );
1054 else if ( iNode == M_meshPtr->numPoints() - 1 )
1056 return ( 1.5 * vector[iNode] - 2.0 * vector[iNode - 1] + 0.5 * vector[iNode - 2] ) / ( meanH );
1060 return ( vector[iNode + 1] - vector[iNode - 1] ) / ( 2.0 * meanH );
1067 std::cout <<
"!!! Warning: finite difference order \"" << bcFiniteDifferenceOrder <<
"\"not available!" << std::endl;
timePtr_Type dataTime() const
Get data time container.
RegionMesh< LinearLine > mesh_Type
const Real & venousPressure() const
Get the venous pressure.
std::string M_postprocessingDirectory
Miscellaneous.
void setVenousPressure(const Real &venousPressure)
Set the venous pressure at the terminals.
scalarVector_Type M_flux12
const std::string & postprocessingDirectory() const
Get the post-processing directory.
scalarVector_Type M_flux21
const Real & young() const
Get the wall Young modulus.
const OneDFSI::physicsType_Type & physicsType() const
Get the physics type.
const Real & leftEigenVector11(const UInt &i) const
Get the left eigenvector coefficient (used only in the linear problem)
const Real & source11(const UInt &i) const
Get the source coefficient (used only in the linear problem)
OneDFSIData()
Empty constructor.
scalarVector_Type M_celerity1LeftEigenvector2
void setup(const GetPot &dataFile, const std::string §ion="1D_Model")
Setup method.
scalarVector_Type M_dAlphadz
scalarVector_Type M_alpha
const Real & CFLmax() const
Get the imposed CFL condition.
scalarVector_Type M_thickness
OneDFSIData - Class which read and holds all the data for the One Dimensional Model Solver...
const Real & source21(const UInt &i) const
Get the source coefficient (used only in the linear problem)
scalarVector_Type M_dArea0dz
Derivatives of main coefficients.
scalarVector_Type M_celerity2LeftEigenvector2
void setPostprocessingDirectory(const std::string &directory)
Set the post-processing directory.
scalarVector_Type M_flux11
Flux matrix.
scalarVector_Type M_source21
const Real & flux21(const UInt &i) const
Get the flux coefficient (used only in the linear problem)
bool M_computeCoefficients
Physical Parameters.
const Real & leftEigenVector12(const UInt &i) const
Get the left eigenvector coefficient (used only in the linear problem)
const Real & beta1(const UInt &i) const
Get the coefficient.
const Real & jacobianPerturbationFlowRate() const
Get the flow rate perturbation parameter to compute the Jacobian matrix (in the Multiscale framework)...
Real M_robertsonCorrection
Real length() const
Get the length of the 1D segment.
scalarVector_Type M_source12
const Real & jacobianPerturbationArea() const
Get the area perturbation parameter to compute the Jacobian matrix (in the Multiscale framework) ...
const Real & flux12(const UInt &i) const
Get the flux coefficient (used only in the linear problem)
Real M_viscoelasticPeriod
void setJacobianPerturbationFlowRate(const Real &jacobianPerturbationFlowRate)
Set the flow rate perturbation parameter to compute the Jacobian matrix (in the Multiscale framework)...
virtual ~OneDFSIData()
Destructor.
int32_type Int
Generic integer data.
const Real & source20(const UInt &i) const
Get the source coefficient (used only in the linear problem)
const Real & poisson() const
Get the wall Poisson number.
void updateCoefficients()
Update all the physical coefficients.
const Real & beta0(const UInt &i) const
Get the coefficient.
const Real & externalPressure() const
Get the wall external pressure.
const Real & area0(const UInt &i) const
Get the reference area .
scalarVector_Type M_source20
void setArea0(const Real &area0, const UInt &i)
Set the reference area.
Real M_jacobianPerturbationStress
void updateInverseJacobian(const UInt &iQuadPt)
void resetContainers()
Reset all the containers.
const Real & thickness(const UInt &i) const
Get the wall thickness.
const Real & viscoelasticCoefficient(const UInt &i) const
Get the viscoelastic coefficient .
void setExternalPressure(const Real &externalPressure)
Set the wall external pressure.
std::shared_ptr< mesh_Type > meshPtr_Type
scalarVector_Type M_source11
OneDFSI::sourceTerm_Type M_sourceType
meshPtr_Type mesh() const
Get the mesh container.
void setJacobianPerturbationStress(const Real &jacobianPerturbationStress)
Set the stress perturbation parameter to compute the Jacobian matrix (in the Multiscale framework) ...
scalarVector_Type M_celerity1LeftEigenvector1
Eigenvector for first and second eigenvalue.
void setTimeData(const timePtr_Type timeDataPtr)
Set data time container.
scalarVector_Type M_viscoelasticCoefficient
const Real & dArea0dz(const UInt &i) const
Get .
const Real & robertsonCorrection() const
Get the Robertson correction coefficient (Not tested: maybe wrong in the code)
scalarVector_Type M_area0
const bool & longitudinalWall() const
Get the flag identifying if the wall has a longitudinal pre-stress.
scalarVector_Type M_celerity2LeftEigenvector1
const Real & densityWall() const
Get the density of the wall.
void showMe(std::ostream &output=std::cout) const
Initialize linear parameters (NOT WORKING)
const OneDFSI::sourceTerm_Type & sourceType() const
Get the source type.
void setViscosity(const Real &viscosity)
Set the fluid viscosity.
void setDensity(const Real &density)
Set the fluid density.
const Real & alpha(const UInt &i) const
Get the Coriolis coefficient .
const Real & celerity1(const UInt &i) const
Get the first eigenvector (used only in the linear problem)
const Real & jacobianPerturbationStress() const
Get the stress perturbation parameter to compute the Jacobian matrix (in the Multiscale framework) ...
void setThickness(const Real &thickness, const UInt &i)
Set the wall thickness.
std::string M_postprocessingFile
full directory name (including path)
scalarVector_Type M_beta0
scalarVector_Type M_beta1
const Real & leftEigenVector22(const UInt &i) const
Get the left eigenvector coefficient (used only in the linear problem)
const Real & celerity2(const UInt &i) const
Get the second eigenvector (used only in the linear problem)
void computeSpatialDerivatives()
Compute the derivatives of alpha, area0, beta0, and beta1 using centered differences.
void setYoung(const Real &young)
Set the wall Young modulus.
ublas::vector< Real > scalarVector_Type
Int M_powerLawCoefficient
const Real & dBeta1dz(const UInt &i) const
Get .
void linearInterpolation(scalarVector_Type &vector, const GetPot &dataFile, const std::string &quantity, const Real &defaultValue, const bool &isArea=false)
Compute the linear interpolation of a general quantity.
scalarVector_Type M_flux22
Real computeSpatialDerivativeAtNode(const VectorType &vector, const UInt &iNode, const UInt &bcFiniteDifferenceOrder=2)
Compute the spatial derivative of a quantity at a node.
scalarVector_Type M_dBeta1dz
const bool & viscoelasticWall() const
Get the flag identifying if the wall is viscoelastic.
UInt numberOfNodes() const
Get the number of nodes in the 1D segment.
scalarVector_Type M_celerity1
Celerities of the linear problem (eigenvalues of the flux matrix)
double Real
Generic real data.
Real M_jacobianPerturbationArea
Jacobian perturbation.
std::array< Real, 2 > container2D_Type
const bool & inertialWall() const
Get the flag identifying if the wall has inertia.
std::shared_ptr< time_Type > timePtr_Type
const Real & inertialModulus() const
Get the inertial coefficient (to be defined)
scalarVector_Type M_source22
const Real & viscosity() const
Get the fluid viscosity.
void setDensityWall(const Real &densityWall)
Set the wall density.
const Real & flux22(const UInt &i) const
Get the flux coefficient (used only in the linear problem)
OneDFSI::physicsType_Type M_physicsType
Model.
const std::string & postprocessingFile() const
Get the post-processing file.
timePtr_Type M_timeDataPtr
Data containers for time and mesh.
#define LIFEV_DEPRECATED(func)
const OneDFSI::fluxTerm_Type & fluxType() const
Get the flux type.
UInt numberOfElements() const
Get the number of elements in the 1D segment.
void setdBeta0dz(const Real &dBeta0dz, const UInt &i)
Set the wall .
void setPoisson(const Real &poisson)
Set the wall Poisson number.
const Real & leftEigenVector21(const UInt &i) const
Get the left eigenvector coefficient (used only in the linear problem)
const Real & source12(const UInt &i) const
Get the source coefficient (used only in the linear problem)
scalarVector_Type M_dBeta0dz
const Real & densityRho() const
Get the fluid density.
const Real & dBeta0dz(const UInt &i) const
Get .
scalarVector_Type M_source10
Source matrix.
Real M_jacobianPerturbationFlowRate
const Real & source22(const UInt &i) const
Get the source coefficient (used only in the linear problem)
OneDFSI::fluxTerm_Type M_fluxType
void setBeta0(const Real &beta0, const UInt &i)
Set the wall .
const Real & source10(const UInt &i) const
Get the source coefficient (used only in the linear problem)
Real M_CFLmax
output file name
uint32_type UInt
generic unsigned integer (used mainly for addressing)
const Real & friction() const
Get the wall friction coefficient .
const Real & dAlphadz(const UInt &i) const
Get .
void setPostprocessingFile(const std::string &file)
Set the post-processing file name.
const Real & flux11(const UInt &i) const
Get the flux coefficient (used only in the linear problem)
void setJacobianPerturbationArea(const Real &jacobianPerturbationArea)
Set the area perturbation parameter to compute the Jacobian matrix (in the Multiscale framework) ...
bool M_viscoelasticWall
Physical Wall Model.
scalarVector_Type M_celerity2
TimeData - Class for handling temporal discretization.