Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

4 Pages«<234
Options
Go to last post Go to first unread
Offline uni  
#61 Posted : 2 years ago
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,634
Man
Russian Federation

Was thanked: 1394 time(s) in 814 post(s)
Originally Posted by: ioncube Go to Quoted Post
How can I get properties of mixtures e.g

Code:
CoolProp_Props("Dmass","T",273+100,"P",101.3*10^3,"Helium[0.5]&Xenon[0.5]")

ref: http://www.coolprop.org/...properties/Mixtures.html

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.

Click to enlarge

Click to enlarge

maple-python-coolprop.sm (7kb) downloaded 17 time(s).
maple-python-coolprop.pdf (20kb) downloaded 13 time(s).

Click to enlarge Crazy
maple-python-coolprop-2.sm (6kb) downloaded 12 time(s).

Edited by user 2 years ago  | Reason: Not specified

Russia ☭ forever (git.io/vOZo0)
Viacheslav N. Mezentsev
Offline Razonar  
#62 Posted : 2 years ago
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,508
Uruguay

Was thanked: 974 time(s) in 609 post(s)
Originally Posted by: ioncube Go to Quoted Post
How can I get properties of mixtures e.g

Code:
CoolProp_Props("Dmass","T",273+100,"P",101.3*10^3,"Helium[0.5]&Xenon[0.5]")

ref: http://www.coolprop.org/...properties/Mixtures.html


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 (20kb) downloaded 20 time(s).
Mixing gases.pdf (68kb) downloaded 21 time(s).

Best regards.
Alvaro.
Offline uni  
#63 Posted : 2 years ago
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,634
Man
Russian Federation

Was thanked: 1394 time(s) in 814 post(s)
More simple

Click to enlarge Click to enlarge Click to enlarge

maple-python-coolprop-3.sm (11kb) downloaded 17 time(s).
maple-python-coolprop-3.1.sm (11kb) downloaded 12 time(s).
maple-python-coolprop-3.2.sm (11kb) downloaded 16 time(s).

Edited by user 2 years ago  | Reason: Not specified

Russia ☭ forever (git.io/vOZo0)
Viacheslav N. Mezentsev
thanks 1 user thanked uni for this useful post.
on 22/04/2023(UTC)
Offline uni  
#64 Posted : 2 years ago
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,634
Man
Russian Federation

Was thanked: 1394 time(s) in 814 post(s)
Now you can write like this

Click to enlarge Click to enlarge Click to enlarge

maple-python-coolprop-3.3.sm (10kb) downloaded 15 time(s).

Edited by user 2 years ago  | Reason: Not specified

Russia ☭ forever (git.io/vOZo0)
Viacheslav N. Mezentsev
Offline uni  
#65 Posted : 2 years ago
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,634
Man
Russian Federation

Was thanked: 1394 time(s) in 814 post(s)
Or like this

Click to enlarge Click to enlarge

maple-python-coolprop-3.4.sm (11kb) downloaded 13 time(s).
maple-python-coolprop-3.5.sm (11kb) downloaded 16 time(s).

Edited by user 2 years ago  | Reason: Not specified

Russia ☭ forever (git.io/vOZo0)
Viacheslav N. Mezentsev
Offline uni  
#66 Posted : 2 years ago
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,634
Man
Russian Federation

Was thanked: 1394 time(s) in 814 post(s)
Click to enlarge

maple-python-coolprop-3.6.sm (10kb) downloaded 22 time(s).
Russia ☭ forever (git.io/vOZo0)
Viacheslav N. Mezentsev
Offline churichuro  
#67 Posted : 2 years ago
churichuro


Rank: Advanced Member

Groups: Registered
Joined: 27/03/2019(UTC)
Posts: 77
Mexico
Location: coah

Was thanked: 28 time(s) in 23 post(s)
is fantastic!
this no work the first time but after I play with the another examples this work, very well
thank you!

Edited by user 2 years ago  | Reason: Not specified

Offline uni  
#68 Posted : 2 years ago
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,634
Man
Russian Federation

Was thanked: 1394 time(s) in 814 post(s)
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' ).

Click to enlarge Click to enlarge Click to enlarge

maple-python-coolprop-3.7.sm (10kb) downloaded 19 time(s).
maple-python-coolprop-3.8.sm (7kb) downloaded 16 time(s).
maple-python-coolprop-3.9.sm (9kb) downloaded 25 time(s).

Edited by user 2 years ago  | Reason: Not specified

Russia ☭ forever (git.io/vOZo0)
Viacheslav N. Mezentsev
Offline ioncube  
#69 Posted : about a year ago
ioncube


Rank: Advanced Member

Groups: Registered
Joined: 04/12/2017(UTC)
Posts: 70
Man
Pakistan

Was thanked: 3 time(s) in 3 post(s)
Uni, can you please help me how to add python into SMATH, I have python already in system [WinPython 3.9] How I link it up with Smath?

I have working CoolProp

smath_s.png
Offline ioncube  
#70 Posted : about a year ago
ioncube


Rank: Advanced Member

Groups: Registered
Joined: 04/12/2017(UTC)
Posts: 70
Man
Pakistan

Was thanked: 3 time(s) in 3 post(s)
Jean, can you help me how do integrate python in my Smath? I event tried environmental variables under Win10 but didn't work
Offline uni  
#71 Posted : about a year ago
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,634
Man
Russian Federation

Was thanked: 1394 time(s) in 814 post(s)
You should use a double slash for the full path.

maple-python-coolprop-3.9.png

Originally Posted by: ioncube Go to Quoted Post
I 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.

Edited by user about a year ago  | Reason: Not specified

Russia ☭ forever (git.io/vOZo0)
Viacheslav N. Mezentsev
Offline ioncube  
#72 Posted : about a year ago
ioncube


Rank: Advanced Member

Groups: Registered
Joined: 04/12/2017(UTC)
Posts: 70
Man
Pakistan

Was thanked: 3 time(s) in 3 post(s)
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/for...-of-state.aspx#post82120

Edited by user about a year ago  | Reason: Not specified

Offline uni  
#73 Posted : about a year ago
uni


Rank: Advanced Member

Groups: Registered, Advanced Member
Joined: 10/11/2010(UTC)
Posts: 1,634
Man
Russian Federation

Was thanked: 1394 time(s) in 814 post(s)
Originally Posted by: ioncube Go to Quoted Post
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]

Mathcad Block from the Mathcad Toolbox plugin and just Text inside it for the script.

mathcad-block-menuitem.png

Edited by user about a year ago  | Reason: Not specified

Russia ☭ forever (git.io/vOZo0)
Viacheslav N. Mezentsev
Offline ioncube  
#74 Posted : about a year ago
ioncube


Rank: Advanced Member

Groups: Registered
Joined: 04/12/2017(UTC)
Posts: 70
Man
Pakistan

Was thanked: 3 time(s) in 3 post(s)
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

Edited by user about a year ago  | Reason: Not specified

Offline Razonar  
#75 Posted : about a year ago
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,508
Uruguay

Was thanked: 974 time(s) in 609 post(s)
Phase diagrams with CoolProps.

Click to enlarge

PhaseDiagram.sm (40kb) downloaded 24 time(s).

Best regards.
Alvaro.
thanks 1 user thanked Razonar for this useful post.
on 08/08/2023(UTC)
Offline Razonar  
#76 Posted : about a year ago
Razonar


Rank: Advanced Member

Groups: Registered
Joined: 28/08/2014(UTC)
Posts: 1,508
Uruguay

Was thanked: 974 time(s) in 609 post(s)
Psychrometric Chart with CoolProps. 'Simplified' version (more readable): Enthalpy lines overlap web bulb temperature lines.

Click to enlarge

PsychrometricChart.sm (126kb) downloaded 26 time(s).

Best regards.
Alvaro.
Offline ioncube  
#77 Posted : about a year ago
ioncube


Rank: Advanced Member

Groups: Registered
Joined: 04/12/2017(UTC)
Posts: 70
Man
Pakistan

Was thanked: 3 time(s) in 3 post(s)
I think I have found some problems while using plugin to get phase properties as discussed here: http://www.coolprop.org/...osing-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

Worksheet1.sm (15kb) downloaded 9 time(s).CW1214.png
Offline mkraska  
#78 Posted : 9 months ago
mkraska


Rank: Advanced Member

Groups: Registered
Joined: 15/04/2012(UTC)
Posts: 2,045
Germany

Was thanked: 1176 time(s) in 752 post(s)
It seems that multiple instances of SMath can't use the plugin at the same time.

How to reproduce:
1. Open SMath and access any Coolprop function
2. Open another SMath instance: You get an error message

2024-04-15 21_51_53-Plug-ins failed to start.png
Martin Kraska

Pre-configured portable distribution of SMath Studio: https://smath.com/wiki/SMath_with_Plugins.ashx
Users browsing this topic
Guest (2)
4 Pages«<234
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.