101 B =
ZeroMatrix(StrainSize, Dimension * NumberOfNodes);
106 Displacements =
ZeroVector(Dimension * NumberOfNodes);
107 VolumetricNodalStrains =
ZeroVector(NumberOfNodes);
170 GeometryType::Pointer pGeometry
179 GeometryType::Pointer pGeometry,
180 PropertiesType::Pointer pProperties
190 mThisIntegrationMethod(rOther.mThisIntegrationMethod),
191 mConstitutiveLawVector(rOther.mConstitutiveLawVector)
210 void Initialize(
const ProcessInfo &rCurrentProcessInfo)
override;
222 void FinalizeSolutionStep(
const ProcessInfo& rCurrentProcessInfo)
override;
234 PropertiesType::Pointer pProperties)
const override;
245 GeometryType::Pointer pGeom,
246 PropertiesType::Pointer pProperties)
const override;
255 Element::Pointer Clone(
264 void EquationIdVector(
265 EquationIdVectorType& rResult,
266 const ProcessInfo& rCurrentProcessInfo)
const override;
274 DofsVectorType& rElementalDofList,
275 const ProcessInfo& rCurrentProcessInfo)
const override;
283 return mThisIntegrationMethod;
293 void CalculateLocalSystem(
303 void CalculateLeftHandSide(
312 void CalculateRightHandSide(
323 int Check(
const ProcessInfo& rCurrentProcessInfo)
const override;
333 std::vector<double>& rOutput,
344 std::vector<Vector>& rOutput,
362 const Parameters GetSpecifications()
const override;
365 std::string
Info()
const override
367 std::stringstream buffer;
368 buffer <<
"Small Displacement Mixed Strain Element #" << Id() <<
"\nConstitutive law: " << mConstitutiveLawVector[0]->Info();
375 rOStream <<
"Small Displacement Mixed Strain Element #" << Id() <<
"\nConstitutive law: " << mConstitutiveLawVector[0]->Info();
381 pGetGeometry()->PrintData(rOStream);
415 mThisIntegrationMethod = ThisIntegrationMethod;
424 mConstitutiveLawVector = ThisConstitutiveLawVector;
430 virtual void InitializeMaterial();
435 virtual bool UseElementProvidedStrain()
const;
445 virtual void SetConstitutiveVariables(
446 KinematicVariables& rThisKinematicVariables,
447 ConstitutiveVariables& rThisConstitutiveVariables,
462 virtual void CalculateConstitutiveVariables(
463 KinematicVariables& rThisKinematicVariables,
464 ConstitutiveVariables& rThisConstitutiveVariables,
502 Matrix mInverseAnisotropyTensor;
519 void CalculateKinematicVariables(
520 KinematicVariables& rThisKinematicVariables,
545 void CalculateEquivalentStrain(KinematicVariables& rThisKinematicVariables)
const;
551 void CalculateAnisotropyTensor(
const ProcessInfo &rCurrentProcessInfo);
558 void CalculateInverseAnisotropyTensor();
566 double CalculateBulkModulus(
const Matrix &rC)
const;
574 double CalculateShearModulus(
const Matrix &rC)
const;
583 const Vector& rStrainTensor
593 template<
class TType>
594 void GetValueOnConstitutiveLaw(
596 std::vector<TType>& rOutput)
598 const auto& r_geometry = GetGeometry();
599 const SizeType n_gauss = r_geometry.IntegrationPointsNumber(GetIntegrationMethod());
601 for (
IndexType i_gauss = 0; i_gauss < n_gauss; ++i_gauss) {
602 mConstitutiveLawVector[i_gauss]->GetValue(rVariable, rOutput[i_gauss]);
614 template<
class TType>
615 void CalculateOnConstitutiveLaw(
616 const Variable<TType>& rVariable,
617 std::vector<TType>& rOutput,
618 const ProcessInfo& rCurrentProcessInfo)
620 const auto& r_geometry = GetGeometry();
622 const SizeType dim = r_geometry.WorkingSpaceDimension();
624 const SizeType n_gauss = r_geometry.IntegrationPointsNumber(GetIntegrationMethod());
625 const auto& r_integration_points = r_geometry.IntegrationPoints(GetIntegrationMethod());
630 const auto& r_disp = r_geometry[i_node].FastGetSolutionStepValue(DISPLACEMENT);
632 kinematic_variables.Displacements(i_node *
dim +
d) = r_disp[
d];
634 kinematic_variables.VolumetricNodalStrains[i_node] = r_geometry[i_node].FastGetSolutionStepValue(VOLUMETRIC_STRAIN);
638 ConstitutiveVariables constitutive_variables(
strain_size);
639 ConstitutiveLaw::Parameters cons_law_values(r_geometry, GetProperties(), rCurrentProcessInfo);
640 auto& r_cons_law_options = cons_law_values.GetOptions();
641 r_cons_law_options.Set(ConstitutiveLaw::COMPUTE_STRESS,
true);
642 r_cons_law_options.Set(ConstitutiveLaw::USE_ELEMENT_PROVIDED_STRAIN,
true);
643 r_cons_law_options.Set(ConstitutiveLaw::COMPUTE_CONSTITUTIVE_TENSOR,
false);
646 for (
IndexType i_gauss = 0; i_gauss < n_gauss; ++i_gauss) {
648 CalculateKinematicVariables(kinematic_variables, i_gauss, GetIntegrationMethod());
651 SetConstitutiveVariables(kinematic_variables, constitutive_variables, cons_law_values, i_gauss, r_integration_points);
654 rOutput[i_gauss] = mConstitutiveLawVector[i_gauss]->CalculateValue(cons_law_values, rVariable, rOutput[i_gauss] );
672 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::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
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
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
Small displacement with strain based mixed formulation element.
Definition: small_displacement_mixed_volumetric_strain_element.h:65
SmallDisplacementMixedVolumetricStrainElement(SmallDisplacementMixedVolumetricStrainElement const &rOther)
Definition: small_displacement_mixed_volumetric_strain_element.h:188
SmallDisplacementMixedVolumetricStrainElement(IndexType NewId, GeometryType::Pointer pGeometry, PropertiesType::Pointer pProperties)
Definition: small_displacement_mixed_volumetric_strain_element.h:177
void SetIntegrationMethod(const IntegrationMethod &ThisIntegrationMethod)
Sets the used integration method.
Definition: small_displacement_mixed_volumetric_strain_element.h:413
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: small_displacement_mixed_volumetric_strain_element.h:379
ConstitutiveLawType::Pointer ConstitutiveLawPointerType
Pointer type for constitutive laws.
Definition: small_displacement_mixed_volumetric_strain_element.h:142
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: small_displacement_mixed_volumetric_strain_element.h:373
std::string Info() const override
Turn back information as a string.
Definition: small_displacement_mixed_volumetric_strain_element.h:365
IntegrationMethod mThisIntegrationMethod
Definition: small_displacement_mixed_volumetric_strain_element.h:397
Element BaseType
The base element type.
Definition: small_displacement_mixed_volumetric_strain_element.h:154
GeometryData::IntegrationMethod IntegrationMethod
Type definition for integration methods.
Definition: small_displacement_mixed_volumetric_strain_element.h:148
~SmallDisplacementMixedVolumetricStrainElement() override
Definition: small_displacement_mixed_volumetric_strain_element.h:195
std::vector< ConstitutiveLaw::Pointer > mConstitutiveLawVector
Currently selected integration methods.
Definition: small_displacement_mixed_volumetric_strain_element.h:399
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(SmallDisplacementMixedVolumetricStrainElement)
Node NodeType
This is the definition of the node.
Definition: small_displacement_mixed_volumetric_strain_element.h:151
void SetConstitutiveLawVector(const std::vector< ConstitutiveLaw::Pointer > &ThisConstitutiveLawVector)
Sets the used constitutive laws.
Definition: small_displacement_mixed_volumetric_strain_element.h:422
SmallDisplacementMixedVolumetricStrainElement()
Definition: small_displacement_mixed_volumetric_strain_element.h:164
ConstitutiveLaw ConstitutiveLawType
Reference type definition for constitutive laws.
Definition: small_displacement_mixed_volumetric_strain_element.h:139
ConstitutiveLawType::StressMeasure StressMeasureType
StressMeasure from constitutive laws.
Definition: small_displacement_mixed_volumetric_strain_element.h:145
IntegrationMethod GetIntegrationMethod() const override
Returns the used integration method.
Definition: small_displacement_mixed_volumetric_strain_element.h:281
SmallDisplacementMixedVolumetricStrainElement(IndexType NewId, GeometryType::Pointer pGeometry)
Definition: small_displacement_mixed_volumetric_strain_element.h:168
std::size_t IndexType
The definition of the index type.
Definition: key_hash.h:35
Modeler::Pointer Create(const std::string &ModelerName, Model &rModel, const Parameters ModelParameters)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:30
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
void ComputeEquivalentF(const Element &rElement, const TVectorType &rStrainTensor, TMatrixType &rF)
This method computes the deformation gradient F (for small deformation solid elements)
Definition: structural_mechanics_element_utilities.h:69
void CalculateB(const GeometricalObject &rElement, const TMatrixType1 &rDN_DX, TMatrixType2 &rB)
This method computes the deformation tensor B (for small deformation solid elements)
Definition: structural_mechanics_element_utilities.h:105
array_1d< double, 3 > GetBodyForce(const Element &rElement, const GeometryType::IntegrationPointsArrayType &rIntegrationPoints, const IndexType PointNumber)
This method returns the computed the computed body force.
Definition: structural_mechanics_element_utilities.cpp:71
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
KratosZeroMatrix< double > ZeroMatrix
Definition: amatrix_interface.h:559
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 strain_size
Definition: generate_hyper_elastic_simo_taylor_neo_hookean.py:16
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
B
Definition: sensitivityMatrix.py:76
Definition: constitutive_law.h:189
Definition: small_displacement_mixed_volumetric_strain_element.h:116
Vector StressVector
Definition: small_displacement_mixed_volumetric_strain_element.h:118
Vector StrainVector
Definition: small_displacement_mixed_volumetric_strain_element.h:117
Matrix D
Definition: small_displacement_mixed_volumetric_strain_element.h:119
ConstitutiveVariables(const SizeType StrainSize)
Definition: small_displacement_mixed_volumetric_strain_element.h:125
Definition: small_displacement_mixed_volumetric_strain_element.h:73
Matrix InvJ0
Definition: small_displacement_mixed_volumetric_strain_element.h:80
Matrix B
Definition: small_displacement_mixed_volumetric_strain_element.h:75
Matrix J0
Definition: small_displacement_mixed_volumetric_strain_element.h:79
double detF
Definition: small_displacement_mixed_volumetric_strain_element.h:76
double detJ0
Definition: small_displacement_mixed_volumetric_strain_element.h:78
Vector VolumetricNodalStrains
Definition: small_displacement_mixed_volumetric_strain_element.h:83
Vector EquivalentStrain
Definition: small_displacement_mixed_volumetric_strain_element.h:84
Matrix DN_DX
Definition: small_displacement_mixed_volumetric_strain_element.h:81
Vector N
Definition: small_displacement_mixed_volumetric_strain_element.h:74
Matrix F
Definition: small_displacement_mixed_volumetric_strain_element.h:77
Vector Displacements
Definition: small_displacement_mixed_volumetric_strain_element.h:82
KinematicVariables(const SizeType StrainSize, const SizeType Dimension, const SizeType NumberOfNodes)
Definition: small_displacement_mixed_volumetric_strain_element.h:92