Expressions > Inputs to expressions
Mathematical functions in expressions
Mathematical functions
The following table lists mathematical functions that are commonly used in formulas for CAE expressions. In the table, v denotes the dimensional or dimensionless numerical argument of the function. To avoid unintended results from expressions, always follow the recommendations in the table for the dimensionality of the arguments for the mathematical functions.
For some mathematical functions, the software can issue a warning message when the dimensionality of the argument is inconsistent with that required by the function. For more information, see Inconsistent units warnings.
| Function | Description | Recommended dimensions for the argument |
|---|---|---|
| ABS(v) | Returns the absolute value of the argument while stripping the units | Dimensionless |
| ABS(v,USEUNITS,TRUE) | Alternate form of ABS(v) that returns the absolute value of the argument while preserving the units | Any |
| ABSU(v) | Returns the absolute value of the argument while preserving the units | Any except temperature arguments with the units of C, K, F, and R |
| ACOSINE(v) | Returns the inverse cosine of the argument | Dimensionless arguments that range between –1 and 1 |
| ASINE(v) | Returns the inverse sine of the argument | Dimensionless arguments that range between –1 and 1 |
| ATANGENT(v) | Returns the inverse tangent of the argument | Dimensionless |
| ATANGENT2(v1,v2) | Returns the inverse tangent for the quotient v2/v1 | Any with both of the arguments having the same dimensionality |
| AVG(v1,v2,v3,......) | Returns the arithmetic mean of the arguments | Any with all of the arguments having the same dimensionality |
| CEILING(v) | Rounds the argument to the next highest integer | Any |
| CEILING(v1,BASE,v2) | Alternate form of CEILING(v) that rounds the argument to the next highest integer independent of the units for the expression | Any with both of the arguments having the same dimensionality |
| COS(v) | Returns the cosine of the argument | Radians, degrees, or dimensionlessDimensionless arguments are taken to be in degrees |
| EXP(v) | Returns the exponential function evaluated at v | Dimensionless |
| FLOOR(v) | Rounds the argument to the next lowest integer | Any |
| FLOOR(v1,BASE,v2) | Alternate form of FLOOR(v) that rounds the argument to the next lowest integer independent of the units for the expression | Any with both of the arguments having the same dimensionality |
| HYPCOS(v) | Returns the hyperbolic cosine of the argument | Radians |
| HYPSIN(v) | Returns the hyperbolic sine of the argument | Radians |
| HYPTAN(v) | Returns the hyperbolic tangent of the argument | Radians |
| LOG(v) | Returns the natural logarithm of the argument | Dimensionless and greater than zero |
| LOG10(v) | Returns the base 10 logarithm of the argument | Dimensionless and greater than zero |
| MAX(v1,v2,v3,.....) | Returns the largest argument from the set of arguments | Any with all of the arguments having the same dimensionality |
| MINIMUM(v1,v2,v3,.....)orMIN(v1,v2,v3,.....) | Returns the smallest argument from the set of arguments | Any with all of the arguments having the same dimensionality |
| MOD(v1,v2) | Returns the modulo of the arguments | Any |
| MOD(v1,v2,USEUNITS,TRUE) | Alternate form of MOD(v1,v2) that returns the modulo of the arguments independent of the units for the expression | Any with both of the arguments having the same dimensionality |
| PI() | Returns the number π | N/A(1) |
| ROUND(v) | Rounds the argument to the closest integer | Any |
| ROUND(v1,BASE,v2) | Alternate form of ROUND(v) that rounds the argument to the closest integer independent of the units for the expression | Any with both of the arguments having the same dimensionality |
| SIGN(v) | Returns the sign of the argument or returns zero if the argument is zero | Dimensionless |
| SIN(v) | Returns the sine of the argument | Radians, degrees, or dimensionlessDimensionless arguments are taken to be in degrees |
| SQRT(v) | Returns the square root of the argument | Dimensionless arguments and arguments that have dimensions that are perfect squares |
| TAN(v) | Returns the tangent of the argument | Radians, degrees, or dimensionlessDimensionless arguments are taken to be in degrees |
| (1) Even though there is no argument for the pi function, it is still necessary to include the parentheses. |
Examples of mathematical functions
The following table provides examples of how the expression system evaluates dimensional and dimensionless numerical arguments for each mathematical function when the expression is dimensional or dimensionless and the mathematical function is the formula for the expression.
| Function | Description | Example | ||
|---|---|---|---|---|
| Expression dimensionality (units) | Formula for the expression | Value for the expression | ||
| ABS(v) (1) | Returns the absolute value of the argument while stripping the units | Unitless | abs(–5) | 5 |
| abs(–5[sec]) | 5 | |||
| abs(–5[min]) | 300 | |||
| Length (mm) | abs(–5) | 5[mm] | ||
| abs(–5[sec]) | 5[mm] | |||
| abs(–5[min]) | 300[mm] | |||
| Time (sec) | abs(–5) | 5[sec] | ||
| abs(–5[sec]) | 5[sec] | |||
| abs(–5[min]) | 300[sec] | |||
| ABS(v,USEUNITS,TRUE) | Alternate form of ABS(v) that returns the absolute value of the argument while preserving the units | Unitless | abs(–5,useunits,true) | 5 |
| abs(–5[sec],useunits,true) | 5 | |||
| abs(–5[min],useunits,true) | 300 | |||
| Length (mm) | abs(–5,useunits,true) | 5[mm] | ||
| abs(–5[sec],useunits,true) | Invalid (3) | |||
| abs(–5[min],useunits,true) | Invalid (3) | |||
| Time (sec) | abs(–5,useunits,true) | 5[sec] | ||
| abs(–5[sec],useunits,true) | 5[sec] | |||
| abs(–5[min],useunits,true) | 300[sec] | |||
| ABSU(v) (2) | Returns the absolute value of the argument while preserving the units | Unitless | absu(–5) | 5 |
| absu(–5[sec]) | 5[sec] | |||
| absu(–5[min]) | 5[min] | |||
| Length (mm) | absu(–5) | 5[mm] | ||
| absu(–5[sec]) | Invalid (3) | |||
| absu(–5[min]) | Invalid (3) | |||
| Time (sec) | absu(–5) | 5[sec] | ||
| absu(–5[sec]) | 5[sec] | |||
| absu(–5[min]) | 300[sec] | |||
| ACOSINE(v) (1) (4) | Returns the inverse cosine of the argument | Unitless | acosine(0.5) | 60 |
| acosine(0.5[mm]) | 60 | |||
| acosine(0.0005[m]) | 60 | |||
| Angle (degrees) (5) | acosine(0.5) | 60[degrees] | ||
| acosine(0.5[mm]) | 60[degrees] | |||
| acosine(0.0005[m]) | 60[degrees] | |||
| ASINE(v) (1) (4) | Returns the inverse sine of the argument | Unitless | asine(0.5) | 30 |
| asine(0.5[mm]) | 30 | |||
| asine(0.0005[m]) | 30 | |||
| Angle (degrees) (5) | asine(0.5) | 30[degrees] | ||
| asine(0.5[mm]) | 30[degrees] | |||
| asine(0.0005[m]) | 30[degrees] | |||
| ATANGENT(v) (1) | Returns the inverse tangent of the argument | Unitless | atangent(1) | 45 |
| atangent(1[mm]) | 45 | |||
| atangent(0.001[m]) | 45 | |||
| Angle (degrees) (5) | atangent(1) | 45[degrees] | ||
| atangent(1[mm]) | 45[degrees] | |||
| atangent(0.001[m]) | 45[degrees] | |||
| ATANGENT2(v1,v2) (1) | Returns the inverse tangent for the quotient v2/v1 | Unitless | atangent2(1,1) | 45 |
| atangent2(1[mm],1[mm]) | 45 | |||
| atangent2(1[mm],1) | 45 | |||
| atangent2(1,1[mm]) | 45 | |||
| atangent2(0.001[m],0.001[m]) | 45 | |||
| atangent2(0.001[m],1) | 45 | |||
| atangent2(1,0.001[m]) | 45 | |||
| Angle (degrees) (5) | atangent2(1,1) | 45[degrees] | ||
| atangent2(1[mm],1[mm]) | 45[degrees] | |||
| atangent2(1[mm],1) | 45[degrees] | |||
| atangent2(1,1[mm]) | 45[degrees] | |||
| atangent2(0.001[m],0.001[m]) | 45[degrees] | |||
| atangent2(0.001[m],1) | 45[degrees] | |||
| atangent2(1,0.001[m]) | 45[degrees] | |||
| AVG(v1,v2,v3,......) | Returns the arithmetic mean of the arguments | Unitless | avg(1,2) | 1.5 |
| avg(1[mm],2) | 1.5 | |||
| avg(1[mm],2[mm]) | 1.5 | |||
| avg(1[mm],0.002[m]) | 1.5 | |||
| Length (mm) | avg(1,2) | 1.5[mm] | ||
| avg(1[mm],2) | 1.5[mm] | |||
| avg(1[mm],2[mm]) | 1.5[mm] | |||
| avg(1[mm],0.002[m]) | 1.5[mm] | |||
| CEILING(v) | Rounds the argument to the next highest integer | See Ceiling function. | ||
| CEILING(v1,BASE,v2) | Alternate form of CEILING(v) that rounds the argument to the next highest integer independent of the units for the expression | |||
| COS(v) (1) | Returns the cosine of the argument | Unitless | cos(60) | 0.5 |
| cos(60[degrees]) | 0.5 | |||
| cos(pi()*1[radians]/3) | 0.5 | |||
| cos(60[mm]) | 0.5 | |||
| cos(0.06[m]) | 0.5 | |||
| Length (mm) | cos(60) | 0.5[mm] | ||
| cos(60[degrees]) | 0.5[mm] | |||
| cos(pi()*1[radians]/3) | 0.5[mm] | |||
| cos(60[mm]) | 0.5[mm] | |||
| cos(0.06[m]) | 0.5[mm] | |||
| EXP(v) (1) | Returns the exponential function evaluated at v | Unitless | exp(1) | 2.71828.... |
| exp(1[mm]) | 2.71828.... | |||
| exp(0.001[m]) | 2.71828.... | |||
| Length (mm) | exp(1) | 2.71828....[mm] | ||
| exp(1[mm]) | 2.71828....[mm] | |||
| exp(0.001[m]) | 2.71828....[mm] | |||
| FLOOR(v) | Rounds the argument to the next lowest integer | See Floor function. | ||
| FLOOR(v1,BASE,v2) | Alternate form of FLOOR(v) that rounds the argument to the next lowest integer independent of the units for the expression | |||
| HYPCOS(v) | Returns the hyperbolic cosine of the argument | Unitless | hypcos(2) | 1.000609.... |
| hypcos(2[radians]) | 3.76219.... | |||
| hypcos(2[degrees]) | 1.000609.... | |||
| hypcos(2[mm]) | 1.000609.... | |||
| hypcos(2[m]) | 7.2228....x1014 | |||
| Length (mm) | hypcos(2) | 1.000609....[mm] | ||
| hypcos(2[radians]) | 3.76219....[mm] | |||
| hypcos(2[degrees]) | 1.000609....[mm] | |||
| hypcos(2[mm]) | 1.000609....[mm] | |||
| hypcos(2[m]) | 7.2228....x1014[mm] | |||
| HYPSIN(v) | Returns the hyperbolic sine of the argument | Unitless | hypsin(2) | 0.034913.... |
| hypsin(2[radians]) | 3.62686.... | |||
| hypsin(2[degrees]) | 0.034913.... | |||
| hypsin(2[mm]) | 0.034913.... | |||
| hypsin(2[m]) | 7.2228....x1014 | |||
| Length (mm) | hypsin(2) | 0.034913....[mm] | ||
| hypsin(2[radians]) | 3.62686....[mm] | |||
| hypsin(2[degrees]) | 0.034913....[mm] | |||
| hypsin(2[mm]) | 0.034913....[mm] | |||
| hypsin(2[m]) | 7.2228....x1014[mm] | |||
| HYPTAN(v) | Returns the hyperbolic tangent of the argument | Unitless | hyptan(2) | 0.03489.... |
| hyptan(2[radians]) | 0.96402.... | |||
| hyptan(2[degrees]) | 0.03489.... | |||
| hyptan(2[mm]) | 0.03489.... | |||
| hyptan(2[m]) | 1 | |||
| Length (mm) | hyptan(2) | 0.03489....[mm] | ||
| hyptan(2[radians]) | 0.96402....[mm] | |||
| hyptan(2[degrees]) | 0.03489....[mm] | |||
| hyptan(2[mm]) | 0.03489....[mm] | |||
| hyptan(2[m]) | 1[mm] | |||
| LOG(v) (1) | Returns the natural logarithm of the argument | Unitless | log(exp(1)) | 1 |
| log(exp(1[mm])) | 1 | |||
| log(exp(0.001[m])) | 1 | |||
| Length (mm) | log(exp(1)) | 1[mm] | ||
| log(exp(1[mm])) | 1[mm] | |||
| log(exp(0.001[m])) | 1[mm] | |||
| LOG10(v) (1) | Returns the base 10 logarithm of the argument | Unitless | log10(10) | 1 |
| log10(10[mm]) | 1 | |||
| log10(0.01[m]) | 1 | |||
| Length (mm) | log10(10) | 1[mm] | ||
| log10(10[mm]) | 1[mm] | |||
| log10(0.01[m]) | 1[mm] | |||
| MAX(v1,v2,v3,.....) | Returns the largest argument from the set of arguments | Unitless | max(–1,0,1,2) | 2 |
| max(–1[mm],0[mm],1[mm],2[mm]) | 2 | |||
| max(–0.001[m],0[m],0.001[m],0.002[m]) | 2 | |||
| Length (mm) | max(–1,0,1,2) | 2[mm] | ||
| max(–1[mm],0[mm],1[mm],2[mm]) | 2[mm] | |||
| max(–0.001[m],0[m],0.001[m],0.002[m]) | 2[mm] | |||
| MIN(v1,v2,v3,.....)orMINIMUM(v1,v2,v3,.....) | Returns the smallest argument from the set of arguments | Unitless | min(–1,0,1,2) | –1 |
| min(–1[mm],0[mm],1[mm],2[mm]) | –1 | |||
| min(–0.001[m],0[m],0.001[m],0.002[m]) | –1 | |||
| Length (mm) | min(–1,0,1,2) | –1[mm] | ||
| min(–1[mm],0[mm],1[mm],2[mm]) | –1[mm] | |||
| min(–0.001[m],0[m],0.001[m],0.002[m]) | –1[mm] | |||
| MOD(v1,v2) | Returns the modulo of the arguments | See Modulo function. | ||
| MOD(v1,v2,USEUNITS,TRUE) | Alternate form of MOD(v1,v2) that returns the modulo of the arguments independent of the units for the expression | |||
| PI() | Returns the number π (6) | Unitless | pi() | 3.14159.... |
| Length (mm) | pi() | 3.14159....[mm] | ||
| ROUND(v) | Rounds the argument to the closest integer | See Rounding function. | ||
| ROUND(v1,BASE,v2) | Alternate form of ROUND(v) that rounds the argument to the closest integer independent of the units for the expression | |||
| SIGN(v) (1) | Returns the sign of the argument or returns zero if the argument is zero | Unitless | sign(2) | 1 |
| sign(0) | 0 | |||
| sign(–2) | –1 | |||
| sign(–2[mm]) | –1 | |||
| sign(–2[m]) | –1 | |||
| Length (mm) | sign(2) | 1[mm] | ||
| sign(0) | 0[mm] | |||
| sign(–2) | –1[mm] | |||
| sign(–2[mm]) | –1[mm] | |||
| sign(–2[m]) | –1[mm] | |||
| SIN(v) (1) | Returns the sine of the argument | Unitless | sin(30) | 0.5 |
| sin(30[degrees]) | 0.5 | |||
| sin(pi()*1[radians]/6) | 0.5 | |||
| sin(30[mm]) | 0.5 | |||
| sin(0.03[m]) | 0.5 | |||
| Length (mm) | sin(30) | 0.5[mm] | ||
| sin(30[degrees]) | 0.5[mm] | |||
| sin(pi()*1[radians]/6) | 0.5[mm] | |||
| sin(30[mm]) | 0.5[mm] | |||
| sin(0.03[m]) | 0.5[mm] | |||
| SQRT(v) | Returns the square root of the argument (7) | Unitless | sqrt(4) | 2 |
| sqrt(4[mm^2]) | 2 | |||
| sqrt(0.000004[m^2]) | 2 | |||
| Length (mm) | sqrt(4) | 2[mm] | ||
| sqrt(4[mm^2]) | 2[mm] | |||
| sqrt(0.000004[m^2]) | 2[mm] | |||
| TAN(v) (1) | Returns the tangent of the argument | Unitless | tan(45) | 1 |
| tan(45[degrees]) | 1 | |||
| tan(pi()*1[radians]/4) | 1 | |||
| tan(45[mm]) | 1 | |||
| tan(0.045[m]) | 1 | |||
| Length (mm) | tan(45) | 1[mm] | ||
| tan(45[degrees]) | 1[mm] | |||
| tan(pi()*1[radians]/4) | 1[mm] | |||
| tan(45[mm]) | 1[mm] | |||
| tan(0.045[m]) | 1[mm] | |||
| (1) Mathematical function that strips units from the argument. For more information, see Unit stripping mathematical functions. (2) Temperature in units of C, K, F, and R is not a valid argument. However, temperature difference in units of dC, dK, dF, and dR is a valid argument. (3) For the argument to be valid, it must have the same dimensionality as the expression, or be dimensionless. (4) If the argument is dimensionless, valid arguments range between –1 and 1. If the argument is dimensional, valid arguments range between –1[base unit] and 1[base unit]. Thus, 0.0005[m] is a valid argument, but 0.5[m] is not a valid argument because the expression system converts it to 500[mm] prior to evaluating the function. (5) For this formula, angle is the only valid dimensionality for the expression. (6) Even though there is no argument for the pi function, it is still necessary to include the parentheses. (7) Only dimensionless input or input having dimensions that are perfect squares are allowed. |
Unit stripping mathematical functions
Some mathematical functions strip the units from the argument before perfoming the mathematical operation.
For example, if the formula for an expression is ABS(-50[sec]), the software begins by stripping the unit from the argument. Then it takes the absolute value of the now dimensionless and unitless argument. If the expression for which the formula is defined has dimensionality and units, the software then assigns that dimensionality and units to the value for the expression. Thus, if the expression dimensionality and units are length and millimeters, the software returns +50 mm as the result.
How do I
Change rename and variable prefix settings
Find units and unit designations
Specify a thermal plugin function
Learn more
Inputs to expressions
Restrictions on auto-generated expressions
Fields in expressions
Units in expressions
Migrating expressions that include angular measures
Inconsistent units warnings
Look up more details
Lookup functions in expressions
Utility functions in expressions
Thermal-flow functions in expressions
Auto-generated expressions
Field function
Mapped field function
Mathematical operators in expressions
Temperatures in expressions
Complex numbers in expressions
Quick links
Command reference
Pre/Post video examples
Bulk Entry Descriptions
Simcenter 3D tutorials
Browse Simcenter 3D help by product area
Mathematical functions in expressions, Simcenter 3D 2021.1 Series
© 2020 Siemens
window.mainLanguage="en_US"
window.delivId=""
window.projectId=""
MathJax.Hub.Config({ TeX: { extensions: ["autoload-all.js"] }, tex2jax: { displayMath: [ ] }, "SVG": { scale: 125 } });
Source: https://docs.sw.siemens.com/en-US/doc/289054037/PL20200601120302950.advanced/xid907076 · retrieved 2026-07-17