usnistgov / REFPROP-wrappers

Wrappers around NIST REFPROP for languages such as Python, MATLAB, etc.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ammonia water mixture flash convergence issue

Eugene-vanHeerden opened this issue · comments

Using:
REFPROP 10.
Visual Studio 2022
Windows 10 with all updates installed.

In my mind this is not an API/wrapper question, but a mixture modelling question, however the response to our email question directed us to post our question here.

We are trying to generate a table of properties for an ammonia-water mixture using the REFPROP 10 API called from C++ code. I have tried using the *.MIX similar to the files that are provided for refrigerant mixtures using this content (the values were obtained from the REFPROP program using water and ammonia at 0.24 and 0.76 mass fractions):

“Ammonia-Water
17.2672272 492.2 18.163 15.31571902
2
AMMONIA.FLD
WATER.FLD
0.77010286055214516
0.22989713944785495
0”

I have also tried using the SETUPdll function with ammonia and water *.FLD files as fluid specification and the "HMX.BNC” file that ships with REFPROP.

In both cases we are able to calculate all the points on the two phase dome as well as most of the properties in the sub-cooled region. However, the PHFLSHdll does not converge (error # 226) for thermodynamic conditions inside the dome that should be physical for example: pressure, 300.348 kPa and enthalpy 1400.521 J/mol (81.1 kJ.kg): this should correspond to a quality of approximately 0.005.

Furthermore; for both these methods a call to SURFTdll results in error # 518 stating that surface tension calculations for this mixture is not supported.

I know that there is a great interest in the ammonia water mixture and that you have done a lot of work on this mixture properties:

  1. Is there a better approach that will render more consistent converging solutions for the PHFLSHdll calculations?
  2. Is the pressure in my example above outside the range where the mixture formulations are applicable?
  3. Is there a way to get REFPROP to calculate the surface tension for this mixture? Or can you suggest a method for determining a good approximation of the surface tension for ammonia-water mixtures?

Thanks
Eugene

Unfortunately about the only recommendation we can make in cases like these is to ensure that the saturation splines are on. If you have a good guess for the statepoint, you can also do the iteration yourself. It isn't too tricky because you can get at the entries needed in the Jacobian from Refprop.

Wow. . . thanks Ian for the very quick response. It is much appreciated.

  1. I have read on one of the REFPROP forums that there is an ammoniaL.fld file for use with REFPROP 9. Is there any sense in trying it or any of the approaches implied in its use?
  2. Do you have any recommendation regarding estimating the surface tension for ammonia water mixtures?

-Eugene

  1. That is only for if you want to use the old Tillner-Roth model that we tried (and partially succeeded) to improve upon with our new model. The Tillner-Roth and Friend model cannot be combined with any other mixture in REFPROP
  2. Sorry, not my domain of expertise. Perhaps you could email Marcia Huber: https://www.nist.gov/people/marcia-l-huber . She is involved with the surface tension models in REFPROP.

While this does not represent a thorough search, I find a few sources of experimental data for the surface tension of ammonia-water mixtures. Mostly around room temperature, so maybe not covering your conditions of interest, but they could at least provide sanity checks for the mixture model used in REFPROP. Since that model is constrained to interpolate between pure water and pure ammonia (both of which are known reasonably well), I might expect it to at least be physically reasonable, but quantitative accuracy matching experiment seems unlikely for such a nonideal mixture.

https://doi.org/10.1021/ja01375a073
https://doi.org/10.1021/j150286a009
and (in Russian)
Efremov, Yu. V.; Golubev, I. F.
Surface tension of aqueous ammonia solutions
Zh. Fiz. Khim., 1962, 36, 999-1000