You are on page 1of 3

FLASHMATE FOR LNG

Product description, 22 May 2008

Short description
With this Excel add in program, flash calculations can be carried out from within Excel
through appropriate function calls and properties of the phases calculated.

Items
The product is delivered as a compressed file “FlashMateLNG Release 2008-05-
22.zip”.
Files can be extracted to a folder selected by the user. After decompressing, the following
files and directories should be present:
“Adsorption functions.xla” Excel Add-in
FlashMateLNG.dll Dynamic link library with FlashMate
core functions
Pepper\*.* Database files
InstallAddin.exe Utility to install Excel add-ins
Doc\FlashMateLNG.doc This document
Doc\Example.xls Example spreadsheet showing how to
use the stflash macro

Installation.
 Create a folder, for instance “C:\Apps\Adsorption Functions”. Copy
(extract) all the files to this directory.
 Make sure Excel is not running.
 Go to the directory and drag “Adsorption Functions.xla” onto
InstallAddin.exe. This will install the add-in into Excel.
 Open file Doc\Example.xls and check that everything works.
The first time you open this file, it will ask you whether it should update links to
another workbook, which in this case is our new xla file. Answer “No” here. After a
short while, a message box should appear, notifying you that the links were updated
automatically. After saving the file, you will not be asked this again. Note: This will
happen with any file that uses “Adsorption Functions.xla” and was created
on a PC where it was installed in a different directory than on your PC, or in an older
version in a different installation directory.
Usage
The functionality is available via the function

STFlash(C, N, T, P, FT, PH, PR, TH)


Public Function STFlash(ComponentNames As Range,
ComponentValues As Range,
Temperature As Double,
Pressure As Double,
FlashType As fmFlashType,
Optional Phase As Integer,
Optional Property As String = "",
Optional Thermo As String = "") As Variant

The inputs can be specified in the function call or by reference to one or more cells in the
spreadsheet. The meaning of the parameters (arguments) is explained in Table1. The
supported property keywords are in Table 2.

The Phase parameter indicates the phase for which you want to retrieve the properties. Phase
1 and 2 are liquid phases, while phase 3 is the vapor phase. Phase 4 can be specified to access
feed properties, where available. The phase parameter is optional and when it is not specified,
phase 3 is used, except for X, Fugacities and LogFugacityCoefficients, which are explained
below. Phase 0 is equivalent to not specifying the Phase parameter.

Meaning Type Values


C MFD component codes Range of character strings 1P 2P, 6A, H2O, ...
N Mole amounts Range of Double
T Temperature [degC] Double
P Pressure [bar] Double
FT Flash type Integer
PH Phase Integer (optional) 0,1,2,3,4
PR Property (optional) Character string (optional) See Table 2
TH Thermodynamic method Integer (optional) 1,2,3
Table 1: STFlash function arguments
Property code Property [unit]
(case insensitive)
CP Isobaric heat capacity [J/(mol.K)]
CV Isochoric heat capacity [J/(mol.K)]
Day License expiry
Fugacities Fugacities of phase [bar] *
H Enthalpy [J/mol]
H2Ogas Water content [mol/mol]
Htot Total enthalpy [kJ/kg]
ISOCOM Isothermal compressibility [1/bar]
JT Joule-Thomson coeff. [K/bar]
LogFugacityCoefficients Logarithm of fugacity coefficients of phase [bar] *
Month License expiry
MV Molar volume [m3]
MW Molecular weight [kg/kmol]
RHO Density [kg/m3]
S Entropy [J/(mol.K)]
SOS Speed of sound [m/s]
THC Thermal conductivity [J/(m.s.K)]
VISC Viscosity [Pa.s]
Nphase Amount in phase [moles]
PhaseFraction Fraction of phase [-]
X Mole fraction of phase [%] *
Year License expiry
Z Compressibility factor [-]
Table 2. Property codes

* When using X, Fugacities and LofFugacityCoefficients, properties will be returned for


every component. Therefore, you will need to reserve an output range in Excel, with one or
three columns and as many rows as there are components. Before entering the formula, select
the desired range of cells. Enter the formula and when you’re done, use Ctrl-Shift-Enter
instead of just Enter to confirm. For these properties, if Phase is not specified, or Phase is
zero, all phases are returned. In this case, you will need to reserve 3 columns for output;
otherwise just one column is needed.

Usage examples can be found in Doc\Example.xls.

You might also like