Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

May 24, 2019
04:24 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

May 24, 2019
04:24 PM

CoolProp 6.3.0 Released - Wrappers for Mathcad 15 and Prime

Since we can't post on the Tips forum, I'll leave this here...

**Coolprop** version 6.3.0 is released. **Coolprop** is an open-source C++ library that implements:

- Pure and pseudo-pure fluid equations of state and transport properties for 122 components
- Mixture properties using high-accuracy Helmholtz energy formulations
- Correlations of properties of incompressible fluids and brines
- Highest accuracy psychrometric routines (Humid Air properties)
- User-friendly interface around the full capabilities of NIST REFPROP (if you own REFPROP already)
- Fast IAPWS-IF97 (Industrial Formulation) for Water/Steam

Fully featured wrappers are available for both **Mathcad 15** and **Mathcad Prime** as Add-in DLLs. Documentation can be found at http:/www.coolprop.org. Instructions for downloading the Add-in wrappers from SourceForge for either version of Mathcad can be found here. A Mathcad worksheet is included with the DLL that demonstrates how to use the add-in.

Solved! Go to Solution.

Labels:

ACCEPTED SOLUTION

Accepted Solutions

Nov 30, 2023
06:54 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Nov 30, 2023
06:54 PM

Yep. That's .045% relative error in Cp between IF97 and IAPWS-95. To be expected. These are the differences between IAPWS-95 and IF97.

The IF97 computational validation points match the verification points in IAPWS R7-97(2012) to 8 decimal places in most cases.

22 REPLIES 22

May 29, 2019
02:56 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

May 29, 2019
02:56 AM

The CoolPro uses the IAPWS-95 not the IAPWS-IF97 formulation! It is a bag!

Jun 05, 2019
07:53 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jun 05, 2019
07:53 PM

Not true. I spent the last year coding IF97 into it. You just use the fluid "IF97::Water" instead of "Water". This calls the IAPWS-IF97 backend, which is now included. See the docs.

The Mathcad add-in was re-implemented in version 6.0.0 and full IF97 was implemented in 6.2.0.

Jun 06, 2019
05:52 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jun 06, 2019
05:52 AM

Last Maple uses CoolProp with IAPWS-95 formulation!

One my fine picture

Jun 06, 2019
06:56 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jun 06, 2019
06:56 AM

Again, please read the documentation. Just use the fluid ** "IF97::Water"** instead of just "Water" or "HEOS::Water"; the HEOS implementation is IAPWS-95. There's no reason this won't work in the Maple wrapper as well. It's been tested in Python, Mathcad, and Excel wrappers. You might have to download the latest version of CoolProp if Maple is distributing an older version. Version 6.3.0 is hot off the press, so I doubt they have it yet in their distribution.

Jun 06, 2019
07:04 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jun 06, 2019
07:04 AM

I see that the latest Maple 2018 release only includes CoolProp 6.1.0. I believe that IF97 is only partially implemented in that release of CoolProp. That was about when I started working on it.

Nov 09, 2023
12:42 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Nov 09, 2023
12:42 AM

Cool Prop IF97 vs WaterSteamPro

Nov 29, 2023
09:23 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Nov 29, 2023
09:23 PM

@ValeryOchkov What is the function that you are plotting against the Liquid Saturation Temperature?

What are the parameters being passed in?

Nov 30, 2023
05:15 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Nov 30, 2023
05:15 AM

Dec 02, 2023
02:06 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 02, 2023
02:06 PM

@ValeryOchkov - Thanks for this. I've looked at your SMath document and reproduced it in Mathcad, with errors. Indeed there is an error when using IF97, but not using the default HEOS for water (which uses IAPWS-95) and not in the IF97 backend. The trick is that your efficiency function makes a few calls to the backward formulation for *h*(*p,s*). There is no function documented in the IF97 release for this so CoolProp has evaluate it manually in all phase regions, which is fairly straight forward. In the two-phase region, however, it requires a lever law calculation, which is not being evaluated correctly (although I'm not sure why yet). I will look into this and make sure something gets into the next patch release.

Nov 29, 2023
09:34 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Nov 29, 2023
09:34 PM

If you are making the Coolprop call to "H2O" you are using the IAPWS-95 functions. IF97 requires "IF97::H2O" or "IF97::Water".

Nov 30, 2023
05:10 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Nov 30, 2023
05:10 AM

Nov 30, 2023
06:54 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Nov 30, 2023
06:54 PM

Yep. That's .045% relative error in Cp between IF97 and IAPWS-95. To be expected. These are the differences between IAPWS-95 and IF97.

The IF97 computational validation points match the verification points in IAPWS R7-97(2012) to 8 decimal places in most cases.

Aug 12, 2024
04:42 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Aug 12, 2024
04:42 AM

After some time, I was able to reproduce your SMath document in Mathcad Prime and verify the issue with CoolProp. It was easy to verify, not so easy to figure out why it was occurring.

