Physical Quantities  v1.0.0
C++ library of physical quantities, physical models, and units of measure for scientific computing. https://github.com/acodcha/phq
Public Types | Public Member Functions | Private Attributes | List of all members
PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType > Class Template Referenceabstract

Constitutive model for an incompressible Newtonian fluid. This is the simplest constitutive model for a fluid. The viscous stress tensor at a point is a linear function of only the local strain rate tensor at that point. More...

#include "IncompressibleNewtonianFluid.hpp"

Public Types

enum class  Type : int8_t { CompressibleNewtonianFluid , ElasticIsotropicSolid , IncompressibleNewtonianFluid }
 Type of a material's constitutive model. More...
 

Public Member Functions

 IncompressibleNewtonianFluid ()
 Default constructor. Constructs an incompressible Newtonian fluid constitutive model with an uninitialized dynamic viscosity. More...
 
constexpr IncompressibleNewtonianFluid (const DynamicViscosity< NumericType > &dynamic_viscosity)
 Constructor. Constructs an incompressible Newtonian fluid constitutive model from a given dynamic viscosity. More...
 
 ~IncompressibleNewtonianFluid () noexcept override=default
 Destructor. Destroys this incompressible Newtonian fluid constitutive model. More...
 
constexpr IncompressibleNewtonianFluid (const IncompressibleNewtonianFluid &other)=default
 Copy constructor. Constructs an incompressible Newtonian fluid constitutive model by copying another one. More...
 
constexpr IncompressibleNewtonianFluid (IncompressibleNewtonianFluid &&other) noexcept=default
 Move constructor. Constructs an incompressible Newtonian fluid constitutive model by moving another one. More...
 
IncompressibleNewtonianFluidoperator= (const IncompressibleNewtonianFluid &other)=default
 Copy assignment operator. Assigns this incompressible Newtonian fluid constitutive model by copying another one. More...
 
IncompressibleNewtonianFluidoperator= (IncompressibleNewtonianFluid &&other) noexcept=default
 Move assignment operator. Assigns this incompressible Newtonian fluid constitutive model by moving another one. More...
 
constexpr const PhQ::DynamicViscosity< NumericType > & DynamicViscosity () const noexcept
 Dynamic viscosity of this incompressible Newtonian fluid constitutive model. More...
 
ConstitutiveModel::Type GetType () const noexcept override
 Returns this constitutive model's type. More...
 
PhQ::Stress< float > Stress (const PhQ::Strain< float > &, const PhQ::StrainRate< float > &strain_rate) const override
 Returns the stress resulting from a given strain and strain rate. Since this is an incompressible Newtonian fluid constitutive model, the strain does not contribute to the stress and is ignored. More...
 
PhQ::Stress< double > Stress (const PhQ::Strain< double > &, const PhQ::StrainRate< double > &strain_rate) const override
 Returns the stress resulting from a given strain and strain rate. Since this is an incompressible Newtonian fluid constitutive model, the strain does not contribute to the stress and is ignored. More...
 
PhQ::Stress< long double > Stress (const PhQ::Strain< long double > &, const PhQ::StrainRate< long double > &strain_rate) const override
 Returns the stress resulting from a given strain and strain rate. Since this is an incompressible Newtonian fluid constitutive model, the strain does not contribute to the stress and is ignored. More...
 
PhQ::Stress< float > Stress (const PhQ::Strain< float > &) const override
 Returns the stress resulting from a given strain. Since this is an incompressible Newtonian fluid constitutive model, the strain does not contribute to the stress, so this always returns a stress of zero. More...
 
PhQ::Stress< double > Stress (const PhQ::Strain< double > &) const override
 Returns the stress resulting from a given strain. Since this is an incompressible Newtonian fluid constitutive model, the strain does not contribute to the stress, so this always returns a stress of zero. More...
 
PhQ::Stress< long double > Stress (const PhQ::Strain< long double > &) const override
 Returns the stress resulting from a given strain. Since this is an incompressible Newtonian fluid constitutive model, the strain does not contribute to the stress, so this always returns a stress of zero. More...
 
PhQ::Stress< float > Stress (const PhQ::StrainRate< float > &strain_rate) const override
 Returns the stress resulting from a given strain rate. More...
 
