CoolProp
CoolProp::IdealHelmholtzContainer Class Reference

## Detailed Description

Term in the ideal-gas specific heat equation that is based on Aly-Lee formulation ** Specific heat is of the form:

• sympy code for this derivative:

from sympy import * a1,a2,a3,a4,a5,Tc,tau = symbols('a1,a2,a3,a4,a5,Tc,tau', real = True) integrand = a1 + a2*(a3/Tc/sinh(a3*tau/Tc))**2 + a4*(a5/Tc/cosh(a5*tau/Tc))**2 integrand = integrand.rewrite(exp) antideriv = trigsimp(integrate(integrand,tau)) display(antideriv) print latex(antideriv) print ccode(antideriv)

$// \displaystyle\int \frac{1}{\tau^2}\frac{c_p^0}{R_u}d\tau = -\frac{a_0}{\tau}+\frac{2a_1a_2}{T_c\left[\exp\left(-\frac{2a_2\tau}{T_c}\right)-1\right]}+\frac{2a_3a_4}{T_c\left[\exp\left(-\frac{2a_4\tau}{T_c}\right)+1\right]} //$

sympy code for this derivative:

a_0,a_1,a_2,a_3,a_4,Tc,tau = symbols('a_0,a_1,a_2,a_3,a_4,Tc,tau', real = True) integrand = a_0/tau + a_1/tau*(a_2*tau/Tc/sinh(a_2*tau/Tc))**2 + a_3/tau*(a_4*tau/Tc/cosh(a_4*tau/Tc))**2

term2 = a_1/tau*(a_2*tau/Tc/sinh(a_2*tau/Tc))**2 term2 = term2.rewrite(exp) # Unpack the sinh to exp functions antideriv2 = trigsimp(integrate(term2,tau)) display(antideriv2) print latex(antideriv2) print ccode(antideriv2)

term3 = a_3/tau*(a_4*tau/Tc/cosh(a_4*tau/Tc))**2 term3 = term3.rewrite(exp) # Unpack the cosh to exp functions antideriv3 = factor(trigsimp(integrate(term3,tau).rewrite(exp))) display(antideriv3) print latex(antideriv3) print ccode(antideriv3)

Can be broken into three parts (trick is to express $$sinh$$ and $$cosh$$ in terms of $$exp$$ function)

Term 2:

$// \displaystyle\int \frac{a_1a_2^2}{T_c^2}\frac{\tau}{\sinh\left(\displaystyle\frac{a_2\tau}{T_c}\right)^2} d\tau = \frac{2 a_{1} a_{2} \tau}{- Tc + Tc e^{- \frac{2 a_{2}}{Tc} \tau}} + a_{1} \log{\left (-1 + e^{- \frac{2 a_{2}}{Tc} \tau} \right )} + \frac{2 a_{1}}{Tc} a_{2} \tau //$

Term 3:

$// \displaystyle\int \frac{a_1a_2^2}{T_c^2}\frac{\tau}{\cosh\left(\displaystyle\frac{a_2\tau}{T_c}\right)^2} d\tau = - \frac{a_{3}}{Tc \left(e^{\frac{2 a_{4}}{Tc} \tau} + 1\right)} \left(Tc e^{\frac{2 a_{4}}{Tc} \tau} \log{\left (e^{\frac{2 a_{4}}{Tc} \tau} + 1 \right )} + Tc \log{\left (e^{\frac{2 a_{4}}{Tc} \tau} + 1 \right )} - 2 a_{4} \tau e^{\frac{2 a_{4}}{Tc} \tau}\right) //$

#include <Helmholtz.h>

Inheritance diagram for CoolProp::IdealHelmholtzContainer:

## Public Member Functions

void empty_the_EOS ()

HelmholtzDerivatives all (const CoolPropDbl tau, const CoolPropDbl delta, bool cache_values=false)

Public Member Functions inherited from CoolProp::BaseHelmholtzContainer
void clear ()

CoolPropDbl base (CoolPropDbl tau, CoolPropDbl delta, const bool dont_use_cache=false)

CoolPropDbl dDelta (CoolPropDbl tau, CoolPropDbl delta, const bool dont_use_cache=false)

CoolPropDbl dTau (CoolPropDbl tau, CoolPropDbl delta, const bool dont_use_cache=false)

CoolPropDbl dDelta2 (CoolPropDbl tau, CoolPropDbl delta, const bool dont_use_cache=false)

CoolPropDbl dDelta_dTau (CoolPropDbl tau, CoolPropDbl delta, const bool dont_use_cache=false)

CoolPropDbl dTau2 (CoolPropDbl tau, CoolPropDbl delta, const bool dont_use_cache=false)

CoolPropDbl dDelta3 (CoolPropDbl tau, CoolPropDbl delta, const bool dont_use_cache=false)

CoolPropDbl dDelta2_dTau (CoolPropDbl tau, CoolPropDbl delta, const bool dont_use_cache=false)

CoolPropDbl dDelta_dTau2 (CoolPropDbl tau, CoolPropDbl delta, const bool dont_use_cache=false)

CoolPropDbl dTau3 (CoolPropDbl tau, CoolPropDbl delta, const bool dont_use_cache=false)

CoolPropDbl dDelta4 (CoolPropDbl tau, CoolPropDbl delta, const bool dont_use_cache=false)

CoolPropDbl dDelta3_dTau (CoolPropDbl tau, CoolPropDbl delta, const bool dont_use_cache=false)

CoolPropDbl dDelta2_dTau2 (CoolPropDbl tau, CoolPropDbl delta, const bool dont_use_cache=false)

CoolPropDbl dDelta_dTau3 (CoolPropDbl tau, CoolPropDbl delta, const bool dont_use_cache=false)

CoolPropDbl dTau4 (CoolPropDbl tau, CoolPropDbl delta, const bool dont_use_cache=false)

## Public Attributes

IdealHelmholtzEnthalpyEntropyOffset EnthalpyEntropyOffsetCore

IdealHelmholtzEnthalpyEntropyOffset EnthalpyEntropyOffset

IdealHelmholtzLogTau LogTau

IdealHelmholtzPower Power

IdealHelmholtzPlanckEinsteinGeneralized PlanckEinstein

IdealHelmholtzCP0Constant CP0Constant

IdealHelmholtzCP0PolyT CP0PolyT

Protected Attributes inherited from CoolProp::BaseHelmholtzContainer
CachedElement _base

CachedElement _dDelta

CachedElement _dTau

CachedElement _dDelta2

CachedElement _dTau2

CachedElement _dDelta_dTau

CachedElement _dDelta3

CachedElement _dDelta2_dTau

CachedElement _dDelta_dTau2

CachedElement _dTau3

CachedElement _dDelta4

CachedElement _dDelta3_dTau

CachedElement _dDelta2_dTau2

CachedElement _dDelta_dTau3

CachedElement _dTau4

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