The issue stems from the fact that:

- IF97 does not provide functions of h(p,s). These have to be evaluated by calculating temperature from T(p,s) and then using h(T,p) to get enthalpy. These functions involve some uncertainties (±25 mK) that can provide (T,p) state points that are just slightly on the wrong side of the saturation curve, returning enthalpies in the vapor phase rather than the liquid phase.
- This problem was exacerbated by calculating saturation temperature (Tk, T'H2, T'H1, etc.) from pressure using Tsat(p), which has some uncertainty (±0.007%). The efficiency function then uses that temperature to get saturation enthalpy/entropy from h'(T) and s'(T), which do not exist in IF97, so the code has to convert Temperature back to saturation pressure (adding another ±0.007% uncertainty) and then calling h'(p) and s'(p). These errors can be removed by calling the saturation functions of pressure h'(p) and s'(p) directly without evaluating the saturation temperature at all. This removes the uncertainties added and (mostly) returns enthalpies and entropies on the correct side of the saturation dome.

However, the saturation temperature from the reverse functions T(p,s) and T(p,h) should still be returning values that are limited to the correct phase, depending on the input state point. This has been corrected in CoolProp (Github.com/CoolProp/CoolProp PR#2404) and it's underlying IF97 backend (Github.com/CoolProp/IF97 PR#49) to behave more robustly very near the saturation curve, which is where the efficiency equation operates. Here are the efficiency plots (reproduced in Mathcad Prime) using both the native HEOS (IAPWS-95) and IF97 backends for Water.

These robustness improvements to the reverse functions will be included in the next release of CoolProp (6.6.1). However, the improvements are included in the nightly build on SourceForge (v6.6.1dev) of the current development version.

Oct 09, 2019
11:12 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 09, 2019
11:12 PM

The CoolProp 6.3.0 binaries have been verified using the new release of Mathcad Prime 6.0.

Sep 16, 2020
08:01 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Sep 16, 2020
08:01 PM

I'm a longtime user of Mathcad 15 with steam table extension and a novice using Prime. I've copied the latest CoolProp .dll file to the "Custom Functions" folder but Prime doesn't recognize any of the thermodynamic functions. I'm looking for some help using CoolProp in Mathcad Prime.

Sep 17, 2020
01:25 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Sep 24, 2020
08:52 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Sep 24, 2020
08:52 AM

Make sure you've got the correct DLL. The one for Mathcad 15 is 32-bit, while the one for Mathcad Prime is 64-bit and compiled specifically for Mathcad Prime.

1. With the DLL in place, restart Mathcad Prime and enter, CustomFunctions= . If the DLL is the correct one, and properly installed, you will see the following list of functions available from the DLL:

If you do not see this list of functions, you do not have the correct DLL.

2. Also on SourceForge, where you got the DLL, is an example Mathcad Prime file called CoolPropFluidProperties.mcdx. Once the DLL is installed properly, download and open this file in Mathcad Prime and press <Ctrl>-F5 to update all equations. This document will show you how to use the functions.

Hope this helps.

Jeff

Sep 30, 2020
11:06 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Sep 30, 2020
11:06 AM

Jeff,

Thanks that all helped me lumber through this problem.

With your insights I continued searching until I found that the Mathcad Prime DLL for CoolProp revision 6.3.0 seems to work work well for me. I can list the functions with CustomFunctions= and all of the functions I've tried so far return expected results.

None of the newer revision DLL files work at all for me and some of the earlier revisions crash when trying to execute the get_global_param_string. Another note, an agent from PTC was able to get the most recent revision, 6.4.1, to work with his set up.

For now I can proceed with a complex MC 15 to Prime 6 thermodynamic analysis conversion and hopefully in the future get the newest revision to work.

Thanks again for your much needed help!

Rob Mock

Sep 24, 2020
10:15 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Sep 24, 2020
10:15 AM

Coolprop, may the software I never know,What important of coolprop for mathcad ?

Sep 24, 2020
12:54 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Sep 24, 2020
12:54 PM

I believe they are functions and tables that import standard thermodynamic properties into Mathcad. There is also WatersteamPro.

Oct 08, 2020
04:55 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Oct 08, 2020
04:55 PM

Yes, @Fred_Kohlhepp is correct. **CoolProp** is an open source library of functions that provide thermodynamic and thermo-physical properties of 120+ pure fluids, mixtures, over 35 incompressible fluids, and Humid Air properties (based on ASHRAE equations). It also provides an easy to use interface to IF97 water/steam properties (built-in) and NIST REFPROP (if installed). You can find out more at http://www.coolprop.org.

Nov 30, 2023
07:05 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Nov 30, 2023
07:05 PM

Note that **CoolProp 6.6.0** is now released and the DLL for Mathcad Prime is autogenerated on SourceForge for this release (along with a sample worksheet).