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.
generic_small_strain_thermal_isotropic_damage.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: Alejandro Cornejo
12 //
13 
14 #pragma once
15 
16 // System includes
17 
18 // External includes
19 // Project includes
22 #include "custom_utilities/constitutive_law_utilities.h"
23 
24 namespace Kratos
25 {
28 
32 
33  // The size type definition
34  typedef std::size_t SizeType;
35 
39 
43 
47 
55 template <class TConstLawIntegratorType>
56 class KRATOS_API(CONSTITUTIVE_LAWS_APPLICATION) GenericSmallStrainThermalIsotropicDamage
57  : public GenericSmallStrainIsotropicDamage<TConstLawIntegratorType>
58 {
59 public:
62 
64  static constexpr SizeType Dimension = TConstLawIntegratorType::Dimension;
65 
67  static constexpr SizeType VoigtSize = TConstLawIntegratorType::VoigtSize;
68 
71 
74 
77 
80 
84 
86  static constexpr double tolerance = std::numeric_limits<double>::epsilon();
87  static constexpr double threshold_tolerance = 1.0e-5;
88 
92 
97  {
98  }
99 
103  ConstitutiveLaw::Pointer Clone() const override
104  {
105  return Kratos::make_shared<GenericSmallStrainThermalIsotropicDamage<TConstLawIntegratorType>>(*this);
106  }
107 
112  : BaseType(rOther),
113  mReferenceTemperature(rOther.mReferenceTemperature)
114  {
115  }
116 
121  {
122  }
123 
127 
131 
136  void CalculateMaterialResponseCauchy(ConstitutiveLaw::Parameters &rValues) override;
137 
145  void InitializeMaterial(
146  const Properties& rMaterialProperties,
147  const GeometryType& rElementGeometry,
148  const Vector& rShapeFunctionsValues
149  ) override;
150 
155  void FinalizeMaterialResponseCauchy(ConstitutiveLaw::Parameters &rValues) override;
156 
162  bool Has(const Variable<double> &rThisVariable) override;
163 
170  void SetValue(
171  const Variable<double> &rThisVariable,
172  const double& rValue,
173  const ProcessInfo& rCurrentProcessInfo
174  ) override;
175 
182  double& GetValue(
183  const Variable<double> &rThisVariable,
184  double& rValue
185  ) override;
186 
191  {
192  return true;
193  }
194 
199  {
200  return false;
201  }
202 
212  int Check(
213  const Properties& rMaterialProperties,
214  const GeometryType& rElementGeometry,
215  const ProcessInfo& rCurrentProcessInfo
216  ) const override;
217 
218 
222 
226 
230 
234 
236 
237 protected:
240 
244 
248 
252 
256 
262  {
263  return mReferenceTemperature;
264  }
265 
270  void SetReferenceTemperature(const double ToRefTemperature)
271  {
272  mReferenceTemperature = ToRefTemperature;
273  }
274 
278 
282 
284 private:
287 
291 
292  double mReferenceTemperature = 0.0;
293 
297 
301 
305 
309 
313 
314  // Serialization
315 
316  friend class Serializer;
317 
318  void save(Serializer &rSerializer) const override
319  {
321  rSerializer.save("ReferenceTemperature", mReferenceTemperature);
322  }
323 
324  void load(Serializer &rSerializer) override
325  {
327  rSerializer.load("ReferenceTemperature", mReferenceTemperature);
328  }
329 
331 
332 }; // Class GenericYieldSurface
333 
334 } // namespace Kratos
This class includes several utilities necessaries for the computation of the constitutive law.
Definition: advanced_constitutive_law_utilities.h:59
This class includes several utilities necessaries for the computation of the constitutive law.
Definition: constitutive_law_utilities.h:63
This class is the base class which define all the constitutive laws for damage in small deformation.
Definition: generic_small_strain_isotropic_damage.h:58
std::conditional< VoigtSize==6, ElasticIsotropic3D, LinearPlaneStrain >::type BaseType
Definition of the base class.
Definition: generic_small_strain_isotropic_damage.h:70
This class derives from the Isotropic damage CL and adds thermal effects (material properties affecta...
Definition: generic_small_strain_thermal_isotropic_damage.h:58
KRATOS_CLASS_POINTER_DEFINITION(GenericSmallStrainThermalIsotropicDamage)
Counted pointer of GenericYieldSurface.
bool RequiresFinalizeMaterialResponse() override
If the CL requires to initialize the material response, called by the element in InitializeSolutionSt...
Definition: generic_small_strain_thermal_isotropic_damage.h:190
GenericSmallStrainThermalIsotropicDamage()
Definition: generic_small_strain_thermal_isotropic_damage.h:96
~GenericSmallStrainThermalIsotropicDamage() override
Definition: generic_small_strain_thermal_isotropic_damage.h:120
void SetReferenceTemperature(const double ToRefTemperature)
Sets the reference temperature.
Definition: generic_small_strain_thermal_isotropic_damage.h:270
double & GetReferenceTemperature()
Retrieve the reference temperature.
Definition: generic_small_strain_thermal_isotropic_damage.h:261
ConstitutiveLaw::Pointer Clone() const override
Definition: generic_small_strain_thermal_isotropic_damage.h:103
bool RequiresInitializeMaterialResponse() override
If the CL requires to initialize the material response, called by the element in InitializeSolutionSt...
Definition: generic_small_strain_thermal_isotropic_damage.h:198
GenericSmallStrainThermalIsotropicDamage(const GenericSmallStrainThermalIsotropicDamage &rOther)
Definition: generic_small_strain_thermal_isotropic_damage.h:111
Geometry base class.
Definition: geometry.h:71
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
std::size_t SizeType
The definition of the size type.
Definition: mortar_classes.h:43
def SetValue(entity, variable, value)
Definition: coupling_interface_data.py:256
def load(f)
Definition: ode_solve.py:307
Definition: constitutive_law.h:189