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

Thermal diffusivity of a material. Measures the rate of heat transfer inside a material. Equals the scalar thermal conductivity divided by the mass density and specific isobaric heat capacity; see PhQ::ScalarThermalConductivity, PhQ::MassDensity, and PhQ::SpecificIsobaricHeatCapacity. Also appears in the definition of the Prandtl number; see PhQ::PrandtlNumber and PhQ::KinematicViscosity. More...

#include "ThermalDiffusivity.hpp"

Public Member Functions

 ThermalDiffusivity ()=default
 Default constructor. Constructs a thermal diffusivity with an uninitialized value. More...
 
 ThermalDiffusivity (const NumericType value, const Unit::Diffusivity unit)
 Constructor. Constructs a thermal diffusivity with a given value expressed in a given diffusivity unit. More...
 
constexpr ThermalDiffusivity (const ScalarThermalConductivity< NumericType > &scalar_thermal_conductivity, const MassDensity< NumericType > &mass_density, const SpecificIsobaricHeatCapacity< NumericType > &specific_isobaric_heat_capacity)
 Constructor. Constructs a thermal diffusivity from a given scalar thermal conductivity, specific isobaric heat capacity, and mass density using the definition of the thermal diffusivity. More...
 
constexpr ThermalDiffusivity (const KinematicViscosity< NumericType > &kinematic_viscosity, const PrandtlNumber< NumericType > &prandtl_number)
 Constructor. Constructs a thermal diffusivity from a given kinematic viscosity and Prandtl number using the definition of the Prandtl number. More...
 
 ~ThermalDiffusivity () noexcept=default
 Destructor. Destroys this thermal diffusivity. More...
 
constexpr ThermalDiffusivity (const ThermalDiffusivity< NumericType > &other)=default
 Copy constructor. Constructs a thermal diffusivity by copying another one. More...
 
template<typename OtherNumericType >
constexpr ThermalDiffusivity (const ThermalDiffusivity< OtherNumericType > &other)
 Copy constructor. Constructs a thermal diffusivity by copying another one. More...
 
constexpr ThermalDiffusivity (ThermalDiffusivity< NumericType > &&other) noexcept=default
 Move constructor. Constructs a thermal diffusivity by moving another one. More...
 
constexpr ThermalDiffusivity< NumericType > & operator= (const ThermalDiffusivity< NumericType > &other)=default
 Copy assignment operator. Assigns this thermal diffusivity by copying another one. More...
 
template<typename OtherNumericType >
constexpr ThermalDiffusivity< NumericType > & operator= (const ThermalDiffusivity< OtherNumericType > &other)
 Copy assignment operator. Assigns this thermal diffusivity by copying another one. More...
 
constexpr ThermalDiffusivity< NumericType > & operator= (ThermalDiffusivity< NumericType > &&other) noexcept=default
 Move assignment operator. Assigns this thermal diffusivity by moving another one. More...
 
constexpr ThermalDiffusivity< NumericType > operator+ (const ThermalDiffusivity< NumericType > &thermal_diffusivity) const
 
constexpr ThermalDiffusivity< NumericType > operator- (const ThermalDiffusivity< NumericType > &thermal_diffusivity) const
 
constexpr ThermalDiffusivity< NumericType > operator* (const NumericType number) const
 
constexpr ThermalDiffusivity< NumericType > operator/ (const NumericType number) const
 
constexpr NumericType operator/ (const ThermalDiffusivity< NumericType > &thermal_diffusivity) const noexcept
 
constexpr void operator+= (const ThermalDiffusivity< NumericType > &thermal_diffusivity) noexcept
 
constexpr void operator-= (const ThermalDiffusivity< NumericType > &thermal_diffusivity) 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::Diffusivity 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::Diffusivity 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::Diffusivity 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::Diffusivity 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::Diffusivity 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 ThermalDiffusivity< NumericType > Zero ()
 Statically creates a thermal diffusivity of zero. More...
 
template<Unit::Diffusivity Unit>
static constexpr ThermalDiffusivity< NumericType > Create (const NumericType value)
 Statically creates a thermal diffusivity with a given value expressed in a given diffusivity unit. More...
 
static constexpr const PhQ::DimensionsDimensions ()
 Physical dimension set of this physical quantity. More...
 
static constexpr Unit::Diffusivity 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 ThermalDiffusivity (const NumericType value)
 Constructor. Constructs a thermal diffusivity with a given value expressed in the standard diffusivity unit. More...
 

Detailed Description

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

Thermal diffusivity of a material. Measures the rate of heat transfer inside a material. Equals the scalar thermal conductivity divided by the mass density and specific isobaric heat capacity; see PhQ::ScalarThermalConductivity, PhQ::MassDensity, and PhQ::SpecificIsobaricHeatCapacity. Also appears in the definition of the Prandtl number; see PhQ::PrandtlNumber and PhQ::KinematicViscosity.

Definition at line 50 of file ThermalDiffusivity.hpp.

Constructor & Destructor Documentation

◆ ThermalDiffusivity() [1/8]

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

Default constructor. Constructs a thermal diffusivity with an uninitialized value.

◆ ThermalDiffusivity() [2/8]

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

Constructor. Constructs a thermal diffusivity with a given value expressed in a given diffusivity unit.

Definition at line 57 of file ThermalDiffusivity.hpp.

◆ ThermalDiffusivity() [3/8]

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

Constructor. Constructs a thermal diffusivity from a given scalar thermal conductivity, specific isobaric heat capacity, and mass density using the definition of the thermal diffusivity.

Definition at line 63 of file ThermalDiffusivity.hpp.

◆ ThermalDiffusivity() [4/8]

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

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

Definition at line 225 of file PrandtlNumber.hpp.

◆ ~ThermalDiffusivity()

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

Destructor. Destroys this thermal diffusivity.

◆ ThermalDiffusivity() [5/8]

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

Copy constructor. Constructs a thermal diffusivity by copying another one.

◆ ThermalDiffusivity() [6/8]

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

Copy constructor. Constructs a thermal diffusivity by copying another one.

Definition at line 84 of file ThermalDiffusivity.hpp.

◆ ThermalDiffusivity() [7/8]

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

Move constructor. Constructs a thermal diffusivity by moving another one.

◆ ThermalDiffusivity() [8/8]

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

Constructor. Constructs a thermal diffusivity with a given value expressed in the standard diffusivity unit.

Definition at line 161 of file ThermalDiffusivity.hpp.

Member Function Documentation

◆ Create()

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

Statically creates a thermal diffusivity with a given value expressed in a given diffusivity unit.

Definition at line 114 of file ThermalDiffusivity.hpp.

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

◆ Dimensions()

static constexpr const PhQ::Dimensions& PhQ::DimensionalScalar< Unit::Diffusivity , 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::Diffusivity , 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::Diffusivity , double >::JSON ( const Unit::Diffusivity  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::Diffusivity , 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 ThermalDiffusivity<NumericType> PhQ::ThermalDiffusivity< NumericType >::operator* ( const NumericType  number) const
inlineconstexpr

◆ operator*=()

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

◆ operator+()

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

◆ operator+=()

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

◆ operator-()

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

◆ operator-=()

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

◆ operator/() [1/2]

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

◆ operator/() [2/2]

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

◆ operator/=()

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

◆ operator=() [1/3]

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

Copy assignment operator. Assigns this thermal diffusivity by copying another one.

◆ operator=() [2/3]

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

Copy assignment operator. Assigns this thermal diffusivity by copying another one.

Definition at line 96 of file ThermalDiffusivity.hpp.

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

◆ operator=() [3/3]

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

Move assignment operator. Assigns this thermal diffusivity by moving another one.

◆ Print() [1/2]

std::string PhQ::DimensionalScalar< Unit::Diffusivity , 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::Diffusivity , double >::Print ( const Unit::Diffusivity  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::Diffusivity , 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::Diffusivity , 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::Diffusivity PhQ::DimensionalScalar< Unit::Diffusivity , 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::Diffusivity , 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::Diffusivity , double >::Value ( const Unit::Diffusivity  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::Diffusivity , 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::Diffusivity , double >::XML ( const Unit::Diffusivity  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::Diffusivity , 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::Diffusivity , double >::YAML ( const Unit::Diffusivity  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 ThermalDiffusivity<NumericType> PhQ::ThermalDiffusivity< NumericType >::Zero ( )
inlinestaticconstexpr

Statically creates a thermal diffusivity of zero.

Definition at line 107 of file ThermalDiffusivity.hpp.

Member Data Documentation

◆ value

double PhQ::DimensionalScalar< Unit::Diffusivity , 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 files: