CoolProp Wrapper - Pure and pseudo-pure fluid equations of state and transport properties for 122 components - Messages
#61 Posted: 4/21/2023 3:17:35 PM
WroteHow can I get properties of mixtures e.g
ref: http://www.coolprop.org/fluid_properties/Mixtures.htmlCoolProp_Props("Dmass","T",273+100,"P",101.3*10^3,"Helium[0.5]&Xenon[0.5]"
This can't be done directly in the current version of the plugin. It is not clear how to call the apply_simple_mixing_rule() function from the library, it can't be imported as it is not in the export table.
maple-python-coolprop.sm (6.61 KiB) downloaded 1705 time(s).
maple-python-coolprop.pdf (19.18 KiB) downloaded 1185 time(s).
maple-python-coolprop-2.sm (5.08 KiB) downloaded 1672 time(s).
Russia ☭ forever, Viacheslav N. Mezentsev
#62 Posted: 4/22/2023 5:00:09 AM
WroteHow can I get properties of mixtures e.g
ref: http://www.coolprop.org/fluid_properties/Mixtures.htmlCoolProp_Props("Dmass","T",273+100,"P",101.3*10^3,"Helium[0.5]&Xenon[0.5]"
Hi. Notice that Refprop from NIST can't handle He/Xe mixing either. At least version 9.
On the other hand, maple doesn't seem to implement the procedure that Viacheslav points out either, as can be seen in the online documentation for the latest version.
However, very good values can be obtained using Coolprop in SMath and some basic stoichiometry.
Mixing gases.sm (19.17 KiB) downloaded 1632 time(s).
Mixing gases.pdf (67.22 KiB) downloaded 1007 time(s).
Best regards.
Alvaro.
#63 Posted: 4/22/2023 5:34:44 AM
More simple

maple-python-coolprop-3.sm (10.97 KiB) downloaded 1657 time(s).
maple-python-coolprop-3.1.sm (10.82 KiB) downloaded 1657 time(s).
maple-python-coolprop-3.2.sm (10.89 KiB) downloaded 1575 time(s).
maple-python-coolprop-3.sm (10.97 KiB) downloaded 1657 time(s).
maple-python-coolprop-3.1.sm (10.82 KiB) downloaded 1657 time(s).
maple-python-coolprop-3.2.sm (10.89 KiB) downloaded 1575 time(s).
Russia ☭ forever, Viacheslav N. Mezentsev
1 users liked this post
Alvaro 4/22/2023 9:32:00 AM
#64 Posted: 4/27/2023 3:09:34 AM
Russia ☭ forever, Viacheslav N. Mezentsev
#65 Posted: 4/28/2023 7:39:13 AM
Or like this

maple-python-coolprop-3.4.sm (10.66 KiB) downloaded 1669 time(s).
maple-python-coolprop-3.5.sm (10.3 KiB) downloaded 1641 time(s).
maple-python-coolprop-3.4.sm (10.66 KiB) downloaded 1669 time(s).
maple-python-coolprop-3.5.sm (10.3 KiB) downloaded 1641 time(s).
Russia ☭ forever, Viacheslav N. Mezentsev
#66 Posted: 4/29/2023 3:33:10 PM
Russia ☭ forever, Viacheslav N. Mezentsev
#67 Posted: 4/29/2023 10:07:03 PM
is fantastic!
this no work the first time but after I play with the another examples this work, very well
thank you!
this no work the first time but after I play with the another examples this work, very well
thank you!
#68 Posted: 5/4/2023 10:29:17 AM
Without "pyfile" (inline multiline script). The script should be without comments.
Space padding is necessary here so that inside the script, when a large string is divided into parts, the line break character itself is not divided ( '\n' -> '\ n' ).

maple-python-coolprop-3.7.sm (9.9 KiB) downloaded 1667 time(s).
maple-python-coolprop-3.8.sm (6.84 KiB) downloaded 1666 time(s).
maple-python-coolprop-3.9.sm (8 KiB) downloaded 1621 time(s).
Space padding is necessary here so that inside the script, when a large string is divided into parts, the line break character itself is not divided ( '\n' -> '\ n' ).
maple-python-coolprop-3.7.sm (9.9 KiB) downloaded 1667 time(s).
maple-python-coolprop-3.8.sm (6.84 KiB) downloaded 1666 time(s).
maple-python-coolprop-3.9.sm (8 KiB) downloaded 1621 time(s).
Russia ☭ forever, Viacheslav N. Mezentsev
#69 Posted: 7/30/2023 8:12:32 AM
#70 Posted: 7/30/2023 1:33:42 PM
Jean, can you help me how do integrate python in my Smath? I event tried environmental variables under Win10 but didn't work
#71 Posted: 7/31/2023 3:45:32 AM
You should use a double slash for the full path.

