10 #if !defined(KRATOS_NEWTONIAN_FLUID_PLANE_STRAIN_2D_LAW_H_INCLUDED )
11 #define KRATOS_NEWTONIAN_FLUID_PLANE_STRAIN_2D_LAW_H_INCLUDED
75 ConstitutiveLaw::Pointer
Clone()
const override
77 return Kratos::make_shared<NewtonianFluidPlaneStrain2DLaw>(*
this);
136 std::string
Info()
const override
138 std::stringstream buffer;
139 buffer <<
"NewtonianFluidPlaneStrain2DLaw" ;
144 void PrintInfo(std::ostream& rOStream)
const override {rOStream <<
"NewtonianFluidPlaneStrain2DLaw";}
147 void PrintData(std::ostream& rOStream)
const override {}
179 const Vector & rStrainVector,
184 const double& rViscosity = rProperties[DYNAMIC_VISCOSITY];
186 const double pressure = (rStrainVector[0]+rStrainVector[1])/3.0;
189 rStressVector[0] = 2.0*rViscosity*(rStrainVector[0] -
pressure);
190 rStressVector[1] = 2.0*rViscosity*(rStrainVector[1] -
pressure);
191 rStressVector[2] = rViscosity*rStrainVector[2];
209 const double& rViscosity = rProperties[DYNAMIC_VISCOSITY];
211 const double diagonal_component = 4.0 * rViscosity / 3.0;
212 const double side_component = -0.5 * diagonal_component;
215 rConstitutiveMatrix ( 0 , 0 ) = diagonal_component;
216 rConstitutiveMatrix ( 1 , 1 ) = diagonal_component;
218 rConstitutiveMatrix ( 2 , 2 ) = rViscosity;
220 rConstitutiveMatrix ( 0 , 1 ) = side_component;
221 rConstitutiveMatrix ( 1 , 0 ) = side_component;
224 rConstitutiveMatrix ( 0 , 2 ) = 0.0;
225 rConstitutiveMatrix ( 2 , 0 ) = 0.0;
226 rConstitutiveMatrix ( 1 , 2 ) = 0.0;
227 rConstitutiveMatrix ( 2 , 1 ) = 0.0;
290 void save(
Serializer& rSerializer)
const override
@ StrainMeasure_Velocity_Gradient
Definition: constitutive_law.h:65
std::size_t SizeType
Definition: constitutive_law.h:82
void Set(const Flags ThisFlag)
Definition: flags.cpp:33
Definition: newtonian_3D_law.hpp:30
NewtonianFluid3DLaw & operator=(const NewtonianFluid3DLaw &rOther)
Assignment operator.
Definition: newtonian_3D_law.cpp:43
Short class definition.
Definition: newtonian_plane_strain_2D_law.hpp:48
SizeType GetStrainSize() const override
Law Voigt Strain Size.
Definition: newtonian_plane_strain_2D_law.hpp:92
void GetLawFeatures(Features &rFeatures) override
Law Features.
Definition: newtonian_plane_strain_2D_law.hpp:95
void CalculateConstitutiveMatrix(Matrix &rConstitutiveMatrix, const Properties &rProperties) override
Definition: newtonian_plane_strain_2D_law.hpp:203
NewtonianFluidPlaneStrain2DLaw(const NewtonianFluidPlaneStrain2DLaw &rOther)
Copy constructor.
Definition: newtonian_plane_strain_2D_law.hpp:65
void CalculateStress(Vector &rStressVector, const Vector &rStrainVector, const Properties &rProperties) override
Definition: newtonian_plane_strain_2D_law.hpp:178
NewtonianFluidPlaneStrain2DLaw()
Default constructor.
Definition: newtonian_plane_strain_2D_law.hpp:61
void PrintInfo(std::ostream &rOStream) const override
Print information about this object.
Definition: newtonian_plane_strain_2D_law.hpp:144
std::string Info() const override
Turn back information as a string.
Definition: newtonian_plane_strain_2D_law.hpp:136
ConstitutiveLaw::Pointer Clone() const override
Clone.
Definition: newtonian_plane_strain_2D_law.hpp:75
NewtonianFluidPlaneStrain2DLaw & operator=(NewtonianFluidPlaneStrain2DLaw const &rOther)
Assignment operator.
Definition: newtonian_plane_strain_2D_law.hpp:68
~NewtonianFluidPlaneStrain2DLaw() override
Destructor.
Definition: newtonian_plane_strain_2D_law.hpp:81
KRATOS_CLASS_POINTER_DEFINITION(NewtonianFluidPlaneStrain2DLaw)
Pointer definition of NewtonianFluidPlaneStrain2DLawg.
void PrintData(std::ostream &rOStream) const override
Print object's data.
Definition: newtonian_plane_strain_2D_law.hpp:147
SizeType WorkingSpaceDimension() override
Law Dimension.
Definition: newtonian_plane_strain_2D_law.hpp:89
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_CATCH(MoreInfo)
Definition: define.h:110
#define KRATOS_TRY
Definition: define.h:109
#define KRATOS_SERIALIZE_LOAD_BASE_CLASS(Serializer, BaseType)
Definition: define.h:815
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
def load(f)
Definition: ode_solve.py:307
float pressure
Definition: test_pureconvectionsolver_benchmarking.py:101
Definition: constitutive_law.h:137
SizeType mStrainSize
Definition: constitutive_law.h:152
std::vector< StrainMeasure > mStrainMeasures
Definition: constitutive_law.h:154
SizeType mSpaceDimension
Definition: constitutive_law.h:153
Flags mOptions
Definition: constitutive_law.h:151