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.
traction_separation_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: Alireza Taherzadeh-Fard
12 // Alejandro Cornejo Velazquez
13 // Sergio Jimenez Reyes
14 // Lucia Gratiela Barbu
15 //
16 
17 #pragma once
18 
19 // System includes
20 
21 // External includes
22 
23 // Project includes
25 
26 
27 namespace Kratos
28 {
31 
35 
39 
43 
47 
60 template<unsigned int TDim>
61 class KRATOS_API(CONSTITUTIVE_LAWS_APPLICATION) TractionSeparationLaw3D
62  : public ParallelRuleOfMixturesLaw<TDim>
63 {
64 public:
65 
69 
70  typedef std::size_t SizeType;
71 
73  static constexpr SizeType VoigtSize = (TDim == 3) ? 6 : 3;
74 
76  static constexpr SizeType Dimension = TDim;
77 
79  static constexpr double machine_tolerance = std::numeric_limits<double>::epsilon();
80 
83 
86 
91 
96  TractionSeparationLaw3D(const std::vector<double> &rCombinationFactors);
97 
102 
106  ~TractionSeparationLaw3D() override;
107 
111 
115 
119  ConstitutiveLaw::Pointer Clone() const override;
120 
126  ConstitutiveLaw::Pointer Create(Kratos::Parameters NewParameters) const override;
127 
133  bool Has(const Variable<Vector>& rThisVariable) override;
134 
141  Vector& GetValue(
142  const Variable<Vector>& rThisVariable,
143  Vector& rValue
144  ) override;
145 
152  bool ValidateInput(const Properties& rMaterialProperties) override;
153 
161  void InitializeMaterial(
162  const Properties& rMaterialProperties,
163  const ConstitutiveLaw::GeometryType& rElementGeometry,
164  const Vector& rShapeFunctionsValues
165  ) override;
166 
171  void CalculateMaterialResponsePK1 (ConstitutiveLaw::Parameters& rValues) override;
172 
177  void CalculateMaterialResponsePK2 (ConstitutiveLaw::Parameters& rValues) override;
178 
183  void CalculateMaterialResponseKirchhoff (ConstitutiveLaw::Parameters& rValues) override;
184 
189  void CalculateMaterialResponseCauchy (ConstitutiveLaw::Parameters& rValues) override;
190 
195  void FinalizeMaterialResponsePK1 (ConstitutiveLaw::Parameters& rValues) override;
196 
201  void FinalizeMaterialResponsePK2 (ConstitutiveLaw::Parameters& rValues) override;
202 
207  void FinalizeMaterialResponseKirchhoff (ConstitutiveLaw::Parameters& rValues) override;
208 
213  void FinalizeMaterialResponseCauchy (ConstitutiveLaw::Parameters& rValues) override;
214 
219  double CalculateDelaminationDamageExponentialSoftening (
221  const double GI,
222  const double E,
223  const double T0,
224  const double equivalent_stress);
225 
234  int Check(
235  const Properties& rMaterialProperties,
236  const ConstitutiveLaw::GeometryType& rElementGeometry,
237  const ProcessInfo& rCurrentProcessInfo
238  ) const override;
239 
244  void CalculateTangentTensor(
246  const ConstitutiveLaw::StressMeasure& rStressMeasure
247  );
248 
249 protected:
250 
253 
257 
261 
265 
267 
268 private:
269 
272 
276 
277  Vector mDelaminationDamageModeOne;
278  Vector mDelaminationDamageModeTwo;
279  Vector mThresholdModeOne;
280  Vector mThresholdModeTwo;
281 
285 
290 
295 
299  friend class Serializer;
300 
301  void save(Serializer& rSerializer) const override
302  {
304  rSerializer.save("DelaminationDamageModeOne", mDelaminationDamageModeOne);
305  rSerializer.save("DelaminationDamageModeTwo", mDelaminationDamageModeTwo);
306  rSerializer.save("ThresholdModeOne", mThresholdModeOne);
307  rSerializer.save("ThresholdModeTwo", mThresholdModeTwo);
308  }
309 
310  void load(Serializer& rSerializer) override
311  {
313  rSerializer.load("DelaminationDamageModeOne", mDelaminationDamageModeOne);
314  rSerializer.load("DelaminationDamageModeTwo", mDelaminationDamageModeTwo);
315  rSerializer.load("ThresholdModeOne", mThresholdModeOne);
316  rSerializer.load("ThresholdModeTwo", mThresholdModeTwo);
317  }
318 
319 }; // Class TractionSeparationLaw3D
320 } // namespace Kratos.
StressMeasure
Definition: constitutive_law.h:69
Geometry base class.
Definition: geometry.h:71
This law defines a parallel rule of mixture (classic law of mixture)
Definition: rule_of_mixtures_law.h:62
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
This law defines a parallel rule of mixture (classic law of mixture)
Definition: traction_separation_law.h:63
ParallelRuleOfMixturesLaw< TDim > BaseType
Definition: traction_separation_law.h:68
std::size_t SizeType
Definition: traction_separation_law.h:70
KRATOS_CLASS_POINTER_DEFINITION(TractionSeparationLaw3D)
Pointer definition of TractionSeparationLaw3D.
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
E
Definition: generate_hyper_elastic_simo_taylor_neo_hookean.py:26
def load(f)
Definition: ode_solve.py:307
Definition: constitutive_law.h:189