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

pi

3.141592653589793

e_const

2.718281828459045

g_const

9.80665

epsilon0_const

8.8541878128e-12

mu0_const

1.25663706212e-06

sigma_const

5.670374419e-08

R_const

8.314462618

k_B_const

1.380649e-23

N_A_const

6.02214076e+23

F_const

96485.33212

c_const

299792458.0

h_const

6.62607015e-34

e

2.718281828459045

i

imaginary unit

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.