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.
truss_constitutive_law.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: Klaus B. Sautter
10 //
11 
12 #pragma once
13 
14 // System includes
15 
16 // External includes
17 
18 // Project includes
20 
21 namespace Kratos
22 {
23 
33 class KRATOS_API(STRUCTURAL_MECHANICS_APPLICATION) TrussConstitutiveLaw : public ConstitutiveLaw
34 {
35 public:
41  typedef std::size_t SizeType;
47 
56 
57  ConstitutiveLaw::Pointer Clone() const override;
58 
63 
64 
68  ~TrussConstitutiveLaw() override;
69 
82  void GetLawFeatures(Features& rFeatures) override;
83 
87  SizeType GetStrainSize() const override
88  {
89  return 1;
90  }
91 
101  int Check(
102  const Properties& rMaterialProperties,
103  const GeometryType& rElementGeometry,
104  const ProcessInfo& rCurrentProcessInfo
105  ) const override;
106 
108  array_1d<double, 3 > & rValue) override;
109 
110  double& CalculateValue(ConstitutiveLaw::Parameters& rParameterValues,
111  const Variable<double>& rThisVariable,double& rValue) override;
112 
113  Vector& CalculateValue(ConstitutiveLaw::Parameters& rParameterValues,
114  const Variable<Vector>& rThisVariable,
115  Vector& rValue) override;
116 
117  // ConstitutiveLaw::StrainVectorType& CalculateValue(ConstitutiveLaw::Parameters& rParameterValues,
118  // const Variable<StrainVectorType>& rThisVariable,
119  // ConstitutiveLaw::StrainVectorType& rValue) override;
120 
121  // ConstitutiveLaw::StressVectorType& CalculateValue(ConstitutiveLaw::Parameters& rParameterValues,
122  // const Variable<StressVectorType>& rThisVariable,
123  // ConstitutiveLaw::StressVectorType& rValue) override;
124 
125  array_1d<double, 3 > & CalculateValue(ConstitutiveLaw::Parameters& rParameterValues,
126  const Variable<array_1d<double, 3 > >& rVariable,
127  array_1d<double, 3 > & rValue) override;
128 
129  void CalculateMaterialResponsePK2(Parameters& rValues) override;
130 
131 
132  void FinalizeMaterialResponsePK2(Parameters& rValues) override
133  {
134  // plasticity law needs this function, so it is called in the truss element
135  };
136 
137  //empty because called in the element and this base class throws an error
138  //if this is not overriden
139 
140 
141  //this functions calculates the current stress based on an element given (set)
142  //strain
143  double CalculateStressElastic(ConstitutiveLaw::Parameters& rParameterValues);
144 
145 protected:
146 
149 
153 
157 
162 
163 private:
164 
167 
174 
179 
180 
185 
189  friend class Serializer;
190 
191  void save(Serializer& rSerializer) const override
192  {
194  }
195 
196  void load(Serializer& rSerializer) override
197  {
199  }
200 
201 
202 }; // Class TrussConstitutiveLaw
203 } // namespace Kratos.
Definition: constitutive_law.h:47
std::size_t SizeType
Definition: constitutive_law.h:82
Geometry base class.
Definition: geometry.h:71
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
ConstitutiveLaw BaseType
Definition: truss_constitutive_law.h:40
KRATOS_CLASS_POINTER_DEFINITION(TrussConstitutiveLaw)
ProcessInfo ProcessInfoType
Definition: truss_constitutive_law.h:39
std::size_t SizeType
Definition: truss_constitutive_law.h:41
void FinalizeMaterialResponsePK2(Parameters &rValues) override
Definition: truss_constitutive_law.h:132
SizeType GetStrainSize() const override
Definition: truss_constitutive_law.h:87
Variable class contains all information needed to store and retrive data from a data container.
Definition: variable.h:63
#define KRATOS_SERIALIZE_SAVE_BASE_CLASS(Serializer, BaseType)
Definition: define.h:812
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
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
This constitutive law represents a linear elastic 1D law.
def load(f)
Definition: ode_solve.py:307
Definition: constitutive_law.h:137
Definition: constitutive_law.h:189