|Excel Unit Operation|
|Matlab Unit Operation|
|Matlab Thermo Import|
|OO Calc Thermo Import|
|SciLab Unit Operation|
|SciLab Thermo Import|
This OpenOffice extension allows for importing CAPE-OPEN version 1.1 thermodynamic and physical Property Packages into OpenOffice Calc spreadsheet.
The extension adds several functions to the OpenOffice Calc Formula AutoPilot, that allow creation of CAPE-OPEN version 1.1 Property Packages, that can subsequently be used to obtain compounds, compound information, phases, temperature- and pressure-dependent compound properties, single-phase mixture properties, two-phase mixture properties and perform thermodynamic phase equilibruim calculations.
The extension defines all 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 OpenOffice version 3.2 or higher (Windows, 32-bit), 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).
In addition to providing the functions to work with CAPE-OPEN thermodynamic servers, dialogs are provided in a CAPE-OPEN menu that allow an manner of inserting the formulas into the OpenOffice Calc spreadsheet.
We start OpenOffice calc; put the cursor in cell A1, and choose Select Property Package from the CAPE-OPEN menu. In the dialog that pops up, we choose the TEA thermodynamic server and we select the "C1_C2 (EOS)" property package. In the optional name field, we use the default pp; this name will be assigned to the cell that contains the property package selection. We will refer to this cell a lot, so it is handy to have name associated with it.
After clicking Insert, cell A1 contains the string TEA (CAPE-OPEN 1.1)::C1_C2 (EOS) which is a placeholder to identify the property package. Evaluating this formula will cause the Property Package automatically.
We can now use the Insert List option from the CAPE-OPEN menu to inspect or insert the list of supported compounds, phases, compound constants, temperature- or pressure dependent properties, single- or two-phase mixture properties or possible flash conditions. All output is by default column-based, but can optionally be requested row-based. in A4, we enter temperature, in B4 we enter pressure, we put the cursor in C4 and insert the compound list:
Notice how we refer to the Property Package using the named range pp, and how we ask for row based output. The spread sheet now looks like this:
All of the CAPE-OPEN units of measure are in SI units. Some properties, such as fractions, enthalpy, etc, can be in mass or mole basis (mole fraction or mass fraction, J/mol or J/kg). By default, all units of measure are in mole basis; however all functions for which basis is relevant take an optional argument "mass". We can at any time ask for the unit of measure of a property; we do so by entering =CapeOpenPropUnit(A4) in A5, and we copy this formula to B5.
Now let us calculate vapor enthalpy. In E4, we enter Phase, in E5, we enter Vapor, in F4 we enter Basis, in F5 we enter mole, in G4 we enter Enthalpy, in G5 we enter =CapeOpenPropUnit(G4;F5). In C5 and D5, we enter =CapeOpenPropUnit("fraction";F5)
We fill in some data: 300 in A6, 1e5 in B6, 0.5 in C6 and in C7: =1-C6.
We put the cursor in G5, and pick Insert Single Phase Property from the CAPE-OPEN menu:
Data values can be picked from the spreadsheet by mouse using the button next to the data field.
For this example, in the resulting formula we replace "Enthalpy" by G4, "Vapor" by E5 and "mole" by F5 to read:
Entering mass in F5 results:
Or, entering Density in G4 results:
Similarly, the property calculation will be updated automatically when changing any of the inputs (temperature, pressure, composition, phase, basis or property).
Calculating phase equilibria is equally simple. We wipe the content of E4:G6, put the cursor at E5 and choose Insert Equilibrium Calculation from the CAPE-OPEN menu:
At these conditions, liquid is not present and the liquid fields are empty. Change the temperature to 150 K to see a two-phase example:
Equilibrium calculations can be performed for two selected equilibrium conditions. An example:
Temperature is now also an output of the equilibrium calculations. All property calculations can be inserted using convenient dialogs, available from the CAPE-OPEN menu:
A function reference is integrated into the OpenOffice help system.
OpenOffice CAPE-OPEN Thermo Import will function with CAPE-OPEN version 1.1 compliant thermodynamic Property Package Managers and stand-alone Property Packages.
OpenOffice 3.2 or higher (windows, 32-bit) must be installed. You can obtain a copy of OpenOffice from http://www.openoffice.org/.
OpenOffice CAPE-OPEN Thermo Import is available free-of-charge from the Downloads page. It is shipped as an OpenOffice extension (OOCO.OXT); double clicking the file should open the OpenOffice extension manager that will guide you through the installation.
The download does not include OpenOffice or any thermodynamic servers.