[prev in list] [next in list] [prev in thread] [next in thread] 

List:       scilab-users
Subject:    [Scilab-users] CoolProp and Scilab (Scinotes + Xcos)
From:       LeBevc <lebevc () gmail ! com>
Date:       2014-07-17 11:03:49
Message-ID: 1405595029355-4030929.post () n3 ! nabble ! com
[Download RAW message or body]

You can use CoolProp in Scilab code and Xcos simulation diagram.

Requirements:
- 64 bit OS
- Python 2.7.x with properly installed Numpy and CoolProp

//--------------------------------------------
Procedure:
- in Scilab open "ATOMS" package manager:
- in section "Scilab development" select and install "Python Interaction
Mechanism in Scilab" (PIMS)
- restart Scilab

//--------------------------------------------
Usage:
at the start of Scilab session execute in console (only once per session):
*--> pyimport CoolProp.CoolProp*

Scinotes:
// call some CoolProp properties:
*--> enthalpy = CoolProp.CoolProp.Props('H','T',300,'P',300,'H2O')*

// you can define new name for CoolProp call:
*--> pyDeff("CoolProp","CoolProp.Props","CP");
--> enthalpy = CP('H', 'T', 300, 'P', 300, 'H2O');*

Xcos:
- In pallete browser select category "User-Defined Functions"
- choose *"scifunc_block_m"*
- Block parameters of "scifunc_block_m":
           input port sizes:    [2,1]
           other parameters by default
           Define function entry:   *y1=CoolProp.CoolProp.Props('H', 'T',
u1(1), 'P', u1(2), 'H2O')*
- place multiplexer (MUX) 2:1 at input port

In case of HAProps: input port sizes [3,1] and MUX 3:1
String literals as input parameters are not supported!

//--------------------------------------------
IMPORTANT:
64 bit OS is mandatory. PIMS has some issues with 32 bit systems.
At the moment only Python 2.7.x is supported, no support for Python 3.x yet.
Tested on openSUSE 13.1 (64 bit); Scilab 5.4
Doesn't work on xUbuntu 14.04 (32 bit); Scilab 5.5
<http://mailinglists.scilab.org/file/n4030929/Xcos_CoolProp.png> 
colprop_proba3.zcos
<http://mailinglists.scilab.org/file/n4030929/colprop_proba3.zcos>  



--
View this message in context: \
http://mailinglists.scilab.org/CoolProp-and-Scilab-Scinotes-Xcos-tp4030929.html Sent \
from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com. \
_______________________________________________ users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic