Information Calculator
The information calculator unit calculates information for an information stream. It can take input from multiple information inlet streams. The output value is calculated by a user-specified formula.
To change the name of the output information, edit the unit operation and go to the Information tab. You can also change the unit of measure of the output information; hit the button on the right of the output information.
You can add and remove input information streams by using the Add and Remove buttons. Double-click an existing input definition to modify it. Input names can only consist of alpha-numeric characters and underscores, and must not start with a number.
The information calculator requires a formula for the output result. The input data and output data are in SI units, but in the simulation environment the output data is exposed as a parameter, and can be shown in desired units of measure.
Formula syntax
The output formula can use the names of the input data as variable names. The following operands can be used in the formulas. The operators are in order of precedence. Use brackets to make order of operations explicit.
operand | sample | meaning |
---|---|---|
- | a - b | substraction |
+ | a + b | addition |
* | a * b | multiplication |
/ | a / b | division |
- | - a | negation (unary minus) |
^ | a ^ b | power (a to the power of b) |
The following values can be used:
value | description |
---|---|
PI | 3.1415926535897932384626433832795 |
R | universal gas constant, 8.314 J/mol/K |
number | any numeric value |
input name | value of an input variable |
The following functions can be used:
function | sample | description |
---|---|---|
SQRT | SQRT(a) | square root |
SIN | SIN(a) | sine |
COS | COS(a) | cosine |
TAN | TAN(a) | tangent |
SINH | SINH(a) | hyperbolic sine |
COSH | COSH(a) | hyperbolic cosine |
TANH | TANH(a) | hyperbolic tangent |
ASIN | ASIN(a) | arc sine |
ACOS | ACOS(a) | arc cosine |
ATAN | ATAN(a) | arc tangent |
FLOOR | FLOOR(a) | nearest lower integer |
CEIL | CEIL(a) | nearest higher integer |
ROUND | ROUND(a) | nearest integer |
EXP | EXP(a) | natural exponent |
LOG | LOG(a) | natural logarithm |
LOG10 | LOG10(a) | 10 based logarithm |
MIN | MIN(a,b) | minimum of two values |
MAX | MAX(a,b) | maximum of two values |
MOD | MOD(a,b) | modulus |
All formulas are case-insensitive. In the above, a and b are arbitrary expressions.