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

Isobaric heat capacity, also known as heat capacity at constant pressure. For the mass-specific isobaric heat capacity, see PhQ::SpecificIsobaricHeatCapacity. More...

#include "IsobaricHeatCapacity.hpp"

Public Member Functions

 IsobaricHeatCapacity ()=default
 Default constructor. Constructs an isobaric heat capacity with an uninitialized value. More...
 
 IsobaricHeatCapacity (const NumericType value, const Unit::HeatCapacity unit)
 Constructor. Constructs an isobaric heat capacity with a given value expressed in a given heat capacity unit. More...
 
constexpr IsobaricHeatCapacity (const IsochoricHeatCapacity< NumericType > &isochoric_heat_capacity, const GasConstant< NumericType > &gas_constant)
 Constructor. Constructs an isobaric heat capacity from a given gas constant and isochoric heat capacity using Mayer's relation. More...
 
constexpr IsobaricHeatCapacity (const HeatCapacityRatio< NumericType > &heat_capacity_ratio, const GasConstant< NumericType > &gas_constant)
 Constructor. Constructs an isobaric heat capacity from a given gas constant and heat capacity ratio using the definition of the heat capacity ratio and Mayer's relation. More...
 
constexpr IsobaricHeatCapacity (const HeatCapacityRatio< NumericType > &heat_capacity_ratio, const IsochoricHeatCapacity< NumericType > &isochoric_heat_capacity)
 Constructor. Constructs an isobaric heat capacity from a given isochoric heat capacity and heat capacity ratio using the definition of the specific heat ratio. More...
 
constexpr IsobaricHeatCapacity (const SpecificIsobaricHeatCapacity< NumericType > &specific_isobaric_heat_capacity, const Mass< NumericType > &mass)
 Constructor. Constructs an isobaric heat capacity from a given specific isobaric heat capacity and mass using the definition of the specific isobaric heat capacity. More...
 
 ~IsobaricHeatCapacity () noexcept=default
 Destructor. Destroys this isobaric heat capacity. More...
 
constexpr IsobaricHeatCapacity (const IsobaricHeatCapacity< NumericType > &other)=default
 Copy constructor. Constructs an isobaric heat capacity by copying another one. More...
 
template<typename OtherNumericType >
constexpr IsobaricHeatCapacity (const IsobaricHeatCapacity< OtherNumericType > &other)
 Copy constructor. Constructs a isobaric heat capacity by copying another one. More...
 
constexpr IsobaricHeatCapacity (IsobaricHeatCapacity< NumericType > &&other) noexcept=default
 Move constructor. Constructs an isobaric heat capacity by moving another one. More...
 
constexpr IsobaricHeatCapacity< NumericType > & operator= (const IsobaricHeatCapacity< NumericType > &other)=default
 Copy assignment operator. Assigns this isobaric heat capacity by copying another one. More...
 
template<typename OtherNumericType >
constexpr IsobaricHeatCapacity< NumericType > & operator= (const IsobaricHeatCapacity< OtherNumericType > &other)
 Copy assignment operator. Assigns this isobaric heat capacity by copying another one. More...
 
constexpr IsobaricHeatCapacity< NumericType > & operator= (IsobaricHeatCapacity< NumericType > &&other) noexcept=default
 Move assignment operator. Assigns this isobaric heat capacity by moving another one. More...
 
constexpr IsobaricHeatCapacity< NumericType > operator+ (const IsobaricHeatCapacity< NumericType > &isobaric_heat_capacity) const
 
constexpr IsobaricHeatCapacity< NumericType > operator- (const IsobaricHeatCapacity< NumericType > &isobaric_heat_capacity) const
 
constexpr GasConstant< NumericType > operator- (const IsochoricHeatCapacity< NumericType > &isochoric_heat_capacity) const
 
constexpr IsochoricHeatCapacity< NumericType > operator- (const GasConstant< NumericType > &gas_constant) const
 
constexpr IsobaricHeatCapacity< NumericType > operator* (const NumericType number) const
 
constexpr IsobaricHeatCapacity< NumericType > operator/ (const NumericType number) const
 
constexpr NumericType operator/ (const IsobaricHeatCapacity< NumericType > &isobaric_heat_capacity) const noexcept
 
constexpr SpecificIsobaricHeatCapacity< NumericType > operator/ (const Mass< NumericType > &mass) const
 
constexpr Mass< NumericType > operator/ (const SpecificIsobaricHeatCapacity< NumericType > &specific_isobaric_heat_capacity) const
 
constexpr HeatCapacityRatio< NumericType > operator/ (const IsochoricHeatCapacity< NumericType > &isochoric_heat_capacity) const
 
constexpr IsochoricHeatCapacity< NumericType > operator/ (const HeatCapacityRatio< NumericType > &heat_capacity_ratio) const
 
constexpr void operator+= (const IsobaricHeatCapacity< NumericType > &isobaric_heat_capacity) noexcept
 
constexpr void operator-= (const IsobaricHeatCapacity< NumericType > &isobaric_heat_capacity) 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::HeatCapacity 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::HeatCapacity 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::HeatCapacity 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::HeatCapacity 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::HeatCapacity 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 IsobaricHeatCapacity< NumericType > Zero ()
 Statically creates an isobaric heat capacity of zero. More...
 
