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.
elastic_isotropic_3d.h
Go to the documentation of this file.
1 // KRATOS ___| | | |
2 // \___ \ __| __| | | __| __| | | __| _` | |
3 // | | | | | ( | | | | ( | |
4 // _____/ \__|_| \__,_|\___|\__|\__,_|_| \__,_|_| MECHANICS
5 //
6 // License: BSD License
7 // license: StructuralMechanicsApplication/license.txt
8 //
9 // Main authors: Riccardo Rossi
10 // Vicente Mataix Ferrandiz
11 //
12 
13 #pragma once
14 
15 // System includes
16 
17 // External includes
18 
19 // Project includes
21 
22 namespace Kratos
23 {
26 
30 
34 
38 
42 
51 class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) ElasticIsotropic3D
52  : public ConstitutiveLaw
53 {
54 public:
55 
58 
61 
64 
66  typedef std::size_t SizeType;
67 
69  static constexpr SizeType Dimension = 3;
70 
72  static constexpr SizeType VoigtSize = 6;
73 
74  // Adding the respective using to avoid overload conflicts
75  using BaseType::Has;
76  using BaseType::GetValue;
77 
80 
84 
89 
93  ConstitutiveLaw::Pointer Clone() const override;
94 
98  ElasticIsotropic3D (const ElasticIsotropic3D& rOther);
99 
103  ~ElasticIsotropic3D() override;
104 
108 
112 
117  void GetLawFeatures(Features& rFeatures) override;
118 
123  {
124  return Dimension;
125  };
126 
130  SizeType GetStrainSize() const override
131  {
132  return VoigtSize;
133  };
134 
140  {
141  return StrainMeasure_Infinitesimal;
142  }
143 
149  {
150  return StressMeasure_Cauchy;
151  }
152 
159  void CalculateMaterialResponsePK1 (ConstitutiveLaw::Parameters & rValues) override;
160 
167  void CalculateMaterialResponsePK2 (ConstitutiveLaw::Parameters & rValues) override;
168 
175  void CalculateMaterialResponseKirchhoff (ConstitutiveLaw::Parameters & rValues) override;
176 
183  void CalculateMaterialResponseCauchy (ConstitutiveLaw::Parameters & rValues) override;
184 
189  void InitializeMaterialResponsePK1 (ConstitutiveLaw::Parameters& rValues) override;
190 
195  void InitializeMaterialResponsePK2 (ConstitutiveLaw::Parameters& rValues) override;
196 
201  void InitializeMaterialResponseKirchhoff (ConstitutiveLaw::Parameters& rValues) override;
202 
207  void InitializeMaterialResponseCauchy (ConstitutiveLaw::Parameters& rValues) override;
208 
215  void FinalizeMaterialResponsePK1 (ConstitutiveLaw::Parameters & rValues) override;
216 
223  void FinalizeMaterialResponsePK2 (ConstitutiveLaw::Parameters & rValues) override;
224 
231  void FinalizeMaterialResponseKirchhoff (ConstitutiveLaw::Parameters & rValues) override;
232 
239  void FinalizeMaterialResponseCauchy (ConstitutiveLaw::Parameters & rValues) override;
240 
245  {
246  return false;
247  }
248 
253  {
254  return false;
255  }
256 
264  double& CalculateValue(
265  ConstitutiveLaw::Parameters& rParameterValues,
266  const Variable<double>& rThisVariable,
267  double& rValue
268  ) override;
269 
277  Vector& CalculateValue(
278  ConstitutiveLaw::Parameters& rParameterValues,
279  const Variable<Vector>& rThisVariable,
280  Vector& rValue
281  ) override;
282 
283  // /**
284  // * @brief It calculates the value of a specified variable (StrainVectorType case)
285  // * @param rParameterValues the needed parameters for the CL calculation
286  // * @param rThisVariable the variable to be returned
287  // * @param rValue a reference to the returned value
288  // * @return rValue output: the value of the specified variable
289  // */
290  // ConstitutiveLaw::StrainVectorType& CalculateValue(
291  // ConstitutiveLaw::Parameters& rParameterValues,
292  // const Variable<StrainVectorType>& rThisVariable,
293  // ConstitutiveLaw::StrainVectorType& rValue
294  // ) override;
295 
296  // /**
297  // * @brief It calculates the value of a specified variable (StressVectorType case)
298  // * @param rParameterValues the needed parameters for the CL calculation
299  // * @param rThisVariable the variable to be returned
300  // * @param rValue a reference to the returned value
301  // * @return rValue output: the value of the specified variable
302  // */
303  // ConstitutiveLaw::StressVectorType& CalculateValue(
304  // ConstitutiveLaw::Parameters& rParameterValues,
305  // const Variable<StressVectorType>& rThisVariable,
306  // ConstitutiveLaw::StressVectorType& rValue
307  // ) override;
308 
316  Matrix& CalculateValue(
317  ConstitutiveLaw::Parameters& rParameterValues,
318  const Variable<Matrix>& rThisVariable,
319  Matrix& rValue
320  ) override;
321 
322  // /**
323  // * @brief It calculates the value of a specified variable (VoigtSizeMatrixType case)
324  // * @param rParameterValues the needed parameters for the CL calculation
325  // * @param rThisVariable the variable to be returned
326  // * @param rValue a reference to the returned value
327  // * @return rValue output: the value of the specified variable
328  // */
329  // ConstitutiveLaw::VoigtSizeMatrixType& CalculateValue(
330  // ConstitutiveLaw::Parameters& rParameterValues,
331  // const Variable<VoigtSizeMatrixType>& rThisVariable,
332  // ConstitutiveLaw::VoigtSizeMatrixType& rValue
333  // ) override;
334 
335  // /**
336  // * @brief It calculates the value of a specified variable (DeformationGradientMatrixType case)
337  // * @param rParameterValues the needed parameters for the CL calculation
338  // * @param rThisVariable the variable to be returned
339  // * @param rValue a reference to the returned value
340  // * @return rValue output: the value of the specified variable
341  // */
342  // ConstitutiveLaw::DeformationGradientMatrixType& CalculateValue(
343  // ConstitutiveLaw::Parameters& rParameterValues,
344  // const Variable<DeformationGradientMatrixType>& rThisVariable,
345  // ConstitutiveLaw::DeformationGradientMatrixType& rValue
346  // ) override;
347 
356  int Check(
357  const Properties& rMaterialProperties,
358  const GeometryType& rElementGeometry,
359  const ProcessInfo& rCurrentProcessInfo
360  ) const override;
361 
362 
364  std::string Info() const override;
365 
370  void PrintInfo(std::ostream& rOStream) const override;
371 
372 protected:
373 
376 
380 
384 
388 
393  void CheckClearElasticMatrix(VoigtSizeMatrixType& rConstitutiveMatrix);
394 
400  virtual void CalculateElasticMatrix(
401  ConstitutiveLaw::VoigtSizeMatrixType& rConstitutiveMatrix,
403  );
404 
411  virtual void CalculatePK2Stress(
412  const ConstitutiveLaw::StrainVectorType& rStrainVector,
413  ConstitutiveLaw::StressVectorType& rStressVector,
415  );
416 
422  virtual void CalculateCauchyGreenStrain(
424  ConstitutiveLaw::StrainVectorType& rStrainVector
425  );
426 
428 
429 private:
430 
433 
437 
441 
445 
450 
454  friend class Serializer;
455 
456  void save(Serializer& rSerializer) const override
457  {
459  }
460 
461  void load(Serializer& rSerializer) override
462  {
464  }
465 
466 
467 }; // Class ElasticIsotropic3D
468 } // namespace Kratos.
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
Definition: constitutive_law.h:47
StrainMeasure
Definition: constitutive_law.h:52
StressMeasure
Definition: constitutive_law.h:69
Definition: elastic_isotropic_3d.h:53
KRATOS_CLASS_POINTER_DEFINITION(ElasticIsotropic3D)
Counted pointer of ElasticIsotropic3D.
SizeType GetStrainSize() const override
Voigt tensor size:
Definition: elastic_isotropic_3d.h:130
std::size_t SizeType
The size type definition.
Definition: elastic_isotropic_3d.h:66
StrainMeasure GetStrainMeasure() override
Returns the expected strain measure of this constitutive law (by default Green-Lagrange)
Definition: elastic_isotropic_3d.h:139
StressMeasure GetStressMeasure() override
Returns the stress measure of this constitutive law (by default 2st Piola-Kirchhoff stress in voigt n...
Definition: elastic_isotropic_3d.h:148
SizeType WorkingSpaceDimension() override
Dimension of the law:
Definition: elastic_isotropic_3d.h:122
ProcessInfo ProcessInfoType
The process info type definition.
Definition: elastic_isotropic_3d.h:60
ConstitutiveLaw BaseType
The base class ConstitutiveLaw type definition.
Definition: elastic_isotropic_3d.h:63
bool RequiresFinalizeMaterialResponse() override
If the CL requires to finalize the material response, called by the element in FinalizeSolutionStep.
Definition: elastic_isotropic_3d.h:252
bool RequiresInitializeMaterialResponse() override
If the CL requires to initialize the material response, called by the element in InitializeSolutionSt...
Definition: elastic_isotropic_3d.h:244
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
#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 load(f)
Definition: ode_solve.py:307
Definition: constitutive_law.h:137
Definition: constitutive_law.h:189