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

Heat capacity ratio, also known as ratio of specific heats, adiabatic index, or Laplace's coefficient. A material's heat capacity ratio is the ratio of its isobaric heat capacity to its isochoric heat capacity; see PhQ::IsobaricHeatCapacity and PhQ::IsochoricHeatCapacity. More...

#include "HeatCapacityRatio.hpp"

Public Member Functions

 HeatCapacityRatio ()=default
 Default constructor. Constructs a heat capacity ratio ratio with an uninitialized value. More...
 
constexpr HeatCapacityRatio (const NumericType value)
 Constructor. Constructs a heat capacity ratio with a given value. More...
 
constexpr HeatCapacityRatio (const SpecificIsobaricHeatCapacity< NumericType > &specific_isobaric_heat_capacity, const SpecificGasConstant< NumericType > &specific_gas_constant)
 Constructor. Constructs a heat capacity ratio from a given specific gas constant and specific isobaric heat capacity using Mayer's relation and the definition of the heat capacity ratio. More...
 
constexpr HeatCapacityRatio (const SpecificGasConstant< NumericType > &specific_gas_constant, const SpecificIsochoricHeatCapacity< NumericType > &specific_isochoric_heat_capacity)
 Constructor. Constructs a heat capacity ratio from a given specific gas constant and specific isochoric heat capacity using Mayer's relation and the definition of the heat capacity ratio. More...
 
constexpr HeatCapacityRatio (const SpecificIsobaricHeatCapacity< NumericType > &specific_isobaric_heat_capacity, const SpecificIsochoricHeatCapacity< NumericType > &specific_isochoric_heat_capacity)
 Constructor. Constructs a heat capacity ratio from a given specific isobaric heat capacity and specific isochoric heat capacity using the definition of the heat capacity ratio. More...
 
constexpr HeatCapacityRatio (const IsobaricHeatCapacity< NumericType > &isobaric_heat_capacity, const GasConstant< NumericType > &gas_constant)
 Constructor. Constructs a heat capacity ratio from a given gas constant and isobaric heat capacity using Mayer's relation and the definition of the heat capacity ratio. More...
 
constexpr HeatCapacityRatio (const GasConstant< NumericType > &gas_constant, const IsochoricHeatCapacity< NumericType > &isochoric_heat_capacity)
 Constructor. Constructs a heat capacity ratio from a given gas constant and isochoric heat capacity using Mayer's relation and the definition of the heat capacity ratio. More...
 
constexpr HeatCapacityRatio (const IsobaricHeatCapacity< NumericType > &isobaric_heat_capacity, const IsochoricHeatCapacity< NumericType > &isochoric_heat_capacity)
 Constructor. Constructs a heat capacity ratio from a given isobaric heat capacity and isochoric heat capacity using the definition of the specific heat ratio. More...
 
 ~HeatCapacityRatio () noexcept=default
 Destructor. Destroys this heat capacity ratio. More...
 
constexpr HeatCapacityRatio (const HeatCapacityRatio< NumericType > &other)=default
 Copy constructor. Constructs a heat capacity ratio by copying another one. More...
 
template<typename OtherNumericType >
constexpr HeatCapacityRatio (const HeatCapacityRatio< OtherNumericType > &other)
 Copy constructor. Constructs a heat capacity ratio by copying another one. More...
 
constexpr HeatCapacityRatio (HeatCapacityRatio< NumericType > &&other) noexcept=default
 Move constructor. Constructs a heat capacity ratio by moving another one. More...
 
constexpr HeatCapacityRatio< NumericType > & operator= (const HeatCapacityRatio< NumericType > &other)=default
 Copy assignment operator. Assigns this heat capacity ratio by copying another one. More...
 
template<typename OtherNumericType >
constexpr HeatCapacityRatio< NumericType > & operator= (const HeatCapacityRatio< OtherNumericType > &other)
 Copy assignment operator. Assigns this heat capacity ratio by copying another one. More...
 
constexpr HeatCapacityRatio< NumericType > & operator= (HeatCapacityRatio< NumericType > &&other) noexcept=default
 Move assignment operator. Assigns this heat capacity ratio by moving another one. More...
 
constexpr HeatCapacityRatio< NumericType > operator+ (const HeatCapacityRatio< NumericType > &heat_capacity_ratio) const
 
constexpr HeatCapacityRatio< NumericType > operator- (const HeatCapacityRatio< NumericType > &heat_capacity_ratio) const
 
constexpr HeatCapacityRatio< NumericType > operator* (const NumericType number) const
 
constexpr IsobaricHeatCapacity< NumericType > operator* (const IsochoricHeatCapacity< NumericType > &isochoric_heat_capacity) const
 
constexpr SpecificIsobaricHeatCapacity< NumericType > operator* (const SpecificIsochoricHeatCapacity< NumericType > &specific_isochoric_heat_capacity) const
 
constexpr HeatCapacityRatio< NumericType > operator/ (const NumericType number) const
 
constexpr NumericType operator/ (const HeatCapacityRatio< NumericType > &heat_capacity_ratio) const noexcept
 
constexpr void operator+= (const HeatCapacityRatio< NumericType > &heat_capacity_ratio) noexcept
 
constexpr void operator-= (const HeatCapacityRatio< NumericType > &heat_capacity_ratio) 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 HeatCapacityRatio< NumericType > Zero ()
 Statically creates a heat capacity ratio 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::HeatCapacityRatio< NumericType >

Heat capacity ratio, also known as ratio of specific heats, adiabatic index, or Laplace's coefficient. A material's heat capacity ratio is the ratio of its isobaric heat capacity to its isochoric heat capacity; see PhQ::IsobaricHeatCapacity and PhQ::IsochoricHeatCapacity.

Definition at line 68 of file HeatCapacityRatio.hpp.

Constructor & Destructor Documentation

◆ HeatCapacityRatio() [1/11]

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

Default constructor. Constructs a heat capacity ratio ratio with an uninitialized value.

◆ HeatCapacityRatio() [2/11]

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

Constructor. Constructs a heat capacity ratio with a given value.

Definition at line 75 of file HeatCapacityRatio.hpp.

◆ HeatCapacityRatio() [3/11]

template<typename NumericType >
constexpr PhQ::HeatCapacityRatio< NumericType >::HeatCapacityRatio ( const SpecificIsobaricHeatCapacity< NumericType > &  specific_isobaric_heat_capacity,
const SpecificGasConstant< NumericType > &  specific_gas_constant 
)
inlineconstexpr

Constructor. Constructs a heat capacity ratio from a given specific gas constant and specific isobaric heat capacity using Mayer's relation and the definition of the heat capacity ratio.

Definition at line 238 of file SpecificGasConstant.hpp.

◆ HeatCapacityRatio() [4/11]

template<typename NumericType >
constexpr PhQ::HeatCapacityRatio< NumericType >::HeatCapacityRatio ( const SpecificGasConstant< NumericType > &  specific_gas_constant,
const SpecificIsochoricHeatCapacity< NumericType > &  specific_isochoric_heat_capacity 
)
inlineconstexpr

Constructor. Constructs a heat capacity ratio from a given specific gas constant and specific isochoric heat capacity using Mayer's relation and the definition of the heat capacity ratio.

Definition at line 246 of file SpecificGasConstant.hpp.

◆ HeatCapacityRatio() [5/11]

template<typename NumericType >
constexpr PhQ::HeatCapacityRatio< NumericType >::HeatCapacityRatio ( const SpecificIsobaricHeatCapacity< NumericType > &  specific_isobaric_heat_capacity,
const SpecificIsochoricHeatCapacity< NumericType > &  specific_isochoric_heat_capacity 
)
inlineconstexpr

Constructor. Constructs a heat capacity ratio from a given specific isobaric heat capacity and specific isochoric heat capacity using the definition of the heat capacity ratio.

Definition at line 294 of file SpecificIsobaricHeatCapacity.hpp.

◆ HeatCapacityRatio() [6/11]

template<typename NumericType >
constexpr PhQ::HeatCapacityRatio< NumericType >::HeatCapacityRatio ( const IsobaricHeatCapacity< NumericType > &  isobaric_heat_capacity,
const GasConstant< NumericType > &  gas_constant 
)
inlineconstexpr

