|Excel Thermo Import|
|Excel Unit Operation|
|Matlab Unit Operation|
|Matlab Thermo Import|
|OO Calc Thermo Import|
|SciLab Unit Operation|
|SciLab Thermo Import|
|Python Thermo Import|
This Matlab package allows for importing CAPE-OPEN version 1.1 thermodynamic and physical Property Packages into Matlab. A command driven package allows for selecting a CAPE-OPEN Property Package, and then perform thermodynamic and physical property calculations as well as thermodynamic equilibrium calculations inside Matlab.
The package defines the interfaces to communicate with CAPE-OPEN thermodynamic and physical Property Packages; it does not implement the thermodynamic engine itself. To use this package, you will need to have Matlab (version 7.7 or higher) as well as a CAPE-OPEN version 1.1 compliant thermo system installed (for example, TEA which is shipped with the freely available CAPE-OPEN simulation environment COCO Simulator).
To get started with the Matlab CAPE-OPEN thermo import, type help capeOpen in Matlab after installation.
» handle=capeOpenGetPackage('TEA (CAPE-OPEN 1.1)','C1_C2'); » %let's calculate and plot the phase envelope at 1 atm for this system » frac=0:0.05:1; » X=[frac' 1-frac'] X = 0 1.0000 0.0500 0.9500 0.1000 0.9000 0.1500 0.8500 0.2000 0.8000 0.2500 0.7500 0.3000 0.7000 0.3500 0.6500 0.4000 0.6000 0.4500 0.5500 0.5000 0.5000 0.5500 0.4500 0.6000 0.4000 0.6500 0.3500 0.7000 0.3000 0.7500 0.2500 0.8000 0.2000 0.8500 0.1500 0.9000 0.1000 0.9500 0.0500 1.0000 0 » P=101325; » tbub=capeOpenEquilibriumProp(handle,'temperature',X,'pressure',P,'vaporFraction',0); » tdew=capeOpenEquilibriumProp(handle,'temperature',X,'pressure',P,'vaporFraction',1); » plot(frac,[tdew tbub])
Matlab CAPE-OPEN Thermo Import will function with CAPE-OPEN version 1.1 compliant thermodynamic Property Package Managers and stand-alone Property Packages. Note that the ThermoSystemAdapter can be used to convert CAPE-OPEN version 1.0 compliant Thermo Systems to CAPE-OPEN version 1.1.
Matlab version 7.7 or higher, must be installed and running at your system. Matlab CAPE-OPEN Thermo Import has been tested with Matlab versions 7.7, 7.8, 7.9, 7.10, 7.11, 7.12, 7.13, 7.14, 8.0, 8.1, 8.2, 8.3, 8.4, 8.5, 8.6, 9.0, 9.1, 9.2, 9.3, 9.4, 9.5 and 9.6.
The Matlab CAPE-OPEN Thermo Import installer is available from the Downloads Page.
Matlab CAPE-OPEN Thermo Import is free of charge for personal and academic use.
For commercial use, a license fee must be paid. Licensing is on a per-person basis (and can be used on multiple computers). Commercial license fee is € 400,- (if you are outside the European union or inside Spain, VAT of 21% is applicable).
For other forms of licenses, please contact email@example.com.
Please see the Downloads page for downloading the Matlab CAPE-OPEN Thermo Import installer.
The RegisterWithMatlab.exe utility will - if invoked for an All Users installation - add the appropriate statements to the Matlab pathdef.m file for the CAPE-OPEN Thermo Import libraries to be loaded properly. This utility will modify C:\Program Files\Matlab\<version>\toolbox\local\pathdef.m file by default. To this it will add the C:\Program Files\Matlab CAPE-OPEN Thermo Import\ and its sub-folder DLL or MEXW32, depending on the Matlab version.
For Windows Vista and later, a virtual store copy of pathdef.m may exist, e.g. C:\Users\<myname>\AppData\Local\VirtualStore\Program Files\MATLAB\<version>\toolbox\local\pathdef.m. In this case, the modifications made to the system copy will not affect Matlab's path and it will appear as if the path registration has failed. This situation will only occur on systems on which the user has edited the pathdef.m file.
To resolve this situation, please manually copy the added lines from the system copy of pathdef.m to the user copy.
For a Current User installation, the matlab path modification needs to be done manually. The easiest solution is to add a startup.m file to the folder in which Matlab starts. In this file, two addpath statements need to appear. The first one adds the Matlab CAPE-OPEN Thermo Import installation folder. The second one adds the MexW sub-folder for Matlab 7.1 or higher, or the DLL sub-folder for Matlab 7.0 or below. The RegisterWithMatlab.exe utility will identify these folders, but will not make the changes.
Matlab 8.6 (2015b) is the last matlab to support the win32/x86 platform; after this, only x64 is supported for Windows. The x64 version of Matlab CAPE-OPEN Thermo Import will support loading x86 thermodynamic servers. However, this cannot be done in-process and will come with a performance penalty.
If you are working with thermodynamic servers that are not (yet) available for x64 windows, perhaps consider keeping a copy of an x86 Matlab installed on your machine, if performance of your application is of importance.