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::CompressibleNewtonianFluid< NumericType > Class Template Reference

Constitutive model for a compressible Newtonian fluid. This is the simplest constitutive model for a compressible fluid. It is similar to the model for an incompressible Newtonian fluid, but also includes the effect of the volumetric component of the strain rate tensor in addition to its deviatoric component. More...

#include "CompressibleNewtonianFluid.hpp"

Public Types

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

Public Member Functions

 CompressibleNewtonianFluid ()
 Default constructor. Constructs a compressible Newtonian fluid constitutive model with an uninitialized dynamic viscosity and bulk dynamic viscosity. More...
 
constexpr CompressibleNewtonianFluid (const DynamicViscosity< NumericType > &dynamic_viscosity)
 Constructor. Constructs a compressible Newtonian fluid constitutive model from a given dynamic viscosity. Initializes the bulk dynamic viscosity to zero. More...
 
constexpr CompressibleNewtonianFluid (const DynamicViscosity< NumericType > &dynamic_viscosity, const BulkDynamicViscosity< NumericType > &bulk_dynamic_viscosity)
 Constructor. Constructs a compressible Newtonian fluid constitutive model from a given dynamic viscosity and bulk dynamic viscosity. More...
 
 ~CompressibleNewtonianFluid () noexcept override=default
 Destructor. Destroys this compressible Newtonian fluid constitutive model. More...
 
constexpr CompressibleNewtonianFluid (const CompressibleNewtonianFluid &other)=default
 Copy constructor. Constructs a compressible Newtonian fluid constitutive model by copying another one. More...
 
constexpr CompressibleNewtonianFluid (CompressibleNewtonianFluid &&other) noexcept=default
 Move constructor. Constructs a compressible Newtonian fluid constitutive model by moving another one. More...
 
CompressibleNewtonianFluidoperator= (const CompressibleNewtonianFluid &other)=default
 Copy assignment operator. Assigns this compressible Newtonian fluid constitutive model by copying another one. More...
 
CompressibleNewtonianFluidoperator= (CompressibleNewtonianFluid &&other) noexcept=default
 Move assignment operator. Assigns this compressible Newtonian fluid constitutive model by moving another one. More...
 
constexpr const PhQ::DynamicViscosity< NumericType > & DynamicViscosity () const noexcept
 Dynamic viscosity of this compressible Newtonian fluid constitutive model. More...
 
constexpr const PhQ::BulkDynamicViscosity< NumericType > & BulkDynamicViscosity () const noexcept
 Bulk dynamic viscosity of this compressible 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 a compressible 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 a compressible 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 a compressible 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 a compressible 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 a compressible 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 a compressible 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 a compressible 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 a compressible 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 a compressible 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 compressible Newtonian fluid constitutive model as a string. More...
 
std::string JSON () const override
 Serializes this compressible Newtonian fluid constitutive model as a JSON message. More...
 
std::string XML () const override
 Serializes this compressible Newtonian fluid constitutive model as an XML message. More...
 
std::string YAML () const override
 Serializes this compressible Newtonian fluid constitutive model as a YAML message. More...
 

Private Attributes

PhQ::DynamicViscosity< NumericType > dynamic_viscosity
 Dynamic viscosity of this compressible Newtonian fluid constitutive model. More...
 
PhQ::BulkDynamicViscosity< NumericType > bulk_dynamic_viscosity
 Bulk dynamic viscosity of this compressible Newtonian fluid constitutive model. More...
 

Detailed Description

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

Constitutive model for a compressible Newtonian fluid. This is the simplest constitutive model for a compressible fluid. It is similar to the model for an incompressible Newtonian fluid, but also includes the effect of the volumetric component of the strain rate tensor in addition to its deviatoric component.

Definition at line 51 of file CompressibleNewtonianFluid.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

◆ CompressibleNewtonianFluid() [1/5]

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

Default constructor. Constructs a compressible Newtonian fluid constitutive model with an uninitialized dynamic viscosity and bulk dynamic viscosity.

Definition at line 55 of file CompressibleNewtonianFluid.hpp.

◆ CompressibleNewtonianFluid() [2/5]

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

Constructor. Constructs a compressible Newtonian fluid constitutive model from a given dynamic viscosity. Initializes the bulk dynamic viscosity to zero.

Definition at line 59 of file CompressibleNewtonianFluid.hpp.

◆ CompressibleNewtonianFluid() [3/5]

