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.
constitutive_3D_law.hpp
Go to the documentation of this file.
1 //
2 // Project Name: KratosConstitutiveModelsApplication $
3 // Created by: $Author: JMCarbonell $
4 // Last modified by: $Co-Author: $
5 // Date: $Date: April 2017 $
6 // Revision: $Revision: 0.0 $
7 //
8 //
9 
10 #if !defined (KRATOS_CONSTITUTIVE_3D_LAW_H_INCLUDED)
11 #define KRATOS_CONSTITUTIVE_3D_LAW_H_INCLUDED
12 
13 // System includes
14 #include <iostream>
15 #include <cmath>
16 
17 // External includes
18 
19 // Project includes
23 
24 namespace Kratos
25 {
29  class KRATOS_API(CONSTITUTIVE_MODELS_APPLICATION) Constitutive3DLaw : public ConstitutiveLaw
30  {
31  protected:
32 
33  using VoigtIndexType = const unsigned int(*)[2];
34 
35  public:
36 
42 
47 
50 
54 
57 
59  Constitutive3DLaw(const Constitutive3DLaw& rOther);
60 
62  ConstitutiveLaw::Pointer Clone() const override;
63 
66 
68  ~Constitutive3DLaw() override;
69 
73 
74 
78 
82  void InitializeMaterial(const Properties& rProperties,
83  const GeometryType& rElementGeometry,
84  const Vector& rShapeFunctionsValues ) override;
85 
86 
93  void CalculateMaterialResponsePK1(Parameters & rValues) override;
94 
101  void CalculateMaterialResponsePK2(Parameters & rValues) override;
102 
109  void CalculateMaterialResponseKirchhoff (Parameters & rValues) override;
110 
111 
118  void CalculateMaterialResponseCauchy (Parameters & rValues) override;
119 
120 
121 
126  void InitializeMaterialResponsePK1 (Parameters& rValues) override;
127 
132  void InitializeMaterialResponsePK2 (Parameters& rValues) override;
133 
138  void InitializeMaterialResponseKirchhoff (Parameters& rValues) override;
139 
144  void InitializeMaterialResponseCauchy (Parameters& rValues) override;
145 
146 
153  void FinalizeMaterialResponsePK1(Parameters & rValues) override;
154 
161  void FinalizeMaterialResponsePK2(Parameters & rValues) override;
162 
169  void FinalizeMaterialResponseKirchhoff(Parameters & rValues) override;
170 
177  void FinalizeMaterialResponseCauchy(Parameters & rValues) override;
178 
179 
184  void GetLawFeatures(Features& rFeatures) override;
185 
186 
196  int Check(const Properties& rProperties, const GeometryType& rElementGeometry, const ProcessInfo& rCurrentProcessInfo) const override;
197 
201 
205  bool Has(const Variable<double>& rThisVariable) override;
206 
207  bool Has(const Variable<Vector>& rThisVariable) override;
208 
209  bool Has(const Variable<Matrix>& rThisVariable) override;
210 
211  bool Has(const Variable<array_1d<double,3> >& rThisVariable) override;
212 
213  bool Has(const Variable<array_1d<double,6> >& rThisVariable) override;
214 
218  void SetValue(const Variable<double>& rVariable,
219  const double& rValue,
220  const ProcessInfo& rCurrentProcessInfo) override;
221 
222  void SetValue(const Variable<Vector>& rThisVariable,
223  const Vector& rValue,
224  const ProcessInfo& rCurrentProcessInfo) override;
225 
226  void SetValue(const Variable<Matrix>& rThisVariable,
227  const Matrix& rValue,
228  const ProcessInfo& rCurrentProcessInfo) override;
229 
230  void SetValue(const Variable<array_1d<double,3> >& rThisVariable,
231  const array_1d<double,3>& rValue,
232  const ProcessInfo& rCurrentProcessInfo) override;
233 
234  void SetValue(const Variable<array_1d<double,6> >& rThisVariable,
235  const array_1d<double,6>& rValue,
236  const ProcessInfo& rCurrentProcessInfo) override;
237 
241  double& GetValue(const Variable<double>& rThisVariable, double& rValue) override;
242 
243  Vector& GetValue(const Variable<Vector>& rThisVariable, Vector& rValue) override;
244 
245  Matrix& GetValue(const Variable<Matrix>& rThisVariable, Matrix& rValue) override;
246 
247  array_1d<double,3>& GetValue(const Variable<array_1d<double,3> >& rThisVariable, array_1d<double,3>& rValue) override;
248 
249  array_1d<double,6>& GetValue(const Variable<array_1d<double,6> >& rThisVariable, array_1d<double,6>& rValue) override;
250 
254  int& CalculateValue(Parameters& rParameterValues, const Variable<int>& rThisVariable, int& rValue) override;
255 
256  double& CalculateValue(Parameters& rParameterValues, const Variable<double>& rThisVariable, double& rValue) override;
257 
258  Vector& CalculateValue(Parameters& rParameterValues, const Variable<Vector>& rThisVariable, Vector& rValue) override;
259 
260  Matrix& CalculateValue(Parameters& rParameterValues, const Variable<Matrix>& rThisVariable, Matrix& rValue) override;
261 
262  array_1d<double, 3 > & CalculateValue(Parameters& rParameterValues, const Variable<array_1d<double,3> >& rVariable, array_1d<double,3> & rValue) override;
263 
264  array_1d<double, 6 > & CalculateValue(Parameters& rParameterValues, const Variable<array_1d<double,6> >& rVariable, array_1d<double,6> & rValue) override;
265 
266 
270 
275  {
276  return 3;
277  };
278 
282  SizeType GetStrainSize() const override
283  {
284  return 6;
285  };
286 
287 
291 
293  std::string Info() const override
294  {
295  std::stringstream buffer;
296  buffer << "Constitutive3DLaw";
297  return buffer.str();
298  }
299 
301  void PrintInfo(std::ostream& rOStream) const override
302  {
303  rOStream << "Constitutive3DLaw";
304  }
305 
307  void PrintData(std::ostream& rOStream) const override
308  {
309  rOStream << "Constitutive3DLaw Data";
310  }
311 
312 
316 
317 
319 
320 
321  protected:
322 
325 
329 
333 
337 
344  virtual void CalculateValue (Parameters & rValues, ModelDataType& rModelValues);
345 
353  virtual void CalculateMaterialResponsePK1 (Parameters & rValues, ModelDataType& rModelValues);
354 
362  virtual void CalculateMaterialResponsePK2 (Parameters & rValues, ModelDataType& rModelValues);
363 
371  virtual void CalculateMaterialResponseKirchhoff (Parameters & rValues, ModelDataType& rModelValues);
372 
373 
381  virtual void CalculateMaterialResponseCauchy (Parameters & rValues, ModelDataType& rModelValues);
382 
383 
384 
389  {
390  return this->msIndexVoigt3D6C;
391  }
392 
396  virtual void InitializeModelData(Parameters& rValues, ModelDataType& rModelValues);
397 
401  virtual void FinalizeModelData(Parameters& rValues, ModelDataType& rModelValues);
402 
410  virtual void CalculateDomainVariables(Parameters& rValues, ModelDataType& rModelValues);
411 
418  virtual double& CalculateDomainVariable(Parameters& rValues, const Variable<double>& rThisVariable, double& rVariable);
419 
420 
427  virtual double& CalculateDomainTemperature(Parameters& rValues, double& rTemperature);
428 
435  virtual double& CalculateDomainPressure (Parameters& rValues, double& rPressure);
436 
437 
444  virtual bool CheckParameters(Parameters& rValues);
445 
446 
448 
449  private:
450 
453 
457 
461 
463 
467 
471 
475  friend class Serializer;
476 
477  void save(Serializer& rSerializer) const override
478  {
480  }
481 
482  void load(Serializer& rSerializer) override
483  {
485  }
486 
487 
491 
492 
496 
498  }; // Class Constitutive3DLaw
499 
501 
504 
505 
509 
511 
513 
514 } // namespace Kratos.
515 #endif // KRATOS_ELASTIC_CONSTITUTIVE_3D_LAW_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Definition: constitutive_3D_law.hpp:30
ConstitutiveModelData::ModelData ModelDataType
Definition: constitutive_3D_law.hpp:45
ConstitutiveModelData::MatrixType MatrixType
Definition: constitutive_3D_law.hpp:44
const unsigned int(*)[2] VoigtIndexType
Definition: constitutive_3D_law.hpp:33
ConstitutiveModelData::SizeType SizeType
Definition: constitutive_3D_law.hpp:41
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: constitutive_3D_law.hpp:301
ConstitutiveModelData::ConstitutiveLawData LawDataType
Definition: constitutive_3D_law.hpp:46
ConstitutiveLaw BaseType
Definition: constitutive_3D_law.hpp:40
std::string Info() const override
Turn back information as a string.
Definition: constitutive_3D_law.hpp:293
SizeType GetStrainSize() const override
Definition: constitutive_3D_law.hpp:282
ConstitutiveModelData::VectorType VectorType
Definition: constitutive_3D_law.hpp:43
SizeType WorkingSpaceDimension() override
Definition: constitutive_3D_law.hpp:274
virtual VoigtIndexType GetVoigtIndexTensor()
Definition: constitutive_3D_law.hpp:388
ProcessInfo ProcessInfoType
Definition: constitutive_3D_law.hpp:39
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: constitutive_3D_law.hpp:307
KRATOS_CLASS_POINTER_DEFINITION(Constitutive3DLaw)
Pointer definition of Constitutive3DLaw.
Definition: constitutive_law.h:47
virtual bool & CalculateValue(Parameters &rParameterValues, const Variable< bool > &rThisVariable, bool &rValue)
Calculates the value of a specified variable (bool)
Definition: constitutive_law.cpp:370
std::size_t SizeType
Definition: constitutive_law.h:82
std::size_t SizeType
Definition: constitutive_model_data.hpp:60
Geometry base class.
Definition: geometry.h:71
Definition: amatrix_interface.h:41
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
#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
REACTION_CHECK_STIFFNESS_FACTOR int
Definition: contact_structural_mechanics_application_variables.h:75
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
Definition: constitutive_model_data.hpp:362
Definition: constitutive_model_data.hpp:383