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.
hencky_plastic_3D_law.hpp
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Ilaria Iaconeta, Bodhinanda Chandra
11 //
12 
13 
14 #if !defined (KRATOS_HENCKY_PLASTIC_3D_LAW_H_INCLUDED)
15 #define KRATOS_HENCKY_PLASTIC_3D_LAW_H_INCLUDED
16 
17 // System includes
18 
19 // External includes
20 
21 // Project includes
22 #include "custom_constitutive/hyperelastic_3D_law.hpp"
25 
26 namespace Kratos
27 {
28 
35 class KRATOS_API(PARTICLE_MECHANICS_APPLICATION) HenckyElasticPlastic3DLaw : public HyperElastic3DLaw
36 {
37 protected:
38 
42  struct VectorSplit
43  {
46  };
47 
48  struct MatrixSplit
49  {
55  };
56 
58  {
61  };
62 
63 
64 public:
70  typedef std::size_t SizeType;
71 
72  typedef ParticleFlowRule::Pointer MPMFlowRulePointer;
73  typedef ParticleYieldCriterion::Pointer YieldCriterionPointer;
74  typedef ParticleHardeningLaw::Pointer HardeningLawPointer;
75  typedef Properties::Pointer PropertiesPointer;
76 
82 
91 
92 
93  HenckyElasticPlastic3DLaw(MPMFlowRulePointer pMPMFlowRule, YieldCriterionPointer pYieldCriterion, HardeningLawPointer pHardeningLaw);
94 
99 
100 
105  //HyperElasticPlastic3DLaw& operator=(const HyperElasticPlastic3DLaw& rOther);
106 
111  ConstitutiveLaw::Pointer Clone() const override;
112 
116  ~HenckyElasticPlastic3DLaw() override;
117 
130  {
131  return 3;
132  };
133 
137  SizeType GetStrainSize() const override
138  {
139  return 6;
140  };
141 
142 
147  void GetLawFeatures(Features& rFeatures) override;
148 
149 
150  bool Has( const Variable<double>& rThisVariable ) override;
151  bool Has( const Variable<Vector>& rThisVariable ) override;
152  bool Has( const Variable<Matrix>& rThisVariable ) override;
153 
154  double& GetValue( const Variable<double>& rThisVariable, double& rValue ) override;
155  Vector& GetValue( const Variable<Vector>& rThisVariable, Vector& rValue ) override;
156  Matrix& GetValue( const Variable<Matrix>& rThisVariable, Matrix& rValue ) override;
157 
158 
159  void SetValue( const Variable<double>& rVariable,
160  const double& rValue,
161  const ProcessInfo& rCurrentProcessInfo ) override;
162  void SetValue( const Variable<Vector>& rThisVariable,
163  const Vector& rValue,
164  const ProcessInfo& rCurrentProcessInfo ) override;
165  void SetValue( const Variable<Matrix>& rThisVariable,
166  const Matrix& rValue,
167  const ProcessInfo& rCurrentProcessInfo ) override;
168 
169 
173  void InitializeMaterial( const Properties& rProps,
174  const GeometryType& rGeometry,
175  const Vector& rShapeFunctionsValues ) override;
176 
183  void CalculateMaterialResponseKirchhoff (Parameters & rValues) override;
184 
185 
195  int Check(const Properties& rMaterialProperties, const GeometryType& rElementGeometry, const ProcessInfo& rCurrentProcessInfo) const override;
196 
197 
198 
205  //virtual String Info() const;
209  //virtual void PrintInfo(std::ostream& rOStream) const;
213  //virtual void PrintData(std::ostream& rOStream) const;
214 
215 protected:
216 
222  unsigned int mPlasticRegion;
225 
227 
229 
231 
238 
239 
240  void GetDomainPressure( double& rPressure, const MaterialResponseVariables& rElasticVariables);
241 
242  virtual Matrix SetConstitutiveMatrixToAppropiateDimension(Matrix& rConstitutiveMatrix, const Matrix& rElastoPlasticTangentMatrix);
243 
244  virtual Vector SetStressMatrixToAppropiateVectorDimension(Vector& rStressVector, const Matrix& rStressMatrix );
245 
246  virtual void CorrectDomainPressure( Matrix& rStressMatrix, const MaterialResponseVariables& rElasticVariables);
247 
248  virtual void CalculateElastoPlasticTangentMatrix( const ParticleFlowRule::RadialReturnVariables & rReturnMappingVariables, const Matrix& rNewElasticLeftCauchyGreen,const double& rAlpha, Matrix& rElastoPlasticMatrix, const MaterialResponseVariables& rElasticVariables, const Properties& rProperties);
249 
250  double& TensorComponent(double & rCabcd,
251  const Matrix& rMA, const Matrix& rMB,
252  const unsigned int& a, const unsigned int& b,
253  const unsigned int& c, const unsigned int& d);
254 
255  virtual void MyTensorProduct(const Matrix& rMA, const Matrix& rMB,
256  Matrix& rEigenbasesProductMatrix);
257 
258  double& TensorComponent2(double & rCabcd,
259  const Matrix& rMA, const Matrix& rMB,
260  const unsigned int& a, const unsigned int& b,
261  const unsigned int& c, const unsigned int& d);
262 
263  virtual void MyTensorProduct2(const Matrix& rMA, const Matrix& rMB,
264  Matrix& rEigenbasesProductMatrix);
265 
266  double& TensorComponent3(double & rCabcd,
267  const Matrix& rMA,
268  const unsigned int& a, const unsigned int& b,
269  const unsigned int& c, const unsigned int& d);
270 
271  virtual void MyTensorProduct3(const Matrix& rMA,
272  Matrix& rEigenbasesProductMatrix);
273 
274  double& TensorComponent4(double & rCabcd,
275  const Matrix& rMA,
276  const unsigned int& a, const unsigned int& b,
277  const unsigned int& c, const unsigned int& d);
278 
279  virtual void MyTensorProduct4(const Matrix& rMA,
280  Matrix& rEigenbasesProductMatrix);
281 
282 
283  virtual Matrix CalculateEigenbases(const ParticleFlowRule::RadialReturnVariables& rReturnMappingVariables, Matrix& rEigenbasesMatrix);
284 
285 
286 
287  Vector& GetStressVectorFromMatrix(const Matrix& rStressMatrix,
288  Vector& rMainStress,
289  const Matrix& rEigenVectors);
290 
291  virtual void CalculateHenckyMainStrain(const Matrix& rCauchyGreeMatrix,
292  ParticleFlowRule::RadialReturnVariables& rReturnMappingVariables,
293  Vector& rMainStrain);
294 
295  virtual void CalculatePrincipalStressTrial(const MaterialResponseVariables & rElasticVariables,Parameters & rValues, const ParticleFlowRule::RadialReturnVariables& rReturnMappingVariables,
296  Matrix& rNewElasticLeftCauchyGreen, Matrix& rStressMatrix);
297 
298 
299 private:
300 
303 
304 
308 
309 
313 
314 
318 
319 
324 
325 
329  friend class Serializer;
330 
331  void save(Serializer& rSerializer) const override
332  {
334 
335  rSerializer.save("mElasticLeftCauchyGreen",mElasticLeftCauchyGreen);
336  rSerializer.save("mpMPMFlowRule",mpMPMFlowRule);
337  rSerializer.save("mpYieldCriterion",mpYieldCriterion);
338  rSerializer.save("mpHardeningLaw",mpHardeningLaw);
339  }
340 
341  void load(Serializer& rSerializer) override
342  {
344 
345  rSerializer.load("mElasticLeftCauchyGreen",mElasticLeftCauchyGreen);
346  rSerializer.load("mpMPMFlowRule",mpMPMFlowRule);
347  rSerializer.load("mpYieldCriterion",mpYieldCriterion);
348  rSerializer.load("mpHardeningLaw",mpHardeningLaw);
349  }
350 
351 
352 
353 
354 }; // Class HenckyElasticPlastic3DLaw
355 
356 } //namespace Kratos
357 
358 #endif //KRATOS_HENCKY_PLASTIC_3D_LAW_H_INCLUDED
359 
Definition: constitutive_law.h:47
std::size_t SizeType
Definition: constitutive_law.h:82
Geometry base class.
Definition: geometry.h:71
Definition: hencky_plastic_3D_law.hpp:36
ConstitutiveLaw BaseType
Definition: hencky_plastic_3D_law.hpp:69
std::size_t SizeType
Definition: hencky_plastic_3D_law.hpp:70
ParticleHardeningLaw::Pointer HardeningLawPointer
Definition: hencky_plastic_3D_law.hpp:74
ParticleFlowRule::Pointer MPMFlowRulePointer
Definition: hencky_plastic_3D_law.hpp:72
HardeningLawPointer mpHardeningLaw
Definition: hencky_plastic_3D_law.hpp:230
SizeType GetStrainSize() const override
Definition: hencky_plastic_3D_law.hpp:137
Matrix mPlasticDeformationGradient
Definition: hencky_plastic_3D_law.hpp:223
MPMFlowRulePointer mpMPMFlowRule
Definition: hencky_plastic_3D_law.hpp:226
Properties::Pointer PropertiesPointer
Definition: hencky_plastic_3D_law.hpp:75
unsigned int mPlasticRegion
Definition: hencky_plastic_3D_law.hpp:222
Matrix mElasticLeftCauchyGreen
Definition: hencky_plastic_3D_law.hpp:224
YieldCriterionPointer mpYieldCriterion
Definition: hencky_plastic_3D_law.hpp:228
ParticleYieldCriterion::Pointer YieldCriterionPointer
Definition: hencky_plastic_3D_law.hpp:73
SizeType WorkingSpaceDimension() override
Definition: hencky_plastic_3D_law.hpp:129
KRATOS_CLASS_POINTER_DEFINITION(HenckyElasticPlastic3DLaw)
ProcessInfo ProcessInfoType
Definition: hencky_plastic_3D_law.hpp:68
Definition: hyperelastic_3D_law.hpp:38
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
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
void load(std::string const &rTag, TDataType &rObject)
Definition: serializer.h:207
void save(std::string const &rTag, std::array< TDataType, TDataSize > const &rObject)
Definition: serializer.h:545
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
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
a
Definition: generate_stokes_twofluid_element.py:77
b
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:31
c
Definition: generate_weakly_compressible_navier_stokes_element.py:108
def load(f)
Definition: ode_solve.py:307
int d
Definition: ode_solve.py:397
Definition: constitutive_law.h:189
Definition: hencky_plastic_3D_law.hpp:49
Matrix Plastic
Definition: hencky_plastic_3D_law.hpp:54
Matrix Volumetric
Definition: hencky_plastic_3D_law.hpp:53
Matrix Isochoric
Definition: hencky_plastic_3D_law.hpp:52
Matrix EigenValues
Definition: hencky_plastic_3D_law.hpp:50
Matrix EigenVectors
Definition: hencky_plastic_3D_law.hpp:51
Matrix TrialLeftStretchTensor
Definition: hencky_plastic_3D_law.hpp:59
Matrix InverseTrialLeftStretchTensor
Definition: hencky_plastic_3D_law.hpp:60
Definition: hencky_plastic_3D_law.hpp:43
Vector Isochoric
Definition: hencky_plastic_3D_law.hpp:44
Vector Volumetric
Definition: hencky_plastic_3D_law.hpp:45
Definition: hyperelastic_3D_law.hpp:43
Definition: particle_flow_rule.hpp:130