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.
Public Types | Public Member Functions | List of all members
Kratos::Newtonian2DLaw Class Reference

#include <newtonian_2d_law.h>

Inheritance diagram for Kratos::Newtonian2DLaw:
Collaboration diagram for Kratos::Newtonian2DLaw:

Public Types

typedef ProcessInfo ProcessInfoType
 
typedef ConstitutiveLaw BaseType
 
typedef std::size_t SizeType
 
typedef ProcessInfo ProcessInfoType
 
typedef ConstitutiveLaw BaseType
 
typedef std::size_t SizeType
 
- Public Types inherited from Kratos::FluidConstitutiveLaw
typedef ConstitutiveLaw BaseType
 
typedef std::size_t SizeType
 
- Public Types inherited from Kratos::ConstitutiveLaw
enum  StrainMeasure {
  StrainMeasure_Infinitesimal , StrainMeasure_GreenLagrange , StrainMeasure_Almansi , StrainMeasure_Hencky_Material ,
  StrainMeasure_Hencky_Spatial , StrainMeasure_Deformation_Gradient , StrainMeasure_Right_CauchyGreen , StrainMeasure_Left_CauchyGreen ,
  StrainMeasure_Velocity_Gradient
}
 
enum  StressMeasure { StressMeasure_PK1 , StressMeasure_PK2 , StressMeasure_Kirchhoff , StressMeasure_Cauchy }
 
typedef ProcessInfo ProcessInfoType
 
typedef std::size_t SizeType
 
typedef Geometry< NodeGeometryType
 
typedef Vector StrainVectorType
 
typedef Vector StressVectorType
 
typedef Matrix VoigtSizeMatrixType
 
typedef Matrix DeformationGradientMatrixType
 
- Public Types inherited from Kratos::Flags
enum  FlagsList {
  Flag0 = BlockType(1) , Flag1 = BlockType(1) << 1 , Flag2 = BlockType(1) << 2 , Flag3 = BlockType(1) << 3 ,
  Flag4 = BlockType(1) << 4 , Flag5 = BlockType(1) << 5 , Flag6 = BlockType(1) << 6 , Flag7 = BlockType(1) << 7 ,
  Flag8 = BlockType(1) << 8 , Flag9 = BlockType(1) << 9 , Flag10 = BlockType(1) << 10 , Flag11 = BlockType(1) << 11 ,
  Flag12 = BlockType(1) << 12 , Flag13 = BlockType(1) << 13 , Flag14 = BlockType(1) << 14 , Flag15 = BlockType(1) << 15 ,
  Flag16 = BlockType(1) << 16 , Flag17 = BlockType(1) << 17 , Flag18 = BlockType(1) << 18 , Flag19 = BlockType(1) << 19 ,
  Flag20 = BlockType(1) << 20 , Flag21 = BlockType(1) << 21 , Flag22 = BlockType(1) << 22 , Flag23 = BlockType(1) << 23 ,
  Flag24 = BlockType(1) << 24 , Flag25 = BlockType(1) << 25 , Flag26 = BlockType(1) << 26 , Flag27 = BlockType(1) << 27 ,
  Flag28 = BlockType(1) << 28 , Flag29 = BlockType(1) << 29 , Flag30 = BlockType(1) << 30
}
 
typedef int64_t BlockType
 
typedef int64_t FlagType
 
typedef std::size_t IndexType
 
- Public Types inherited from Kratos::PfemFluidConstitutiveLaw
typedef ConstitutiveLaw BaseType
 
typedef std::size_t SizeType
 

Public Member Functions

 KRATOS_CLASS_POINTER_DEFINITION (Newtonian2DLaw)
 
 Newtonian2DLaw ()
 
ConstitutiveLaw::Pointer Clone () const override
 
 Newtonian2DLaw (const Newtonian2DLaw &rOther)
 
 ~Newtonian2DLaw () override
 
SizeType WorkingSpaceDimension () override
 
SizeType GetStrainSize () const override
 
void CalculateMaterialResponseCauchy (Parameters &rValues) override
 Calculate the response of the material for the current strain rates. More...
 
void CalculateDerivative (Parameters &rParameterValues, const Variable< double > &rFunctionVariable, const Variable< double > &rDerivativeVariable, double &rOutput) override
 Calculates derivatives of a given function. More...
 
void CalculateDerivative (Parameters &rParameterValues, const Variable< Vector > &rFunctionVariable, const Variable< double > &rDerivativeVariable, Vector &rOutput) override
 Calculates derivatives of a given function. More...
 
void CalculateDerivative (Parameters &rParameterValues, const Variable< Matrix > &rFunctionVariable, const Variable< double > &rDerivativeVariable, Matrix &rOutput) override
 Calculates derivatives of a given function. More...
 
int Check (const Properties &rMaterialProperties, const GeometryType &rElementGeometry, const ProcessInfo &rCurrentProcessInfo) const override
 
std::string Info () const override
 
 KRATOS_CLASS_POINTER_DEFINITION (Newtonian2DLaw)
 
 Newtonian2DLaw ()
 