template<typename NumericType = double>
constexpr PhQ::ConstitutiveModel::CompressibleNewtonianFluid< NumericType >::CompressibleNewtonianFluid ( const DynamicViscosity< NumericType > &  dynamic_viscosity,
const BulkDynamicViscosity< NumericType > &  bulk_dynamic_viscosity 
)
inlineconstexpr

Constructor. Constructs a compressible Newtonian fluid constitutive model from a given dynamic viscosity and bulk dynamic viscosity.

Definition at line 66 of file CompressibleNewtonianFluid.hpp.

◆ ~CompressibleNewtonianFluid()

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

Destructor. Destroys this compressible Newtonian fluid constitutive model.

◆ CompressibleNewtonianFluid() [4/5]

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

Copy constructor. Constructs a compressible Newtonian fluid constitutive model by copying another one.

◆ CompressibleNewtonianFluid() [5/5]

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

Move constructor. Constructs a compressible Newtonian fluid constitutive model by moving another one.

Member Function Documentation

◆ BulkDynamicViscosity()

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

Bulk dynamic viscosity of this compressible Newtonian fluid constitutive model.

Definition at line 99 of file CompressibleNewtonianFluid.hpp.

References PhQ::ConstitutiveModel::CompressibleNewtonianFluid< NumericType >::bulk_dynamic_viscosity.

◆ DynamicViscosity()

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

Dynamic viscosity of this compressible Newtonian fluid constitutive model.

Definition at line 93 of file CompressibleNewtonianFluid.hpp.

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

◆ GetType()

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

◆ JSON()

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

◆ operator=() [1/2]

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

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

◆ operator=() [2/2]

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

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

◆ Print()

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

◆ Strain() [1/3]

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

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

Implements PhQ::ConstitutiveModel.

Definition at line 223 of file CompressibleNewtonianFluid.hpp.

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

◆ Strain() [2/3]

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

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

Implements PhQ::ConstitutiveModel.

Definition at line 215 of file CompressibleNewtonianFluid.hpp.

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

◆ Strain() [3/3]

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

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

Implements PhQ::ConstitutiveModel.

Definition at line 231 of file CompressibleNewtonianFluid.hpp.

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

◆ StrainRate() [1/3]

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

◆ StrainRate() [2/3]

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

◆ StrainRate() [3/3]

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

◆ Stress() [1/9]

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

Returns the stress resulting from a given strain. Since this is a compressible 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 146 of file CompressibleNewtonianFluid.hpp.

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

◆ Stress() [2/9]

template<typename NumericType = double>
PhQ::Stress<double> PhQ::ConstitutiveModel::CompressibleNewtonianFluid< 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 a compressible Newtonian fluid constitutive model, the strain does not contribute to the stress and is ignored.

Implements PhQ::ConstitutiveModel.

Definition at line 120 of file CompressibleNewtonianFluid.hpp.

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

◆ Stress() [3/9]

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

Returns the stress resulting from a given strain. Since this is a compressible 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 138 of file CompressibleNewtonianFluid.hpp.

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

◆ Stress() [4/9]

template<typename NumericType = double>
PhQ::Stress<float> PhQ::ConstitutiveModel::CompressibleNewtonianFluid< 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 a compressible Newtonian fluid constitutive model, the strain does not contribute to the stress and is ignored.

Implements PhQ::ConstitutiveModel.

Definition at line 111 of file CompressibleNewtonianFluid.hpp.

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

◆ Stress() [5/9]

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

Returns the stress resulting from a given strain. Since this is a compressible 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 154 of file CompressibleNewtonianFluid.hpp.

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

◆ Stress() [6/9]

template<typename NumericType = double>
PhQ::Stress<long double> PhQ::ConstitutiveModel::CompressibleNewtonianFluid< 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 a compressible Newtonian fluid constitutive model, the strain does not contribute to the stress and is ignored.

Implements PhQ::ConstitutiveModel.

Definition at line 129 of file CompressibleNewtonianFluid.hpp.

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

◆ Stress() [7/9]

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

◆ Stress() [8/9]

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

◆ Stress() [9/9]

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

◆ XML()

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

◆ YAML()

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

Member Data Documentation

◆ bulk_dynamic_viscosity

template<typename NumericType = double>
PhQ::BulkDynamicViscosity<NumericType> PhQ::ConstitutiveModel::CompressibleNewtonianFluid< NumericType >::bulk_dynamic_viscosity
private

◆ dynamic_viscosity

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

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