CoolProp Wrapper - Pure and pseudo-pure fluid equations of state and transport properties for 122 components - Messages





Functions
CoolProp_get_fluid_param_string
CoolProp_get_global_param_string
CoolProp_get_param_index
CoolProp_get_parameter_information_string
CoolProp_HAProps
CoolProp_Phase
CoolProp_Props
CoolProp_Props1
CoolProp_saturation_ancillary
CoolProp_set_reference_stateD
CoolProp_set_reference_stateS
This plugin (clone of the official SMath wrapper linked below, adapted to have it available through the Extensions Manager)
- extension's page: http://smath.info/view/CoolProp;
- requirements: SMath Studio 0.97.5346 or later;
- installation: SMath Studio: Tools > Plugins... > Online Gallery;
- sources: SVN repository;
- UI languages:
CoolProp
- website: http://www.coolprop.org/;
- repository: https://github.com/CoolProp/CoolProp;
- binaries: https://sourceforge.net/projects/coolprop/files/CoolProp/;
- license: https://github.com/CoolProp/CoolProp/blob/master/LICENSE;
Official SMath wrapper (you have to build it by yourself, instructions in his documentation)
- repository: https://github.com/CoolProp/CoolProp/tree/master/wrappers/SMath;
- documentation: http://www.coolprop.org/coolprop/wrappers/SMath/;
NOTE: you should be able to run worksheets made with a plugin using the other and vice-versa.
WroteCode uploaded in the SVN repository (CoolPropWrapper), to make it easily available for further changes.
UPDATED
- CoolProp 5.1.2
CoolProp_demo.sm (117 KiB) downloaded 442 time(s).
EDIT: Updated the demo (using development version of library).
Thanks
Alvaro.
"Alvaro" was great collab from the former Mathsoft Collaboratory.
At that time of the Mathsoft Collaboratory, I signed "jmG".
Here is a hint: your great Mathcad 11 "Dichotomy" module.
Jean
CoolProp_set_reference_stateS. See the yellow in the attached.
Best regards.
Alvaro.
P3.sm (118 KiB) downloaded 204 time(s).
WroteHi. I don't know how to call the functions CoolProp_set_reference_stateD nor
CoolProp_set_reference_stateS. See the yellow in the attached.
https://github.com/CoolProp/CoolProp/issues/1091
Regarding CoolProp_set_reference_stateS, AFAICT, it works OK, following the definition given in https://github.com/CoolProp/CoolProp/blob/master/include/CoolProp.h :
Set the reference state based on a string representation
@param FluidName The name of the fluid (Backend can be provided like "REFPROP::Water", or if no backend is provided, "HEOS" is the assumed backend)
@param reference_state The reference state to use, one of
Reference State | Description
------------- | -------------------
"IIR" | h = 200 kJ/kg, s=1 kJ/kg/K at 0C saturated liquid
"ASHRAE" | h = 0, s = 0 @ -40C saturated liquid
"NBP" | h = 0, s = 0 @ 1.0 bar saturated liquid
"DEF" | Reset to the default reference state for the fluid
"RESET" | Remove the offset
The offset in the ideal gas Helmholtz energy can be obtained from
{Δs}/{R_u/M}+{Δh}/{(R_u/M)T}τ
where Δs = s-s_{spec} and Δh = h-h_{spec}
void set_reference_stateS(const std::string &FluidName, const std::string &reference_state);
with the only exception that "RESET" doesn't remove any offset.
Wrote
Regarding CoolProp_set_reference_stateS, AFAICT, it works OK, following the definition given in https://github.com/CoolProp/CoolProp/blob/master/include/CoolProp.h:
In the attached there are a similar information, from github too, but referent to the wrapper. Can provide a smath example changing the refstate and showing h or s values changing? I can't do that inside smath.
Thanks in advance
Alvaro.
Wrote
In the attached there are a similar information, from github too, but referent to the wrapper. Can provide a smath example changing the refstate and showing h or s values changing? I can't do that inside smath.
refstate.sm (48 KiB) downloaded 202 time(s).
WRT CoolProp_set_reference_stateD, I do agree it doesn't work for now, which is why I filed a bug upstream.
Is it worth it to turn the plugin to newer interface, I mean Entry instead of Term[]? Which oldest SMath will be supported then?
Wrote@Davide,
Is it worth it to turn the plugin to newer interface, I mean Entry instead of Term[]? Which oldest SMath will be supported then?
Maybe yes, however soon or later should be done. Entry class is since 0.98, therefore supported versions as for now they would be only 0.98.5935 Stable and further nightly builds.
BTW in NonlinearSolvers refactoring I've switched all the functions to that interface (with different degrees of changes; some are just linked to Entry in the input/output points, in some other cases I've take advantage of the Entry features to make deep changes)
is there a documentation available (aside the source code itself)?
Thank you for your help.
If you want to try by examples: https://smath.info/svn/public/plugins/NonlinearSolvers/NIGHTLY BUILD/; in Tools you may found the most simpler examples (Taylor is an easy example of conversion in the input/output nodes using Terms; Unknowns makes use of Entry to do the job, Terms are used to build the output)

- CoolProp 6.1.0;
- refactored to new SS fast interface (please test it a little so I can see if make it stable or I have to fix/change something);
1. 'Q' does not not belong to WASP [WaterSteamProperties].
2. '1' is what ? ... maybe '1' is atm in the 2nd line ?
If "Units don't match": how could the dynamic assistance help ?
The coulomb (unit symbol: C) is the International System of Units (SI) unit of electric charge.
It is the charge (symbol: Q or q) transported by a constant current of one ampere in one second:
1 C = 1 A * 1 s
1 ((Pa * m * s^2) / kg) * bar = 100 000 pascals
Wrote
Reproduced, thank you. I'll fix it ASAP

WroteAlso, no dynamic assistance is available. Though disabling the plugin doesn't help.
This is really strange, I have the dynamic assistant both in install and portable versions and using different localizations (languages/symbols) o_o
Wrote1. 'Q' does not not belong to WASP [WaterSteamProperties].
2. '1' is what ? ... maybe '1' is atm in the 2nd line ?
Hello Jean, according with CoolProp documentation "Q" stands for "Mass vapor quality", thus 1 is 1 mol/mol
WroteIf "Units don't match": how could the dynamic assistance help ?
I guess it is a separate bug

-
New Posts
-
No New Posts