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 | List of all members
PhQ::PrandtlNumber< NumericType > Class Template Reference

Prandtl number of a fluid. Represents the ratio of the momentum diffusivity to the thermal diffusivity of a fluid. See also PhQ::KinematicViscosity, PhQ::SpecificIsobaricHeatCapacity, PhQ::DynamicViscosity, PhQ::ScalarThermalConductivity, and PhQ::ThermalDiffusivity. More...

#include "PrandtlNumber.hpp"

Public Member Functions

 PrandtlNumber ()=default
 Default constructor. Constructs a Prandtl number with an uninitialized value. More...
 
constexpr PrandtlNumber (const NumericType value)
 Constructor. Constructs a Prandtl number with a given value. More...
 
constexpr PrandtlNumber (const KinematicViscosity< NumericType > &kinematic_viscosity, const ThermalDiffusivity< NumericType > &thermal_diffusivity)
 Constructor. Constructs a Prandtl number from a given kinematic viscosity and thermal diffusivity using the definition of the Prandtl number. More...
 
constexpr PrandtlNumber (const SpecificIsobaricHeatCapacity< NumericType > &specific_isobaric_heat_capacity, const DynamicViscosity< NumericType > &dynamic_viscosity, const ScalarThermalConductivity< NumericType > &scalar_thermal_conductivity)
 Constructor. Constructs a Prandtl number from a given specific isobaric heat capacity, dynamic viscosity, and scalar thermal conductivity using the definition of the Prandtl number. More...
 
 ~PrandtlNumber () noexcept=default
 Destructor. Destroys this Prandtl number. More...
 
constexpr PrandtlNumber (const PrandtlNumber< NumericType > &other)=default
 Copy constructor. Constructs a Prandtl number by copying another one. More...
 
template<typename OtherNumericType >
constexpr PrandtlNumber (const PrandtlNumber< OtherNumericType > &other)
 Copy constructor. Constructs a Prandtl number by copying another one. More...
 
constexpr PrandtlNumber (PrandtlNumber< NumericType > &&other) noexcept=default
 Move constructor. Constructs a Prandtl number by moving another one. More...
 
constexpr PrandtlNumber< NumericType > & operator= (const PrandtlNumber< NumericType > &other)=default
 Copy assignment operator. Assigns this Prandtl number by copying another one. More...
 
template<typename OtherNumericType >
constexpr PrandtlNumber< NumericType > & operator= (const PrandtlNumber< OtherNumericType > &other)
 Copy assignment operator. Assigns this Prandtl number by copying another one. More...
 
constexpr PrandtlNumber< NumericType > & operator= (PrandtlNumber< NumericType > &&other) noexcept=default
 Move assignment operator. Assigns this Prandtl number by moving another one. More...
 
constexpr PhQ::DynamicViscosity< NumericType > DynamicViscosity (const PhQ::ScalarThermalConductivity< NumericType > &scalar_thermal_conductivity, const PhQ::SpecificIsobaricHeatCapacity< NumericType > &specific_isobaric_heat_capacity) const
 
constexpr PhQ::KinematicViscosity< NumericType > KinematicViscosity (const PhQ::ThermalDiffusivity< NumericType > &thermal_diffusivity) const
 
constexpr PhQ::SpecificIsobaricHeatCapacity< NumericType > SpecificIsobaricHeatCapacity (const PhQ::ScalarThermalConductivity< NumericType > &scalar_thermal_conductivity, const PhQ::DynamicViscosity< NumericType > &dynamic_viscosity) const
 
constexpr PhQ::ScalarThermalConductivity< NumericType > ScalarThermalConductivity (const PhQ::SpecificIsobaricHeatCapacity< NumericType > &specific_isobaric_heat_capacity, const PhQ::DynamicViscosity< NumericType > &dynamic_viscosity) const
 
constexpr PhQ::ThermalDiffusivity< NumericType > ThermalDiffusivity (const PhQ::KinematicViscosity< NumericType > &kinematic_viscosity) const
 
constexpr PrandtlNumber< NumericType > operator+ (const PrandtlNumber< NumericType > &prandtl_number) const
 
constexpr PrandtlNumber< NumericType > operator- (const PrandtlNumber< NumericType > &prandtl_number) const
 
constexpr PrandtlNumber< NumericType > operator* (const NumericType number) const
 
constexpr PrandtlNumber< NumericType > operator/ (const NumericType number) const
 
constexpr NumericType operator/ (const PrandtlNumber< NumericType > &prandtl_number) const noexcept
 
constexpr void operator+= (const PrandtlNumber< NumericType > &prandtl_number) noexcept
 
constexpr void operator-= (const PrandtlNumber< NumericType > &prandtl_number) 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. More...
 
constexpr double & MutableValue () noexcept
 Returns the value of this physical quantity as a mutable value. More...
 
