mirror of
https://github.com/CoolProp/CoolProp.git
synced 2026-01-22 12:28:04 -05:00
Fix p_triple and p_min for REFPROP backend
This commit is contained in:
@@ -612,6 +612,27 @@ CoolPropDbl REFPROPMixtureBackend::calc_Ttriple(){
|
||||
return static_cast<CoolPropDbl>(Tmin);
|
||||
}
|
||||
};
|
||||
CoolPropDbl REFPROPMixtureBackend::calc_p_triple(){
|
||||
this->check_loaded_fluid();
|
||||
double p_kPa = _HUGE;
|
||||
try{
|
||||
double rho_mol_L=_HUGE, rhoLmol_L=_HUGE, rhoVmol_L=_HUGE,
|
||||
hmol=_HUGE,emol=_HUGE,smol=_HUGE,cvmol=_HUGE,cpmol=_HUGE,
|
||||
w=_HUGE;
|
||||
long ierr = 0;
|
||||
char herr[errormessagelength+1];
|
||||
long kq = 1;
|
||||
double __T = Ttriple(), __Q = 0;
|
||||
TQFLSHdll(&__T,&__Q,&(mole_fractions[0]),&kq,&p_kPa,&rho_mol_L,
|
||||
&rhoLmol_L,&rhoVmol_L,&(mole_fractions_liq[0]),&(mole_fractions_vap[0]), // Saturation terms
|
||||
&emol,&hmol,&smol,&cvmol,&cpmol,&w, // Other thermodynamic terms
|
||||
&ierr,herr,errormessagelength); // Error terms
|
||||
}
|
||||
catch(...){
|
||||
throw ValueError(format("Unable to calculate triple point pressure"));
|
||||
}
|
||||
return p_kPa*1000;
|
||||
};
|
||||
CoolPropDbl REFPROPMixtureBackend::calc_dipole_moment(){
|
||||
// subroutine INFO (icomp,wmm,ttrp,tnbpt,tc,pc,Dc,Zc,acf,dip,Rgas)
|
||||
// c
|
||||
|
||||
@@ -151,6 +151,8 @@ public:
|
||||
CoolPropDbl calc_T_critical(void);
|
||||
CoolPropDbl calc_T_reducing(void);
|
||||
CoolPropDbl calc_p_critical(void);
|
||||
CoolPropDbl calc_p_triple(void);
|
||||
CoolPropDbl calc_p_min(void){return calc_p_triple();};
|
||||
CoolPropDbl calc_rhomolar_critical(void);
|
||||
CoolPropDbl calc_rhomolar_reducing(void);
|
||||
CoolPropDbl calc_Ttriple(void);
|
||||
|
||||
Reference in New Issue
Block a user