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.
linear_elastic_law.h
Go to the documentation of this file.
1 // KRATOS___
2 // // ) )
3 // // ___ ___
4 // // ____ //___) ) // ) )
5 // // / / // // / /
6 // ((____/ / ((____ ((___/ / MECHANICS
7 //
8 // License: geo_mechanics_application/license.txt
9 //
10 // Main authors: Anne van de Graaf
11 //
12 
13 #pragma once
14 
16 
17 namespace Kratos
18 {
19 
20 class KRATOS_API(GEO_MECHANICS_APPLICATION) GeoLinearElasticLaw : public ConstitutiveLaw
21 {
22 public:
23  bool RequiresInitializeMaterialResponse() override;
24  bool RequiresFinalizeMaterialResponse() override;
25 
26  StrainMeasure GetStrainMeasure() override;
27  StressMeasure GetStressMeasure() override;
28 
29  void CalculateMaterialResponsePK1(ConstitutiveLaw::Parameters& rValues) override;
30  void CalculateMaterialResponsePK2(ConstitutiveLaw::Parameters& rValues) override;
31  void CalculateMaterialResponseKirchhoff(ConstitutiveLaw::Parameters& rValues) override;
32  void CalculateMaterialResponseCauchy(ConstitutiveLaw::Parameters& rValues) override;
33 
34  double& CalculateValue(ConstitutiveLaw::Parameters& rParameterValues,
35  const Variable<double>& rThisVariable,
36  double& rValue) override;
37  Vector& CalculateValue(ConstitutiveLaw::Parameters& rParameterValues,
38  const Variable<Vector>& rThisVariable,
39  Vector& rValue) override;
40  Matrix& CalculateValue(ConstitutiveLaw::Parameters& rParameterValues,
41  const Variable<Matrix>& rThisVariable,
42  Matrix& rValue) override;
44 
45  void SetValue(const Variable<double>&, const double&, const ProcessInfo&) override;
46  void SetValue(const Variable<Vector>&, const Vector&, const ProcessInfo&) override;
48 
49  int Check(const Properties& rMaterialProperties,
50  const GeometryType& rElementGeometry,
51  const ProcessInfo& rCurrentProcessInfo) const override;
52 
53  void SetConsiderDiagonalEntriesOnlyAndNoShear(bool Whether);
54  [[nodiscard]] bool GetConsiderDiagonalEntriesOnlyAndNoShear() const;
55 
56 protected:
57  virtual void CalculateElasticMatrix(Matrix& rConstitutiveMatrix,
58  ConstitutiveLaw::Parameters& rValues) = 0;
60  Vector& rStrainVector) = 0;
61  virtual void CalculatePK2Stress(const Vector& rStrainVector,
62  Vector& rStressVector,
63  ConstitutiveLaw::Parameters& rValues) = 0;
64 
65 private:
66  friend class Serializer;
67  void save(Serializer& rSerializer) const override;
68  void load(Serializer& rSerializer) override;
69 
70  bool mConsiderDiagonalEntriesOnlyAndNoShear = false;
71 };
72 
73 } // namespace Kratos
Definition: constitutive_law.h:47
StrainMeasure
Definition: constitutive_law.h:52
StressMeasure
Definition: constitutive_law.h:69
virtual bool & CalculateValue(Parameters &rParameterValues, const Variable< bool > &rThisVariable, bool &rValue)
Calculates the value of a specified variable (bool)
Definition: constitutive_law.cpp:370
virtual void SetValue(const Variable< bool > &rVariable, const bool &Value, const ProcessInfo &rCurrentProcessInfo)
Sets the value of a specified variable (boolean)
Definition: constitutive_law.cpp:279
Definition: linear_elastic_law.h:21
virtual void CalculatePK2Stress(const Vector &rStrainVector, Vector &rStressVector, ConstitutiveLaw::Parameters &rValues)=0
virtual void CalculateCauchyGreenStrain(ConstitutiveLaw::Parameters &rValues, Vector &rStrainVector)=0
virtual void CalculateElasticMatrix(Matrix &rConstitutiveMatrix, ConstitutiveLaw::Parameters &rValues)=0
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
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:189