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.
johnson_cook_thermal_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: Peter Wilson
11 //
12 
13 #if !defined (KRATOS_JOHNSON_COOK_THERMAL_PLASTIC_3D_LAW_H_INCLUDED)
14 #define KRATOS_JOHNSON_COOK_THERMAL_PLASTIC_3D_LAW_H_INCLUDED
15 
16 // System includes
17 
18 // External includes
19 
20 // Project includes
21 
22 #include "custom_constitutive/hyperelastic_3D_law.hpp"
23 #include "includes/checks.h"
24 
25 
26 namespace Kratos
27 {
40 class KRATOS_API(PARTICLE_MECHANICS_APPLICATION) JohnsonCookThermalPlastic3DLaw : public HyperElastic3DLaw
41 {
42 public:
43 
47  typedef std::size_t SizeType;
48  typedef Properties::Pointer PropertiesPointer;
49 
52 
57 
62 
67 
72  ConstitutiveLaw::Pointer Clone() const override;
73 
78 
86  void GetLawFeatures(Features& rFeatures) override;
87 
88  double& GetValue(const Variable<double>& rThisVariable, double& rValue) override;
89 
90  void SetValue(const Variable<double>& rVariable,
91  const double& rValue,
92  const ProcessInfo& rCurrentProcessInfo) override;
93 
94  bool Has(const Variable<double>& rThisVariable) override;
95 
99  void InitializeMaterial(const Properties& rMaterialProperties,
100  const GeometryType& rElementGeometry,
101  const Vector& rShapeFunctionsValues) override;
102 
109  void CalculateMaterialResponseKirchhoff(Parameters& rValues) override;
110 
120  int Check(const Properties& rMaterialProperties, const GeometryType& rElementGeometry, const ProcessInfo& rCurrentProcessInfo) const override;//E:\Kratos\applications\SolidMechanicsApplication\custom_constitutive\hyperelastic_plastic_3D_law.hpp
121 
122 protected:
123 
129 
135  double mGammaOld;
141 
145 
152  bool CheckParameters(Parameters& rValues) override;
153 
154  virtual void MakeStrainStressMatrixFromVector(const Vector& rInput, Matrix& rOutput);
155 
156  virtual void MakeStrainStressVectorFromMatrix(const Matrix& rInput, Vector& rOutput);
157 
158  void CheckIsExplicitTimeIntegration(const ProcessInfo& rCurrentProcessInfo);
159 
160 private:
161 
162  double CalculateHardenedYieldStress(const Properties& MaterialProperties, const double EquivalentPlasticStrain,
163  const double PlasticStrainRate, const double Temperature);
164 
165  double CalculateThermalHardeningFactor(const Properties& MaterialProperties, const double Temperature);
166 
167  double CalculateStrainRateHardeningFactor(const Properties& MaterialProperties, const double PlasticStrainRate);
168 
169  double CalculateThermalDerivative(const Properties& MaterialProperties, const double EquivalentPlasticStrain,
170  const double PlasticStrainRate, const double Temperature);
171 
172  double CalculatePlasticStrainRateDerivative(const Properties& MaterialProperties, const double EquivalentPlasticStrain,
173  const double PlasticStrainRate, const double Temperature);
174 
175  double CalculatePlasticStrainDerivative(const Properties& MaterialProperties, const double EquivalentPlasticStrain,
176  const double PlasticStrainRate, const double Temperature);
177 
178  inline double GetSqrt32() { return 1.2247448713915900000; } //sqrt(3.0/2.0)
179 
180  inline double GetSqrt23() { return 0.8164965809277260000; } //sqrt(2.0/3.0)
181 
182  inline double GetSqrt6() { return 2.4494897427831800000; } //sqrt(6.0)
183 
184  friend class Serializer;
185 
186  void save(Serializer& rSerializer) const override
187  {
189 
190  rSerializer.save("mEquivalentStress", mEquivalentStress);
191  rSerializer.save("mStrainOld", mStrainOld);
192  rSerializer.save("mEquivalentPlasticStrainOld", mEquivalentPlasticStrainOld);
193  rSerializer.save("mPlasticStrainRateOld", mPlasticStrainRateOld);
194  rSerializer.save("mTemperatureOld", mTemperatureOld);
195  rSerializer.save("mGammaOld", mGammaOld);
196  rSerializer.save("mEnergyInternal", mEnergyInternal);
197  rSerializer.save("mEnergyDissipated", mEnergyDissipated);
198  rSerializer.save("mYieldStressOld", mYieldStressOld);
199  rSerializer.save("mYieldStressVirgin", mYieldStressVirgin);
200  rSerializer.save("mHardeningRatio", mHardeningRatio);
201  }
202 
203  void load(Serializer& rSerializer) override
204  {
206 
207  rSerializer.load("mEquivalentStress", mEquivalentStress);
208  rSerializer.load("mStrainOld", mStrainOld);
209  rSerializer.load("mEquivalentPlasticStrainOld", mEquivalentPlasticStrainOld);
210  rSerializer.load("mPlasticStrainRateOld", mPlasticStrainRateOld);
211  rSerializer.load("mTemperatureOld", mTemperatureOld);
212  rSerializer.load("mGammaOld", mGammaOld);
213  rSerializer.load("mEnergyInternal", mEnergyInternal);
214  rSerializer.load("mEnergyDissipated", mEnergyDissipated);
215  rSerializer.load("mYieldStressOld", mYieldStressOld);
216  rSerializer.load("mYieldStressVirgin", mYieldStressVirgin);
217  rSerializer.load("mHardeningRatio", mHardeningRatio);
218  }
219 
220 
221 
222 }; // Class JohnsonCookThermalPlastic3DLaw
223 } // namespace Kratos.
224 #endif // KRATOS_JOHNSON_COOK_THERMAL_PLASTIC_3D_LAW_H_INCLUDED defined
Geometry base class.
Definition: geometry.h:71
Definition: hyperelastic_3D_law.hpp:38
Definition: johnson_cook_thermal_plastic_3D_law.hpp:41
double mGammaOld
Definition: johnson_cook_thermal_plastic_3D_law.hpp:135
std::size_t SizeType
Definition: johnson_cook_thermal_plastic_3D_law.hpp:47
double mPlasticStrainRateOld
Definition: johnson_cook_thermal_plastic_3D_law.hpp:133
double mYieldStressOld
Definition: johnson_cook_thermal_plastic_3D_law.hpp:138
double mYieldStressVirgin
Definition: johnson_cook_thermal_plastic_3D_law.hpp:139
double mTemperatureOld
Definition: johnson_cook_thermal_plastic_3D_law.hpp:134
HyperElastic3DLaw BaseType
Definition: johnson_cook_thermal_plastic_3D_law.hpp:46
Vector mStrainOld
Definition: johnson_cook_thermal_plastic_3D_law.hpp:131
double mEquivalentPlasticStrainOld
Definition: johnson_cook_thermal_plastic_3D_law.hpp:132
Properties::Pointer PropertiesPointer
Definition: johnson_cook_thermal_plastic_3D_law.hpp:48
KRATOS_CLASS_POINTER_DEFINITION(JohnsonCookThermalPlastic3DLaw)
Counted pointer of JohnsonCookThermalPlastic3DLaw.
double mEnergyInternal
Definition: johnson_cook_thermal_plastic_3D_law.hpp:136
double mEnergyDissipated
Definition: johnson_cook_thermal_plastic_3D_law.hpp:137
double mHardeningRatio
Definition: johnson_cook_thermal_plastic_3D_law.hpp:140
ProcessInfo ProcessInfoType
Type Definitions.
Definition: johnson_cook_thermal_plastic_3D_law.hpp:45
double mEquivalentStress
Definition: johnson_cook_thermal_plastic_3D_law.hpp:130
JohnsonCookThermalPlastic3DLaw & operator=(const JohnsonCookThermalPlastic3DLaw &rOther)
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
def load(f)
Definition: ode_solve.py:307
Definition: constitutive_law.h:137
Definition: constitutive_law.h:189