KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
plasticity_isotropic_kinematic_j2.h
Go to the documentation of this file.
1 // KRATOS ___ _ _ _ _ _ __ _
2 // / __\___ _ __ ___| |_(_) |_ _ _| |_(_)_ _____ / / __ ___ _____ /_\ _ __ _ __
3 // / / / _ \| '_ \/ __| __| | __| | | | __| \ \ / / _ \/ / / _` \ \ /\ / / __| //_\\| '_ \| '_ |
4 // / /__| (_) | | | \__ \ |_| | |_| |_| | |_| |\ V / __/ /__| (_| |\ V V /\__ \/ _ \ |_) | |_) |
5 // \____/\___/|_| |_|___/\__|_|\__|\__,_|\__|_| \_/ \___\____/\__,_| \_/\_/ |___/\_/ \_/ .__/| .__/
6 // |_| |_|
7 //
8 // License: BSD License
9 // license: structural_mechanics_application/license.txt
10 //
11 // Main authors: Fernando Rastellini
12 // Collaborators: Riccardo Rossi
13 // Vicente Mataix Ferrandiz
14 
15 #pragma once
16 
17 // System includes
18 
19 // External includes
20 
21 // Project includes
22 #include "includes/checks.h"
24 
25 namespace Kratos
26 {
29 
33 
37 
41 
45 
59 class KRATOS_API(CONSTITUTIVE_LAWS_APPLICATION) PlasticityIsotropicKinematicJ2
60  : public ConstitutiveLaw
61 {
62 public:
63 
66 
69  typedef std::size_t SizeType;
70 
72  static constexpr SizeType VoigtSize = 6; //3D only (for the moment)
73 
75  static constexpr SizeType Dimension = VoigtSize == 6 ? 3 : 2;
76 
79 
81  typedef Matrix MatrixType;
82 
83  // Counted pointer of PlasticityIsotropicKinematicJ2
85 
89 
94 
99 
103  ~PlasticityIsotropicKinematicJ2() override;
104 
109  ConstitutiveLaw::Pointer Clone() const override;
110 
114 
118 
123  void GetLawFeatures(Features& rFeatures) override;
124 
129  {
130  return Dimension;
131  };
132 
136  SizeType GetStrainSize() const override
137  {
138  return VoigtSize;
139  };
140 
146  bool Has(const Variable<double>& rThisVariable) override;
147 
153  double& GetValue(
154  const Variable<double>& rThisVariable,
155  double& rValue
156  ) override;
157 
163  void SetValue(
164  const Variable<double>& rThisVariable,
165  const double& rValue,
166  const ProcessInfo& rCurrentProcessInfo
167  ) override;
168 
177  void InitializeMaterial(const Properties& rMaterialProperties,
178  const GeometryType& rElementGeometry,
179  const Vector& rShapeFunctionsValues) override;
180 
189  void FinalizeSolutionStep(const Properties& rMaterialProperties,
190  const GeometryType& rElementGeometry,
191  const Vector& rShapeFunctionsValues,
192  const ProcessInfo& rCurrentProcessInfo) override;
193 
199  void InitializeMaterialResponsePK1(ConstitutiveLaw::Parameters& rValues) override;
200 
206  void InitializeMaterialResponsePK2(ConstitutiveLaw::Parameters& rValues) override;
207 
213  void InitializeMaterialResponseKirchhoff(ConstitutiveLaw::Parameters& rValues) override;
214 
220  void InitializeMaterialResponseCauchy(ConstitutiveLaw::Parameters& rValues) override;
221 
227  void CalculateMaterialResponsePK1(ConstitutiveLaw::Parameters& rValues) override;
228 
234  void CalculateMaterialResponsePK2(ConstitutiveLaw::Parameters& rValues) override;
235 
241  void CalculateMaterialResponseKirchhoff(ConstitutiveLaw::Parameters& rValues) override;
242 
248  void CalculateMaterialResponseCauchy(ConstitutiveLaw::Parameters& rValues) override;
249 
255  void FinalizeMaterialResponsePK1(ConstitutiveLaw::Parameters& rValues) override;
256 
262  void FinalizeMaterialResponsePK2(ConstitutiveLaw::Parameters& rValues) override;
263 
269  void FinalizeMaterialResponseKirchhoff(ConstitutiveLaw::Parameters& rValues) override;
270 
276  void FinalizeMaterialResponseCauchy(ConstitutiveLaw::Parameters& rValues) override;
277 
285  double& CalculateValue(ConstitutiveLaw::Parameters& rParameterValues,
286  const Variable<double>& rThisVariable,
287  double& rValue) override;
288 
297  int Check(
298  const Properties& rMaterialProperties,
299  const GeometryType& rElementGeometry,
300  const ProcessInfo& rCurrentProcessInfo
301  ) const override;
302 
309 
311  void PrintData(std::ostream& rOStream) const override {
312  rOStream << "Linear J2 Plasticity 3D constitutive law\n";
313  };
314 
315 protected:
316 
319 
323 
326 
330 
334 
341  double YieldFunction(
342  const double NormDeviatoricStress,
343  const Properties& rMaterialProperties
344  );
345 
352  void CalculateResponse6(
354  BoundedArrayType& rPlasticStrain,
355  double& rAccumulatedPlasticStrain
356  );
357 
366  void CalculateTangentTensor6(
367  const double DeltaGamma,
368  const double NormStressTrial,
369  const BoundedArrayType& rYieldFunctionNormalVector,
370  const Properties& rMaterialProperties,
371  MatrixType& rTangentTensor
372  );
373 
379  void CalculateElasticMatrix6(
380  const Properties& rMaterialProperties,
381  MatrixType& rElasticityTensor
382  );
383 
387 
388 
392 
393 
398 
399 private:
400 
403 
407 
411 
415 
420 
424 
425  friend class Serializer;
426 
427  void save(Serializer& rSerializer) const override;
428 
429  void load(Serializer& rSerializer) override;
430 
431 }; // Class PlasticityIsotropicKinematicJ2
432 } // namespace Kratos.
Definition: constitutive_law.h:47
Geometry base class.
Definition: geometry.h:71
Defines a Simo J2 plasticity CL with Isotropic & Kinematic Hardening in 3D.
Definition: plasticity_isotropic_kinematic_j2.h:61
std::size_t SizeType
Definition: plasticity_isotropic_kinematic_j2.h:69
double mEquivalentPlasticStrain
The last converged plastic strain.
Definition: plasticity_isotropic_kinematic_j2.h:325
Matrix MatrixType
The constitutive matrix type definition.
Definition: plasticity_isotropic_kinematic_j2.h:81
SizeType GetStrainSize() const override
Voigt tensor size:
Definition: plasticity_isotropic_kinematic_j2.h:136
BoundedArrayType mPlasticStrain
Definition: plasticity_isotropic_kinematic_j2.h:324
SizeType WorkingSpaceDimension() override
Dimension of the law:
Definition: plasticity_isotropic_kinematic_j2.h:128
ProcessInfo ProcessInfoType
Definition: plasticity_isotropic_kinematic_j2.h:67
ConstitutiveLaw BaseType
Definition: plasticity_isotropic_kinematic_j2.h:68
KRATOS_CLASS_POINTER_DEFINITION(PlasticityIsotropicKinematicJ2)
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: plasticity_isotropic_kinematic_j2.h:311
array_1d< double, VoigtSize > BoundedArrayType
The strain/stress vector type definition.
Definition: plasticity_isotropic_kinematic_j2.h:78
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
bool Has(const std::string &ModelerName)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:24
Parameters GetValue(Parameters &rParameters, const std::string &rEntry)
Definition: add_kratos_parameters_to_python.cpp:53
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def SetValue(entity, variable, value)
Definition: coupling_interface_data.py:256
def load(f)
Definition: ode_solve.py:307
Definition: constitutive_law.h:137
Definition: constitutive_law.h:189