ConstitutiveLaw::Pointer Clone () const override
 
 Newtonian2DLaw (const Newtonian2DLaw &rOther)
 
 ~Newtonian2DLaw () override
 
SizeType WorkingSpaceDimension () override
 
SizeType GetStrainSize () const override
 
void CalculateMaterialResponseCauchy (Parameters &rValues) override
 Calculate the response of the material for the current strain rates. More...
 
int Check (const Properties &rMaterialProperties, const GeometryType &rElementGeometry, const ProcessInfo &rCurrentProcessInfo) const override
 
std::string Info () const override
 
- Public Member Functions inherited from Kratos::FluidConstitutiveLaw
 FluidConstitutiveLaw ()
 Default constructor. More...
 
 FluidConstitutiveLaw (const FluidConstitutiveLaw &rOther)
 Copy constructor. More...
 
 ~FluidConstitutiveLaw () override
 Destructor. More...
 
intCalculateValue (ConstitutiveLaw::Parameters &rParameters, const Variable< int > &rThisVariable, int &rValue) override
 Useless boilerplate that's just here to avoid a compilation warning. Only the double variant is meaningful. More...
 
doubleCalculateValue (ConstitutiveLaw::Parameters &rParameters, const Variable< double > &rThisVariable, double &rValue) override
 We are abusing the constitutive law interface to return the effective viscosity to the calling element through this function. More...
 
VectorCalculateValue (ConstitutiveLaw::Parameters &rParameters, const Variable< Vector > &rThisVariable, Vector &rValue) override
 Useless boilerplate that's just here to avoid a compilation warning. Only the double variant is meaningful. More...
 
MatrixCalculateValue (ConstitutiveLaw::Parameters &rParameters, const Variable< Matrix > &rThisVariable, Matrix &rValue) override
 Useless boilerplate that's just here to avoid a compilation warning. Only the double variant is meaningful. More...
 
array_1d< double, 3 > & CalculateValue (ConstitutiveLaw::Parameters &rParameters, const Variable< array_1d< double, 3 > > &rThisVariable, array_1d< double, 3 > &rValue) override
 Useless boilerplate that's just here to avoid a compilation warning. Only the double variant is meaningful. More...
 
array_1d< double, 6 > & CalculateValue (ConstitutiveLaw::Parameters &rParameters, const Variable< array_1d< double, 6 > > &rThisVariable, array_1d< double, 6 > &rValue) override
 Useless boilerplate that's just here to avoid a compilation warning. Only the double variant is meaningful. More...
 
void PrintInfo (std::ostream &rOStream) const override
 Print basic information about this constitutive law instance. More...
 
void PrintData (std::ostream &rOStream) const override
 Print detailed information about this constitutive law instance and its managed data. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (FluidConstitutiveLaw)
 
- Public Member Functions inherited from Kratos::ConstitutiveLaw
 KRATOS_CLASS_POINTER_DEFINITION (ConstitutiveLaw)
 
 KRATOS_DEFINE_LOCAL_FLAG (USE_ELEMENT_PROVIDED_STRAIN)
 
 KRATOS_DEFINE_LOCAL_FLAG (COMPUTE_STRESS)
 
 KRATOS_DEFINE_LOCAL_FLAG (COMPUTE_CONSTITUTIVE_TENSOR)
 
 KRATOS_DEFINE_LOCAL_FLAG (COMPUTE_STRAIN_ENERGY)
 
 KRATOS_DEFINE_LOCAL_FLAG (ISOCHORIC_TENSOR_ONLY)
 
 KRATOS_DEFINE_LOCAL_FLAG (VOLUMETRIC_TENSOR_ONLY)
 
 KRATOS_DEFINE_LOCAL_FLAG (MECHANICAL_RESPONSE_ONLY)
 
 KRATOS_DEFINE_LOCAL_FLAG (THERMAL_RESPONSE_ONLY)
 
 KRATOS_DEFINE_LOCAL_FLAG (INCREMENTAL_STRAIN_MEASURE)
 
 KRATOS_DEFINE_LOCAL_FLAG (INITIALIZE_MATERIAL_RESPONSE)
 
 KRATOS_DEFINE_LOCAL_FLAG (FINALIZE_MATERIAL_RESPONSE)
 
 KRATOS_DEFINE_LOCAL_FLAG (FINITE_STRAINS)
 
 KRATOS_DEFINE_LOCAL_FLAG (INFINITESIMAL_STRAINS)
 
 KRATOS_DEFINE_LOCAL_FLAG (THREE_DIMENSIONAL_LAW)
 
 KRATOS_DEFINE_LOCAL_FLAG (PLANE_STRAIN_LAW)
 
 KRATOS_DEFINE_LOCAL_FLAG (PLANE_STRESS_LAW)
 
 KRATOS_DEFINE_LOCAL_FLAG (AXISYMMETRIC_LAW)
 
 KRATOS_DEFINE_LOCAL_FLAG (U_P_LAW)
 
 KRATOS_DEFINE_LOCAL_FLAG (ISOTROPIC)
 
 KRATOS_DEFINE_LOCAL_FLAG (ANISOTROPIC)
 
 ConstitutiveLaw ()
 
 ~ConstitutiveLaw () override
 
