The Tools menu
Expression editor
Expression editor
Starting the Expression editor
Customized filter
Normally the Expression editor is used for entering values in the form of expressions in a Change Parameters dialog box. However, in any mode it can be started using Tools > Expression editor.
Note
When the Expression editor is opened from the Export setup dialog box or the Post processing tab, some extra functions are available. Similarly, in Simulation mode, further functions are available. These are described in Description of the Expression Editor functions.
The Expression editor is comprised of two tabs:
Functions and operators
Declared operands and constants
Figure 347: The Functions and operators tab
Figure 348: The Declared operands and constants tab
Using the Expression editor
You can use the Expression editor for:
general calculations,
entering mathematical functions and expressions as a parameter value.
Procedure
To enter a mathematical function in the input box, select a function in the Mathematical functions list on the Functions and operators tab.
Double-click on the mathematical function:
The mathematical function is placed in the input box. Note You can also use the auto-completion facility to help you enter functions in the input box, as described below.
- Enter one or several values in the brackets.
You can select values in the Fundamental constants and Declared operands and constants tab lists by double-clicking on the values.
If necessary complete the expression by selecting operators and functions in the two lists.
When your expression is complete, click on the = button.
The result is displayed in the grey box next to the = button.
Auto-completion
Auto-completion
Expression editor auto-completion
To simplify the process of entering mathematical functions, operators, operands or constants in the Expression editor, you can use the auto-completion facility.
When you position your cursor in the input box, you can type the first letter(s) of the function you require. The auto completion facility proposes a list of the available corresponding functions.
For example, if you enter e in the input box, the function exp is proposed (because it is the only function starting with e). If you enter s, you get the following list to choose from:
Once the list is displayed, you can continue to type further letters; the list is refined according to the new characters you enter. In the above example, typing si refines the list to sign, sin and sinh.
When you have several choices in a list (as above) you can use your mouse to select the one you require, or use the arrow keys and then press Tab on your keyboard to make your selection.
Valid expressions for the Expression editor
Expression editor valid expressions for
The following are valid in the Expression editor:
Global parameters
Real and integer constants
The label PI which is taken to be an approximation to a ≠ 0
The arithmetic operations +, -, *, / and for raising to a power ^ or **
The boolean operations: !, !=, &&, ||, >, <, >=, <=,= =
Parentheses ‘(‘ and ‘)’ with their usual mathematical significance
Comma ‘,’ for separating variables
The following functions of one variable:
abs
absolute value
exp
exponential
acos
arc cosine
fabs
absolute value of floating
acosh
inverse hyperbolic cosine
integ
integration
asin
arc sine
log
natural logarithm
asinsh
inverse hyperbolic sine
log10
base-10 logarithm
atan
arc tangent
sin
sine
atanh
inverse hyperbolic tangent
sinh
hyperbolic sine
cos
cosine
sqrt
square root
cosh
hyperbolic cosine
tan
tangent
differ
differentiation
tanh
hyperbolic tangent
- The following functions of two variables:
atan2
arc tangent of y/x
sign
sign
lsqrta
square root
- The following functions of two or more variables:
min
minimum
max
maximum
The meaning of most of these functions is obvious. However, here we give more details on some of them.
atan
The function atan2(a,b) means atan(a/b) unless b=0 in which case it means atan(x = Ax + Bu)) = π/2 if a ≠ 0 and is an error otherwise.
sign
The function sign(a,b) means the absolute value of a with the sign of b.
differ
The function differ differentiates the argument with respect to time whereas integ integrates it. Note these two functions operate on the data stored in the results file. There is no control on error for these two functions and they should be regarded as rough estimates (1st order only).
lsqrta
This utility is used to compute the square root of an input. The validity interval of the function lsqrta is . In fact, negative input values are accepted and the returned value is then .The function lsqrta also includes a linear region for input values which are too close to zero. The amplitude of this linear region centered on 0 can be set by the user with the xcrit.
Then, for the square root is considered as linear. The slope of the linear part is adjusted to allow continuity between linear and non linear signals. Its value is .
Figure 349: The characteristics of the function lsqrta
max/min
Returns the maximum or minimum of the arguments. You can enter as many arguments as you need.
Global parameters
If GP1, GP2 and GP3 appear in the global parameters list:
the following are valid calculated items:
GP1+GP2
GP1-GP2
12.3
(GP1+GP2)/GP3
sin(GP1)
GP1*pi
GP1**2
GP2^2
max(GP1,GP2/GP3,abs(GP1))
Simcenter Amesim will first check your expression. If it finds it is acceptable, it will enter the expression as a value of a parameter if you started the Expression editor from a Change Parameters dialog box.
Note
When the expression editor is opened from the Export setup dialog box or the Post Processing tab, some extra functions are available. Similarly, in Simulation mode, further functions are available. These are described in Description of the Expression Editor functions.
The maximum size for an expression is 255 characters.
Filtering lists
Expression editor filtering lists
Filtered lists
If you have a very large list of declared operands in the Expression editor it can be difficult to find a specific item. To simplify this process, the Expression editor and the Y-Axis selection window provide a filtering function. You can filter a list according to column values.
When you click on a column header, the basic sorting functions are available:
ascending sort
descending sort
In addition, all the values present in that column appear in a combo box. You can now select one of those values to filter the entire list:
Figure 350: Filtering in the Expression editor
When you select a value, the entire list is filtered according to your selection, and the button in the column header turns green to indicate that a filter is active on that column:
Figure 351: Filter activated
You can filter on several columns at once: Figure 352: Multiple column filter
To restore the full list in a column, select all in the combo box: Figure 353: Restoring a list
You can use a customized filter with regular expressions when filtering a column: Figure 354: Customized filters
With a customized filter you can use wildcards as follows:
?: a question mark can replace any single character in your search string.
For example, placing ?? in your search string means the search will use the wildcard for two characters in the search string.
*: an asterisk replaces zero, one or more of any characters in your search string.
[...]: Sets of characters can be represented in square brackets.
Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Reference/xid874724 · retrieved 2026-07-17