In this case, you need to check whether python is available from the command line. If not, it means that the paths are specified incorrectly.

WroteI event tried environmental variables under Win10 but didn't work
In this case, you need to check whether python is available from the command line. If not, it means that the paths are specified incorrectly.
Russia ☭ forever, Viacheslav N. Mezentsev
#72 Posted: 8/2/2023 7:17:11 PM
uni, thanks a lot
Can you tell me what is this block you used after python sub-section [i.e with the square bracket & holding script conetnts]
Additionally Razonar sample here is also very intuitive while calculating mixing values
https://en.smath.com/forum/yaf_postsm82120_Understanding-Redlich-Kwong-equation-of-state.aspx#post82120
Can you tell me what is this block you used after python sub-section [i.e with the square bracket & holding script conetnts]
Additionally Razonar sample here is also very intuitive while calculating mixing values
https://en.smath.com/forum/yaf_postsm82120_Understanding-Redlich-Kwong-equation-of-state.aspx#post82120
#73 Posted: 8/3/2023 3:06:16 AM
#74 Posted: 8/4/2023 3:23:07 PM
uni, so it means the text inside the block is not automatically generated. Can you please explain the construct
On second note you were correct, I fixed my environment variable under windows %python% now works
On second note you were correct, I fixed my environment variable under windows %python% now works
#75 Posted: 8/8/2023 2:01:18 AM
Phase diagrams with CoolProps.
PhaseDiagram.sm (39.17 KiB) downloaded 1649 time(s).
Best regards.
Alvaro.
PhaseDiagram.sm (39.17 KiB) downloaded 1649 time(s).
Best regards.
Alvaro.
1 users liked this post
Davide Carpi 8/8/2023 2:10:00 AM
#76 Posted: 8/9/2023 3:47:50 AM
Psychrometric Chart with CoolProps. 'Simplified' version (more readable): Enthalpy lines overlap web bulb temperature lines.
PsychrometricChart.sm (125.39 KiB) downloaded 1625 time(s).
Best regards.
Alvaro.
PsychrometricChart.sm (125.39 KiB) downloaded 1625 time(s).
Best regards.
Alvaro.
#77 Posted: 8/21/2023 5:39:50 PM
I think I have found some problems while using plugin to get phase properties as discussed here: http://www.coolprop.org/coolprop/HighLevelAPI.html#imposing-the-phase-optional
First when using "P|phase_gas" it doesn't accept units & T,P values have to be directly written in SI equivalent
Second there is a value discrepancy when using "P" & "P|phase_gas" for a fluid that exists only in gas phase at that T,P
File not found.File not found.
First when using "P|phase_gas" it doesn't accept units & T,P values have to be directly written in SI equivalent
Second there is a value discrepancy when using "P" & "P|phase_gas" for a fluid that exists only in gas phase at that T,P
File not found.File not found.
#78 Posted: 4/16/2024 3:55:20 AM
#79 Posted: 12/19/2025 1:10:36 AM
WrotePhase diagrams with CoolProps. ...
Now can show other thermo properties, and get animations.
PhaseDiagram.sm (46.88 KiB) downloaded 641 time(s).

Animating volume of water and enthalpy of O2.

Best regards.
Alvaro.
2 users liked this post
#80 Posted: 8/12/2026 9:45:52 PM
I have a small feature request that I may be in the wrong spot to make. Anyway, I love how the CoolProp Wrapper is able to keep track of units and it's way more convenient than Excel or Python. Today I noticed that the wrapper is currently unable to handle units for derivatives. For example, the syntax of CoolProp_Props("d(C)/d(T)|P", "T", 300 K, "P", 1 atm, "Water") results in -0.3248 unitless. By doing a central difference around the same temperature with constant pressure, SMath+CoolProp will respond with -0.3248 J/kg·K². Is there a way that we can get the units into the shorter syntax?
- New Posts
- No New Posts


