Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REFPROP ver.10 (PHFLSH error 248, Ethylene glycol and water) #587

Open
StoneRockSteel opened this issue Mar 10, 2023 · 4 comments
Open

REFPROP ver.10 (PHFLSH error 248, Ethylene glycol and water) #587

StoneRockSteel opened this issue Mar 10, 2023 · 4 comments

Comments

@StoneRockSteel
Copy link

I’ve tried to find the thermal properties of ethylene glycol and water mixture.
There seem to be problem with getting the properties of the mixture fluid.
The procedure I’ve done is like below.

Mixture: Ethylene glycol (50%), Water(50%) (Mass % base)

First, call enthalpy with pressure and temperature.
(P: 3.5barg, T: 11degC, Result h: -217.52kJ/kg)

And next,, call temperature with pressure and enthalpy. (Here, enthalpy come from above the value.)
However, there is error message (PHFLSH error248) and I can’t get the pressure value with temperature and enthalpy.
(P: 3.5barg, h: -217.52kJ/kg, Result T: [PHFLSH error 248] Single-phase iteration did not converge for P=0.350000MPa and H=-6074.36J/mol.)

How can I get the correct property value of the ethylene glycol and water mixture?

Versions

**REFPROP Version: REFPROP ver.10
**Operating System and Version: Windows10 64bit
**Access Method: EXCEL/VBA

@ianhbell
Copy link
Contributor

Make sure you enable saturation splines with the calls in the VBA code

@StoneRockSteel
Copy link
Author

Yes. I'm struggling to find the Eglycol water mixture temperature with pressure and enthalpy depending on your advice.
However, I still have a problem with getting the properties of the Eglycol water mixture.
P: 2.5barg, T: 10degC -> h: -518.276kJ/kg
enthalpy difference: -66.842kJ/kg
And then,
P: 1barg, h: -585.118kJ/kg -> T: #VALUE!
(In other thermal property calculation program, T: -10.01degC)

How can I solve this problem?

@nist-aharvey
Copy link

As a first step, I would try seeing if the "easier" calculation of the final state as a function of T and P worked -- input T=-10 degC and p=1 barg and see if you get near the expected enthalpy. If that calculation works, that means that the problem is in the convergence of the iterative routine that solves as a function of (p,h). @ianhbell may have suggestions for helping that.
You might also try using mole fractions for your mixture (that is the natural measure for mixture thermodynamics that REFPROP uses internally); I believe there are a few cases where mass fractions are not handled correctly in REFPROP 10.0.

@ianhbell -- I sort of doubt that saturation splines would help (although it is worth trying), since the liquid mixture as described is not anywhere close to the V/L saturation boundary.

@ianhbell
Copy link
Contributor

I agree, this seems like a bug in REFPROP. I tried to do the calls to REFPROP via CoolProp because CoolProp handles the mass fractions properly, but got the same bug. Python:

import CoolProp.CoolProp as CP 
import os
os.environ['RPPREFIX'] = os.getenv('HOME')+'/REFPROP10'

CP.set_config_string(CP.ALTERNATIVE_REFPROP_PATH, os.getenv('RPPREFIX'))

AS = CP.AbstractState('REFPROP','EGLYCOL&WATER')
AS.set_mass_fractions([0.5, 0.5])
AS.update(CP.PT_INPUTS, 3.5e5+101325, -11+273.15)
print(AS.hmass())

AS.update(CP.HmassP_INPUTS, AS.hmass(), AS.p())
print(AS.T())
-287615.25259259256
Traceback (most recent call last):
  File "/Users/ihb/Desktop/issues/import CoolProp.py", line 12, in <module>
    AS.update(CP.HmassP_INPUTS, AS.hmass(), AS.p())
  File "CoolProp/AbstractState.pyx", line 102, in CoolProp.CoolProp.AbstractState.update
  File "CoolProp/AbstractState.pyx", line 104, in CoolProp.CoolProp.AbstractState.update
ValueError: HmolarPmolar: One or more inputs are out of range; Temperature below triple-point or minimum temperature: T = 193.784 K, Tmin = 239.401 K; Density above upper limit: D = 50.1240 mol/L, Dmax = 48.7256 mol/L.   

@ianhbell ianhbell added the bug label May 22, 2024
@ianhbell ianhbell added the flash label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants