65 template<std::
size_t TDim>
70 static constexpr std::size_t NumNodes = TDim + 1;
71 static constexpr std::size_t StrainSize = TDim == 2 ? 3 : 6;
72 static constexpr std::size_t BlockSize = TDim +1;
73 static constexpr std::size_t LocalSize = NumNodes*BlockSize;
124 ConstitutiveMatrix =
ZeroMatrix(StrainSize, StrainSize);
177 GeometryType::Pointer pGeometry)
184 GeometryType::Pointer pGeometry,
185 PropertiesType::Pointer pProperties)
186 :
Element(NewId, pGeometry, pProperties)
192 , mThisIntegrationMethod(rOther.mThisIntegrationMethod)
193 , mConstitutiveLawVector(rOther.mConstitutiveLawVector)
212 void Initialize(
const ProcessInfo &rCurrentProcessInfo)
override;
224 void FinalizeSolutionStep(
const ProcessInfo& rCurrentProcessInfo)
override;
236 PropertiesType::Pointer pProperties)
const override;
247 GeometryType::Pointer pGeom,
248 PropertiesType::Pointer pProperties)
const override;
257 Element::Pointer Clone(
268 const ProcessInfo& rCurrentProcessInfo)
const override;
277 const ProcessInfo& rCurrentProcessInfo)
const override;
285 return mThisIntegrationMethod;
325 int Check(
const ProcessInfo& rCurrentProcessInfo)
const override;
335 std::vector<double>& rOutput,
346 std::vector<Vector>& rOutput,
363 const Parameters GetSpecifications()
const override;
366 std::string
Info()
const override
368 std::stringstream buffer;
369 buffer <<
"Small Displacement Mixed Strain Element #" << Id() <<
"\nConstitutive law: " << mConstitutiveLawVector[0]->Info();
376 rOStream <<
"Small Displacement Mixed Strain Element #" << Id() <<
"\nConstitutive law: " << mConstitutiveLawVector[0]->Info();
382 pGetGeometry()->PrintData(rOStream);
426 Vector mMinShearModulusVector;
430 std::vector<ConstitutiveLaw::Pointer> mConstitutiveLawVector;
446 mThisIntegrationMethod = ThisIntegrationMethod;
453 void SetConstitutiveLawVector(
const std::vector<ConstitutiveLaw::Pointer>& ThisConstitutiveLawVector)
455 mConstitutiveLawVector = ThisConstitutiveLawVector;
461 virtual void InitializeMaterial();
466 virtual bool UseElementProvidedStrain()
const;
476 virtual void SetConstitutiveVariables(
477 KinematicVariables& rThisKinematicVariables,
478 ConstitutiveVariables& rThisConstitutiveVariables,
479 ConstitutiveLaw::Parameters& rValues,
492 virtual void CalculateConstitutiveVariables(
493 KinematicVariables& rThisKinematicVariables,
494 ConstitutiveVariables& rThisConstitutiveVariables,
495 ConstitutiveLaw::Parameters& rValues,
507 void CalculateKinematicVariables(
508 KinematicVariables& rThisKinematicVariables,
521 void CalculateEquivalentStrain(KinematicVariables& rThisKinematicVariables)
const;
531 void CalculateEquivalentF(KinematicVariables& rThisKinematicVariables)
const;
540 double CalculateShearModulus(
const Matrix &rC)
const;
548 double CalculateBulkModulus(
const Matrix &rC)
const;
557 template<
class TType>
558 void GetValueOnConstitutiveLaw(
559 const Variable<TType>& rVariable,
560 std::vector<TType>& rOutput)
562 const auto& r_geometry = GetGeometry();
563 const SizeType n_gauss = r_geometry.IntegrationPointsNumber(GetIntegrationMethod());
565 for (
IndexType i_gauss = 0; i_gauss < n_gauss; ++i_gauss) {
566 mConstitutiveLawVector[i_gauss]->GetValue(rVariable, rOutput[i_gauss]);
578 template<
class TType>
579 void CalculateOnConstitutiveLaw(
580 const Variable<TType>& rVariable,
581 std::vector<TType>& rOutput,
582 const ProcessInfo& rCurrentProcessInfo)
584 const auto& r_geometry = GetGeometry();
586 const SizeType dim = r_geometry.WorkingSpaceDimension();
587 const SizeType n_gauss = r_geometry.IntegrationPointsNumber(GetIntegrationMethod());
588 const auto& r_integration_points = r_geometry.IntegrationPoints(GetIntegrationMethod());
591 KinematicVariables kinematic_variables;
593 const auto& r_disp = r_geometry[i_node].FastGetSolutionStepValue(DISPLACEMENT);
595 kinematic_variables.Displacements(i_node,
d) = r_disp[
d];
597 kinematic_variables.JacobianDeterminant[i_node] = r_geometry[i_node].FastGetSolutionStepValue(VOLUMETRIC_STRAIN);
601 ConstitutiveVariables constitutive_variables;
602 ConstitutiveLaw::Parameters cons_law_values(r_geometry, GetProperties(), rCurrentProcessInfo);
603 auto& r_cons_law_options = cons_law_values.GetOptions();
604 r_cons_law_options.Set(ConstitutiveLaw::COMPUTE_STRESS,
true);
605 r_cons_law_options.Set(ConstitutiveLaw::USE_ELEMENT_PROVIDED_STRAIN,
true);
606 r_cons_law_options.Set(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR,
false);
609 for (
IndexType i_gauss = 0; i_gauss < n_gauss; ++i_gauss) {
611 CalculateKinematicVariables(kinematic_variables, i_gauss, GetIntegrationMethod());
614 SetConstitutiveVariables(kinematic_variables, constitutive_variables, cons_law_values, i_gauss, r_integration_points);
617 rOutput[i_gauss] = mConstitutiveLawVector[i_gauss]->CalculateValue(cons_law_values, rVariable, rOutput[i_gauss] );
635 void save(
Serializer& rSerializer )
const override;
Definition: constitutive_law.h:47
StressMeasure
Definition: constitutive_law.h:69
@ StressMeasure_PK2
Definition: constitutive_law.h:71
Base class for all Elements.
Definition: element.h:60
std::size_t SizeType
Definition: element.h:94
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
This defines the geometrical object, base definition of the element and condition entities.
Definition: geometrical_object.h:58
IntegrationMethod
Definition: geometry_data.h:76
std::vector< IntegrationPointType > IntegrationPointsArrayType
Definition: geometry.h:161
GeometryData::IntegrationMethod IntegrationMethod
Definition: geometry.h:122
This class defines the node.
Definition: node.h:65
This class provides to Kratos a data structure for I/O based on the standard of JSON.
Definition: kratos_parameters.h:59
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
Properties encapsulates data shared by different Elements or Conditions. It can store any type of dat...
Definition: properties.h:69
The serialization consists in storing the state of an object into a storage format like data file or ...
Definition: serializer.h:123
Total Lagrangian mixed displacement volumetric strain formulation element.
Definition: total_lagrangian_mixed_volumetric_strain_element.h:68
ConstitutiveLawType::Pointer ConstitutiveLawPointerType
Pointer type for constitutive laws.
Definition: total_lagrangian_mixed_volumetric_strain_element.h:137
void GetDofList(DofsVectorType &rElementalDofList, const ProcessInfo &rCurrentProcessInfo) const override
Sets on rElementalDofList the degrees of freedom of the considered element geometry.
GeometryData::IntegrationMethod IntegrationMethod
Type definition for integration methods.
Definition: total_lagrangian_mixed_volumetric_strain_element.h:143
TotalLagrangianMixedVolumetricStrainElement(IndexType NewId, GeometryType::Pointer pGeometry)
Definition: total_lagrangian_mixed_volumetric_strain_element.h:175
Element BaseType
The base element type.
Definition: total_lagrangian_mixed_volumetric_strain_element.h:149
void CalculateRightHandSide(VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
This is called during the assembling process in order to calculate the elemental right hand side vect...
void CalculateLeftHandSide(MatrixType &rLeftHandSideMatrix, const ProcessInfo &rCurrentProcessInfo) override
This is called during the assembling process in order to calculate the elemental left hand side matri...
ConstitutiveLawType::StressMeasure StressMeasureType
StressMeasure from constitutive laws.
Definition: total_lagrangian_mixed_volumetric_strain_element.h:140
void EquationIdVector(EquationIdVectorType &rResult, const ProcessInfo &rCurrentProcessInfo) const override
Sets on rResult the ID's of the element degrees of freedom.
IntegrationMethod GetIntegrationMethod() const override
Returns the used integration method.
Definition: total_lagrangian_mixed_volumetric_strain_element.h:283
std::string Info() const override
Turn back information as a string.
Definition: total_lagrangian_mixed_volumetric_strain_element.h:366
void CalculateLocalSystem(MatrixType &rLeftHandSideMatrix, VectorType &rRightHandSideVector, const ProcessInfo &rCurrentProcessInfo) override
This function provides a more general interface to the element.
TotalLagrangianMixedVolumetricStrainElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Definition: total_lagrangian_mixed_volumetric_strain_element.h:182
TotalLagrangianMixedVolumetricStrainElement(TotalLagrangianMixedVolumetricStrainElement const &rOther)
Definition: total_lagrangian_mixed_volumetric_strain_element.h:190
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: total_lagrangian_mixed_volumetric_strain_element.h:380
ConstitutiveLaw ConstitutiveLawType
Reference type definition for constitutive laws.
Definition: total_lagrangian_mixed_volumetric_strain_element.h:134
~TotalLagrangianMixedVolumetricStrainElement() override
Definition: total_lagrangian_mixed_volumetric_strain_element.h:197
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: total_lagrangian_mixed_volumetric_strain_element.h:374
Node NodeType
This is the definition of the node.
Definition: total_lagrangian_mixed_volumetric_strain_element.h:146
TotalLagrangianMixedVolumetricStrainElement()
Definition: total_lagrangian_mixed_volumetric_strain_element.h:171
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(TotalLagrangianMixedVolumetricStrainElement)
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
std::size_t IndexType
Definition: binary_expression.cpp:25
Modeler::Pointer Create(const std::string &ModelerName, Model &rModel, const Parameters ModelParameters)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:30
std::size_t SizeType
Definition: nurbs_utilities.h:41
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
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
AMatrix::IdentityMatrix< double > IdentityMatrix
Definition: amatrix_interface.h:564
Properties PropertiesType
Definition: regenerate_pfem_pressure_conditions_process.h:26
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
Internals::Matrix< double, AMatrix::dynamic, AMatrix::dynamic > Matrix
Definition: amatrix_interface.h:470
std::size_t SizeType
The definition of the size type.
Definition: mortar_classes.h:43
ModelPart::NodesContainerType NodesArrayType
Definition: gid_gauss_point_container.h:42
int n_nodes
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:15
F
Definition: hinsberg_optimization.py:144
def load(f)
Definition: ode_solve.py:307
int d
Definition: ode_solve.py:397
N
Definition: sensitivityMatrix.py:29
int dim
Definition: sensitivityMatrix.py:25
Definition: total_lagrangian_mixed_volumetric_strain_element.h:112
Vector StressVector
Definition: total_lagrangian_mixed_volumetric_strain_element.h:114
Matrix ConstitutiveMatrix
Definition: total_lagrangian_mixed_volumetric_strain_element.h:115
ConstitutiveVariables()
Definition: total_lagrangian_mixed_volumetric_strain_element.h:120
Vector StrainVector
Definition: total_lagrangian_mixed_volumetric_strain_element.h:113
Definition: total_lagrangian_mixed_volumetric_strain_element.h:81
Matrix J0
Definition: total_lagrangian_mixed_volumetric_strain_element.h:85
Matrix DN_DX
Definition: total_lagrangian_mixed_volumetric_strain_element.h:88
Matrix F
Definition: total_lagrangian_mixed_volumetric_strain_element.h:83
Vector N
Definition: total_lagrangian_mixed_volumetric_strain_element.h:87
double detF
Definition: total_lagrangian_mixed_volumetric_strain_element.h:82
Vector EquivalentStrain
Definition: total_lagrangian_mixed_volumetric_strain_element.h:91
Matrix InvJ0
Definition: total_lagrangian_mixed_volumetric_strain_element.h:86
BoundedVector< double, NumNodes > JacobianDeterminant
Definition: total_lagrangian_mixed_volumetric_strain_element.h:90
KinematicVariables()
Definition: total_lagrangian_mixed_volumetric_strain_element.h:93
BoundedMatrix< double, NumNodes, TDim > Displacements
Definition: total_lagrangian_mixed_volumetric_strain_element.h:89
double detJ0
Definition: total_lagrangian_mixed_volumetric_strain_element.h:84