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.
ogden_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_OGDEN_MODEL_H_INCLUDED )
11 #define KRATOS_OGDEN_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) OgdenModel : public HyperElasticModel
50  {
51  public:
52 
55 
58 
62 
64  OgdenModel();
65 
67  OgdenModel(OgdenModel const& rOther);
68 
70  OgdenModel& operator=(OgdenModel const& rOther);
71 
73  ConstitutiveModel::Pointer Clone() const override;
74 
75 
77  ~OgdenModel() override;
78 
79 
83 
84 
88 
92  void CalculateStrainEnergy(ModelDataType& rValues, double& rDensityFunction) override;
93 
97  void CalculateConstitutiveTensor(ModelDataType& rValues, Matrix& rConstitutiveMatrix) override;
98 
99 
103  int Check(const Properties& rProperties, const ProcessInfo& rCurrentProcessInfo) override;
104 
108 
109 
113 
114 
118 
120  std::string Info() const override
121  {
122  std::stringstream buffer;
123  buffer << "OgdenModel";
124  return buffer.str();
125  }
126 
128  void PrintInfo(std::ostream& rOStream) const override
129  {
130  rOStream << "OgdenModel";
131  }
132 
134  void PrintData(std::ostream& rOStream) const override
135  {
136  rOStream << "OgdenModel Data";
137  }
138 
139 
143 
144 
146 
147  protected:
150 
154 
158 
159 
163 
167  void CalculateAndAddStressTensor(HyperElasticDataType& rVariables, MatrixType& rStressMatrix) override;
168 
172  void CalculateAndAddConstitutiveTensor(HyperElasticDataType& rVariables, Matrix& rConstitutiveMatrix) override;
173 
174  virtual void CalculateAndAddConstitutiveTensorB(HyperElasticDataType& rVariables, Matrix& rConstitutiveMatrix);
175 
179  double& AddConstitutiveComponent(HyperElasticDataType& rVariables, double &rCabcd,
180  const array_1d<double,3>& rVectorDerivative,
181  const unsigned int& a, const unsigned int& b,
182  const unsigned int& c, const unsigned int& d);
183 
187  void GetEigenCoincidence(const array_1d<double,3>& rStrainEigenValues,
189  unsigned int& option);
190 
194  double& CalculateIsotropicTensorDerivative(const MatrixType& rStrainMatrix,
195  const MatrixType& rStrainEigenVectors,
196  const array_1d<double,3>& rStrainEigenValues,
197  const MatrixType& rStressDerivatives,
198  const array_1d<double,3>& rStressEigenValues,
199  const array_1d<double,6>& rOptionFactors,
200  const unsigned int& rOption,
201  double &rCabcd,
202  const unsigned int& a, const unsigned int& b,
203  const unsigned int& c, const unsigned int& d);
204 
205 
209  void CalculateDerivativeFactors(array_1d<double,6>& rDerivativeFactors, const MatrixType& rStressDerivatives, const array_1d<double,3>& rStressEigenValues, const array_1d<double,3>& rStrainEigenValues, const array_1d<unsigned int,3>& rOrder);
210 
211 
212  //************// Strain Data
213 
214 
215  void CalculateStrainData(ModelDataType& rValues, HyperElasticDataType& rVariables) override;
216 
217  virtual void CalculateMainStresses(HyperElasticDataType& rVariables, array_1d<double,3>& rMainStresses);
218 
219  virtual void CalculateMainStressDerivatives(HyperElasticDataType& rVariables, MatrixType& rStressDerivatives);
220 
221  virtual double& CalculateStressDerivativesI(HyperElasticDataType& rVariables, double& rValue, const unsigned int& i, const unsigned int& j);
222  virtual double& CalculateStressDerivativesII(HyperElasticDataType& rVariables, double& rValue, const unsigned int& i, const unsigned int& j);
223 
224  //************//W
225 
226  void CalculateAndAddVolumetricStrainEnergy(HyperElasticDataType& rVariables, double& rVolumetricDensityFunction) override;
227 
231 
232 
236 
237 
241 
242 
244 
245  private:
246 
249 
250 
254 
255 
259 
260 
264 
266 
270 
271 
275  friend class Serializer;
276 
277 
278  void save(Serializer& rSerializer) const override
279  {
281  }
282 
283  void load(Serializer& rSerializer) override
284  {
286  }
287 
291 
292 
296 
298 
299  }; // Class OgdenModel
300 
302 
305 
306 
310 
311 
313 
315 
316 } // namespace Kratos.
317 
318 #endif // KRATOS_OGDEN_MODEL_H_INCLUDED defined
PeriodicInterfaceProcess & operator=(const PeriodicInterfaceProcess &)=delete
Short class definition.
Definition: hyper_elastic_model.hpp:50
virtual double & AddConstitutiveComponent(HyperElasticDataType &rVariables, double &rCabcd, const unsigned int &a, const unsigned int &b, const unsigned int &c, const unsigned int &d)
Definition: hyper_elastic_model.cpp:454
Short class definition.
Definition: ogden_model.hpp:50
std::string Info() const override
Turn back information as a string.
Definition: ogden_model.hpp:120
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: ogden_model.hpp:128
KRATOS_CLASS_POINTER_DEFINITION(OgdenModel)
Pointer definition of OgdenModel.
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: ogden_model.hpp:134
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
double CalculateStrainEnergy(Element &rElement)
Definition: mpm_energy_calculation_utility.cpp:89
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
int j
Definition: quadrature.py:648
integer i
Definition: TensorModule.f:17
Definition: constitutive_model_data.hpp:383