Constructor. Constructs a heat capacity ratio from a given gas constant and isobaric heat capacity using Mayer's relation and the definition of the heat capacity ratio.

Definition at line 225 of file GasConstant.hpp.

◆ HeatCapacityRatio() [7/11]

template<typename NumericType >
constexpr PhQ::HeatCapacityRatio< NumericType >::HeatCapacityRatio ( const GasConstant< NumericType > &  gas_constant,
const IsochoricHeatCapacity< NumericType > &  isochoric_heat_capacity 
)
inlineconstexpr

Constructor. Constructs a heat capacity ratio from a given gas constant and isochoric heat capacity using Mayer's relation and the definition of the heat capacity ratio.

Definition at line 232 of file GasConstant.hpp.

◆ HeatCapacityRatio() [8/11]

template<typename NumericType >
constexpr PhQ::HeatCapacityRatio< NumericType >::HeatCapacityRatio ( const IsobaricHeatCapacity< NumericType > &  isobaric_heat_capacity,
const IsochoricHeatCapacity< NumericType > &  isochoric_heat_capacity 
)
inlineconstexpr

Constructor. Constructs a heat capacity ratio from a given isobaric heat capacity and isochoric heat capacity using the definition of the specific heat ratio.

Definition at line 238 of file IsobaricHeatCapacity.hpp.

◆ ~HeatCapacityRatio()

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

Destructor. Destroys this heat capacity ratio.

◆ HeatCapacityRatio() [9/11]

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

Copy constructor. Constructs a heat capacity ratio by copying another one.

◆ HeatCapacityRatio() [10/11]

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

Copy constructor. Constructs a heat capacity ratio by copying another one.

Definition at line 121 of file HeatCapacityRatio.hpp.

◆ HeatCapacityRatio() [11/11]

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

Move constructor. Constructs a heat capacity ratio 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.

◆ 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.

◆ 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*() [1/3]

template<typename NumericType >
constexpr IsobaricHeatCapacity< NumericType > PhQ::HeatCapacityRatio< NumericType >::operator* ( const IsochoricHeatCapacity< NumericType > &  isochoric_heat_capacity) const
inlineconstexpr

Definition at line 252 of file IsobaricHeatCapacity.hpp.

◆ operator*() [2/3]

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

Definition at line 158 of file HeatCapacityRatio.hpp.

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

◆ operator*() [3/3]

template<typename NumericType >
constexpr SpecificIsobaricHeatCapacity< NumericType > PhQ::HeatCapacityRatio< NumericType >::operator* ( const SpecificIsochoricHeatCapacity< NumericType > &  specific_isochoric_heat_capacity) const
inlineconstexpr

Definition at line 327 of file SpecificIsobaricHeatCapacity.hpp.

◆ operator*=()

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

Definition at line 185 of file HeatCapacityRatio.hpp.

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

◆ operator+()

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

◆ operator+=()

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

Definition at line 177 of file HeatCapacityRatio.hpp.

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

◆ operator-()

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

◆ operator-=()

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

Definition at line 181 of file HeatCapacityRatio.hpp.

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

◆ operator/() [1/2]

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

Definition at line 172 of file HeatCapacityRatio.hpp.

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

◆ operator/() [2/2]

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

Definition at line 168 of file HeatCapacityRatio.hpp.

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

◆ operator/=()

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

Definition at line 189 of file HeatCapacityRatio.hpp.

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

◆ operator=() [1/3]

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

Copy assignment operator. Assigns this heat capacity ratio by copying another one.

◆ operator=() [2/3]

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

Copy assignment operator. Assigns this heat capacity ratio by copying another one.

Definition at line 133 of file HeatCapacityRatio.hpp.

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

◆ operator=() [3/3]

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

Move assignment operator. Assigns this heat capacity ratio 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.

◆ 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.

◆ 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 HeatCapacityRatio<NumericType> PhQ::HeatCapacityRatio< NumericType >::Zero ( )
inlinestaticconstexpr

Statically creates a heat capacity ratio of zero.

Definition at line 144 of file HeatCapacityRatio.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: