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.
mooney_rivlin_model.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_MOONEY_RIVLIN_MODEL_H_INCLUDED )
11 #define KRATOS_MOONEY_RIVLIN_MODEL_H_INCLUDED
12 
13 // System includes
14 #include <string>
15 #include <iostream>
16 
17 // External includes
18 
19 // Project includes
21 
22 namespace Kratos
23 {
26 
29 
33 
37 
41 
45 
47 
49  class KRATOS_API(CONSTITUTIVE_MODELS_APPLICATION) MooneyRivlinModel : public HyperElasticModel
50  {
51  public:
52 
55 
58 
62 
65 
67  MooneyRivlinModel(MooneyRivlinModel const& rOther);
68 
71 
73  ConstitutiveModel::Pointer Clone() const override;
74 
75 
77  ~MooneyRivlinModel() override;
78 
79 
83 
84 
88 
89 
93  int Check(const Properties& rProperties, const ProcessInfo& rCurrentProcessInfo) override;
94 
98 
99 
103 
104 
108 
110  std::string Info() const override
111  {
112  std::stringstream buffer;
113  buffer << "MooneyRivlinModel";
114  return buffer.str();
115  }
116 
118  void PrintInfo(std::ostream& rOStream) const override
119  {
120  rOStream << "MooneyRivlinModel";
121  }
122 
124  void PrintData(std::ostream& rOStream) const override
125  {
126  rOStream << "MooneyRivlinModel Data";
127  }
128 
129 
133 
134 
136 
137  protected:
140 
144 
148 
149 
153 
154 
158  void CalculateAndAddStressTensor(HyperElasticDataType& rVariables, MatrixType& rStressMatrix) override;
159 
164  double& AddConstitutiveComponent(HyperElasticDataType& rVariables, double &rCabcd,
165  const unsigned int& a, const unsigned int& b,
166  const unsigned int& c, const unsigned int& d) override;
167 
168 
169  //************// Strain Data
170 
171 
172  void CalculateStrainData(ModelDataType& rValues, HyperElasticDataType& rVariables) override;
173 
174  void CalculateScalingFactors(HyperElasticDataType& rVariables) override;
175 
176 
177  //************// dW
178 
179  double& GetVolumetricFunction1stJDerivative(HyperElasticDataType& rVariables, double& rDerivative) override; //dU/dJ
180 
181  double& GetVolumetricFunction2ndJDerivative(HyperElasticDataType& rVariables, double& rDerivative) override; //ddU/dJdJ
182 
183 
184  virtual double& GetFunction1stI1Derivative(HyperElasticDataType& rVariables, double& rDerivative); //dW/dI1
185 
186  virtual double& GetFunction1stI2Derivative(HyperElasticDataType& rVariables, double& rDerivative); //dW/dI2
187 
188  virtual double& GetFunction1stI3Derivative(HyperElasticDataType& rVariables, double& rDerivative); //dW/dI3
189 
190 
191  virtual double& GetFunction2ndI1Derivative(HyperElasticDataType& rVariables, double& rDerivative); //ddW/dI1dI1
192 
193  virtual double& GetFunction2ndI2Derivative(HyperElasticDataType& rVariables, double& rDerivative); //ddW/dI2dI2
194 
195  virtual double& GetFunction2ndI3Derivative(HyperElasticDataType& rVariables, double& rDerivative); //ddW/dI3dI3
196 
197  // the implementation of the crossed derivatives have to be added for a more general form (usually they are zero)
198  // virtual double& GetFunction2ndI2I1Derivative(HyperElasticDataType& rVariables, double& rDerivative); //ddW/dI2dI1
199  // virtual double& GetFunction2ndI3I1Derivative(HyperElasticDataType& rVariables, double& rDerivative); //ddW/dI3dI1
200  // virtual double& GetFunction2ndI1I2Derivative(HyperElasticDataType& rVariables, double& rDerivative); //ddW/dI1dI2
201  // virtual double& GetFunction2ndI3I2Derivative(HyperElasticDataType& rVariables, double& rDerivative); //ddW/dI3dI2
202  // virtual double& GetFunction2ndI1I3Derivative(HyperElasticDataType& rVariables, double& rDerivative); //ddW/dI1dI3
203  // virtual double& GetFunction2ndI2I3Derivative(HyperElasticDataType& rVariables, double& rDerivative); //ddW/dI2dI3
204 
205  //isochoric volumetric slit
206 
207  MatrixType& GetIsochoricRightCauchyGreenDerivative(const StrainData& rStrain, MatrixType& rDerivative); //dC'/dC
208 
209  double& GetIsochoricRightCauchyGreenDerivative(const StrainData& rStrain,
210  double& rDerivative,
211  const double& a,
212  const double& b,
213  const double& c,
214  const double& d); //dC'/dC
215 
216 
217  MatrixType& GetIsochoricLeftCauchyGreenDerivative(const StrainData& rStrain,
218  MatrixType& rDerivative); //db'/db
219 
220  double& GetIsochoricLeftCauchyGreenDerivative(const StrainData& rStrain,
221  double& rDerivative,
222  const double& a,
223  const double& b,
224  const double& c,
225  const double& d); //db'/db
226 
227  //************// right cauchy green: C
228 
229  MatrixType& GetI1RightCauchyGreenDerivative(const StrainData& rStrain, MatrixType& rDerivative); //dI1/dC
230 
231  MatrixType& GetI2RightCauchyGreenDerivative(const StrainData& rStrain, MatrixType& rDerivative); //dI2/dC
232 
233  MatrixType& GetI3RightCauchyGreenDerivative(const StrainData& rStrain, MatrixType& rDerivative); //dI3/dC
234 
235 
236 
237  double& GetFourthOrderUnitTensor(double& rValue,
238  const double& a,
239  const double& b,
240  const double& c,
241  const double& d); //ddC/dCdC or ddb/dbdb
242 
243 
244  double& GetInverseRightCauchyGreenDerivative(const StrainData& rStrain,
245  double& rDerivative,
246  const double& a,
247  const double& b,
248  const double& c,
249  const double& d); //dC^-1/dC
250 
251 
252  //Invariants 1st derivatives by components
253  double& GetI1RightCauchyGreen1stDerivative(const StrainData& rStrain,
254  double& rDerivative,
255  const double& a,
256  const double& b); //dI1/dC
257 
258 
259  double& GetI2RightCauchyGreen1stDerivative(const StrainData& rStrain,
260  double& rDerivative,
261  const double& a,
262  const double& b); //dI2/dC
263 
264 
265  double& GetI3RightCauchyGreen1stDerivative(const StrainData& rStrain,
266  double& rDerivative,
267  const double& a,
268  const double& b); //dI3/dC
269 
270 
271 
272 
273 
274  //Invariants Square of the 1st derivatives by components
275  double& GetI1RightCauchyGreenSquare1stDerivative(const StrainData& rStrain,
276  double& rDerivative,
277  const double& a,
278  const double& b,
279  const double& c,
280  const double& d); //dI1/dC * dI2/dC
281 
282 
283  double& GetI2RightCauchyGreenSquare1stDerivative(const StrainData& rStrain,
284  double& rDerivative,
285  const double& a,
286  const double& b,
287  const double& c,
288  const double& d); //dI2/dC * dI3/dC
289 
290 
291  double& GetI3RightCauchyGreenSquare1stDerivative(const StrainData& rStrain,
292  double& rDerivative,
293  const double& a,
294  const double& b,
295  const double& c,
296  const double& d); //dI3/dC * dI3/dC
297 
298 
299 
300  //Invariants 2nd derivatives by components
301  double& GetI1RightCauchyGreen2ndDerivative(const StrainData& rStrain,
302  double& rDerivative,
303  const double& a,
304  const double& b,
305  const double& c,
306  const double& d); //ddI1/dCdC
307 
308 
309  double& GetI2RightCauchyGreen2ndDerivative(const StrainData& rStrain,
310  double& rDerivative,
311  const double& a,
312  const double& b,
313  const double& c,
314  const double& d); //ddI2/dCdC
315 
316 
317  double& GetI3RightCauchyGreen2ndDerivative(const StrainData& rStrain,
318  double& rDerivative,
319  const double& a,
320  const double& b,
321  const double& c,
322  const double& d); //ddI3/dCdC
323 
324 
325  //************// left cauchy green : b
326 
327  MatrixType& GetI1LeftCauchyGreenDerivative(const StrainData& rStrain, MatrixType& rDerivative); //dI1/db
328 
329  MatrixType& GetI2LeftCauchyGreenDerivative(const StrainData& rStrain, MatrixType& rDerivative); //dI2/db
330 
331  MatrixType& GetI3LeftCauchyGreenDerivative(const StrainData& rStrain, MatrixType& rDerivative); //dI3/db
332 
333 
334  //Invariants 1st derivatives by components
335  double& GetI1LeftCauchyGreen1stDerivative(const StrainData& rStrain,
336  double& rDerivative,
337  const double& a,
338  const double& b); //dI1/db
339 
340 
341  double& GetI2LeftCauchyGreen1stDerivative(const StrainData& rStrain,
342  double& rDerivative,
343  const double& a,
344  const double& b); //dI2/db
345 
346 
347  double& GetI3LeftCauchyGreen1stDerivative(const StrainData& rStrain,
348  double& rDerivative,
349  const double& a,
350  const double& b); //dI3/db
351 
352 
353 
354  //Invariants Square of the 1st derivatives by components
355  double& GetI1LeftCauchyGreenSquare1stDerivative(const StrainData& rStrain,
356  double& rDerivative,
357  const double& a,
358  const double& b,
359  const double& c,
360  const double& d); //dI1/db * dI1/db
361 
362 
363  double& GetI2LeftCauchyGreenSquare1stDerivative(const StrainData& rStrain,
364  double& rDerivative,
365  const double& a,
366  const double& b,
367  const double& c,
368  const double& d); //dI2/db * dI2/db
369 
370 
371  double& GetI3LeftCauchyGreenSquare1stDerivative(const StrainData& rStrain,
372  double& rDerivative,
373  const double& a,
374  const double& b,
375  const double& c,
376  const double& d); //dI3/db * dI3/db
377 
378 
379 
380  //Invariants 2nd derivatives by components
381  double& GetI1LeftCauchyGreen2ndDerivative(const StrainData& rStrain,
382  double& rDerivative,
383  const double& a,
384  const double& b,
385  const double& c,
386  const double& d); //ddI1/dbdb
387 
388 
389  double& GetI2LeftCauchyGreen2ndDerivative(const StrainData& rStrain,
390  double& rDerivative,
391  const double& a,
392  const double& b,
393  const double& c,
394  const double& d); //ddI2/dbdb
395 
396 
397  double& GetI3LeftCauchyGreen2ndDerivative(const StrainData& rStrain,
398  double& rDerivative,
399  const double& a,
400  const double& b,
401  const double& c,
402  const double& d); //ddI3/dbdb
403 
404 
408 
409 
413 
414 
418 
419 
421 
422  private:
423 
426 
427 
431 
432 
436 
437 
441 
442 
446 
447 
451  friend class Serializer;
452 
453 
454  void save(Serializer& rSerializer) const override
455  {
457  }
458 
459  void load(Serializer& rSerializer) override
460  {
462  }
463 
467 
468 
472 
474 
475  }; // Class MooneyRivlinModel
476 
478 
481 
482 
486 
487 
489 
491 
492 } // namespace Kratos.
493 
494 #endif // KRATOS_MOONEY_RIVLIN_MODEL_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Short class definition.
Definition: hyper_elastic_model.hpp:50
Short class definition.
Definition: mooney_rivlin_model.hpp:50
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: mooney_rivlin_model.hpp:124
std::string Info() const override
Turn back information as a string.
Definition: mooney_rivlin_model.hpp:110
KRATOS_CLASS_POINTER_DEFINITION(MooneyRivlinModel)
Pointer definition of MooneyRivlinModel.
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: mooney_rivlin_model.hpp:118
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
Matrix MatrixType
Definition: geometrical_transformation_utilities.h:55
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
a
Definition: generate_stokes_twofluid_element.py:77
b
Definition: generate_total_lagrangian_mixed_volumetric_strain_element.py:31
c
Definition: generate_weakly_compressible_navier_stokes_element.py:108
def load(f)
Definition: ode_solve.py:307
int d
Definition: ode_solve.py:397