12#ifndef BELFEM_CL_GM_HELMHOLTZ_METHANE_HPP
13#define BELFEM_CL_GM_HELMHOLTZ_METHANE_HPP
143 update_delta_pow_d()
const;
148 update_tau_pow_theta()
const;
158 EoS_Methane::update_e()
const
160 if(
mTau != mE( 0 ) )
163 mE( 3 ) = std::exp( mB( 3 ) *
mTau ) ;
164 mE( 4 ) = std::exp( mB( 4 ) *
mTau ) ;
165 mE( 5 ) = std::exp( mB( 5 ) *
mTau ) ;
166 mE( 6 ) = std::exp( mB( 6 ) *
mTau ) ;
167 mE( 7 ) = std::exp( mB( 7 ) *
mTau ) ;
174 EoS_Methane::update_f()
const
176 this->update_tau_pow_theta() ;
177 this->update_delta_pow_d() ;
181 for(
uint k=0; k<40; ++k )
183 mF( k ) = mN( k ) * mDeltaPowD( k ) * mTauPowT( k ) ;
194 EoS_Methane::update_g()
const
200 mG( 13 ) = std::exp( -
mDelta );
228 for(
uint k=36; k<40; ++k )
231 mAlpha( k ) * std::pow(
mDelta - mPsi( k ) , 2 )
232 + mBeta( k ) * std::pow(
mTau - mGamma( k ), 2 ) );
243 EoS_Methane::update_delta_pow_d()
const
245 if(
mDelta != mDeltaPowD( 40 ) )
250 for(
uint k=0; k<40; ++k )
254 for(
uint i=0;
i<mD( k ); ++
i )
259 mDeltaPowD( k ) = tPow ;
265 mDeltaPowD( 40 ) =
mDelta ;
272 EoS_Methane::update_tau_pow_theta()
const
274 if(
mTau != mTauPowT( 40 ) )
280 const real tSqrtTau = std::sqrt(
mTau ) ;
282 for(
uint k=0; k<40; ++k )
284 const int tN =
static_cast< int >( std::lround( 2.0 * mT( k ) ) );
287 "tau exponent %f of term %u is not a multiple of one half",
288 (
float ) mT( k ), (
unsigned int ) k );
290 mTauPowT( k ) =
hpow(
mTau, tSqrtTau, tN );
293 mTauPowT( 40 ) =
mTau ;
#define BELFEM_ASSERT(aCheck,...)
Definition assert.hpp:244
The gas class that provides the fluid model.
Definition cl_Gas.hpp:81
real compute_phi0() const
Definition cl_GM_EoS_Methane.cpp:142
EoS_Methane(Gas &aParent)
Definition cl_GM_EoS_Methane.cpp:22
real compute_phir() const
Definition cl_GM_EoS_Methane.cpp:191
real compute_phir_dd() const
Definition cl_GM_EoS_Methane.cpp:245
real compute_phi0_t() const
Definition cl_GM_EoS_Methane.cpp:159
real compute_phi0_tt() const
Definition cl_GM_EoS_Methane.cpp:175
real compute_phir_t() const
Definition cl_GM_EoS_Methane.cpp:285
real compute_phir_dt() const
Definition cl_GM_EoS_Methane.cpp:351
real compute_phir_d() const
Definition cl_GM_EoS_Methane.cpp:214
real compute_phir_tt() const
Definition cl_GM_EoS_Methane.cpp:315
Helmholtz(Gas &aParent, const string &aLabel)
Definition cl_GM_Helmholtz.cpp:25
const real & mTau
Definition cl_GM_Helmholtz.hpp:115
static real ipow(real x, uint n)
integer power by binary exponentiation, for the coefficient tables of the residual functions.
Definition cl_GM_Helmholtz.hpp:512
static real hpow(const real x, const real sqrt_x, const int n)
x^( n / 2 ) for a signed half integer exponent given as n = 2j.
Definition cl_GM_Helmholtz.hpp:538
const real & mDelta
Definition cl_GM_Helmholtz.hpp:116
USER GUIDES:
Definition cl_Capacitor.cpp:16
unsigned int uint
Definition typedefs.hpp:30
double real
Definition typedefs.hpp:36