23 #include "custom_utilities/constitutive_law_utilities.h"
53 template<
unsigned int TDim,
unsigned int TyieldSurf>
102 static constexpr
SizeType VoigtSize = (TDim == 3) ? 6 : 3;
105 static constexpr
SizeType NumberOfEdges = (TDim == 3) ? 6 : 3;
111 static constexpr
double tolerance = std::numeric_limits<double>::epsilon();
147 GeometryType::Pointer pGeom,
148 PropertiesType::Pointer pProperties
161 PropertiesType::Pointer pProperties
171 Element::Pointer Clone(
187 Vector &rStrainVector,
double &rDamageElement,
bool &rIsDamaging,
const double CharacteristicLength,
188 const bool SaveIntVars)
override;
194 const Vector &rStrainVector,
195 Vector& rPlasticStrainVector,
196 double &rAcumulatedPlasticStrain,
198 double& rUniaxialStress,
199 bool &rIsPlastifying);
204 void ComputePlasticMultiplier(
const double UniaxialStress,
205 const double Threshold,
206 double &rPlasticMultiplier,
211 void ComputePlasticThreshold(
const double AcumulatedPlasticStrain,
218 void IntegratePerturbedStrain(
Vector &rPerturbedStressVector,
219 const Vector &rPerturbedStrainVector,
220 const Matrix &rElasticMatrix,
225 std::vector<double> &rOutput,
230 std::vector<Vector>& rOutput,
235 std::vector<Matrix>& rOutput,
238 Vector CalculateAveragePlasticStrain()
240 Vector average_plastic_strain(VoigtSize);
243 average_plastic_strain += mPlasticStrains[
i];
244 return average_plastic_strain / NumberOfEdges;
247 double CalculateAverageAcumulatedPlasticStrain()
249 double acumulated_strain = 0.0;
251 acumulated_strain += mAcumulatedPlasticStrains[
i];
252 return acumulated_strain / NumberOfEdges;
256 void CheckIfEraseElement(
257 const ProcessInfo &rCurrentProcessInfo,
258 const Properties& rProperties
261 if (this->mDamage >= 0.98 && this->CalculateAverageAcumulatedPlasticStrain() >= rProperties[MAX_PLASTIC_STRAIN]) {
262 this->Set(ACTIVE,
false);
263 this->mDamage = 0.98;
273 const ProcessInfo &rCurrentProcessInfo,
274 const bool CalculateStiffnessMatrixFlag,
275 const bool CalculateResidualVectorFlag)
override;
277 Vector mAcumulatedPlasticStrains;
278 Vector mPlasticityThresholds;
279 std::vector<Vector> mPlasticStrains;
280 double mUniaxialStress = 0.0;
Definition: constitutive_law.h:47
Base class for all Elements.
Definition: element.h:60
std::size_t IndexType
Definition: flags.h:74
Total Lagrangian element for 2D and 3D geometries.
Definition: generic_total_lagrangian_femdem_element.h:60
Total Lagrangian element taking into account a Classical Rule Of Mixtures and j2-plasticity for the f...
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:56
Geometry< NodeType >::PointsArrayType NodesArrayType
definition of nodes container type, redefined from GeometryType
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:83
static constexpr SizeType NumberOfEdges
We define the number of edges.
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:105
Node NodeType
definition of node type (default is: Node)
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:71
PointerVectorSet< Dof< double >, IndexedObject > DofsArrayType
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:97
Properties PropertiesType
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:77
Geometry< NodeType > GeometryType
definition of the geometry type with given NodeType
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:80
static constexpr SizeType VoigtSize
We define the dimension.
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:102
std::vector< Dof< double >::Pointer > DofsVectorType
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:95
Matrix MatrixType
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:87
std::size_t SizeType
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:91
GenericTotalLagrangianMixturesFemDemElement(GenericTotalLagrangianMixturesFemDemElement const &rOther)
Assignment operator.
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:134
GenericTotalLagrangianFemDemElement< TDim, TyieldSurf > BaseType
base type: an GeometricalObject that automatically has a unique number
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:68
array_1d< double, VoigtSize > BoundedVectorType
The definition of the bounded vector type.
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:114
std::vector< std::size_t > EquationIdVectorType
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:93
std::size_t IndexType
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:89
ConstitutiveLaw ConstitutiveLawType
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:62
Vector VectorType
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:85
Element ElementType
definition of element type
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:65
KRATOS_CLASS_INTRUSIVE_POINTER_DEFINITION(GenericTotalLagrangianMixturesFemDemElement)
Counted pointer of GenericTotalLagrangianMixturesFemDemElement.
GenericTotalLagrangianMixturesFemDemElement()
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:176
ConstitutiveLawType::Pointer ConstitutiveLawPointerType
Pointer type for constitutive laws.
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:108
GeometryData GeometryDataType
Definition: generic_total_lagrangian_mixtures_femdem_element.hpp:99
This defines the geometrical object, base definition of the element and condition entities.
Definition: geometrical_object.h:58
Definition: geometry_data.h:60
Geometry base class.
Definition: geometry.h:71
This object defines an indexed object.
Definition: indexed_object.h:54
This class defines the node.
Definition: node.h:65
PointerVector is a container like stl vector but using a vector to store pointers to its data.
Definition: pointer_vector.h:72
A sorted associative container similar to an STL set, but uses a vector to store pointers to its data...
Definition: pointer_vector_set.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
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
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
KratosZeroVector< double > ZeroVector
Definition: amatrix_interface.h:561
Internals::Matrix< double, AMatrix::dynamic, 1 > Vector
Definition: amatrix_interface.h:472
array_1d< double, 3 > VectorType
Definition: solid_mechanics_application_variables.cpp:19
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
T & noalias(T &TheMatrix)
Definition: amatrix_interface.h:484
def SetValue(entity, variable, value)
Definition: coupling_interface_data.py:256
integer i
Definition: TensorModule.f:17
Definition: base_solid_element.h:112
Definition: base_solid_element.h:73
Definition: constitutive_law.h:189