JavaScript wrapper - can't calculate T of predefined mixture R407F.MIX

87 views
Skip to first unread message

Viktor De Knibber

unread,
Jan 27, 2022, 8:44:26 AM1/27/22
to coolprop-users
Hi,

Is it possible that there is an error in the calculation of the temperature in R407F or am I doing something wrong?
I'm trying to calculate it using pressure and enthalpy, but always get Infinity as the result. Other calculations with this mixture give no problem, so I'm assuming CoolProp is configured correctly. I tested the function for CO2 and there I never get Infinity.

Simplest example that returns Infinity:
CoolProp.PropsSI('T', 'P', 2000000, 'H', 450000, 'R407F.MIX')

I'm able to provide more examples if needed.
Thank you very much in advance!

Kind regards,
Viktor

Ian Bell

unread,
Jan 28, 2022, 5:25:31 PM1/28/22
to coolpro...@googlegroups.com
What error do you get ? Mixture iterative routines in CoolProp are not that reliable. 

--
You received this message because you are subscribed to the Google Groups "coolprop-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coolprop-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/coolprop-users/6f60c1e1-ebf0-49f8-b626-194d4ea2ed68n%40googlegroups.com.

Viktor De Knibber

unread,
Jan 29, 2022, 2:09:45 PM1/29/22
to coolprop-users
The result is Infinity (which is a "valid" number in JavaScript) every single time when calculating from pressure and enthalpy.
Unfortunately, at that point in my calculations, I have no other props to calculate from, so I can't circumvent the problem using other props.

The expected result from the example should be around 334K.

const temperature = CoolProp.PropsSI('T', 'P', 2000000, 'H', 450000, 'R407F.MIX');
console.log(temperature); // result: Infinity, expected: 334

Op vrijdag 28 januari 2022 om 23:25:31 UTC+1 schreef ian.h...@gmail.com:

Ian Bell

unread,
Jan 29, 2022, 5:34:53 PM1/29/22
to coolpro...@googlegroups.com
Not much more I can recommend, unfortunately,  aside from doing the solving yourself in terms of density and temperature. 

Viktor De Knibber

unread,
Feb 9, 2022, 7:33:28 AM2/9/22
to coolprop-users
Unfortunately not a single property I have tried (density, viscosity, temperature) can be calculated from pressure and enthalpy.
Is this what you mean with iterative routines (calculating from pressure and enthalpy)?

What is an example of a non-iterative routine?

Thank you!

Op zaterdag 29 januari 2022 om 23:34:53 UTC+1 schreef ian.h...@gmail.com:

David Contreras

unread,
Apr 25, 2022, 6:32:27 PM4/25/22
to coolprop-users
Hi Viktor,

There is no "R407F" on the list of fluids from the documentation.

In JavaScript everytime you put a fluid name that is not on the documentation you get an infinity.
Module.PropsSI('T', 'P', 2000000, 'H', 450000, 'BadFluidName')
--> Infinity

I think you could get some approximate results from using "R404a" according to:

Thus:
Module.PropsSI('T', 'P', 2000000, 'H', 450000, 'R404A')

--> 372.4465178839852 [K]

and validating with

Remembering that:

Enthalpy and entropy are relative properties! You should always be comparing differences in enthalpy rather than absolute values of the enthalpy or entropy.

Viktor De Knibber

unread,
Aug 4, 2022, 11:58:16 AM8/4/22
to coolprop-users
Hi,

R407F.MIX is a valid mixture to use for the PropsSI function (feel free to try it out!).
However, I had only read the documentation diagonally and missed an important segment on the following page under Theoretical description:

The only types of inputs that are allowed for mixtures right now are
  • Pressure/quality
  • Temperature/quality
  • Temperature/pressure
With this information, it is only logical that I got an invalid result.
I managed to work around this by using a regular formula to get an estimation for my temperature.

Thank you!

Kind regards,
Viktor
Op dinsdag 26 april 2022 om 00:32:27 UTC+2 schreef dvd...@gmail.com:
Reply all
Reply to author
Forward
0 new messages