constexpr void SetValue (const double value) noexcept
 Sets the value of this physical quantity to the given value. More...
 
std::string Print () const
 Prints this physical quantity as a string. More...
 
std::string JSON () const
 Serializes this physical quantity as a JSON message. More...
 
std::string XML () const
 Serializes this physical quantity as an XML message. More...
 
std::string YAML () const
 Serializes this physical quantity as a YAML message. More...
 

Static Public Member Functions

static constexpr PrandtlNumber< NumericType > Zero ()
 Statically creates a Prandtl number of zero. More...
 
static constexpr PhQ::Dimensions Dimensions ()
 Physical dimension set of this physical quantity. Since this physical quantity is dimensionless, its physical dimension set is simply the null set. More...
 

Protected Attributes

double value
 Value of this physical quantity. More...
 

Detailed Description

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

Prandtl number of a fluid. Represents the ratio of the momentum diffusivity to the thermal diffusivity of a fluid. See also PhQ::KinematicViscosity, PhQ::SpecificIsobaricHeatCapacity, PhQ::DynamicViscosity, PhQ::ScalarThermalConductivity, and PhQ::ThermalDiffusivity.

Definition at line 46 of file PrandtlNumber.hpp.

Constructor & Destructor Documentation

◆ PrandtlNumber() [1/7]

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

Default constructor. Constructs a Prandtl number with an uninitialized value.

◆ PrandtlNumber() [2/7]

template<typename NumericType = double>
constexpr PhQ::PrandtlNumber< NumericType >::PrandtlNumber ( const NumericType  value)
inlineexplicitconstexpr

Constructor. Constructs a Prandtl number with a given value.

Definition at line 52 of file PrandtlNumber.hpp.

◆ PrandtlNumber() [3/7]

template<typename NumericType = double>
constexpr PhQ::PrandtlNumber< NumericType >::PrandtlNumber ( const KinematicViscosity< NumericType > &  kinematic_viscosity,
const ThermalDiffusivity< NumericType > &  thermal_diffusivity 
)
inlineconstexpr

Constructor. Constructs a Prandtl number from a given kinematic viscosity and thermal diffusivity using the definition of the Prandtl number.

Definition at line 57 of file PrandtlNumber.hpp.

◆ PrandtlNumber() [4/7]

template<typename NumericType = double>
constexpr PhQ::PrandtlNumber< NumericType >::PrandtlNumber ( const SpecificIsobaricHeatCapacity< NumericType > &  specific_isobaric_heat_capacity,
const DynamicViscosity< NumericType > &  dynamic_viscosity,
const ScalarThermalConductivity< NumericType > &  scalar_thermal_conductivity 
)
inlineconstexpr

Constructor. Constructs a Prandtl number from a given specific isobaric heat capacity, dynamic viscosity, and scalar thermal conductivity using the definition of the Prandtl number.

Definition at line 63 of file PrandtlNumber.hpp.

◆ ~PrandtlNumber()

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

Destructor. Destroys this Prandtl number.

◆ PrandtlNumber() [5/7]

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

Copy constructor. Constructs a Prandtl number by copying another one.

◆ PrandtlNumber() [6/7]

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

Copy constructor. Constructs a Prandtl number by copying another one.

Definition at line 78 of file PrandtlNumber.hpp.

◆ PrandtlNumber() [7/7]

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

Move constructor. Constructs a Prandtl number by moving another one.

Member Function Documentation

◆ Dimensions()

static constexpr PhQ::Dimensions PhQ::DimensionlessScalar< double >::Dimensions ( )
inlinestaticconstexprinherited

Physical dimension set of this physical quantity. Since this physical quantity is dimensionless, its physical dimension set is simply the null set.

Definition at line 55 of file DimensionlessScalar.hpp.

◆ DynamicViscosity()

template<typename NumericType = double>
constexpr PhQ::DynamicViscosity<NumericType> PhQ::PrandtlNumber< NumericType >::DynamicViscosity ( const PhQ::ScalarThermalConductivity< NumericType > &  scalar_thermal_conductivity,
const PhQ::SpecificIsobaricHeatCapacity< NumericType > &  specific_isobaric_heat_capacity 
) const
inlineconstexpr

Definition at line 104 of file PrandtlNumber.hpp.

◆ JSON()

std::string PhQ::DimensionlessScalar< double >::JSON ( ) const
inlineinherited

Serializes this physical quantity as a JSON message.

Definition at line 80 of file DimensionlessScalar.hpp.

◆ KinematicViscosity()

template<typename NumericType = double>
constexpr PhQ::KinematicViscosity<NumericType> PhQ::PrandtlNumber< NumericType >::KinematicViscosity ( const PhQ::ThermalDiffusivity< NumericType > &  thermal_diffusivity) const
inlineconstexpr

Definition at line 111 of file PrandtlNumber.hpp.

◆ MutableValue()

constexpr double & PhQ::DimensionlessScalar< double >::MutableValue ( )
inlineconstexprnoexceptinherited

Returns the value of this physical quantity as a mutable value.

Definition at line 65 of file DimensionlessScalar.hpp.

◆ operator*()

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

Definition at line 146 of file PrandtlNumber.hpp.

References PhQ::DimensionlessScalar< double >::value.

◆ operator*=()

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

Definition at line 166 of file PrandtlNumber.hpp.

References PhQ::DimensionlessScalar< double >::value.

◆ operator+()

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

◆ operator+=()

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

Definition at line 158 of file PrandtlNumber.hpp.

References PhQ::DimensionlessScalar< double >::value.

◆ operator-()

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

◆ operator-=()

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

Definition at line 162 of file PrandtlNumber.hpp.

References PhQ::DimensionlessScalar< double >::value.

◆ operator/() [1/2]

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

Definition at line 150 of file PrandtlNumber.hpp.

References PhQ::DimensionlessScalar< double >::value.

◆ operator/() [2/2]

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

Definition at line 154 of file PrandtlNumber.hpp.

References PhQ::DimensionlessScalar< double >::value.

◆ operator/=()

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

Definition at line 170 of file PrandtlNumber.hpp.

References PhQ::DimensionlessScalar< double >::value.

◆ operator=() [1/3]

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

Copy assignment operator. Assigns this Prandtl number by copying another one.

◆ operator=() [2/3]

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

Copy assignment operator. Assigns this Prandtl number by copying another one.

Definition at line 90 of file PrandtlNumber.hpp.

References PhQ::DimensionlessScalar< NumericType >::Value(), and PhQ::DimensionlessScalar< double >::value.

◆ operator=() [3/3]

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

Move assignment operator. Assigns this Prandtl number by moving another one.

◆ Print()

std::string PhQ::DimensionlessScalar< double >::Print ( ) const
inlineinherited

Prints this physical quantity as a string.

Definition at line 75 of file DimensionlessScalar.hpp.

◆ ScalarThermalConductivity()

template<typename NumericType = double>
constexpr PhQ::ScalarThermalConductivity<NumericType> PhQ::PrandtlNumber< NumericType >::ScalarThermalConductivity ( const PhQ::SpecificIsobaricHeatCapacity< NumericType > &  specific_isobaric_heat_capacity,
const PhQ::DynamicViscosity< NumericType > &  dynamic_viscosity 
) const
inlineconstexpr

Definition at line 124 of file PrandtlNumber.hpp.

◆ SetValue()

constexpr void PhQ::DimensionlessScalar< double >::SetValue ( const NumericType  value)
inlineconstexprnoexceptinherited

Sets the value of this physical quantity to the given value.

Definition at line 70 of file DimensionlessScalar.hpp.

◆ SpecificIsobaricHeatCapacity()

template<typename NumericType = double>
constexpr PhQ::SpecificIsobaricHeatCapacity<NumericType> PhQ::PrandtlNumber< NumericType >::SpecificIsobaricHeatCapacity ( const PhQ::ScalarThermalConductivity< NumericType > &  scalar_thermal_conductivity,
const PhQ::DynamicViscosity< NumericType > &  dynamic_viscosity 
) const
inlineconstexpr

Definition at line 117 of file PrandtlNumber.hpp.

◆ ThermalDiffusivity()

template<typename NumericType = double>
constexpr PhQ::ThermalDiffusivity<NumericType> PhQ::PrandtlNumber< NumericType >::ThermalDiffusivity ( const PhQ::KinematicViscosity< NumericType > &  kinematic_viscosity) const
inlineconstexpr

Definition at line 131 of file PrandtlNumber.hpp.

◆ Value()

constexpr double PhQ::DimensionlessScalar< double >::Value ( ) const
inlineconstexprnoexceptinherited

Value of this physical quantity.

Definition at line 60 of file DimensionlessScalar.hpp.

◆ XML()

std::string PhQ::DimensionlessScalar< double >::XML ( ) const
inlineinherited

Serializes this physical quantity as an XML message.

Definition at line 85 of file DimensionlessScalar.hpp.

◆ YAML()

std::string PhQ::DimensionlessScalar< double >::YAML ( ) const
inlineinherited

Serializes this physical quantity as a YAML message.

Definition at line 90 of file DimensionlessScalar.hpp.

◆ Zero()

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

Statically creates a Prandtl number of zero.

Definition at line 100 of file PrandtlNumber.hpp.

Member Data Documentation

◆ value

double PhQ::DimensionlessScalar< double >::value
protectedinherited

Value of this physical quantity.

Definition at line 143 of file DimensionlessScalar.hpp.


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