Operations and functions in expressions

This section lists the operations and functions available in the expression field editor. Arguments to trigonometric functions are assumed to be in radians in the range from -π to π. Proper inline Python statements returning a value, including functions in the math module such as those listed, can be used.

For more information, see the documentation for the math module accessible from the official Python home page (http://www.python.org). Select HelpAbout Abaqus from the main menu bar to obtain the Python version used by Abaqus/CAE.

Related Topics
Building valid expressions
Creating expression fields
Mathematical operations:
+ Add
Subtract
* Multiply
/ Divide
% Return the remainder of integer division.
1/A Return the reciprocal of A.
ceil(A) Return the ceiling of A, the smallest integer value greater than or equal to A.
fabs(A) Return the absolute value.
floor(A) Return the floor of A, the largest integer value less than or equal to A.
fmod(A,B) Return fmod(A, B), as defined by the platform C library. The intent of the C standard is that fmod(A, B) be exactly (mathematically; to infinite precision) equal to An * B for some integer n such that the result has the same sign as A and magnitude less than abs(B).
frexp(A)[] Return the mantissa and exponent of A as the pair (m, e). m is a float and e is an integer such that A = m * 2 ** e exactly. Use the brackets to specify the index of the return value to use in the expression evaluation.
modf(A)[] Return the fractional and integer parts of A. Use the brackets to specify the index of the return value to use in the expression evaluation.
Trigonometric functions:
acos(A) Return the arccosine.
asin(A) Return the arcsine.
atan(A) Return the arctangent.
cos(A) Return the cosine.
cosh(A) Return the hyperbolic cosine.
hypot(A,B) Return the Euclidean norm, sqrt(A*A + B*B). This is the length of the vector from the origin to point (A, B).
sin(A) Return the sine.
sinh(A) Return the hyperbolic sine.
tan(A) Return the tangent.
tanh(A) Return the hyperbolic tangent.
Power and logarithmic functions:
exp(A) Return the natural exponential to the power A, eA.
ldexp(A,B) Return A * (2B).
log(A) Return the natural logarithm.
log10(A) Return the base 10 logarithm.
pow(A,B) Raise a variable to a power.
sqrt(A) Return the square root.
Constants:
pi Mathematical constant π.
e Mathematical constant e.