AmesimKnowledge

platform-facilities

Description of EXPORT and Post Processing functions

In this appendix we define the functions which are specific to the Export Setup module and Post processing tab, and we give a description of each.

Each function can be combined with any other.

Throughout this appendix, we consider Simcenter Amesim variables as functions of time.

The value assigned to a simple output parameter is the value held by the corresponding variable at the end of the simulation.

In the following array, A and B can be input parameters, output parameters or expressions.

T, T1 and T2 can be numerical values, input parameters, output parameters or expressions.

Syntax Brief description Full description Domain of definition
valueAt(A,T) Value at time t Returns the value of a variable or expression at a given time. If the specified time is not a communication time, the nearest communication time is considered. The result value is said to be undefined if: the specified time is outside the domain of definition of the variable or expression. A or T are undefined. T is lower than Start Time or greater than Final Time
restrict(A,T1,T2) Restriction to a time interval Allows the user to only consider part of a simulation result. If used alone, the result value is the value at time t= T2. The domain of definition is limited to [T1, T2]. This means that valueAt(restrict(A, T1, T2),t) is undefined for t < T1 and t > T2. It is also undefined on every point where A is undefined.
leftTrunc(A,T) Left truncation of a signal Allows the user to ignore the left part of a simulation result. If used alone, the result value is the value at time t= Final Time. The domain of definition is limited to [T,Final time]. This means that valueAt(leftTrunc(A, T),t) is undefined for t < T. It is also undefined on every point where A is undefined.
rightTrunc(A,T) Right truncation of a signal Allows the user to ignore the right part of a simulation result. If used alone, the result value is the value at time t= T. The domain of definition is limited to [Start Time, T]. This means that valueAt(rightTrunc(A, T),t) is undefined for t > T. It is also undefined on every point where A is undefined.
globMax(A) Global Maximum Computes the maximum value reached by a variable or expression on the domain of definition of A. The domain of definition is [Start Time, Final time]. This means that valueAt(globMax(A, T),t) is undefined for t > Final time and t < Start Time but is defined and constant anywhere else (using valueAt with globMax is not useful at all). It is also defined even on point where A is undefined. But it is always undefined if A is never defined on [Start Time, Final time].
globMin(A) Global Minimum This function is defined as globMin(A) = -globMax(-A). Cf. globMax(A)
locMax(A) Local Maximum Computes all the local maxima (points where the slope changes from positive to negative) of a variable or expression on the domain of definition of A, and keeps the highest one. If at least one local maximum is found, the domain of definition is [Start Time, Final time]. Otherwise, the domain of definition is empty. This means that valueAt(locMax(A, T),t) is either never defined or defined and constant only for t in [Start time, Final Time] (using valueAt with locMax is not useful at all). It may also be defined even on point where A is undefined. But it is always undefined if A is never defined for 3 consecutive communication times on [Start Time, Final time].
locMin(A) Local Minimum defined as locMin(A) = -locMax(-A). cf. locMax(A).
globMaxTime(A) Global Maximum Time Computes the time for which globMax(A) is reached. The domain of definition is the same as for globMax function.
globMinTime(A) Global Minimum Time This function is defined as globMinTime(A) = globMaxTime(-A) cf globMaxTime(A).
locMaxTime(A) Local Maximum Time Computes the time for which the highest local maximum is found. The domain of definition is the same as for locMax function
locMinTime(A) Local Minimum Time This function is defined as locMinTime(A) = locMaxTime(-A). cf locMaxTime(A).
reachTime(A,B) Reach Time Tries to find the first communication time ti for which: - A(ti) and B(ti) are defined and are such as: A(ti) = B(ti) OR - A(ti-1), B(ti-1), A(ti) and B(ti) are defined and are such as: A(ti-1) < B(ti-1) AND A(ti) ≤ Bti) OR A(ti-1) > B(ti-1) AND A(ti) ≤ B(ti) If no such time is found, the function is never defined. Otherwise, valueAt(reachTime(A, B), t) is defined and constant only for t in [Start Time, Final Time] and is not defined for any other t. It may also be defined even on point where A or B are undefined.
responseTime (A,S) Response Time Returns the last time at which a specified signal was outside a specified range ‘I’of its final value. I = [1-S/100)*XFinal ; (1+S/100)*Xfinal] Syntax : responseTime(A,S) A is the input signal the user wants to analyze. S is a percentage 0 < S ≤ 100 This computation is based on the stabilization of a signal at the end of a simulation. It is the user’s responsibility to ensure this criterion is respected. The function does not return an error message in the case of a non-stabilized signal. The function is defined as soon as A(t) is defined for at least one t.
differ(A) Derivation Computes the derivative of a variable A. The result value is defined as: Except for TN=EndTime where the formula used is: differ(A) is defined for every Ti where A(Ti) and A(Ti+k) are defined where k is the first integer for which Ti≠Ti+k. It is also defined for TN=EndTime if A(TN-k) is defined where k is the first integer for which TN≠TN-k.
integ(A) Integration Returns the value of the integration of A on the whole domain of definition of A. To compute the integral we are using the following approximation (trapezoidal method): It is defined as soon as A(t) is defined for at least one t. valueAt(integ(A), T) is defined if and only if T belongs to the domain of definition of A and is Thus, if A is defined on [T1, T2], integ(restrict(A, T1, T2)) is . valueAt(integ(restrict(A, T1, T2)), T) is defined only if T belongs to [T1, T2] and is .
mean(A) Mean Value The mean value definition of a signal used here is the classic one: and mean (A)=0 if ∆T=0 The domain of definition is the same as for the integ function.
dist(A,B) Distance between two curves The definition of the distance between two signals is the classic one: dist(A,B) is then computed as integ(fabs(A-B)). It is defined as soon as A and B are defined at a given time T.
readTable TimeLinear Read tables from files using linear splines readTableTimeLinear(file_path, extrapolation_type) file_path is the path to the file containing the table to read. It must be enclosed in double quote characters. extrapolation_type is the extrapolation method to use. extrapolation_type: 0: Not valid out of table range. 1: Extrapolation. 2: Extreme values. 3: Cyclic - first and last values of the table must be the same.
readTable TimeCubic Read tables from files using cubic splines readTableTimeCubic(file_path, boundary_conditions, extrapolation_type, left_slope, right_slope) file_path is the path to the file containing the table to read. It must be enclosed in double quote characters. boundary_conditions are the conditions at the edges for the extrapolation. extrapolation_type is the extrapolation method to use. left_slope is the slope to apply when extrapolation on the left is needed. This is available when boundary_conditions is specified as the slopes mode. right_slope is the slope to apply when extrapolation on the right is needed. This is available when boundary_conditions is specified as the slopes mode. boundary_conditions: 0: Not valid out of table range. 1: Natural (y”=0). 2: Specified slopes. 3: Cyclic - first and last values of the table must be the same.
extrapolation _type: 1: Linear. 2: Cubic.
readTableConvertedTimeLinear readTable ConvertedTime Linear Read tables from files using linear splines, converting time line to the requested unit readTableConvertedTimeLinear (file_path, extrapolation_type, time_unit) file_path is the path to the file containing the table to read. It must be enclosed in double quote characters. extrapolation_type is the extrapolation method to use. time_unit is the unit time range that has to be converted. For example if, in the table being read, the time line has been saved using ms time unit, you will have to set this third argument to "ms". Default unit is s. extrapolation_type: 0: Not valid out of table range. 1: Extrapolation. 2: Extreme values. 3: Cyclic - first and last values of the table must be the same.
readTableConvertedTimeCubic readTable ConvertedTime Cubic Read tables from files using cubic splines, converting the time line to the requested unit readTableConvertedTimeCubic (file_path, boundary_conditions, extrapolation_type, left_slope, right_slope, ) file_path is the path to the file containing the table to read. It must be enclosed in double quote characters. boundary_conditions are the conditions at the edges for the extrapolation. extrapolation_type is the extrapolation method to use. left_slope is the slope to apply when extrapolation on the left is needed. This is available when boundary_conditions is specified as the slopes mode. right_slope is the slope to apply when extrapolation on the right is needed. This is available when boundary_conditions is specified as the slopes mode. time_unit is the unit time range that has to be converted. For example if, in the table being read, the time line has been saved using ms time unit, you will have to set this third argument to "ms". Default unit is s. boundary_conditions: 0: Not valid out of table range 1: Natural (y”=0). 2: Specified slopes 3: Cyclic - first and last values of the table must be the same.
extrapolation _type: 1: Linear. 2: Cubic.
readTable VarLinear Identical to readTable TimeLinear except that it has an extra argument which is the table input expression. Table input is a token, or expression of tokens, recognized by the Expression Editor.
readTable VarCubic Identical to readTable TimeCubic except that it has an extra argument which is the table input expression. Table input is a token, or expression of tokens, recognized by the Expression Editor.
filter(A, n, wc) filter This function returns a filtered signal at a given cut-off frequency and a specified order. A is the input signal the user wants to filter. n is the filter order 1 ≤ n ≤ 5 (wc) is the relative cut-off frequency 0 ≤ wc ≤ 0.5 The relative cut-off frequency is the ratio between the desired cut-off frequency and the signal sampling frequency. the maximum value of (wc) (0.5) is the Nyquist frequency. This function applies an IIR, nth order Butterworth round trip filter to a signal. If this function is used in a stand-alone version, the last value of the filtered signal is returned. Warning: The filter function relies on equidistant points. This means that the signal to which you are applying the filter must have been obtained using a constant print interval. You must make sure that: - the simulation was launched without discontinuity printouts, - the submodel TI001 was not enclosed in the simulated system. The domain of definition is the same as that of the original signal.

Source: https://docs.sw.siemens.com/en-US/doc/254352342/PL20250521841123434.amesim_collection.Export/Description_of_EXPORT_and_Post_Processing_functions · retrieved 2026-07-17