CoolProp 8.0.0
An open-source fluid property and humid air property database
Public Member Functions | Protected Types | Protected Attributes | List of all members
CoolProp::MeltingCaloric Class Reference

Detailed Description

Caloric properties along the solid-liquid melting curve, parametrized by ln(p) (the monotone curve variable; T is double-valued on water's curve).

Definition at line 20 of file MeltingCaloric.h.

#include <MeltingCaloric.h>

Public Member Functions

 MeltingCaloric ()=default
 
void sample (HelmholtzEOSMixtureBackend &H, std::size_t n)
 
std::size_t n_samples () const
 
double sample_lnp (std::size_t i) const
 
double sample_T (std::size_t i) const
 
double sample_rho (std::size_t i) const
 
double sample_h (std::size_t i) const
 
double sample_s (std::size_t i) const
 
void build (HelmholtzEOSMixtureBackend &H)
 sample() probe + per-segment Chebyshev fits vs ln(p). Idempotent; sets built()==true on success. More...
 
bool built () const
 
double lnp_min () const
 
double lnp_max () const
 
double eval_T (double lnp) const
 
double eval_rho (double lnp) const
 
double eval_h (double lnp) const
 
double eval_s (double lnp) const
 
bool seed_for_hs (double s_cache, double h_cache, double &T0, double &rho0) const
 
std::optional< std::pair< double, double > > stamp () const
 
double curve_Tmin () const
 

Protected Types

using Approx = CoolProp::superancillary::ChebyshevApproximation1D< Eigen::ArrayXd >
 

Protected Attributes

std::vector< double > m_lnp
 
std::vector< double > m_T
 
std::vector< double > m_rho
 
std::vector< double > m_h
 
std::vector< double > m_s
 
bool m_built = false
 
std::optional< Approxm_T_approx
 
std::optional< Approxm_rho_approx
 
std::optional< Approxm_h_approx
 
std::optional< Approxm_s_approx
 
std::optional< std::pair< double, double > > m_stamp
 
double m_curve_Tmin = 0.0
 

Member Typedef Documentation

◆ Approx

Definition at line 96 of file MeltingCaloric.h.

Constructor & Destructor Documentation

◆ MeltingCaloric()

CoolProp::MeltingCaloric::MeltingCaloric ( )
default

Member Function Documentation

◆ build()

void CoolProp::MeltingCaloric::build ( HelmholtzEOSMixtureBackend H)

sample() probe + per-segment Chebyshev fits vs ln(p). Idempotent; sets built()==true on success.

Definition at line 206 of file MeltingCaloric.cpp.

◆ built()

bool CoolProp::MeltingCaloric::built ( ) const
inline

Definition at line 50 of file MeltingCaloric.h.

◆ curve_Tmin()

double CoolProp::MeltingCaloric::curve_Tmin ( ) const
inline

Minimum temperature on the melting curve (may be below the triple-point T for fluids like water that fold back, e.g. ~251 K for water). Returns 0.0 if build() has not completed successfully.

Definition at line 89 of file MeltingCaloric.h.

◆ eval_h()

double CoolProp::MeltingCaloric::eval_h ( double  lnp) const
inline

Definition at line 67 of file MeltingCaloric.h.

◆ eval_rho()

double CoolProp::MeltingCaloric::eval_rho ( double  lnp) const
inline

Definition at line 64 of file MeltingCaloric.h.

◆ eval_s()

double CoolProp::MeltingCaloric::eval_s ( double  lnp) const
inline

Definition at line 70 of file MeltingCaloric.h.

◆ eval_T()

double CoolProp::MeltingCaloric::eval_T ( double  lnp) const
inline

Definition at line 61 of file MeltingCaloric.h.

◆ lnp_max()

double CoolProp::MeltingCaloric::lnp_max ( ) const
inline

Definition at line 57 of file MeltingCaloric.h.

◆ lnp_min()

double CoolProp::MeltingCaloric::lnp_min ( ) const
inline

Definition at line 54 of file MeltingCaloric.h.

◆ n_samples()

std::size_t CoolProp::MeltingCaloric::n_samples ( ) const
inline

Definition at line 29 of file MeltingCaloric.h.

◆ sample()

void CoolProp::MeltingCaloric::sample ( HelmholtzEOSMixtureBackend H,
std::size_t  n 
)

Walk the melting curve over [pmin, pmax] into raw (lnp, T, rho, h, s) samples. n>=8. EOS density/caloric come from update(PT_INPUTS,...).

Definition at line 18 of file MeltingCaloric.cpp.

◆ sample_h()

double CoolProp::MeltingCaloric::sample_h ( std::size_t  i) const
inline

Definition at line 41 of file MeltingCaloric.h.

◆ sample_lnp()

double CoolProp::MeltingCaloric::sample_lnp ( std::size_t  i) const
inline

Definition at line 32 of file MeltingCaloric.h.

◆ sample_rho()

double CoolProp::MeltingCaloric::sample_rho ( std::size_t  i) const
inline

Definition at line 38 of file MeltingCaloric.h.

◆ sample_s()

double CoolProp::MeltingCaloric::sample_s ( std::size_t  i) const
inline

Definition at line 44 of file MeltingCaloric.h.

◆ sample_T()

double CoolProp::MeltingCaloric::sample_T ( std::size_t  i) const
inline

Definition at line 35 of file MeltingCaloric.h.

◆ seed_for_hs()

bool CoolProp::MeltingCaloric::seed_for_hs ( double  s_cache,
double  h_cache,
double &  T0,
double &  rho0 
) const

Find a (T0, rho0) seed for a target whose caloric values are expressed in THIS object's build frame (s_cache, h_cache). Returns false if no melting- line entropy intersection exists. Disambiguates multiple intersections by closeness in enthalpy.

Definition at line 166 of file MeltingCaloric.cpp.

◆ stamp()

std::optional< std::pair< double, double > > CoolProp::MeltingCaloric::stamp ( ) const
inline

The (a1, a2) alpha0 offset pair that was active when build() was called, or nullopt if build() has not completed successfully.

Definition at line 82 of file MeltingCaloric.h.

Member Data Documentation

◆ m_built

bool CoolProp::MeltingCaloric::m_built = false
protected

Definition at line 97 of file MeltingCaloric.h.

◆ m_curve_Tmin

double CoolProp::MeltingCaloric::m_curve_Tmin = 0.0
protected

Definition at line 100 of file MeltingCaloric.h.

◆ m_h

std::vector<double> CoolProp::MeltingCaloric::m_h
protected

Definition at line 94 of file MeltingCaloric.h.

◆ m_h_approx

std::optional<Approx> CoolProp::MeltingCaloric::m_h_approx
protected

Definition at line 98 of file MeltingCaloric.h.

◆ m_lnp

std::vector<double> CoolProp::MeltingCaloric::m_lnp
protected

Definition at line 94 of file MeltingCaloric.h.

◆ m_rho

std::vector<double> CoolProp::MeltingCaloric::m_rho
protected

Definition at line 94 of file MeltingCaloric.h.

◆ m_rho_approx

std::optional<Approx> CoolProp::MeltingCaloric::m_rho_approx
protected

Definition at line 98 of file MeltingCaloric.h.

◆ m_s

std::vector<double> CoolProp::MeltingCaloric::m_s
protected

Definition at line 94 of file MeltingCaloric.h.

◆ m_s_approx

std::optional<Approx> CoolProp::MeltingCaloric::m_s_approx
protected

Definition at line 98 of file MeltingCaloric.h.

◆ m_stamp

std::optional<std::pair<double, double> > CoolProp::MeltingCaloric::m_stamp
protected

Definition at line 99 of file MeltingCaloric.h.

◆ m_T

std::vector<double> CoolProp::MeltingCaloric::m_T
protected

Definition at line 94 of file MeltingCaloric.h.

◆ m_T_approx

std::optional<Approx> CoolProp::MeltingCaloric::m_T_approx
protected

Definition at line 98 of file MeltingCaloric.h.


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