CoolProp Wrapper

CoolProp Wrapper - Pure and pseudo-pure fluid equations of state and transport properties for 122 components - Сообщения

#1 Опубликовано: 28.03.2016 20:11:53
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

CoolProp Wrapper

SMath Studio compatibility SMath Viewer compatibility mono compatibility Extension page Sources


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)


CoolProp


Official SMath wrapper (you have to build it by yourself, instructions in his documentation)


NOTE: you should be able to run worksheets made with a plugin using the other and vice-versa.
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
Mike Kaganski 28.03.2016 21:29:00
#2 Опубликовано: 28.03.2016 20:15:24
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

Wrote

Code uploaded in the SVN repository (CoolPropWrapper), to make it easily available for further changes.



UPDATED
- CoolProp 5.1.2
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
2 пользователям понравился этот пост
ElSid 11.04.2016 15:44:00, Mike Kaganski 28.03.2016 21:29:00
#3 Опубликовано: 11.04.2016 14:12:47
Mike Kaganski

Mike Kaganski

184 сообщений из 434 понравились пользователям.

Группа: User

A sheet to see some of CoolProp functions.
CoolProp_demo.sm (117 КиБ) скачан 445 раз(а).

EDIT: Updated the demo (using development version of library).
С уважением, Михаил Каганский
3 пользователям понравился этот пост
Davide Carpi 12.04.2016 14:04:00, ElSid 11.04.2016 15:44:00, frapuano 12.04.2016 01:55:00
#4 Опубликовано: 06.05.2016 00:59:54
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1675 понравились пользователям.

Группа: User

Very useful!
Thanks
Alvaro.
#5 Опубликовано: 06.05.2016 09:38:56
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User


"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

#6 Опубликовано: 09.05.2016 04:05:13
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1675 понравились пользователям.

Группа: User

Hi, Jean. Yes, it's "me" (and my personal english too). ¿How are you?
#7 Опубликовано: 02.06.2016 07:00:23
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1675 понравились пользователям.

Группа: User

Hi. I don't know how to call the functions CoolProp_set_reference_stateD nor
CoolProp_set_reference_stateS. See the yellow in the attached.
Best regards.
Alvaro.
P3.sm (118 КиБ) скачан 207 раз(а).
#8 Опубликовано: 02.06.2016 10:41:17
Mike Kaganski

Mike Kaganski

184 сообщений из 434 понравились пользователям.

Группа: User

Wrote

Hi. 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.
С уважением, Михаил Каганский
#9 Опубликовано: 02.06.2016 13:55:47
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1675 понравились пользователям.

Группа: User

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.
#10 Опубликовано: 02.06.2016 16:11:35
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1675 понравились пользователям.

Группа: User

CoolProp_set_reference_stateD.gif

#11 Опубликовано: 02.06.2016 18:03:44
Mike Kaganski

Mike Kaganski

184 сообщений из 434 понравились пользователям.

Группа: User

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 КиБ) скачан 208 раз(а).

WRT CoolProp_set_reference_stateD, I do agree it doesn't work for now, which is why I filed a bug upstream.
С уважением, Михаил Каганский
#12 Опубликовано: 05.06.2016 17:28:43
Mike Kaganski

Mike Kaganski

184 сообщений из 434 понравились пользователям.

Группа: User

@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?
С уважением, Михаил Каганский
#13 Опубликовано: 05.06.2016 19:03:36
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

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)
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#14 Опубликовано: 06.06.2016 12:22:10
Mike Kaganski

Mike Kaganski

184 сообщений из 434 понравились пользователям.

Группа: User

@Davide,

is there a documentation available (aside the source code itself)?
Thank you for your help.
С уважением, Михаил Каганский
#15 Опубликовано: 06.06.2016 12:49:55
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

I've asked Andrey to publish the updated core documentation, I guess we have to wait the next Stable build...

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)
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#16 Опубликовано: 08.06.2016 10:05:09
Mike Kaganski

Mike Kaganski

184 сообщений из 434 понравились пользователям.

Группа: User

Making it run on mono under Ubuntu:

scrH54.png

Hope it will be available in next version of plugin.
С уважением, Михаил Каганский
1 пользователям понравился этот пост
Davide Carpi 08.06.2016 10:16:00
#17 Опубликовано: 25.10.2016 14:17:52
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

UPDATED Stable: SMath Studio 0.98.6128

- 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);
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
1 пользователям понравился этот пост
Mike Kaganski 25.10.2016 16:54:00
#18 Опубликовано: 25.10.2016 17:05:43
Mike Kaganski

Mike Kaganski

184 сообщений из 434 понравились пользователям.

Группа: User

Thanks, Davide!

Here's what I see:
CoolProp61.png

Also, no dynamic assistance is available. Though disabling the plugin doesn't help.
С уважением, Михаил Каганский
#19 Опубликовано: 25.10.2016 22:21:34
Jean Giraud

Jean Giraud

983 сообщений из 6866 понравились пользователям.

Группа: User

Though I don't use Smath unit system, two questions come to evidence:

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
#20 Опубликовано: 26.10.2016 04:27:20
Davide Carpi

Davide Carpi

1417 сообщений из 2873 понравились пользователям.

Группа: Moderator

Hello Mike,

Wrote

CoolProp61.png


Reproduced, thank you. I'll fix it ASAP

Wrote

Also, 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

Wrote

1. '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

Wrote

If "Units don't match": how could the dynamic assistance help ?


I guess it is a separate bug
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений