10 #if !defined(KRATOS_FLUID_ELEMENT_H_INCLUDED)
11 #define KRATOS_FLUID_ELEMENT_H_INCLUDED
45 class KRATOS_API(PFEM_APPLICATION) FluidElement
129 pNcontainer=&rNcontainer;
134 pProcessInfo=&rProcessInfo;
153 return *pProcessInfo;
158 const unsigned int& number_of_nodes )
169 IntegrationWeight = 1;
176 StrainVector.
resize(voigt_size,
false);
177 StressVector.
resize(voigt_size,
false);
178 N.resize(number_of_nodes,
false);
181 B.resize(voigt_size,
dimension*number_of_nodes,
false);
185 ConstitutiveMatrix.
resize(voigt_size,voigt_size,
false);
331 void GetValuesVector(
Vector& rValues,
int Step = 0)
const override;
377 const std::vector<ConstitutiveLaw::Pointer>& rValues,
387 std::vector<ConstitutiveLaw::Pointer>& rValues,
408 void InitializeNonLinearIteration(
const ProcessInfo& rCurrentProcessInfo)
override;
413 void FinalizeNonLinearIteration(
const ProcessInfo& rCurrentProcessInfo)
override;
418 void FinalizeSolutionStep(
const ProcessInfo& rCurrentProcessInfo)
override;
464 void CalculateFirstDerivativesContributions(
MatrixType& rLeftHandSideMatrix,
475 void CalculateSecondDerivativesContributions(
MatrixType& rLeftHandSideMatrix,
485 void CalculateSecondDerivativesLHS(
MatrixType& rLeftHandSideMatrix,
495 void CalculateSecondDerivativesRHS(
VectorType& rRightHandSideVector,
513 void CalculateDampingMatrix(
MatrixType& rDampingMatrix,
526 virtual void AddExplicitContribution(
const VectorType& rRHSVector,
570 std::string
Info()
const override
572 std::stringstream buffer;
573 buffer <<
"Fluid Element #" << Id();
580 rOStream <<
"Fluid Element #" << Id();
586 GetGeometry().PrintData(rOStream);
621 virtual void SetProcessInformation(
const ProcessInfo& rCurrentProcessInfo);
627 unsigned int increment)
const;
650 void CalculatePerturbedLeftHandSide (
MatrixType& rLeftHandSideMatrix,
672 virtual void CalculateAndAddDynamicLHS(
MatrixType& rLeftHandSideMatrix,
678 virtual void CalculateAndAddDynamicRHS(
VectorType& rRightHandSideVector,
684 virtual void CalculateAndAddKvvm(
MatrixType& rLeftHandSideMatrix,
690 virtual void CalculateAndAddKvvg(
MatrixType& rLeftHandSideMatrix,
697 virtual void CalculateAndAddExternalForces(
VectorType& rRightHandSideVector,
704 virtual void CalculateAndAddInternalForces(
VectorType& rRightHandSideVector,
713 const int & rPointNumber);
721 const int & rPointNumber);
726 virtual unsigned int GetDofsSize()
const;
737 virtual void InitializeSystemMatrices(
MatrixType& rLeftHandSideMatrix,
739 Flags& rCalculationFlags);
744 void InitializeConstitutiveLaw();
750 void ResetConstitutiveLaw()
override;
756 void InitializeExplicitContributions();
763 const double& rPointNumber);
769 const double& rPointNumber);
781 const double& rPointNumber);
787 const double& rPointNumber);
792 void CalculateVelocityGradient(
Matrix& rL,
794 unsigned int step = 0);
799 void CalculateVelocityGradientVector(
Vector& rVector,
802 unsigned int step = 0);
806 void CalculateVelocityGradientVector(
Vector& rVector,
808 unsigned int step = 0);
813 void CalculateSymmetricVelocityGradient(
const Matrix& rL,
819 void CalculateSkewSymmetricVelocityGradient(
const Matrix& rL,
825 virtual double& CalculateIntegrationWeight(
double& rIntegrationWeight);
831 virtual double& CalculateTotalMass(
double& rTotalMass,
const ProcessInfo& rCurrentProcessInfo);
837 virtual double& CalculateVolumeChange(
double& rVolumeChange,
ElementDataType& rVariables);
887 virtual void save(
Serializer& rSerializer)
const override;
Definition: constitutive_law.h:47
StressMeasure
Definition: constitutive_law.h:69
@ StressMeasure_PK2
Definition: constitutive_law.h:71
std::vector< DofType::Pointer > DofsVectorType
Definition: element.h:100
std::vector< std::size_t > EquationIdVectorType
Definition: element.h:98
std::size_t IndexType
Definition: flags.h:74
Large Displacement Lagrangian Element for 3D and 2D geometries. (base class)
Definition: fluid_element.h:61
GeometryData::IntegrationMethod IntegrationMethod
Type definition for integration methods.
Definition: fluid_element.hpp:59
IntegrationMethod mThisIntegrationMethod
Definition: fluid_element.hpp:603
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
std::vector< ConstitutiveLaw::Pointer > mConstitutiveLawVector
Definition: fluid_element.hpp:608
void CalculateOnIntegrationPoints(const Variable< Vector > &rVariable, std::vector< Vector > &rOutput, const ProcessInfo &rCurrentProcessInfo) override
ConstitutiveLawType::Pointer ConstitutiveLawPointerType
Pointer type for constitutive laws.
Definition: fluid_element.hpp:55
void GetFirstDerivativesVector(Vector &rValues, int Step=0) const override
FluidElement(IndexType NewId, GeometryType::Pointer pGeometry)
Default constructors.
ElementData ElementDataType
Type for element variables.
Definition: fluid_element.hpp:261
ConstitutiveLaw ConstitutiveLawType
Definition: fluid_element.hpp:53
IntegrationMethod GetIntegrationMethod() const override
void CalculateOnIntegrationPoints(const Variable< double > &rVariable, std::vector< double > &rOutput, const ProcessInfo &rCurrentProcessInfo) override
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: fluid_element.hpp:578
FluidElement(FluidElement const &rOther)
Copy constructor.
void GetDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const override
FluidElement & operator=(FluidElement const &rOther)
Assignment operator.
KRATOS_DEFINE_LOCAL_FLAG(FINALIZED_STEP)
void GetSecondDerivativesVector(Vector &rValues, int Step=0) const override
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(FluidElement)
Counted pointer of FluidElement.
std::string Info() const override
Turn back information as a string.
Definition: fluid_element.hpp:570
GeometryData::SizeType SizeType
Type for size.
Definition: fluid_element.hpp:61
virtual ~FluidElement()
Destructor.
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
void CalculateOnIntegrationPoints(const Variable< Matrix > &rVariable, std::vector< Matrix > &rOutput, const ProcessInfo &rCurrentProcessInfo) override
virtual void Initialize(const ProcessInfo &rCurrentProcessInfo) override
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
void CalculateMassMatrix(MatrixType &rMassMatrix, const ProcessInfo &rCurrentProcessInfo) override
KRATOS_DEFINE_LOCAL_FLAG(COMPUTE_LHS_MATRIX)
void CalculateLeftHandSide(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo) override
KRATOS_DEFINE_LOCAL_FLAG(COMPUTE_RHS_VECTOR)
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: fluid_element.hpp:584
ConstitutiveLawType::StressMeasure StressMeasureType
StressMeasure from constitutive laws.
Definition: fluid_element.hpp:57
int Check(const ProcessInfo &rCurrentProcessInfo) const override
IntegrationMethod
Definition: geometry_data.h:76
std::size_t SizeType
Definition: geometry_data.h:173
Definition: amatrix_interface.h:41
void resize(std::size_t NewSize1, std::size_t NewSize2, bool preserve=0)
Definition: amatrix_interface.h:224
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
ProcessInfo holds the current value of different solution parameters.
Definition: process_info.h:59
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Modeler::Pointer Create(const std::string &ModelerName, Model &rModel, const Parameters ModelParameters)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:30
void SetValuesOnIntegrationPoints(TObject &dummy, const Variable< TDataType > &rVariable, const std::vector< TDataType > &values, const ProcessInfo &rCurrentProcessInfo)
Definition: add_mesh_to_python.cpp:185
pybind11::list CalculateOnIntegrationPoints(TObject &dummy, const Variable< TDataType > &rVariable, const ProcessInfo &rProcessInfo)
Definition: add_mesh_to_python.cpp:142
void InitializeSolutionStep(ConstructionUtility &rThisUtil, std::string ThermalSubModelPartName, std::string MechanicalSubModelPartName, std::string HeatFluxSubModelPartName, std::string HydraulicPressureSubModelPartName, bool thermal_conditions, bool mechanical_conditions, int phase)
Definition: add_custom_utilities_to_python.cpp:45
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
int step
Definition: face_heat.py:88
F
Definition: hinsberg_optimization.py:144
int dimension
Definition: isotropic_damage_automatic_differentiation.py:123
def load(f)
Definition: ode_solve.py:307
int L
Definition: ode_solve.py:390
def Alpha(n, j)
Definition: quadrature.py:93
int j
Definition: quadrature.py:648
J
Definition: sensitivityMatrix.py:58
N
Definition: sensitivityMatrix.py:29
B
Definition: sensitivityMatrix.py:76
Definition: constitutive_law.h:189
Definition: fluid_element.hpp:82
double detF
Definition: fluid_element.hpp:99
const ProcessInfo & GetProcessInfo()
Definition: fluid_element.hpp:151
void SetShapeFunctionsGradients(const GeometryType::ShapeFunctionsGradientsType &rDN_De)
Definition: fluid_element.hpp:122
Matrix L
Definition: fluid_element.hpp:107
double detJ
Definition: fluid_element.hpp:100
Matrix ConstitutiveMatrix
Definition: fluid_element.hpp:111
Vector N
Definition: fluid_element.hpp:104
Vector StrainVector
Definition: fluid_element.hpp:102
const Matrix & GetShapeFunctions()
Definition: fluid_element.hpp:146
Matrix DN_DX
Definition: fluid_element.hpp:110
double Tau
Definition: fluid_element.hpp:95
double IntegrationWeight
Definition: fluid_element.hpp:96
const GeometryType::ShapeFunctionsGradientsType & GetShapeFunctionsGradients()
Definition: fluid_element.hpp:141
Matrix F
Definition: fluid_element.hpp:108
GeometryType::JacobiansType j
Definition: fluid_element.hpp:115
Matrix B
Definition: fluid_element.hpp:106
void SetProcessInfo(const ProcessInfo &rProcessInfo)
Definition: fluid_element.hpp:132
Matrix DeltaPosition
Definition: fluid_element.hpp:116
Vector StressVector
Definition: fluid_element.hpp:103
void Initialize(const unsigned int &voigt_size, const unsigned int &dimension, const unsigned int &number_of_nodes)
Definition: fluid_element.hpp:156
StressMeasureType StressMeasure
Definition: fluid_element.hpp:92
void SetShapeFunctions(const Matrix &rNcontainer)
Definition: fluid_element.hpp:127
double Alpha
Definition: fluid_element.hpp:94
GeometryType::JacobiansType J
Definition: fluid_element.hpp:114
Definition: fluid_element.hpp:228
Flags CalculationFlags
Definition: fluid_element.hpp:238
void SetLeftHandSideMatrix(MatrixType &rLeftHandSideMatrix)
Definition: fluid_element.hpp:243
MatrixType & GetLeftHandSideMatrix()
Definition: fluid_element.hpp:251
void SetRightHandSideVector(VectorType &rRightHandSideVector)
Definition: fluid_element.hpp:245
VectorType & GetRightHandSideVector()
Definition: fluid_element.hpp:253