Referencing a Lookup
Table
Lookup Table elements are unique in that you don’t reference them in the same manner that you reference the outputs of other elements. Instead, you reference them in the way that you would reference a built-in function (like sin or min). That is, once you define a table, you reference it in input expressions for other elements as if it were a custom function:
This is referred to as a
Of course, once you have defined the table, you can reference it at multiple locations (i.e., in the input fields for various elements) using different input arguments (different independent variables) in the same manner as you would use the built-in functions provided by GoldSim multiple times. For example, elsewhere in the model you could reference X_Table(10ft, 135kg).
The argument(s) to a table function must have dimensions An output attribute for an element that defines the dimensionality (in terms of Length, Time and other fundamental dimensions) of the output. that are the same as those of the independent variables with which the Lookup Table was originally defined. Hence, in the example above, if you referenced the table as X_Table(10 day, 150 kg), GoldSim would produce an error message, since based on the way that X_Table was defined, the first argument (the Row Variable) must have dimensions of length.
The dimensions of the table function are determined by the Result Units specified when the Lookup Table was defined.
Table functions are always referenced as follows:
Table Type | Reference |
1-D Tables | Tablename(Row Variable) |
2-D Tables | Tablename(Row Variable, Column Variable) |
3-D Tables | Tablename(Row Variable, Column Variable, Layer Variable) |
The arguments to a table function do not need to be numbers; they can be links from other elements.
Table functions can also accept arrays as input arguments (and subsequently produce arrays as outputs). For example, if ABC was a two-dimensional lookup table, ABC(1,2) would return a scalar An output consisting of a single value or condition. value. However, if X and Y were vectors (e.g., of “Days”), then ABC(X,Y) would return a vector A one-dimensional array. of days. The items would be evaluated by the lookup table on a term-by-term basis.
When you create a Lookup Table, GoldSim automatically lists the table function in the Function menu that is accessible from the context menu within an input field:
There are two ways to add a Lookup Table to an expression:
- You can use the context menu to insert a Table function (as shown above).
- You can use the Insert Link cursor A special cursor for creating links invoked by double-clicking on an input or output object in a browser. to reference the table directly:
In either case, the table is inserted as a function (i.e., with parentheses for arguments, and commas if there are multiple arguments):
In addition to the Lookup Tables you have created, there are two additional specialized functions in the Table Functions list (tablemin and tablemax). Both of these functions require as their argument the name of a Lookup Table element A type of input element that allows you to define your input in terms of a lookup table (i.e., a response surface).. They return the minimum and maximum value, respectively, of the dependent variable.
In addition to referencing a Lookup Table as described
above, GoldSim also provides some specialized ways to reference a 1-D table
(i.e., to do an “inverse Lookup” and to compute the integral or derivative of a
1-D Table). These options are discussed
Learn more
- Browser View of a Lookup Table Element
- Building a Dynamic Lookup Table
- Controlling Interpolation and Extrapolation for a Lookup Table
- Linking a Lookup Table to an External Data Source
- Referencing a Lookup Table
- Specifying Data for a Lookup Table
- Steps for Defining a Lookup Table
- Using Lookup Table Elements