virtual Pointer Create (Kratos::Parameters NewParameters) const
 It creates a new constitutive law pointer. More...
 
virtual Pointer Create (Kratos::Parameters NewParameters, const Properties &rProperties) const
 It creates a new constitutive law pointer (version with properties) More...
 
void SetInitialState (InitialState::Pointer pInitialState)
 
InitialState::Pointer pGetInitialState ()
 
InitialStateGetInitialState ()
 
bool HasInitialState () const
 
template<typename TVectorType >
void AddInitialStressVectorContribution (TVectorType &rStressVector)
 Adds the initial stress vector if it is defined in the InitialState. More...
 
template<typename TVectorType >
void AddInitialStrainVectorContribution (TVectorType &rStrainVector)
 Adds the initial strain vector if it is defined in the InitialState. More...
 
template<typename TMatrixType >
void AddInitialDeformationGradientMatrixContribution (TMatrixType &rF)
 Adds the initial strain vector if it is defined in the InitialState. More...
 
virtual bool Has (const Variable< bool > &rThisVariable)
 Returns whether this constitutive Law has specified variable (boolean) More...
 
virtual bool Has (const Variable< int > &rThisVariable)
 Returns whether this constitutive Law has specified variable (integer) More...
 
virtual bool Has (const Variable< double > &rThisVariable)
 Returns whether this constitutive Law has specified variable (double) More...
 
virtual bool Has (const Variable< Vector > &rThisVariable)
 Returns whether this constitutive Law has specified variable (Vector) More...
 
virtual bool Has (const Variable< Matrix > &rThisVariable)
 Returns whether this constitutive Law has specified variable (Matrix) More...
 
virtual bool Has (const Variable< array_1d< double, 3 > > &rThisVariable)
 Returns whether this constitutive Law has specified variable (array of 3 components) More...
 
virtual bool Has (const Variable< array_1d< double, 6 > > &rThisVariable)
 Returns whether this constitutive Law has specified variable (array of 6 components) More...
 
virtual boolGetValue (const Variable< bool > &rThisVariable, bool &rValue)
 Returns the value of a specified variable (boolean) More...
 
virtual intGetValue (const Variable< int > &rThisVariable, int &rValue)
 
virtual doubleGetValue (const Variable< double > &rThisVariable, double &rValue)
 Returns the value of a specified variable (double) More...
 
virtual VectorGetValue (const Variable< Vector > &rThisVariable, Vector &rValue)
 Returns the value of a specified variable (Vector) More...
 
virtual MatrixGetValue (const Variable< Matrix > &rThisVariable, Matrix &rValue)
 Returns the value of a specified variable (Matrix) More...
 
virtual array_1d< double, 3 > & GetValue (const Variable< array_1d< double, 3 > > &rThisVariable, array_1d< double, 3 > &rValue)
 Returns the value of a specified variable (array of 3 components) More...
 
virtual array_1d< double, 6 > & GetValue (const Variable< array_1d< double, 6 > > &rThisVariable, array_1d< double, 6 > &rValue)
 Returns the value of a specified variable (array of 6 components) More...
 
virtual void SetValue (const Variable< bool > &rVariable, const bool &Value, const ProcessInfo &rCurrentProcessInfo)
 Sets the value of a specified variable (boolean) More...
 
virtual void SetValue (const Variable< int > &rVariable, const int &Value, const ProcessInfo &rCurrentProcessInfo)
 Sets the value of a specified variable (integer) More...
 
virtual void SetValue (const Variable< double > &rVariable, const double &rValue, const ProcessInfo &rCurrentProcessInfo)
 Sets the value of a specified variable (double) More...
 
virtual void SetValue (const Variable< Vector > &rVariable, const Vector &rValue, const ProcessInfo &rCurrentProcessInfo)
 Sets the value of a specified variable (Vector) More...
 
virtual void SetValue (const Variable< Matrix > &rVariable, const Matrix &rValue, const ProcessInfo &rCurrentProcessInfo)
 Sets the value of a specified variable (Matrix) More...
 
virtual void SetValue (const Variable< array_1d< double, 3 > > &rVariable, const array_1d< double, 3 > &rValue, const ProcessInfo &rCurrentProcessInfo)
 Sets the value of a specified variable (array of 3 components) More...
 
virtual void SetValue (const Variable< array_1d< double, 6 > > &rVariable, const array_1d< double, 6 > &rValue, const ProcessInfo &rCurrentProcessInfo)
 Sets the value of a specified variable (array of 6 components) More...
 
virtual boolCalculateValue (Parameters &rParameterValues, const Variable< bool > &rThisVariable, bool &rValue)
 Calculates the value of a specified variable (bool) More...
 
virtual void CalculateDerivative (Parameters &rParameterValues, const Variable< array_1d< double, 3 >> &rFunctionVariable, const Variable< double > &rDerivativeVariable, array_1d< double, 3 > &rOutput)
 Calculates derivatives of a given function. More...
 
