Download as xls, pdf, or txt
Download as xls, pdf, or txt
You are on page 1of 9

This EXCEL spreadsheet contains the MACROs required for the

definition of EXCEL-based Foreign Object and Foreign Process Interfaces

PLEASE LOAD THIS INTO EXCEL BEFORE


DEFINING ANY INTERFACES IN YOUR EXCEL SPREADSHEET

Use CTRL+SHIFT+O to define Foreign Objects


Use CTRL+SHIFT+P to define Foreign Processes

Copyright © 1999-2021 Siemens


Output Output Output Output Output
Name Number_reactions
Diffusion_length Diffusivity
Interfacial_concentration
Initial_concentration
Cell X-Ref 4 0.0001 1.00E-10 1 0
Type Integer Real Real Real Real
[Length] 0/1 0/1 0/1 0/1 0/1
[Mass] 0/1 0/1 0/1 0/1 0/1
[Time] 0/1 0/1 0/1 0/1 0/1
[Electric Current] 0/1 0/1 0/1 0/1 0/1
[Temperature] 0/1 0/1 0/1 0/1 0/1
[Amount of Substance] 0/1 0/1 0/1 0/1 0/1
[Luminous Intensity] 0/1 0/1 0/1 0/1 0/1
[Plane Angle] 0/1 0/1 0/1 0/1 0/1
[Solid Angle] 0/1 0/1 0/1 0/1 0/1
[Money] 0/1 0/1 0/1 0/1 0/1
SI Offset 0 0 0 0 0
SI Multiplier 1 1 1 1 1
Derivative N/A N/A N/A N/A N/A

Notes:
1. gExcelFOI searches for method definitions by looking for the word "Output" in the first row
of a "gFO-" worksheet. The search starts in cell B1 and ends when it reaches an empty cell.
Any column not headed by "Output" is considered an input of the current method.
All inputs to a method must be provided a suitable column heading name. As in
gPROMS, the order of inputs is left to right.

2. In an "Output" column, the second row must contain the name of the method. This is the method
name used in the gPROMS input file

3. The Cell X-reference tells gExcelFOI where the parameter values for a method go (for input
columns) and where to retrieve the method return value from (for "output" columns). For a method
call, gExcelFOI places the input values in the correct cells, recalculates the workbook, and then
returns the value in the "Output" cell to gPROMS.

4. The 'Type' field can be either (R)eal, (I)nteger, (L)ogical or (S)tring. These types must correlate with the internal
gPROMS variables used in the method call. Currently all gPROMS variables are of type Real, but
gPROMS parameters may be of type Integer, Logical or Ordered_Set (String) as well. Note that the String type is applicable

5. All the dimension fields (Rows 5 to 14) are ignored at the moment, along with the SI Offset and
SI Mulitplier fields. These are for future compatibility with new versions of gPROMS.

6. The derivative cell (row 17) is another cell X-reference. If this cell is empty, it indicates that the
time derivative of the method is unavailable. Otherwise it should indicate where the derivative value
is.
Output Output Output Output Output Output Output
Preexponential_factor
Activation_energyReaction_order Stoichiometry Component Temperature Time_simulation
0.05 1 1 -0.5 A 300 200
Real Real Real Real String Real Real
0/1 0/1 0/1 0/1 0/1 0/1 0/1
0/1 0/1 0/1 0/1 0/1 0/1 0/1
0/1 0/1 0/1 0/1 0/1 0/1 0/1
0/1 0/1 0/1 0/1 0/1 0/1 0/1
0/1 0/1 0/1 0/1 0/1 0/1 0/1
0/1 0/1 0/1 0/1 0/1 0/1 0/1
0/1 0/1 0/1 0/1 0/1 0/1 0/1
0/1 0/1 0/1 0/1 0/1 0/1 0/1
0/1 0/1 0/1 0/1 0/1 0/1 0/1
0/1 0/1 0/1 0/1 0/1 0/1 0/1
0 0 0 0 0 0 0
1 1 1 1 1 1 1
N/A N/A N/A N/A N/A N/A N/A

relate with the internal

te that the String type is applicable only to an 'Output' parameter.


Output
Simulation_Control
100
Integer
0/1
0/1
0/1
0/1
0/1
0/1
0/1
0/1
0/1
0/1
0
1
N/A
Tag name gTIME concentration RunSwitch temperature TimeInterval
Type (R, I or L) Real Real Real Real Real
Cell X-ref 4 1 270 4
Table mode (C, R or none) r r

Execution mode

Notes:
1. 'Tag name' is the string used in the GET and SEND commands to attach a tag to a gPROMS variable

2. The type must correspond to the type of the attached gPROMS variable. At the moment, only
PARAMETERS support the types INTEGER and LOGICAL.

3. The tag is ignored if the Cell X-Reference is not provided. This cell X-reference informs gExcelFPI where
to find the value or values to be retrieved for a GET task and modified for a SEND task.

4. The table mode allows tabulation of values. If this is set to 'C', then after each SEND task the cell reference
effectively moves to the next column. This is column tabulation, whereas 'R' provides row tabulation. Leave
this cell empty for no tabulation.

5. The execution mode modifies the execution behaviour of the various FPI tasks. 'Manual' mode causes
the GET task to pause until the workbook has recalculated. This allows user interaction. 'Automatic' mode
tries to synchronise the gPROMS simulation with the gTIME tag. Each GET task waits until the value
specified by the gTIME tag is equal to the gPROMS simulation time. ' Normal' mode involves the modification
and retrieval of values with no pauses, i.e. it does nothing special.

6. The first tag must be defined in the range "B1:B4". There must not be any gaps between tag defintions since
gExcelFPI searches along the first row of this worksheet, retrieving tags, until it reaches an empty cell.
elFPI where

cell reference
ulation. Leave

omatic' mode

the modification

defintions since
Parameter Value Unit Commmnet
Time Points 50
Run Switch 1
Temperature 270

Time Interval for Update 4 s


Discretization Points in Length 100
Component 5
Temperature, K 300
Component A B C D E
Number of Reaction 4
Diffusion Length, m 0.0001
Interface Concentration 1 0 0 1 1
Initial Concentration 0 1 0 0 0
Diffusivity 1.00E-10 1.00E-10 1.00E-10 1.00E-10 1.00E-10
Preexponent Factor 0.05 0.0001 0.0001 0.0001
Activation Energy 1 1 1 1

1 2 3 4
Reaction order A 1 0 1 0
B 1 0 0 1
C 0 1 0 0
D 0 0 0 0
E 0 0 0 0
1 2 3 4
Stoicheimometry A -0.5 0.5 -1 0
B -1 1 0 -1
C 1 -1 0 0
D 0 0 0 0
E 0 0 0 0
Time Simulation 200
Simulation Control 100

You might also like