PhQ::Stress< double > Stress (const PhQ::StrainRate< double > &strain_rate) const override
 Returns the stress resulting from a given strain rate. More...
 
PhQ::Stress< long double > Stress (const PhQ::StrainRate< long double > &strain_rate) const override
 Returns the stress resulting from a given strain rate. More...
 
PhQ::Strain< float > Strain (const PhQ::Stress< float > &) const override
 Returns the strain resulting from a given stress. Since this is an incompressible Newtonian fluid constitutive model, stress does not depend on strain, so this always returns a strain of zero. More...
 
PhQ::Strain< double > Strain (const PhQ::Stress< double > &) const override
 Returns the strain resulting from a given stress. Since this is an incompressible Newtonian fluid constitutive model, stress does not depend on strain, so this always returns a strain of zero. More...
 
PhQ::Strain< long double > Strain (const PhQ::Stress< long double > &) const override
 Returns the strain resulting from a given stress. Since this is an incompressible Newtonian fluid constitutive model, stress does not depend on strain, so this always returns a strain of zero. More...
 
PhQ::StrainRate< float > StrainRate (const PhQ::Stress< float > &stress) const override
 Returns the strain rate resulting from a given stress. More...
 
PhQ::StrainRate< double > StrainRate (const PhQ::Stress< double > &stress) const override
 Returns the strain rate resulting from a given stress. More...
 
PhQ::StrainRate< long double > StrainRate (const PhQ::Stress< long double > &stress) const override
 Returns the strain rate resulting from a given stress. More...
 
std::string Print () const override
 Prints this incompressible Newtonian fluid constitutive model as a string. More...
 
std::string JSON () const override
 Serializes this incompressible Newtonian fluid constitutive model as a JSON message. More...
 
virtual std::string XML () const =0
 Serializes this constitutive model as an XML message. More...
 
virtual std::string YAML () const =0
 Serializes this constitutive model as a YAML message. More...
 

Private Attributes

PhQ::DynamicViscosity< NumericType > dynamic_viscosity
 Dynamic viscosity of this incompressible Newtonian fluid constitutive model. More...
 

Detailed Description

template<typename NumericType = double>
class PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >

Constitutive model for an incompressible Newtonian fluid. This is the simplest constitutive model for a fluid. The viscous stress tensor at a point is a linear function of only the local strain rate tensor at that point.

Definition at line 49 of file IncompressibleNewtonianFluid.hpp.

Member Enumeration Documentation

◆ Type

enum PhQ::ConstitutiveModel::Type : int8_t
stronginherited

Type of a material's constitutive model.

Enumerator
CompressibleNewtonianFluid 

Compressible Newtonian fluid constitutive model.

ElasticIsotropicSolid 

Elastic isotropic solid constitutive model.

IncompressibleNewtonianFluid 

Incompressible Newtonian fluid constitutive model.

Definition at line 57 of file ConstitutiveModel.hpp.

Constructor & Destructor Documentation

◆ IncompressibleNewtonianFluid() [1/4]

template<typename NumericType = double>
PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::IncompressibleNewtonianFluid ( )
inline

Default constructor. Constructs an incompressible Newtonian fluid constitutive model with an uninitialized dynamic viscosity.

Definition at line 53 of file IncompressibleNewtonianFluid.hpp.

◆ IncompressibleNewtonianFluid() [2/4]

template<typename NumericType = double>
constexpr PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::IncompressibleNewtonianFluid ( const DynamicViscosity< NumericType > &  dynamic_viscosity)
inlineexplicitconstexpr

Constructor. Constructs an incompressible Newtonian fluid constitutive model from a given dynamic viscosity.

Definition at line 57 of file IncompressibleNewtonianFluid.hpp.

◆ ~IncompressibleNewtonianFluid()

template<typename NumericType = double>
PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::~IncompressibleNewtonianFluid ( )
overridedefaultnoexcept

Destructor. Destroys this incompressible Newtonian fluid constitutive model.

◆ IncompressibleNewtonianFluid() [3/4]

template<typename NumericType = double>
constexpr PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::IncompressibleNewtonianFluid ( const IncompressibleNewtonianFluid< NumericType > &  other)
constexprdefault