virtual bool ValidateInput (const Properties &rMaterialProperties)
 
virtual StrainMeasure GetStrainMeasure ()
 
virtual StressMeasure GetStressMeasure ()
 
virtual bool IsIncremental ()
 
virtual void InitializeMaterial (const Properties &rMaterialProperties, const GeometryType &rElementGeometry, const Vector &rShapeFunctionsValues)
 
virtual void InitializeSolutionStep (const Properties &rMaterialProperties, const GeometryType &rElementGeometry, const Vector &rShapeFunctionsValues, const ProcessInfo &rCurrentProcessInfo)
 
virtual void FinalizeSolutionStep (const Properties &rMaterialProperties, const GeometryType &rElementGeometry, const Vector &rShapeFunctionsValues, const ProcessInfo &rCurrentProcessInfo)
 
virtual void InitializeNonLinearIteration (const Properties &rMaterialProperties, const GeometryType &rElementGeometry, const Vector &rShapeFunctionsValues, const ProcessInfo &rCurrentProcessInfo)
 
virtual void FinalizeNonLinearIteration (const Properties &rMaterialProperties, const GeometryType &rElementGeometry, const Vector &rShapeFunctionsValues, const ProcessInfo &rCurrentProcessInfo)
 
void CalculateMaterialResponse (Parameters &rValues, const StressMeasure &rStressMeasure)
 
virtual void CalculateMaterialResponsePK1 (Parameters &rValues)
 
virtual void CalculateMaterialResponsePK2 (Parameters &rValues)
 
virtual void CalculateMaterialResponseKirchhoff (Parameters &rValues)
 
virtual bool RequiresInitializeMaterialResponse ()
 If the CL requires to initialize the material response, called by the element in InitializeSolutionStep. More...
 
virtual void CalculateStressResponse (Parameters &rValues, Vector &rInternalVariables)
 
void InitializeMaterialResponse (Parameters &rValues, const StressMeasure &rStressMeasure)
 Initialize the material response, called by the element in InitializeSolutionStep. More...
 
virtual void InitializeMaterialResponsePK1 (Parameters &rValues)
 Initialize the material response in terms of 1st Piola-Kirchhoff stresses. More...
 
virtual void InitializeMaterialResponsePK2 (Parameters &rValues)
 Initialize the material response in terms of 2nd Piola-Kirchhoff stresses. More...
 
virtual void InitializeMaterialResponseKirchhoff (Parameters &rValues)
 Initialize the material response in terms of Kirchhoff stresses. More...
 
virtual void InitializeMaterialResponseCauchy (Parameters &rValues)
 Initialize the material response in terms of Cauchy stresses. More...
 
virtual bool RequiresFinalizeMaterialResponse ()
 If the CL requires to finalize the material response, called by the element in FinalizeSolutionStep. More...
 
void FinalizeMaterialResponse (Parameters &rValues, const StressMeasure &rStressMeasure)
 Finalize the material response, called by the element in FinalizeSolutionStep. More...
 
virtual void FinalizeMaterialResponsePK1 (Parameters &rValues)
 
virtual void FinalizeMaterialResponsePK2 (Parameters &rValues)
 
virtual void FinalizeMaterialResponseKirchhoff (Parameters &rValues)
 
virtual void FinalizeMaterialResponseCauchy (Parameters &rValues)
 
virtual void ResetMaterial (const Properties &rMaterialProperties, const GeometryType &rElementGeometry, const Vector &rShapeFunctionsValues)
 
virtual VectorTransformStrains (Vector &rStrainVector, const Matrix &rF, StrainMeasure rStrainInitial, StrainMeasure rStrainFinal)
 
virtual MatrixTransformStresses (Matrix &rStressMatrix, const Matrix &rF, const double &rdetF, StressMeasure rStressInitial, StressMeasure rStressFinal)
 
virtual VectorTransformStresses (Vector &rStressVector, const Matrix &rF, const double &rdetF, StressMeasure rStressInitial, StressMeasure rStressFinal)
 
VectorTransformPK1Stresses (Vector &rStressVector, const Matrix &rF, const double &rdetF, StressMeasure rStressFinal)
 
VectorTransformPK2Stresses (Vector &rStressVector, const Matrix &rF, const double &rdetF, StressMeasure rStressFinal)
 
VectorTransformKirchhoffStresses (Vector &rStressVector, const Matrix &rF, const double &rdetF, StressMeasure rStressFinal)
 
VectorTransformCauchyStresses (Vector &rStressVector, const Matrix &rF, const double &rdetF, StressMeasure rStressFinal)
 
void PullBackConstitutiveMatrix (Matrix &rConstitutiveMatrix, const Matrix &rF)
 
void PushForwardConstitutiveMatrix (Matrix &rConstitutiveMatrix, const Matrix &rF)
 
virtual void GetLawFeatures (Features &rFeatures)
 
virtual void CalculateCauchyStresses (Vector &Cauchy_StressVector, const Matrix &F, const Vector &PK2_StressVector, const Vector &GreenLagrangeStrainVector)
 
