Variable#
A Variable node defines a single value that can be used across multiple attributes. Examples of variables
are physical properties such as mass densities and lower heating values.
Calculations in variables are done using the following formula:
The Addition is applied before the Multiplier, and the bounds are applied last.
An attribute that references the node holds \(y\) to its own minimum and maximum value as well: an inclusive one clamps \(y\), and \(y\) reaching an exclusive one stops the run with an error. See Assigning attributes.
Example:
Variable "lower_heating_value_diesel" {
Value = 42.7
}
Attributes#
Value#
Sets the value of the variable, which enters the formula at the top of this page. The value may be an expression of numbers; an expression that references a node is rejected. INF and -INF are accepted, and are checked against each attribute the variable is assigned to (see Assigning attributes).
Data type:
Float,ExpressionExample value:
42.7Default: None. Must be provided by the user.
Addition#
Sets a value that is added to the Value, before the Multiplier is applied, according to the formula at the top of this page. The value may be an expression of numbers; an expression that references a node is rejected. INF and -INF are rejected.
Data type:
Float,ExpressionExample value:
10Default: 0
Multiplier#
Sets a factor that the Value, plus the Addition, is multiplied by, according to the formula at the top of this page. The value may be an expression of numbers; an expression that references a node is rejected. INF and -INF are rejected.
Data type:
Float,ExpressionExample value:
2.5Default: 1
LowerBound#
Sets the lower bound that the result is clamped to after the Addition and the Multiplier are applied, according to the formula at the top of this page. -INF means no lower bound; INF is rejected. It must not exceed UpperBound, nor the upper bound an attribute referencing the node requires.
Data type:
FloatExample value:
-5Default: -INF
UpperBound#
Sets the upper bound that the result is clamped to after the Addition and the Multiplier are applied, according to the formula at the top of this page. INF means no upper bound; -INF is rejected. It must not be below LowerBound, nor the lower bound an attribute referencing the node requires.
Data type:
FloatExample value:
5Default: INF