Copy constructor. Constructs an incompressible Newtonian fluid constitutive model by copying another one.

◆ IncompressibleNewtonianFluid() [4/4]

template<typename NumericType = double>
constexpr PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::IncompressibleNewtonianFluid ( IncompressibleNewtonianFluid< NumericType > &&  other)
constexprdefaultnoexcept

Move constructor. Constructs an incompressible Newtonian fluid constitutive model by moving another one.

Member Function Documentation

◆ DynamicViscosity()

template<typename NumericType = double>
constexpr const PhQ::DynamicViscosity<NumericType>& PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::DynamicViscosity ( ) const
inlineconstexprnoexcept

Dynamic viscosity of this incompressible Newtonian fluid constitutive model.

Definition at line 82 of file IncompressibleNewtonianFluid.hpp.

References PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::dynamic_viscosity.

◆ GetType()

template<typename NumericType = double>
ConstitutiveModel::Type PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::GetType ( ) const
inlineoverridevirtualnoexcept

◆ JSON()

template<typename NumericType = double>
std::string PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::JSON ( ) const
inlineoverridevirtual

◆ operator=() [1/2]

template<typename NumericType = double>
IncompressibleNewtonianFluid& PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::operator= ( const IncompressibleNewtonianFluid< NumericType > &  other)
default

Copy assignment operator. Assigns this incompressible Newtonian fluid constitutive model by copying another one.

◆ operator=() [2/2]

template<typename NumericType = double>
IncompressibleNewtonianFluid& PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::operator= ( IncompressibleNewtonianFluid< NumericType > &&  other)
defaultnoexcept

Move assignment operator. Assigns this incompressible Newtonian fluid constitutive model by moving another one.

◆ Print()

template<typename NumericType = double>
std::string PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::Print ( ) const
inlineoverridevirtual

◆ Strain() [1/3]

template<typename NumericType = double>
PhQ::Strain<double> PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::Strain ( const PhQ::Stress< double > &  ) const
inlineoverridevirtual

Returns the strain resulting from a given stress. Since this is an incompressible Newtonian fluid constitutive model, stress does not depend on strain, so this always returns a strain of zero.

Implements PhQ::ConstitutiveModel.

Definition at line 182 of file IncompressibleNewtonianFluid.hpp.

References PhQ::Strain< NumericType >::Zero().

◆ Strain() [2/3]

template<typename NumericType = double>
PhQ::Strain<float> PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::Strain ( const PhQ::Stress< float > &  ) const
inlineoverridevirtual

Returns the strain resulting from a given stress. Since this is an incompressible Newtonian fluid constitutive model, stress does not depend on strain, so this always returns a strain of zero.

Implements PhQ::ConstitutiveModel.

Definition at line 174 of file IncompressibleNewtonianFluid.hpp.

References PhQ::Strain< NumericType >::Zero().

◆ Strain() [3/3]

template<typename NumericType = double>
PhQ::Strain<long double> PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::Strain ( const PhQ::Stress< long double > &  ) const
inlineoverridevirtual

Returns the strain resulting from a given stress. Since this is an incompressible Newtonian fluid constitutive model, stress does not depend on strain, so this always returns a strain of zero.

Implements PhQ::ConstitutiveModel.

Definition at line 190 of file IncompressibleNewtonianFluid.hpp.

References PhQ::Strain< NumericType >::Zero().

◆ StrainRate() [1/3]

template<typename NumericType = double>
PhQ::StrainRate<double> PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::StrainRate ( const PhQ::Stress< double > &  stress) const
inlineoverridevirtual

◆ StrainRate() [2/3]

template<typename NumericType = double>
PhQ::StrainRate<float> PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::StrainRate ( const PhQ::Stress< float > &  stress) const
inlineoverridevirtual

◆ StrainRate() [3/3]

template<typename NumericType = double>
PhQ::StrainRate<long double> PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::StrainRate ( const PhQ::Stress< long double > &  stress) const
inlineoverridevirtual

◆ Stress() [1/9]

template<typename NumericType = double>
PhQ::Stress<double> PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::Stress ( const PhQ::Strain< double > &  ) const
inlineoverridevirtual

Returns the stress resulting from a given strain. Since this is an incompressible Newtonian fluid constitutive model, the strain does not contribute to the stress, so this always returns a stress of zero.

Implements PhQ::ConstitutiveModel.

Definition at line 129 of file IncompressibleNewtonianFluid.hpp.

References PhQ::Stress< NumericType >::Zero().

◆ Stress() [2/9]

template<typename NumericType = double>
PhQ::Stress<double> PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::Stress ( const PhQ::Strain< double > &  ,
const PhQ::StrainRate< double > &  strain_rate 
) const
inlineoverridevirtual

Returns the stress resulting from a given strain and strain rate. Since this is an incompressible Newtonian fluid constitutive model, the strain does not contribute to the stress and is ignored.

Implements PhQ::ConstitutiveModel.

Definition at line 103 of file IncompressibleNewtonianFluid.hpp.

References PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::Stress().

◆ Stress() [3/9]

template<typename NumericType = double>
PhQ::Stress<float> PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::Stress ( const PhQ::Strain< float > &  ) const
inlineoverridevirtual

Returns the stress resulting from a given strain. Since this is an incompressible Newtonian fluid constitutive model, the strain does not contribute to the stress, so this always returns a stress of zero.

Implements PhQ::ConstitutiveModel.

Definition at line 121 of file IncompressibleNewtonianFluid.hpp.

References PhQ::Stress< NumericType >::Zero().

◆ Stress() [4/9]

template<typename NumericType = double>
PhQ::Stress<float> PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::Stress ( const PhQ::Strain< float > &  ,
const PhQ::StrainRate< float > &  strain_rate 
) const
inlineoverridevirtual

Returns the stress resulting from a given strain and strain rate. Since this is an incompressible Newtonian fluid constitutive model, the strain does not contribute to the stress and is ignored.

Implements PhQ::ConstitutiveModel.

Definition at line 94 of file IncompressibleNewtonianFluid.hpp.

Referenced by PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::Stress().

◆ Stress() [5/9]

template<typename NumericType = double>
PhQ::Stress<long double> PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::Stress ( const PhQ::Strain< long double > &  ) const
inlineoverridevirtual

Returns the stress resulting from a given strain. Since this is an incompressible Newtonian fluid constitutive model, the strain does not contribute to the stress, so this always returns a stress of zero.

Implements PhQ::ConstitutiveModel.

Definition at line 137 of file IncompressibleNewtonianFluid.hpp.

References PhQ::Stress< NumericType >::Zero().

◆ Stress() [6/9]

template<typename NumericType = double>
PhQ::Stress<long double> PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::Stress ( const PhQ::Strain< long double > &  ,
const PhQ::StrainRate< long double > &  strain_rate 
) const
inlineoverridevirtual

Returns the stress resulting from a given strain and strain rate. Since this is an incompressible Newtonian fluid constitutive model, the strain does not contribute to the stress and is ignored.

Implements PhQ::ConstitutiveModel.

Definition at line 112 of file IncompressibleNewtonianFluid.hpp.

References PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::Stress().

◆ Stress() [7/9]

template<typename NumericType = double>
PhQ::Stress<double> PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::Stress ( const PhQ::StrainRate< double > &  strain_rate) const
inlineoverridevirtual

◆ Stress() [8/9]

template<typename NumericType = double>
PhQ::Stress<float> PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::Stress ( const PhQ::StrainRate< float > &  strain_rate) const
inlineoverridevirtual

◆ Stress() [9/9]

template<typename NumericType = double>
PhQ::Stress<long double> PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::Stress ( const PhQ::StrainRate< long double > &  strain_rate) const
inlineoverridevirtual

◆ XML()

virtual std::string PhQ::ConstitutiveModel::XML ( ) const
inlinepure virtualinherited

◆ YAML()

virtual std::string PhQ::ConstitutiveModel::YAML ( ) const
inlinepure virtualinherited

Member Data Documentation

◆ dynamic_viscosity

template<typename NumericType = double>
PhQ::DynamicViscosity<NumericType> PhQ::ConstitutiveModel::IncompressibleNewtonianFluid< NumericType >::dynamic_viscosity
private

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