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.
wrinkling_linear_2d_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: Klaus B. Sautter
12 //
13 
14 #pragma once
15 
16 // System includes
17 
18 // External includes
19 
20 // Project includes
22 
23 namespace Kratos
24 {
27 
31 
35 
39 
43 
49 class KRATOS_API(CONSTITUTIVE_LAWS_APPLICATION) WrinklingLinear2DLaw
50  : public ConstitutiveLaw
51 {
52 public:
53 
56 
59 
62 
64  typedef std::size_t SizeType;
65 
68 
69  enum class WrinklingType {
70  Taut,
71  Slack,
72  Wrinkle
73  };
74 
77 
82 
87 
91  ~WrinklingLinear2DLaw() override = default;
92 
96 
100 
104  ConstitutiveLaw::Pointer Clone() const override;
105 
111  ConstitutiveLaw::Pointer Create(Kratos::Parameters NewParameters) const override;
112 
117  SizeType WorkingSpaceDimension() override;
118 
123  SizeType GetStrainSize() const override;
124 
125 
131  bool Has(const Variable<bool>& rThisVariable) override
132  {
133  return mpConstitutiveLaw->Has(rThisVariable);
134  }
135 
141  bool Has(const Variable<int>& rThisVariable) override
142  {
143  return mpConstitutiveLaw->Has(rThisVariable);
144  }
145 
151  bool Has(const Variable<double>& rThisVariable) override
152  {
153  return mpConstitutiveLaw->Has(rThisVariable);
154  }
155 
161  bool Has(const Variable<Vector>& rThisVariable) override
162  {
163  return mpConstitutiveLaw->Has(rThisVariable);
164  }
165 
171  bool Has(const Variable<Matrix>& rThisVariable) override
172  {
173  return mpConstitutiveLaw->Has(rThisVariable);
174  }
175 
181  bool Has(const Variable<array_1d<double, 3 > >& rThisVariable) override
182  {
183  return mpConstitutiveLaw->Has(rThisVariable);
184  }
185 
191  bool Has(const Variable<array_1d<double, 6 > >& rThisVariable) override
192  {
193  return mpConstitutiveLaw->Has(rThisVariable);
194  }
195 
202  bool& GetValue(const Variable<bool>& rThisVariable,bool& rValue) override
203  {
204  mpConstitutiveLaw->GetValue(rThisVariable,rValue);
205  return rValue;
206  }
207 
214  int& GetValue(const Variable<int>& rThisVariable,int& rValue) override
215  {
216  mpConstitutiveLaw->GetValue(rThisVariable,rValue);
217  return rValue;
218  }
219 
226  double& GetValue(const Variable<double>& rThisVariable,double& rValue) override
227  {
228  mpConstitutiveLaw->GetValue(rThisVariable,rValue);
229  return rValue;
230  }
231 
238  Vector& GetValue(const Variable<Vector>& rThisVariable,Vector& rValue) override
239  {
240  mpConstitutiveLaw->GetValue(rThisVariable,rValue);
241  return rValue;
242  }
243 
250  Matrix& GetValue(const Variable<Matrix>& rThisVariable,Matrix& rValue) override
251  {
252  mpConstitutiveLaw->GetValue(rThisVariable,rValue);
253  return rValue;
254  }
255 
263  {
264  mpConstitutiveLaw->GetValue(rThisVariable,rValue);
265  return rValue;
266  }
267 
268 
276  {
277  mpConstitutiveLaw->GetValue(rThisVariable,rValue);
278  return rValue;
279  }
280 
288  bool& CalculateValue(Parameters& rParameterValues,const Variable<bool>& rThisVariable,
289  bool& rValue) override
290  {
291  mpConstitutiveLaw->CalculateValue(rParameterValues,rThisVariable,rValue);
292  return rValue;
293  }
294 
302  int& CalculateValue(Parameters& rParameterValues,
303  const Variable<int>& rThisVariable,int& rValue) override
304  {
305  mpConstitutiveLaw->CalculateValue(rParameterValues,rThisVariable,rValue);
306  return rValue;
307  }
308 
316  double& CalculateValue(ConstitutiveLaw::Parameters& rParameterValues,
317  const Variable<double>& rThisVariable,double& rValue) override
318  {
319  mpConstitutiveLaw->CalculateValue(rParameterValues,rThisVariable,rValue);
320  return rValue;
321  }
322 
331  const Variable<Vector>& rThisVariable,Vector& rValue) override
332  {
333  mpConstitutiveLaw->CalculateValue(rParameterValues,rThisVariable,rValue);
334  return rValue;
335  }
336 
345  const Variable<Matrix>& rThisVariable,Matrix& rValue) override
346  {
347  mpConstitutiveLaw->CalculateValue(rParameterValues,rThisVariable,rValue);
348  return rValue;
349  }
350 
359  const Variable<array_1d<double, 3 >>& rThisVariable,array_1d<double, 3 >& rValue) override
360  {
361  mpConstitutiveLaw->CalculateValue(rParameterValues,rThisVariable,rValue);
362  return rValue;
363  }
364 
373  const Variable<array_1d<double, 6 >>& rThisVariable,array_1d<double, 6 >& rValue) override
374  {
375  mpConstitutiveLaw->CalculateValue(rParameterValues,rThisVariable,rValue);
376  return rValue;
377  }
378 
385  void SetValue(const Variable<bool>& rThisVariable,const bool& rValue,
386  const ProcessInfo& rCurrentProcessInfo) override
387  {
388  mpConstitutiveLaw->SetValue(rThisVariable, rValue, rCurrentProcessInfo);
389  }
390 
397  void SetValue(const Variable<int>& rThisVariable,const int& rValue,
398  const ProcessInfo& rCurrentProcessInfo) override
399  {
400  mpConstitutiveLaw->SetValue(rThisVariable, rValue, rCurrentProcessInfo);
401  }
402 
409  void SetValue(const Variable<double>& rThisVariable,const double& rValue,
410  const ProcessInfo& rCurrentProcessInfo) override
411  {
412  mpConstitutiveLaw->SetValue(rThisVariable, rValue, rCurrentProcessInfo);
413  }
414 
421  void SetValue(const Variable<Vector>& rThisVariable,const Vector& rValue,
422  const ProcessInfo& rCurrentProcessInfo) override
423  {
424  mpConstitutiveLaw->SetValue(rThisVariable, rValue, rCurrentProcessInfo);
425  }
426 
433  void SetValue(const Variable<Matrix>& rThisVariable,const Matrix& rValue,
434  const ProcessInfo& rCurrentProcessInfo) override
435  {
436  mpConstitutiveLaw->SetValue(rThisVariable, rValue, rCurrentProcessInfo);
437  }
438 
445  void SetValue(const Variable<array_1d<double, 3 >>& rThisVariable,
446  const array_1d<double, 3 >& rValue,const ProcessInfo& rCurrentProcessInfo) override
447  {
448  mpConstitutiveLaw->SetValue(rThisVariable, rValue, rCurrentProcessInfo);
449  }
450 
457  void SetValue(const Variable<array_1d<double, 6 >>& rThisVariable,
458  const array_1d<double, 6 >& rValue,const ProcessInfo& rCurrentProcessInfo) override
459  {
460  mpConstitutiveLaw->SetValue(rThisVariable, rValue, rCurrentProcessInfo);
461  }
462 
471  void InitializeMaterial(
472  const Properties& rMaterialProperties,
473  const GeometryType& rElementGeometry,
474  const Vector& rShapeFunctionsValues
475  ) override;
476 
477 
482  void CalculateMaterialResponsePK2 (Parameters& rValues) override;
483 
488  void InitializeMaterialResponsePK2 (Parameters& rValues) override;
489 
490 
495  void FinalizeMaterialResponsePK2 (Parameters& rValues) override;
496 
497 
506  void ResetMaterial(
507  const Properties& rMaterialProperties,
508  const GeometryType& rElementGeometry,
509  const Vector& rShapeFunctionsValues
510  ) override;
511 
516  void GetLawFeatures(Features& rFeatures) override;
517 
518 
528  int Check(
529  const Properties& rMaterialProperties,
530  const GeometryType& rElementGeometry,
531  const ProcessInfo& rCurrentProcessInfo
532  ) const override;
533 
539  void PrincipalVector(Vector& rPrincipalVector, const Vector& rNonPrincipalVector);
540 
541 
548  void CheckWrinklingState(WrinklingType& rWrinklingState, const Vector& rStress, const Vector& rStrain,
549  Vector& rWrinklingDirectionVector);
550 
551 protected:
552 
555 
559 
563 
567 
569 
570 private:
571 
574 
578 
579  ConstitutiveLaw::Pointer mpConstitutiveLaw;
580 
581 
585 
590 
595 
599  friend class Serializer;
600 
601  void save(Serializer& rSerializer) const override
602  {
604  rSerializer.save("ConstitutiveLaw", mpConstitutiveLaw);
605  }
606 
607  void load(Serializer& rSerializer) override
608  {
610  rSerializer.load("ConstitutiveLaw", mpConstitutiveLaw);
611  }
612 
613 
614 }; // Class WrinklingLinear2DLaw
615 } // 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
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
This law defines a wrinkling modification for any linear 2D claw.
Definition: wrinkling_linear_2d_law.h:51
double & GetValue(const Variable< double > &rThisVariable, double &rValue) override
Returns the value of a specified variable (double)
Definition: wrinkling_linear_2d_law.h:226
bool Has(const Variable< int > &rThisVariable) override
Returns whether this constitutive Law has specified variable (int)
Definition: wrinkling_linear_2d_law.h:141
int & CalculateValue(Parameters &rParameterValues, const Variable< int > &rThisVariable, int &rValue) override
Calculates the value of a specified variable (int)
Definition: wrinkling_linear_2d_law.h:302
void SetValue(const Variable< int > &rThisVariable, const int &rValue, const ProcessInfo &rCurrentProcessInfo) override
Sets the value of a specified variable (int)
Definition: wrinkling_linear_2d_law.h:397
bool Has(const Variable< array_1d< double, 3 > > &rThisVariable) override
Returns whether this constitutive Law has specified variable (array_1d<double, 3 >)
Definition: wrinkling_linear_2d_law.h:181
WrinklingType
Definition: wrinkling_linear_2d_law.h:69
ConstitutiveLaw BaseType
The definition of the CL base class.
Definition: wrinkling_linear_2d_law.h:61
void SetValue(const Variable< Matrix > &rThisVariable, const Matrix &rValue, const ProcessInfo &rCurrentProcessInfo) override
Sets the value of a specified variable (Matrix)
Definition: wrinkling_linear_2d_law.h:433
ProcessInfo ProcessInfoType
The definition of the process info.
Definition: wrinkling_linear_2d_law.h:58
void SetValue(const Variable< Vector > &rThisVariable, const Vector &rValue, const ProcessInfo &rCurrentProcessInfo) override
Sets the value of a specified variable (Vector)
Definition: wrinkling_linear_2d_law.h:421
array_1d< double, 6 > & CalculateValue(Parameters &rParameterValues, const Variable< array_1d< double, 6 >> &rThisVariable, array_1d< double, 6 > &rValue) override
Calculates the value of a specified variable (array_1d<double, 6 >)
Definition: wrinkling_linear_2d_law.h:372
KRATOS_CLASS_POINTER_DEFINITION(WrinklingLinear2DLaw)
Pointer definition of WrinklingLinear2DLaw.
void SetValue(const Variable< bool > &rThisVariable, const bool &rValue, const ProcessInfo &rCurrentProcessInfo) override
Sets the value of a specified variable (boolean)
Definition: wrinkling_linear_2d_law.h:385
void SetValue(const Variable< array_1d< double, 6 >> &rThisVariable, const array_1d< double, 6 > &rValue, const ProcessInfo &rCurrentProcessInfo) override
Sets the value of a specified variable (array_1d<double, 6 > )
Definition: wrinkling_linear_2d_law.h:457
bool Has(const Variable< double > &rThisVariable) override
Returns whether this constitutive Law has specified variable (double)
Definition: wrinkling_linear_2d_law.h:151
bool & GetValue(const Variable< bool > &rThisVariable, bool &rValue) override
Returns the value of a specified variable (bool)
Definition: wrinkling_linear_2d_law.h:202
bool Has(const Variable< Matrix > &rThisVariable) override
Returns whether this constitutive Law has specified variable (Matrix)
Definition: wrinkling_linear_2d_law.h:171
bool Has(const Variable< Vector > &rThisVariable) override
Returns whether this constitutive Law has specified variable (Vector)
Definition: wrinkling_linear_2d_law.h:161
Vector & GetValue(const Variable< Vector > &rThisVariable, Vector &rValue) override
Returns the value of a specified variable (Vector)
Definition: wrinkling_linear_2d_law.h:238
array_1d< double, 6 > & GetValue(const Variable< array_1d< double, 6 >> &rThisVariable, array_1d< double, 6 > &rValue) override
Returns the value of a specified variable (array_1d<double, 6 > )
Definition: wrinkling_linear_2d_law.h:275
double & CalculateValue(ConstitutiveLaw::Parameters &rParameterValues, const Variable< double > &rThisVariable, double &rValue) override
Calculates the value of a specified variable (double)
Definition: wrinkling_linear_2d_law.h:316
bool & CalculateValue(Parameters &rParameterValues, const Variable< bool > &rThisVariable, bool &rValue) override
Calculates the value of a specified variable (bool)
Definition: wrinkling_linear_2d_law.h:288
int & GetValue(const Variable< int > &rThisVariable, int &rValue) override
Returns the value of a specified variable (int)
Definition: wrinkling_linear_2d_law.h:214
array_1d< double, 3 > & GetValue(const Variable< array_1d< double, 3 >> &rThisVariable, array_1d< double, 3 > &rValue) override
Returns the value of a specified variable (array_1d<double, 3 > )
Definition: wrinkling_linear_2d_law.h:262
~WrinklingLinear2DLaw() override=default
Destructor.
Matrix & CalculateValue(ConstitutiveLaw::Parameters &rParameterValues, const Variable< Matrix > &rThisVariable, Matrix &rValue) override
Calculates the value of a specified variable (Matrix)
Definition: wrinkling_linear_2d_law.h:344
std::size_t SizeType
The definition of the size type.
Definition: wrinkling_linear_2d_law.h:64
Matrix & GetValue(const Variable< Matrix > &rThisVariable, Matrix &rValue) override
Returns the value of a specified variable (Matrix)
Definition: wrinkling_linear_2d_law.h:250
Vector & CalculateValue(ConstitutiveLaw::Parameters &rParameterValues, const Variable< Vector > &rThisVariable, Vector &rValue) override
Calculates the value of a specified variable (Vector)
Definition: wrinkling_linear_2d_law.h:330
array_1d< double, 3 > & CalculateValue(Parameters &rParameterValues, const Variable< array_1d< double, 3 >> &rThisVariable, array_1d< double, 3 > &rValue) override
Calculates the value of a specified variable (array_1d<double, 3 >)
Definition: wrinkling_linear_2d_law.h:358
bool Has(const Variable< array_1d< double, 6 > > &rThisVariable) override
Returns whether this constitutive Law has specified variable (array_1d<double, 6 >)
Definition: wrinkling_linear_2d_law.h:191
void SetValue(const Variable< array_1d< double, 3 >> &rThisVariable, const array_1d< double, 3 > &rValue, const ProcessInfo &rCurrentProcessInfo) override
Sets the value of a specified variable (array_1d<double, 3 > )
Definition: wrinkling_linear_2d_law.h:445
bool Has(const Variable< bool > &rThisVariable) override
Returns whether this constitutive Law has specified variable (bool)
Definition: wrinkling_linear_2d_law.h:131
void SetValue(const Variable< double > &rThisVariable, const double &rValue, const ProcessInfo &rCurrentProcessInfo) override
Sets the value of a specified variable (double)
Definition: wrinkling_linear_2d_law.h:409
#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
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