- Public Member Functions inherited from Kratos::Flags
Flagsoperator= (Flags const &rOther)
 Assignment operator. More...
 
 operator bool () const
 
Flags operator~ () const
 
bool operator! () const
 
void AssignFlags (Flags const &rOther)
 
void Set (const Flags ThisFlag)
 
void Set (const Flags ThisFlag, bool Value)
 
void Reset (const Flags ThisFlag)
 
void Flip (const Flags ThisFlag)
 
void SetPosition (IndexType Position, bool Value=true)
 
bool GetPosition (IndexType Position) const
 
void FlipPosition (IndexType Position)
 
void ClearPosition (IndexType Position)
 
void Clear ()
 
Flags AsFalse () const
 
bool Is (Flags const &rOther) const
 
bool IsDefined (Flags const &rOther) const
 
bool IsNot (Flags const &rOther) const
 
bool IsNotDefined (Flags const &rOther) const
 
 KRATOS_CLASS_POINTER_DEFINITION (Flags)
 Pointer definition of Flags. More...
 
const Flagsoperator|= (const Flags &Other)
 
const Flagsoperator&= (const Flags &Other)
 
 Flags ()
 Default constructor. More...
 
 Flags (Flags const &rOther)
 Copy constructor. More...
 
virtual ~Flags ()
 Destructor. More...
 
- Public Member Functions inherited from Kratos::PfemFluidConstitutiveLaw
 PfemFluidConstitutiveLaw ()
 Default constructor. More...
 
 PfemFluidConstitutiveLaw (const PfemFluidConstitutiveLaw &rOther)
 Copy constructor. More...
 
 ~PfemFluidConstitutiveLaw () override
 Destructor. More...
 
doubleCalculateValue (ConstitutiveLaw::Parameters &rParameters, const Variable< double > &rThisVariable, double &rValue) override
 
void PrintInfo (std::ostream &rOStream) const override
 Print basic information about this constitutive law instance. More...
 
void PrintData (std::ostream &rOStream) const override
 Print detailed information about this constitutive law instance and its managed data. More...
 
 KRATOS_CLASS_POINTER_DEFINITION (PfemFluidConstitutiveLaw)
 

Protected Member Functions

Protected Operations
double GetEffectiveViscosity (ConstitutiveLaw::Parameters &rParameters) const override
 Get the effective viscosity (in dynamic units – Pa s) for the fluid. More...
 
double GetEffectiveMaterialParameter (ConstitutiveLaw::Parameters &rParameters, const Variable< double > &rVariable) const override
 Get the effective density for the fluid. More...
 
- Protected Member Functions inherited from Kratos::FluidConstitutiveLaw
void NewtonianConstitutiveMatrix2D (double EffectiveViscosity, Matrix &rC)
 Helper function to write the constitutive matrix using an effective viscosity (2D version). More...
 
void NewtonianConstitutiveMatrix3D (double EffectiveViscosity, Matrix &rC)
 Helper function to write the constitutive matrix using an effective viscosity (3D version). More...
 
virtual double GetValueFromTable (const Variable< double > &rVariableInput, const Variable< double > &rVariableOutput, ConstitutiveLaw::Parameters &rParameters) const
 Get the Value From Table object For an table input variable, this method returns the table output variable value. Note that the properties container must have a table relating the input and output variables. More...
 
- Protected Member Functions inherited from Kratos::ConstitutiveLaw
void ContraVariantPushForward (Matrix &rMatrix, const Matrix &rF)
 
void ContraVariantPullBack (Matrix &rMatrix, const Matrix &rF)
 
void CoVariantPushForward (Matrix &rMatrix, const Matrix &rF)
 
void CoVariantPullBack (Matrix &rMatrix, const Matrix &rF)
 
void ConstitutiveMatrixTransformation (Matrix &rConstitutiveMatrix, const Matrix &rOriginalConstitutiveMatrix, const Matrix &rF)
 
doubleTransformConstitutiveComponent (double &rCabcd, const Matrix &rConstitutiveMatrix, const Matrix &rF, const unsigned int &a, const unsigned int &b, const unsigned int &c, const unsigned int &d)
 
doubleGetConstitutiveComponent (double &rCabcd, const Matrix &rConstitutiveMatrix, const unsigned int &a, const unsigned int &b, const unsigned int &c, const unsigned int &d)
 
- Protected Member Functions inherited from Kratos::PfemFluidConstitutiveLaw
void EffectiveViscousConstitutiveMatrix2D (double EffectiveViscosity, Matrix &rC)
 Helper function to write the constitutive matrix using an effective viscosity (2D version). More...
 
void EffectiveViscousConstitutiveMatrix3D (double EffectiveViscosity, Matrix &rC)
 Helper function to write the constitutive matrix using an effective viscosity (3D version). More...
 
double GetThetaMomentumForPressureIntegration ()
 
virtual double CalculateAveragedVariable (const Variable< double > &rVariableInput, ConstitutiveLaw::Parameters &rParameters, unsigned int step) const
 Get the averaged value of the Input Variable. More...
 
virtual double CalculateInGaussPoint (const Variable< double > &rVariableInput, ConstitutiveLaw::Parameters &rParameters, unsigned int step) const
 Get the averaged value of the Input Variable. More...
 
virtual double GetValueFromTable (const Variable< double > &rIndependentVariable, const Variable< double > &rDependentVariable, ConstitutiveLaw::Parameters &rParameters) const
 Get the Value From Table object For an table independent variable, this method returns the table dependent variable value. Note that the properties container must have a table relating the two variables. More...
 

Serialization

class Serializer
 

Additional Inherited Members

- Static Public Member Functions inherited from Kratos::ConstitutiveLaw
static bool HasSameType (const ConstitutiveLaw &rLHS, const ConstitutiveLaw &rRHS)
 This method is used to check that two Constitutive Laws are the same type (references) More...
 
static bool HasSameType (const ConstitutiveLaw *rLHS, const ConstitutiveLaw *rRHS)
 This method is used to check that two Constitutive Laws are the same type (pointers) More...
 
- Static Public Member Functions inherited from Kratos::Flags
static const Flags AllDefined ()
 
static const Flags AllTrue ()
 
static Flags Create (IndexType ThisPosition, bool Value=true)
 
- Static Protected Attributes inherited from Kratos::ConstitutiveLaw
static const unsigned int msIndexVoigt3D6C [6][2] = { {0, 0}, {1, 1}, {2, 2}, {0, 1}, {1, 2}, {0, 2} }
 
static const unsigned int msIndexVoigt2D4C [4][2] = { {0, 0}, {1, 1}, {2, 2}, {0, 1} }
 
static const unsigned int msIndexVoigt2D3C [3][2] = { {0, 0}, {1, 1}, {0, 1} }
 

Detailed Description

Defines a Newtonian constitutive law for 2D This material law is defined by the parameters: 1) DYNAMIC_VISCOSITY

Member Typedef Documentation

◆ BaseType [1/2]

◆ BaseType [2/2]

◆ ProcessInfoType [1/2]

Type Definitions

◆ ProcessInfoType [2/2]

Type Definitions

◆ SizeType [1/2]

typedef std::size_t Kratos::Newtonian2DLaw::SizeType

◆ SizeType [2/2]

typedef std::size_t Kratos::Newtonian2DLaw::SizeType

Constructor & Destructor Documentation

◆ Newtonian2DLaw() [1/4]

Kratos::Newtonian2DLaw::Newtonian2DLaw ( )

Life Cycle Default constructor.

◆ Newtonian2DLaw() [2/4]

Kratos::Newtonian2DLaw::Newtonian2DLaw ( const Newtonian2DLaw rOther)

Copy constructor.

◆ ~Newtonian2DLaw() [1/2]

Kratos::Newtonian2DLaw::~Newtonian2DLaw ( )
override

Destructor.

◆ Newtonian2DLaw() [3/4]

Kratos::Newtonian2DLaw::Newtonian2DLaw ( )

Life Cycle Default constructor.

◆ Newtonian2DLaw() [4/4]

Kratos::Newtonian2DLaw::Newtonian2DLaw ( const Newtonian2DLaw rOther)

Copy constructor.

◆ ~Newtonian2DLaw() [2/2]

Kratos::Newtonian2DLaw::~Newtonian2DLaw ( )
override

Destructor.

Member Function Documentation

◆ CalculateDerivative() [1/3]

void Kratos::Newtonian2DLaw::CalculateDerivative ( Parameters rParameterValues,
const Variable< double > &  rFunctionVariable,
const Variable< double > &  rDerivativeVariable,
double rOutput 
)
overridevirtual

Calculates derivatives of a given function.

This method calculates derivative of a scalar function (denoted by rFunctionVariable) w.r.t. rDerivativeVariable and stores the output in rOutput. The rDerivativeVariable represents a gauss point scalar variable only.

Eg: Assume following function (gauss point evaluated): [ \nu = \nu_{fluid} + \nu_t = \nu_{fluid} + \left(\frac{y}{\omega}\right)^2 \frac{\partial k}{\partial x_i}\frac{\partial \omega}{\partial x_i} ]

Then in here we use rFunctionVariable = EFFECTIVE_VISCOSITY

Then if we want to take derivatives w.r.t. $\omega$ (i.e. rDerivativeVariable = OMEGA). So following steps needs to be used.

 1. First calculate derivatives w.r.t. omega (rDerivativeVariable = OMEGA)
    using the call:
         CalculateDerivative(Values, EFFECTIVE_VISCOSITY, OMEGA, output);
    The output will hold the following:
         \[
             \frac{\partial \nu}{\partial \omega} = \frac{\partial \nu_t}{\partial \omega} = -2\frac{y^2}{\omega^3}\frac{\partial k}{\partial x_i}\frac{\partial \omega}{\partial x_i}
         \]
 2. Then calculate derivatives w.r.t. omega gradients (rDerivativeVariable = OMEGA_GRADIENT_X)
    using the call: (where OMEGA_GRADIENT is a 3D vector with components)
         CalculateDerivative(Values, EFFECTIVE_VISCOSITY, OMEGA_GRADIENT_X, output);
    The output will hold the following:
         \[
             \frac{\partial \nu}{\partial \nabla\omega_x} = \frac{\partial \nu_t}{\partial \nabla\omega_x} =  \left(\frac{y}{\omega}\right)^2 \frac{\partial k}{\partial x_x}
         \]
    Once you have these outputs, you can transform it to a nodal derivative (eg: discrete adjoint computation)
    within your element by using the chain rule. [Where $c$ is the node index of the geometry.]
         \[
             \frac{\partial \nu}{\partial \omega^c} = \frac{\partial \nu}{\partial \omega}\frac{\partial \omega}{\partial \omega^c} + \frac{\partial \nu}{\partial \nabla\omega_i}\frac{\partial \nabla\omega_i}{\partial \omega^c}
         \]
Parameters
rParameterValuesInput for the derivative calculation
rFunctionVariableVariable to identify the function for which derivatives are computed
rDerivativeVariableScalar derivative variable
rOutputOutput having the same type as the rFunctionVariable

Reimplemented from Kratos::ConstitutiveLaw.

◆ CalculateDerivative() [2/3]

void Kratos::Newtonian2DLaw::CalculateDerivative ( Parameters rParameterValues,
const Variable< Matrix > &  rFunctionVariable,
const Variable< double > &  rDerivativeVariable,
Matrix rOutput 
)
overridevirtual

Calculates derivatives of a given function.

This method calculates derivative of a Matrix function (denoted by rFunctionVariable) w.r.t. rDerivativeVariable and stores the output in rOutput. The rDerivativeVariable represents a gauss point scalar variable only.

See also
double overload of this method for more explanations
Parameters
rParameterValuesInput for the derivative calculation
rFunctionVariableVariable to identify the function for which derivatives are computed
rDerivativeVariableScalar derivative variable
rOutputOutput having the same type as the rFunctionVariable

Reimplemented from Kratos::ConstitutiveLaw.

◆ CalculateDerivative() [3/3]

void Kratos::Newtonian2DLaw::CalculateDerivative ( Parameters rParameterValues,
const Variable< Vector > &  rFunctionVariable,
const Variable< double > &  rDerivativeVariable,
Vector rOutput 
)
overridevirtual

Calculates derivatives of a given function.

This method calculates derivative of a Vector function (denoted by rFunctionVariable) w.r.t. rDerivativeVariable and stores the output in rOutput. The rDerivativeVariable represents a gauss point scalar variable only.

See also
double overload of this method for more explanations
Parameters
rParameterValuesInput for the derivative calculation
rFunctionVariableVariable to identify the function for which derivatives are computed
rDerivativeVariableScalar derivative variable
rOutputOutput having the same type as the rFunctionVariable

Reimplemented from Kratos::ConstitutiveLaw.

◆ CalculateMaterialResponseCauchy() [1/2]

void Kratos::Newtonian2DLaw::CalculateMaterialResponseCauchy ( Parameters rValues)
overridevirtual

Calculate the response of the material for the current strain rates.

This is the main method for fluid constitutive laws. It should calculate, at least, the tangent matrix d(Stress)/d(Strain rate) or a suitable linearization and the stresses corresponding to the current strain rates. These are returned as rValues.GetConstitutiveMatrix() and rValues.GetStressVector(), respectively.

Note
Besides computing the response, derived constitutive laws are responsible for setting the effective viscosity for the law, which will be used by the element to calculate the stabilization Tau. When implementing derived laws, please make sure to call SetEffectiveViscosity() at some point within this function.
See also
FluidElement, FluidElementData.

Reimplemented from Kratos::FluidConstitutiveLaw.

◆ CalculateMaterialResponseCauchy() [2/2]

void Kratos::Newtonian2DLaw::CalculateMaterialResponseCauchy ( Parameters rValues)
overridevirtual

Calculate the response of the material for the current strain rates.

This is the main method for fluid constitutive laws. It should calculate, at least, the tangent matrix d(Stress)/d(Strain rate) or a suitable linearization and the stresses corresponding to the current strain rates. These are returned as rValues.GetConstitutiveMatrix() and rValues.GetStressVector(), respectively.

Note
Besides computing the response, derived constitutive laws are responsible for setting the effective viscosity for the law, which will be used by the element to calculate the stabilization Tau. When implementing derived laws, please make sure to call SetEffectiveViscosity() at some point within this function.
See also
FluidElement, FluidElementData.

Reimplemented from Kratos::FluidConstitutiveLaw.

◆ Check() [1/2]

int Kratos::Newtonian2DLaw::Check ( const Properties rMaterialProperties,
const GeometryType rElementGeometry,
const ProcessInfo rCurrentProcessInfo 
) const
overridevirtual

This function is designed to be called once to perform all the checks needed on the input provided. Checks can be "expensive" as the function is designed to catch user's errors.

Parameters
rMaterialProperties
rElementGeometry
rCurrentProcessInfo
Returns

Reimplemented from Kratos::FluidConstitutiveLaw.

