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_anisotropic_3d_law.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 // Collaborator: Lucia Barbu
13 //
14 
15 #pragma once
16 
17 // System includes
18 
19 // External includes
20 
21 // Project includes
23 
24 namespace Kratos
25 {
28 
32 
36 
40 
44 
53 class KRATOS_API(CONSTITUTIVE_LAWS_APPLICATION) GenericAnisotropic3DLaw
54  : public ConstitutiveLaw
55 {
56  public:
59 
61  typedef Node NodeType;
62 
65 
67  static constexpr double machine_tolerance = std::numeric_limits<double>::epsilon();
68 
70  typedef std::size_t SizeType;
71 
73  static constexpr SizeType Dimension = 3;
74 
76  static constexpr SizeType VoigtSize = 6;
77 
80 
83 
86 
90 
95  {
96  }
97 
101  ConstitutiveLaw::Pointer Clone() const override
102  {
103  return Kratos::make_shared<GenericAnisotropic3DLaw>(*this);
104  }
105 
106  // Copy constructor
108  : ConstitutiveLaw(rOther),
109  mpIsotropicCL(rOther.mpIsotropicCL)
110  {
111  }
112 
117  {
118  }
119 
123 
127 
133  ConstitutiveLaw::Pointer Create(Kratos::Parameters NewParameters) const override;
134 
139  {
140  return 3;
141  };
142 
146  SizeType GetStrainSize() const override
147  {
148  return 6;
149  };
150 
155  void CalculateMaterialResponsePK1(ConstitutiveLaw::Parameters& rValues) override;
156 
161  void CalculateMaterialResponsePK2(ConstitutiveLaw::Parameters& rValues) override;
162 
167  void CalculateMaterialResponseKirchhoff(ConstitutiveLaw::Parameters& rValues) override;
168 
173  void CalculateMaterialResponseCauchy(ConstitutiveLaw::Parameters& rValues) override;
174 
179  void FinalizeMaterialResponsePK1(ConstitutiveLaw::Parameters& rValues) override;
180 
185  void FinalizeMaterialResponsePK2(ConstitutiveLaw::Parameters& rValues) override;
186 
191  void FinalizeMaterialResponseKirchhoff(ConstitutiveLaw::Parameters& rValues) override;
192 
197  void FinalizeMaterialResponseCauchy(ConstitutiveLaw::Parameters& rValues) override;
198 
205  Vector& GetValue(const Variable<Vector>& rThisVariable, Vector& rValue) override;
206 
213  double& GetValue(const Variable<double>& rThisVariable, double& rValue) override;
214 
220  Matrix& GetValue(const Variable<Matrix>& rThisVariable, Matrix& rValue) override;
221 
227  bool Has(const Variable<bool>& rThisVariable) override;
228 
234  bool Has(const Variable<double>& rThisVariable) override;
235 
241  bool Has(const Variable<Vector>& rThisVariable) override;
242 
248  bool Has(const Variable<Matrix>& rThisVariable) override;
249 
257  double& CalculateValue(
258  Parameters& rParameterValues,
259  const Variable<double>& rThisVariable,
260  double& rValue) override;
261 
269  Vector& CalculateValue(
270  Parameters& rParameterValues,
271  const Variable<Vector>& rThisVariable,
272  Vector& rValue) override;
273 
281  Matrix& CalculateValue(
282  Parameters& rParameterValues,
283  const Variable<Matrix>& rThisVariable,
284  Matrix& rValue) override;
285 
294  void InitializeMaterial(
295  const Properties& rMaterialProperties,
296  const GeometryType& rElementGeometry,
297  const Vector& rShapeFunctionsValues) override;
298 
299 
308  void CalculateAnisotropicStressMapperMatrix(
309  const Properties& rProperties,
310  BoundedMatrixVoigtType &rAs,
311  BoundedMatrixVoigtType& rAsInv
312  );
313 
322  void CalculateAnisotropicStrainMapperMatrix(
323  const BoundedMatrixVoigtType& rAnisotropicElasticMatrix,
324  const BoundedMatrixVoigtType& rIsotropicElasticMatrix,
325  const BoundedMatrixVoigtType &rAs,
326  BoundedMatrixVoigtType& rAe
327  );
328 
333  void InitializeMaterialResponsePK2(Parameters& rValues) override;
334 
339  {
340  return mpIsotropicCL->RequiresInitializeMaterialResponse();
341  }
342 
347  {
348  return mpIsotropicCL->RequiresFinalizeMaterialResponse();
349  }
350 
351  void CalculateOrthotropicElasticMatrix(
352  BoundedMatrixVoigtType &rElasticityTensor,
353  const Properties &rMaterialProperties);
354 
355  int Check(const Properties &rMaterialProperties,
356  const GeometryType &rElementGeometry,
357  const ProcessInfo &rCurrentProcessInfo) const override;
358 
359  void CalculateTangentTensor(ConstitutiveLaw::Parameters &rValues);
363 
367 
371 
375 
377 
378  protected:
381 
385 
389 
393  ConstitutiveLaw::Pointer GetIsotropicConstitutiveLaw()
394  {
395  return mpIsotropicCL;
396  }
397 
401  void SetIsotropicConstitutiveLaw(ConstitutiveLaw::Pointer pIsotropicConstitutiveLaw)
402  {
403  mpIsotropicCL = pIsotropicConstitutiveLaw;
404  }
405 
406 
410 
414 
418 
422 
424  private:
427 
431 
432  ConstitutiveLaw::Pointer mpIsotropicCL;
433 
437 
441 
442  void CalculateCauchyGreenStrain(
444  Vector &rStrainVector);
445 
449 
453 
457 
458  // Serialization
459 
460  friend class Serializer;
461 
462  void save(Serializer& rSerializer) const override
463  {
465  rSerializer.save("IsotropicCL", mpIsotropicCL);
466  }
467 
468  void load(Serializer& rSerializer) override
469  {
471  rSerializer.load("IsotropicCL", mpIsotropicCL);
472  }
473 
475 
476 }; // Class GenericAnisotropic3DLaw
477 
478 } // namespace Kratos
Definition: constitutive_law.h:47
This CL takes into account the material anisotropy in terms of young modulus, poisson ratio,...
Definition: generic_anisotropic_3d_law.h:55
bool RequiresFinalizeMaterialResponse() override
If the CL requires to initialize the material response, called by the element in InitializeSolutionSt...
Definition: generic_anisotropic_3d_law.h:346
KRATOS_CLASS_POINTER_DEFINITION(GenericAnisotropic3DLaw)
Counted pointer of GenericAnisotropic3DLaw.
~GenericAnisotropic3DLaw() override
Definition: generic_anisotropic_3d_law.h:116
ConstitutiveLaw::Pointer GetIsotropicConstitutiveLaw()
This method sets the constitutive law of the isotropic space.
Definition: generic_anisotropic_3d_law.h:393
Node NodeType
The node definition.
Definition: generic_anisotropic_3d_law.h:61
SizeType WorkingSpaceDimension() override
Dimension of the law:
Definition: generic_anisotropic_3d_law.h:138
BoundedMatrix< double, VoigtSize, VoigtSize > BoundedMatrixVoigtType
The definition of the bounded matrix type.
Definition: generic_anisotropic_3d_law.h:82
GenericAnisotropic3DLaw(GenericAnisotropic3DLaw const &rOther)
Definition: generic_anisotropic_3d_law.h:107
SizeType GetStrainSize() const override
Voigt tensor size:
Definition: generic_anisotropic_3d_law.h:146
ConstitutiveLaw::Pointer Clone() const override
Definition: generic_anisotropic_3d_law.h:101
GenericAnisotropic3DLaw()
Definition: generic_anisotropic_3d_law.h:94
std::size_t SizeType
The size type definition.
Definition: generic_anisotropic_3d_law.h:70
BoundedMatrix< double, 3, 3 > BoundedMatrixType
The definition of the bounded matrix type.
Definition: generic_anisotropic_3d_law.h:79
void SetIsotropicConstitutiveLaw(ConstitutiveLaw::Pointer pIsotropicConstitutiveLaw)
This method sets the constitutive law of the isotropic space.
Definition: generic_anisotropic_3d_law.h:401
Geometry< NodeType > GeometryType
The geometry definition.
Definition: generic_anisotropic_3d_law.h:64
bool RequiresInitializeMaterialResponse() override
If the CL requires to initialize the material response, called by the element in InitializeSolutionSt...
Definition: generic_anisotropic_3d_law.h:338
Geometry base class.
Definition: geometry.h:71
Definition: amatrix_interface.h:41
This class defines the node.
Definition: node.h:65
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
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
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
Modeler::Pointer Create(const std::string &ModelerName, Model &rModel, const Parameters ModelParameters)
Checks if the modeler is registered.
Definition: modeler_factory.cpp:30
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:189