template<Unit::HeatCapacity Unit>
static constexpr IsobaricHeatCapacity< NumericType > Create (const NumericType value)
 Statically creates an isobaric heat capacity with a given value expressed in a given heat capacity unit. More...
 
static constexpr const PhQ::DimensionsDimensions ()
 Physical dimension set of this physical quantity. More...
 
static constexpr Unit::HeatCapacity 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 IsobaricHeatCapacity (const NumericType value)
 Constructor. Constructs an isobaric heat capacity with a given value expressed in the standard heat capacity unit. More...
 

Detailed Description

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

Isobaric heat capacity, also known as heat capacity at constant pressure. For the mass-specific isobaric heat capacity, see PhQ::SpecificIsobaricHeatCapacity.

Definition at line 42 of file IsobaricHeatCapacity.hpp.

Constructor & Destructor Documentation

◆ IsobaricHeatCapacity() [1/10]

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

Default constructor. Constructs an isobaric heat capacity with an uninitialized value.

◆ IsobaricHeatCapacity() [2/10]

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

Constructor. Constructs an isobaric heat capacity with a given value expressed in a given heat capacity unit.

Definition at line 49 of file IsobaricHeatCapacity.hpp.

◆ IsobaricHeatCapacity() [3/10]

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

Constructor. Constructs an isobaric heat capacity from a given gas constant and isochoric heat capacity using Mayer's relation.

Definition at line 251 of file GasConstant.hpp.

◆ IsobaricHeatCapacity() [4/10]

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

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

Definition at line 257 of file GasConstant.hpp.

◆ IsobaricHeatCapacity() [5/10]

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

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

Definition at line 64 of file IsobaricHeatCapacity.hpp.

◆ IsobaricHeatCapacity() [6/10]

template<typename NumericType >
constexpr PhQ::IsobaricHeatCapacity< NumericType >::IsobaricHeatCapacity ( const SpecificIsobaricHeatCapacity< NumericType > &  specific_isobaric_heat_capacity,
const Mass< NumericType > &  mass 
)
inlineconstexpr

Constructor. Constructs an isobaric heat capacity from a given specific isobaric heat capacity and mass using the definition of the specific isobaric heat capacity.

Definition at line 307 of file SpecificIsobaricHeatCapacity.hpp.

◆ ~IsobaricHeatCapacity()

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

Destructor. Destroys this isobaric heat capacity.

◆ IsobaricHeatCapacity() [7/10]

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

Copy constructor. Constructs an isobaric heat capacity by copying another one.

◆ IsobaricHeatCapacity() [8/10]

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

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

Definition at line 83 of file IsobaricHeatCapacity.hpp.

◆ IsobaricHeatCapacity() [9/10]

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

Move constructor. Constructs an isobaric heat capacity by moving another one.

◆ IsobaricHeatCapacity() [10/10]

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

Constructor. Constructs an isobaric heat capacity with a given value expressed in the standard heat capacity unit.

Definition at line 184 of file IsobaricHeatCapacity.hpp.

Member Function Documentation

◆ Create()

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

Statically creates an isobaric heat capacity with a given value expressed in a given heat capacity unit.

Definition at line 113 of file IsobaricHeatCapacity.hpp.

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

◆ Dimensions()

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

◆ operator*=()

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

◆ operator+()

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

◆ operator+=()

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

◆ operator-() [1/3]

template<typename NumericType >
constexpr IsochoricHeatCapacity< NumericType > PhQ::IsobaricHeatCapacity< NumericType >::operator- ( const GasConstant< NumericType > &  gas_constant) const
inlineconstexpr

Definition at line 276 of file GasConstant.hpp.

◆ operator-() [2/3]

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

◆ operator-() [3/3]

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

Definition at line 270 of file GasConstant.hpp.

◆ operator-=()

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

◆ operator/() [1/6]

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

Definition at line 158 of file IsobaricHeatCapacity.hpp.

◆ operator/() [2/6]

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

◆ operator/() [3/6]

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

Definition at line 153 of file IsobaricHeatCapacity.hpp.

◆ operator/() [4/6]

template<typename NumericType >
constexpr SpecificIsobaricHeatCapacity< NumericType > PhQ::IsobaricHeatCapacity< NumericType >::operator/ ( const Mass< NumericType > &  mass) const
inlineconstexpr

Definition at line 341 of file SpecificIsobaricHeatCapacity.hpp.

◆ operator/() [5/6]

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

◆ operator/() [6/6]

template<typename NumericType >
constexpr Mass< NumericType > PhQ::IsobaricHeatCapacity< NumericType >::operator/ ( const SpecificIsobaricHeatCapacity< NumericType > &  specific_isobaric_heat_capacity) const
inlineconstexpr

Definition at line 346 of file SpecificIsobaricHeatCapacity.hpp.

◆ operator/=()

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

◆ operator=() [1/3]

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

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

◆ operator=() [2/3]

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

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

Definition at line 95 of file IsobaricHeatCapacity.hpp.

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

◆ operator=() [3/3]

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

Move assignment operator. Assigns this isobaric heat capacity by moving another one.

◆ Print() [1/2]

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

Statically creates an isobaric heat capacity of zero.

Definition at line 106 of file IsobaricHeatCapacity.hpp.

Member Data Documentation

◆ value

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