Expressions and units
The expression syntax used in parameters, variables, material properties, physics settings and results.
Operators
+ - * / ^ (power; ** works too), parentheses, comparisons < ⇐ > >= == != (true = 1, false = 0), for example T0 + 5[K]*(t > 10[s]).
Functions
sin, cos, tan, asin, acos, atan, atan2, sinh, cosh, tanh, exp, log, log10, sqrt, abs, min, max, sign, floor, ceil, round, pow, real, imag, arg, conj.
Two-argument min(a, b) and max(a, b) work in every expression; in physics settings they are exported to Elmer as small MATC helper functions.
Constants
| Name | Value |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Units
Write a unit in square brackets after a number or parameter: 10[mm], 20[degC], 5[W/(m^2*K)], n[rpm]. Values are converted to SI before Elmer sees them.
SI prefixes (Y, Z, E, P, T, G, M, k, h, da, d, c, m, u, µ, n, p, f) work with: m, g, s, A, K, mol, cd, N, Pa, J, W, C, V, F, ohm, S, Wb, T, H, Hz, L, l, eV, bar, Ohm, Ω.
Other units: 1, rad, sr, deg, min, h, d, day, yr, in, ft, yd, mi, lb, lbf, psi, atm, torr, mmHg, kWh, Wh, cal, kcal, rpm, percent, ppm, gal, erg, dyn, G, Oe, liter.
Temperatures with an offset: degC, °C, degF, °F, degR. A temperature difference is written in K.