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.
fluid_constitutive_law.h
Go to the documentation of this file.
1 // | / |
2 // ' / __| _` | __| _ \ __|
3 // . \ | ( | | ( |\__ `
4 // _|\_\_| \__,_|\__|\___/ ____/
5 // Multi-Physics
6 //
7 // License: BSD License
8 // Kratos default license: kratos/license.txt
9 //
10 // Main authors: Jordi Cotela
11 //
12 
13 #if !defined (KRATOS_FLUID_CONSTITUTIVE_LAW)
14 #define KRATOS_FLUID_CONSTITUTIVE_LAW
15 
16 // System includes
17 
18 // External includes
19 
20 // Project includes
22 
23 
24 namespace Kratos
25 {
26 
29 
32 
34 class KRATOS_API(FLUID_DYNAMICS_APPLICATION) FluidConstitutiveLaw : public ConstitutiveLaw
35 {
36 public:
37 
40 
42 
44  typedef std::size_t SizeType;
45 
49 
52 
55 
57  ~FluidConstitutiveLaw() override;
58 
62 
64  ConstitutiveLaw::Pointer Clone() const override;
65 
67 
76  void CalculateMaterialResponseCauchy(ConstitutiveLaw::Parameters& rValues) override;
77 
79 
84  int Check(
85  const Properties& rMaterialProperties,
86  const GeometryType& rElementGeometry,
87  const ProcessInfo& rCurrentProcessInfo) const override;
88 
92 
94  int& CalculateValue(ConstitutiveLaw::Parameters& rParameters, const Variable<int>& rThisVariable, int& rValue) override;
95 
97 
98  double& CalculateValue(ConstitutiveLaw::Parameters& rParameters, const Variable<double>& rThisVariable, double& rValue) override;
99 
101  Vector& CalculateValue(ConstitutiveLaw::Parameters& rParameters, const Variable<Vector>& rThisVariable, Vector& rValue) override;
102 
104  Matrix& CalculateValue(ConstitutiveLaw::Parameters& rParameters, const Variable<Matrix>& rThisVariable, Matrix& rValue) override;
105 
107  array_1d<double, 3 > & CalculateValue(ConstitutiveLaw::Parameters& rParameters, const Variable<array_1d<double, 3 > >& rThisVariable,array_1d<double, 3 > & rValue) override;
108 
110  array_1d<double, 6 > & CalculateValue(ConstitutiveLaw::Parameters& rParameters, const Variable<array_1d<double, 6 > >& rThisVariable, array_1d<double, 6 > & rValue) override;
111 
115 
117 
119  SizeType WorkingSpaceDimension() override;
120 
122 
124  SizeType GetStrainSize() const override;
125 
129 
131  std::string Info() const override;
132 
134  void PrintInfo(std::ostream& rOStream) const override;
135 
137  void PrintData(std::ostream& rOStream) const override;
138 
140 
141 protected:
142 
145 
147 
151  void NewtonianConstitutiveMatrix2D(double EffectiveViscosity, Matrix& rC);
152 
154 
158  void NewtonianConstitutiveMatrix3D(double EffectiveViscosity, Matrix& rC);
159 
163 
170  virtual double GetEffectiveViscosity(ConstitutiveLaw::Parameters& rParameters) const;
171 
182  virtual double GetValueFromTable(
183  const Variable<double> &rVariableInput,
184  const Variable<double> &rVariableOutput,
185  ConstitutiveLaw::Parameters &rParameters) const;
186 
188 
189  private:
190 
193 
194 
198 
199  friend class Serializer;
200 
201  void save(Serializer& rSerializer) const override;
202 
203  void load(Serializer& rSerializer) override;
204 
206 
207 }; // Class FluidConstitutiveLaw
208 
209 } // namespace Kratos.
210 
211 #endif // KRATOS_FLUID_CONSTITUTIVE_LAW defined
std::string Info() const override
Turn back information as a string.
Definition: periodic_interface_process.hpp:93
Definition: constitutive_law.h:47
std::size_t SizeType
Definition: constitutive_law.h:82
This class contains the common infrastructure for fluid constitutive laws.
Definition: fluid_constitutive_law.h:35
Geometry base class.
Definition: geometry.h:71
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
KRATOS_CLASS_POINTER_DEFINITION(FluidConstitutiveLaw)
ConstitutiveLaw BaseType
Definition: fluid_constitutive_law.h:43
std::size_t SizeType
Definition: fluid_constitutive_law.h:44
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