Reimplemented in Kratos::RansNewtonian2DLaw, Kratos::NewtonianTemperatureDependent2DLaw, Kratos::NewtonianTwoFluid2DLaw, and Kratos::NewtonianTemperatureDependent2DLaw.

◆ Check() [2/2]

int Kratos::Newtonian2DLaw::Check ( const Properties rMaterialProperties,
const GeometryType rElementGeometry,
const ProcessInfo rCurrentProcessInfo 
) const
overridevirtual

This function is designed to be called once to perform all the checks needed on the input provided. Checks can be "expensive" as the function is designed to catch user's errors.

Parameters
rMaterialProperties
rElementGeometry
rCurrentProcessInfo
Returns

Reimplemented from Kratos::FluidConstitutiveLaw.

Reimplemented in Kratos::RansNewtonian2DLaw, and Kratos::NewtonianTemperatureDependent2DLaw.

◆ Clone() [1/2]

ConstitutiveLaw::Pointer Kratos::Newtonian2DLaw::Clone ( ) const
overridevirtual

Clone function (has to be implemented by any derived class)

Returns
a pointer to a new instance of this constitutive law

Reimplemented from Kratos::FluidConstitutiveLaw.

Reimplemented in Kratos::RansNewtonian2DLaw, Kratos::NewtonianTemperatureDependent2DLaw, Kratos::NewtonianTwoFluid2DLaw, and Kratos::NewtonianTemperatureDependent2DLaw.

◆ Clone() [2/2]

ConstitutiveLaw::Pointer Kratos::Newtonian2DLaw::Clone ( ) const
overridevirtual

Clone function (has to be implemented by any derived class)

Returns
a pointer to a new instance of this constitutive law

Reimplemented from Kratos::FluidConstitutiveLaw.

Reimplemented in Kratos::RansNewtonian2DLaw, and Kratos::NewtonianTemperatureDependent2DLaw.

◆ GetEffectiveMaterialParameter()

double Kratos::Newtonian2DLaw::GetEffectiveMaterialParameter ( ConstitutiveLaw::Parameters rParameters,
const Variable< double > &  rVariable 
) const
overrideprotectedvirtual

Get the effective density for the fluid.

Reimplemented from Kratos::PfemFluidConstitutiveLaw.

Reimplemented in Kratos::NewtonianTemperatureDependent2DLaw.

◆ GetEffectiveViscosity()

double Kratos::Newtonian2DLaw::GetEffectiveViscosity ( ConstitutiveLaw::Parameters rParameters) const
overrideprotectedvirtual

Get the effective viscosity (in dynamic units – Pa s) for the fluid.

Reimplemented from Kratos::FluidConstitutiveLaw.

Reimplemented in Kratos::RansNewtonian2DLaw, Kratos::NewtonianTwoFluid2DLaw, and Kratos::NewtonianTemperatureDependent2DLaw.

◆ GetStrainSize() [1/2]

ConstitutiveLaw::SizeType Kratos::Newtonian2DLaw::GetStrainSize ( ) const
overridevirtual
Returns
Size of the strain vector (in Voigt notation) for the constitutive law

Reimplemented from Kratos::FluidConstitutiveLaw.

◆ GetStrainSize() [2/2]

SizeType Kratos::Newtonian2DLaw::GetStrainSize ( ) const
overridevirtual
Returns
Size of the strain vector (in Voigt notation) for the constitutive law

Reimplemented from Kratos::FluidConstitutiveLaw.

◆ Info() [1/2]

std::string Kratos::Newtonian2DLaw::Info ( ) const
overridevirtual

◆ Info() [2/2]

std::string Kratos::Newtonian2DLaw::Info ( ) const
overridevirtual

Input and output Turn back information as a string.

Reimplemented from Kratos::FluidConstitutiveLaw.

Reimplemented in Kratos::RansNewtonian2DLaw, and Kratos::NewtonianTemperatureDependent2DLaw.

◆ KRATOS_CLASS_POINTER_DEFINITION() [1/2]

Kratos::Newtonian2DLaw::KRATOS_CLASS_POINTER_DEFINITION ( Newtonian2DLaw  )

Counted pointer of Newtonian3DLaw

◆ KRATOS_CLASS_POINTER_DEFINITION() [2/2]

Kratos::Newtonian2DLaw::KRATOS_CLASS_POINTER_DEFINITION ( Newtonian2DLaw  )

Counted pointer of Newtonian3DLaw

◆ WorkingSpaceDimension() [1/2]

ConstitutiveLaw::SizeType Kratos::Newtonian2DLaw::WorkingSpaceDimension ( )
overridevirtual

Operations needed by the base class:

Returns
Working space dimension constitutive law

Reimplemented from Kratos::FluidConstitutiveLaw.

◆ WorkingSpaceDimension() [2/2]

SizeType Kratos::Newtonian2DLaw::WorkingSpaceDimension ( )
overridevirtual

Operations needed by the base class:

Returns
Working space dimension constitutive law

Reimplemented from Kratos::FluidConstitutiveLaw.

Friends And Related Function Documentation

◆ Serializer

Serializer
friend

The documentation for this class was generated from the following files: