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 Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
PhQ::BulkDynamicViscosity< NumericType > Class Template Reference

Bulk dynamic viscosity, also known as volume dynamic viscosity or dilatational dynamic viscosity. Not to be confused with dynamic viscosity; see PhQ::DynamicViscosity. More...

#include "BulkDynamicViscosity.hpp"

Public Member Functions

 BulkDynamicViscosity ()=default
 Default constructor. Constructs a bulk dynamic viscosity with an uninitialized value. More...
 
 BulkDynamicViscosity (const NumericType value, const Unit::DynamicViscosity unit)
 Constructor. Constructs a bulk dynamic viscosity with a given value expressed in a given dynamic viscosity unit. More...
 
 ~BulkDynamicViscosity () noexcept=default
 Destructor. Destroys this bulk dynamic viscosity. More...
 
constexpr BulkDynamicViscosity (const BulkDynamicViscosity< NumericType > &other)=default
 Copy constructor. Constructs a bulk dynamic viscosity by copying another one. More...
 
template<typename OtherNumericType >
constexpr BulkDynamicViscosity (const BulkDynamicViscosity< OtherNumericType > &other)
 Copy constructor. Constructs a bulk dynamic viscosity by copying another one. More...
 
constexpr BulkDynamicViscosity (BulkDynamicViscosity< NumericType > &&other) noexcept=default
 Move constructor. Constructs a bulk dynamic viscosity by moving another one. More...
 
constexpr BulkDynamicViscosity< NumericType > & operator= (const BulkDynamicViscosity< NumericType > &other)=default
 Copy assignment operator. Assigns this bulk dynamic viscosity by copying another one. More...
 
template<typename OtherNumericType >
constexpr BulkDynamicViscosity< NumericType > & operator= (const BulkDynamicViscosity< OtherNumericType > &other)
 Copy assignment operator. Assigns this bulk dynamic viscosity by copying another one. More...
 
constexpr BulkDynamicViscosity< NumericType > & operator= (BulkDynamicViscosity< NumericType > &&other) noexcept=default
 Move assignment operator. Assigns this bulk dynamic viscosity by moving another one. More...
 
constexpr BulkDynamicViscosity< NumericType > operator+ (const BulkDynamicViscosity< NumericType > &bulk_dynamic_viscosity) const
 
constexpr BulkDynamicViscosity< NumericType > operator- (const BulkDynamicViscosity< NumericType > &bulk_dynamic_viscosity) const
 
constexpr BulkDynamicViscosity< NumericType > operator* (const NumericType number) const
 
constexpr BulkDynamicViscosity< NumericType > operator/ (const NumericType number) const
 
constexpr NumericType operator/ (const BulkDynamicViscosity< NumericType > &bulk_dynamic_viscosity) const noexcept
 
constexpr void operator+= (const BulkDynamicViscosity< NumericType > &bulk_dynamic_viscosity) noexcept
 
constexpr void operator-= (const BulkDynamicViscosity< NumericType > &bulk_dynamic_viscosity) noexcept
 
constexpr void operator*= (const NumericType number) noexcept
 
constexpr void operator/= (const NumericType number) noexcept
 
constexpr double Value () const noexcept
 Value of this physical quantity expressed in its standard unit of measure. More...
 
double Value (const Unit::DynamicViscosity unit) const
 Value of this physical quantity expressed in a given unit of measure. More...
 
constexpr double StaticValue () const
 Value of this physical quantity expressed in a given unit of measure. This method can be evaluated statically at compile-time. More...
 
constexpr double & MutableValue () noexcept
 Returns the value of this physical quantity expressed in its standard unit of measure as a mutable value. More...
 
constexpr void SetValue (const double value) noexcept
 Sets the value of this physical quantity expressed in its standard unit of measure to the given value. More...
 
std::string Print () const
 Prints this physical quantity as a string. This physical quantity's value is expressed in its standard unit of measure. More...
 
std::string Print (const Unit::DynamicViscosity unit) const
 Prints this physical quantity as a string. This physical quantity's value is expressed in the given unit of measure. More...
 
std::string JSON () const
 Serializes this physical quantity as a JSON message. This physical quantity's value is expressed in its standard unit of measure. More...
 
std::string JSON (const Unit::DynamicViscosity unit) const
 Serializes this physical quantity as a JSON message. This physical quantity's value is expressed in the given unit of measure. More...
 
std::string XML () const
 Serializes this physical quantity as an XML message. This physical quantity's value is expressed in its standard unit of measure. More...
 
std::string XML (const Unit::DynamicViscosity unit) const
 Serializes this physical quantity as an XML message. This physical quantity's value is expressed in the given unit of measure. More...
 
std::string YAML () const
 Serializes this physical quantity as a YAML message. This physical quantity's value is expressed in its standard unit of measure. More...
 
std::string YAML (const Unit::DynamicViscosity unit) const
 Serializes this physical quantity as a YAML message. This physical quantity's value is expressed in the given unit of measure. More...
 

Static Public Member Functions

static constexpr BulkDynamicViscosity< NumericType > Zero ()
 Statically creates a bulk dynamic viscosity of zero. More...
 
template<Unit::DynamicViscosity Unit>
static constexpr BulkDynamicViscosity< NumericType > Create (const NumericType value)
 Statically creates a bulk dynamic viscosity with a given value expressed in a given dynamic viscosity unit. More...
 
static constexpr const PhQ::DimensionsDimensions ()
 Physical dimension set of this physical quantity. More...
 
static constexpr Unit::DynamicViscosity Unit ()
 Standard unit of measure for this physical quantity. This physical quantity's value is stored internally in this unit of measure. More...
 

Protected Attributes

double value
 Value of this physical quantity expressed in its standard unit of measure. More...
 

Private Member Functions

constexpr BulkDynamicViscosity (const NumericType value)
 Constructor. Constructs a bulk dynamic viscosity with a given value expressed in the standard dynamic viscosity unit. More...
 

Friends

class ConstitutiveModel
 

Detailed Description

template<typename NumericType = double>
class PhQ::BulkDynamicViscosity< NumericType >

Bulk dynamic viscosity, also known as volume dynamic viscosity or dilatational dynamic viscosity. Not to be confused with dynamic viscosity; see PhQ::DynamicViscosity.

Definition at line 40 of file BulkDynamicViscosity.hpp.

Constructor & Destructor Documentation

◆ BulkDynamicViscosity() [1/6]

template<typename NumericType = double>
PhQ::BulkDynamicViscosity< NumericType >::BulkDynamicViscosity ( )
default

Default constructor. Constructs a bulk dynamic viscosity with an uninitialized value.

◆ BulkDynamicViscosity() [2/6]

template<typename NumericType = double>
PhQ::BulkDynamicViscosity< NumericType >::BulkDynamicViscosity ( const NumericType  value,
const Unit::DynamicViscosity  unit 
)
inline

Constructor. Constructs a bulk dynamic viscosity with a given value expressed in a given dynamic viscosity unit.

Definition at line 47 of file BulkDynamicViscosity.hpp.

◆ ~BulkDynamicViscosity()

template<typename NumericType = double>
PhQ::BulkDynamicViscosity< NumericType >::~BulkDynamicViscosity ( )
defaultnoexcept

Destructor. Destroys this bulk dynamic viscosity.

◆ BulkDynamicViscosity() [3/6]

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

Copy constructor. Constructs a bulk dynamic viscosity by copying another one.

◆ BulkDynamicViscosity() [4/6]

template<typename NumericType = double>
template<typename OtherNumericType >
constexpr PhQ::BulkDynamicViscosity< NumericType >::BulkDynamicViscosity ( const BulkDynamicViscosity< OtherNumericType > &  other)
inlineexplicitconstexpr

Copy constructor. Constructs a bulk dynamic viscosity by copying another one.

Definition at line 58 of file BulkDynamicViscosity.hpp.

◆ BulkDynamicViscosity() [5/6]

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

Move constructor. Constructs a bulk dynamic viscosity by moving another one.

◆ BulkDynamicViscosity() [6/6]

template<typename NumericType = double>
constexpr PhQ::BulkDynamicViscosity< NumericType >::BulkDynamicViscosity ( const NumericType  value)
inlineexplicitconstexprprivate

Constructor. Constructs a bulk dynamic viscosity with a given value expressed in the standard dynamic viscosity unit.

Definition at line 137 of file BulkDynamicViscosity.hpp.

Member Function Documentation

◆ Create()

template<typename NumericType = double>
template<Unit::DynamicViscosity Unit>
static constexpr BulkDynamicViscosity<NumericType> PhQ::BulkDynamicViscosity< NumericType >::Create ( const NumericType  value)
inlinestaticconstexpr

Statically creates a bulk dynamic viscosity with a given value expressed in a given dynamic viscosity unit.

Definition at line 88 of file BulkDynamicViscosity.hpp.

References PhQ::DimensionalScalar< Unit::DynamicViscosity, double >::value.

◆ Dimensions()

static constexpr const PhQ::Dimensions& PhQ::DimensionalScalar< Unit::DynamicViscosity , double >::Dimensions ( )
inlinestaticconstexprinherited

Physical dimension set of this physical quantity.

Definition at line 54 of file DimensionalScalar.hpp.

◆ JSON() [1/2]

std::string PhQ::DimensionalScalar< Unit::DynamicViscosity , double >::JSON ( ) const
inlineinherited

Serializes this physical quantity as a JSON message. This physical quantity's value is expressed in its standard unit of measure.

Definition at line 107 of file DimensionalScalar.hpp.

◆ JSON() [2/2]

std::string PhQ::DimensionalScalar< Unit::DynamicViscosity , double >::JSON ( const Unit::DynamicViscosity  unit) const
inlineinherited

Serializes this physical quantity as a JSON message. This physical quantity's value is expressed in the given unit of measure.

Definition at line 117 of file DimensionalScalar.hpp.

◆ MutableValue()

constexpr double & PhQ::DimensionalScalar< Unit::DynamicViscosity , double >::MutableValue ( )
inlineconstexprnoexceptinherited

Returns the value of this physical quantity expressed in its standard unit of measure as a mutable value.

Definition at line 83 of file DimensionalScalar.hpp.

◆ operator*()

template<typename NumericType = double>
constexpr BulkDynamicViscosity<NumericType> PhQ::BulkDynamicViscosity< NumericType >::operator* ( const NumericType  number) const
inlineconstexpr

◆ operator*=()

template<typename NumericType = double>
constexpr void PhQ::BulkDynamicViscosity< NumericType >::operator*= ( const NumericType  number)
inlineconstexprnoexcept

◆ operator+()

template<typename NumericType = double>
constexpr BulkDynamicViscosity<NumericType> PhQ::BulkDynamicViscosity< NumericType >::operator+ ( const BulkDynamicViscosity< NumericType > &  bulk_dynamic_viscosity) const
inlineconstexpr

◆ operator+=()

template<typename NumericType = double>
constexpr void PhQ::BulkDynamicViscosity< NumericType >::operator+= ( const BulkDynamicViscosity< NumericType > &  bulk_dynamic_viscosity)
inlineconstexprnoexcept

◆ operator-()

template<typename NumericType = double>
constexpr BulkDynamicViscosity<NumericType> PhQ::BulkDynamicViscosity< NumericType >::operator- ( const BulkDynamicViscosity< NumericType > &  bulk_dynamic_viscosity) const
inlineconstexpr

◆ operator-=()

template<typename NumericType = double>
constexpr void PhQ::BulkDynamicViscosity< NumericType >::operator-= ( const BulkDynamicViscosity< NumericType > &  bulk_dynamic_viscosity)
inlineconstexprnoexcept

◆ operator/() [1/2]

template<typename NumericType = double>
constexpr NumericType PhQ::BulkDynamicViscosity< NumericType >::operator/ ( const BulkDynamicViscosity< NumericType > &  bulk_dynamic_viscosity) const
inlineconstexprnoexcept

◆ operator/() [2/2]

template<typename NumericType = double>
constexpr BulkDynamicViscosity<NumericType> PhQ::BulkDynamicViscosity< NumericType >::operator/ ( const NumericType  number) const
inlineconstexpr

◆ operator/=()

template<typename NumericType = double>
constexpr void PhQ::BulkDynamicViscosity< NumericType >::operator/= ( const NumericType  number)
inlineconstexprnoexcept

◆ operator=() [1/3]

template<typename NumericType = double>
constexpr BulkDynamicViscosity<NumericType>& PhQ::BulkDynamicViscosity< NumericType >::operator= ( BulkDynamicViscosity< NumericType > &&  other)
constexprdefaultnoexcept

Move assignment operator. Assigns this bulk dynamic viscosity by moving another one.

◆ operator=() [2/3]

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

Copy assignment operator. Assigns this bulk dynamic viscosity by copying another one.

◆ operator=() [3/3]

template<typename NumericType = double>
template<typename OtherNumericType >
constexpr BulkDynamicViscosity<NumericType>& PhQ::BulkDynamicViscosity< NumericType >::operator= ( const BulkDynamicViscosity< OtherNumericType > &  other)
inlineconstexpr

Copy assignment operator. Assigns this bulk dynamic viscosity by copying another one.

Definition at line 70 of file BulkDynamicViscosity.hpp.

References PhQ::DimensionalScalar< UnitType, NumericType >::Value(), and PhQ::DimensionalScalar< Unit::DynamicViscosity, double >::value.

◆ Print() [1/2]

std::string PhQ::DimensionalScalar< Unit::DynamicViscosity , double >::Print ( ) const
inlineinherited

Prints this physical quantity as a string. This physical quantity's value is expressed in its standard unit of measure.

Definition at line 95 of file DimensionalScalar.hpp.

◆ Print() [2/2]

std::string PhQ::DimensionalScalar< Unit::DynamicViscosity , double >::Print ( const Unit::DynamicViscosity  unit) const
inlineinherited

Prints this physical quantity as a string. This physical quantity's value is expressed in the given unit of measure.

Definition at line 101 of file DimensionalScalar.hpp.

◆ SetValue()

constexpr void PhQ::DimensionalScalar< Unit::DynamicViscosity , double >::SetValue ( const double  value)
inlineconstexprnoexceptinherited

Sets the value of this physical quantity expressed in its standard unit of measure to the given value.

Definition at line 89 of file DimensionalScalar.hpp.

◆ StaticValue()

constexpr double PhQ::DimensionalScalar< Unit::DynamicViscosity , double >::StaticValue ( ) const
inlineconstexprinherited

Value of this physical quantity expressed in a given unit of measure. This method can be evaluated statically at compile-time.

Definition at line 77 of file DimensionalScalar.hpp.

◆ Unit()

static constexpr Unit::DynamicViscosity PhQ::DimensionalScalar< Unit::DynamicViscosity , double >::Unit ( )
inlinestaticconstexprinherited

Standard unit of measure for this physical quantity. This physical quantity's value is stored internally in this unit of measure.

Definition at line 60 of file DimensionalScalar.hpp.

◆ Value() [1/2]

constexpr double PhQ::DimensionalScalar< Unit::DynamicViscosity , double >::Value ( ) const
inlineconstexprnoexceptinherited

Value of this physical quantity expressed in its standard unit of measure.

Definition at line 65 of file DimensionalScalar.hpp.

◆ Value() [2/2]

double PhQ::DimensionalScalar< Unit::DynamicViscosity , double >::Value ( const Unit::DynamicViscosity  unit) const
inlineinherited

Value of this physical quantity expressed in a given unit of measure.

Definition at line 70 of file DimensionalScalar.hpp.

◆ XML() [1/2]

std::string PhQ::DimensionalScalar< Unit::DynamicViscosity , double >::XML ( ) const
inlineinherited

Serializes this physical quantity as an XML message. This physical quantity's value is expressed in its standard unit of measure.

Definition at line 127 of file DimensionalScalar.hpp.

◆ XML() [2/2]

std::string PhQ::DimensionalScalar< Unit::DynamicViscosity , double >::XML ( const Unit::DynamicViscosity  unit) const
inlineinherited

Serializes this physical quantity as an XML message. This physical quantity's value is expressed in the given unit of measure.

Definition at line 137 of file DimensionalScalar.hpp.

◆ YAML() [1/2]

std::string PhQ::DimensionalScalar< Unit::DynamicViscosity , double >::YAML ( ) const
inlineinherited

Serializes this physical quantity as a YAML message. This physical quantity's value is expressed in its standard unit of measure.

Definition at line 147 of file DimensionalScalar.hpp.

◆ YAML() [2/2]

std::string PhQ::DimensionalScalar< Unit::DynamicViscosity , double >::YAML ( const Unit::DynamicViscosity  unit) const
inlineinherited

Serializes this physical quantity as a YAML message. This physical quantity's value is expressed in the given unit of measure.

Definition at line 157 of file DimensionalScalar.hpp.

◆ Zero()

template<typename NumericType = double>
static constexpr BulkDynamicViscosity<NumericType> PhQ::BulkDynamicViscosity< NumericType >::Zero ( )
inlinestaticconstexpr

Statically creates a bulk dynamic viscosity of zero.

Definition at line 81 of file BulkDynamicViscosity.hpp.

Friends And Related Function Documentation

◆ ConstitutiveModel

template<typename NumericType = double>
friend class ConstitutiveModel
friend

Definition at line 140 of file BulkDynamicViscosity.hpp.

Member Data Documentation

◆ value

double PhQ::DimensionalScalar< Unit::DynamicViscosity , double >::value
protectedinherited

Value of this physical quantity expressed in its standard unit of measure.

Definition at line 221 of file DimensionalScalar.hpp.


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