Dimensionality#

This subsection enables automatic rescaling of physical properties when the simulation is not carried out in SI units. It is particularly useful when a mesh is built in non-SI units (e.g. centimetres or millimetres) but the physical properties (e.g. viscosity, thermal conductivity, permittivity) are known and tabulated in SI units. Instead of converting every property by hand, the user specifies the fundamental unit scales and Lethe rescales all properties automatically.

subsection dimensionality
  set length           = 1   # metre
  set mass             = 1   # kilogram
  set time             = 1   # second
  set temperature      = 1   # Kelvin
  set electric current = 1   # Ampere
end

The default value of every parameter is 1, which corresponds to the SI unit system. No rescaling is applied in that case.

Parameters#

length

The length unit used in the simulation, expressed in metres. If the mesh was built in centimetres, for example, set length = 0.01.

mass

The mass unit used in the simulation, expressed in kilograms. For most simulations this can be left at its default value of 1.

time

The time unit used in the simulation, expressed in seconds.

temperature

The temperature unit used in the simulation, expressed in Kelvin.

electric current

The electric current unit used in the simulation, expressed in Amperes. This parameter is only relevant for simulations that include electromagnetic physics (e.g. the time-harmonic Maxwell solver).

How rescaling works#

Each physical property has a known dimensional formula in terms of the five base dimensions: length \(\mathsf{L}\), mass \(\mathsf{M}\), time \(\mathsf{T}\), temperature \(\mathsf{\Theta}\), and electric current \(\mathsf{I}\). When non-SI base units are chosen, a quantity expressed in SI must be multiplied by a scaling factor to obtain its value in the simulation unit system.

If the user sets a length scale \(L\), a mass scale \(M\), a time scale \(T\), a temperature scale \(\Theta\), and an electric current scale \(I\) (all expressed in their respective SI units), then a property whose SI unit is \(\mathsf{L}^{a}\,\mathsf{M}^{b}\,\mathsf{T}^{c}\,\mathsf{\Theta}^{d}\,\mathsf{I}^{e}\) is rescaled by

\[\text{scaling} = L^{a} \cdot M^{b} \cdot T^{c} \cdot \Theta^{d} \cdot I^{e}\]

and the value supplied by the user (in SI) is multiplied by this factor before being used in the solver.

The table below lists the scaling factor applied to each property supported by Lethe, together with its SI unit and its dimensional formula.

Scaling factors for supported physical properties#

Property

SI unit

Scaling factor

Density

\(\text{kg/m}^3\)

\(L^3 / M\)

Specific gas constant

\(\text{J/(kg·K)}\)

\(T^2 \Theta / L^2\)

Dynamic viscosity

\(\text{Pa·s}\)

\(T / L^2\)

Specific heat capacity

\(\text{J/(kg·K)}\)

\(T^2 \Theta / L^2\)

Thermal conductivity

\(\text{W/(m·K)}\)

\(T^3 \Theta / (M \cdot L)\)

Specific enthalpy

\(\text{J/kg}\)

\(T^2 / (M \cdot L^2)\)

Diffusivity

\(\text{m}^2/\text{s}\)

\(T / L^2\)

Thermal expansion coefficient

\(\text{K}^{-1}\)

\(\Theta\)

Surface tension

\(\text{N/m}\)

\(T^2 / M\)

Surface tension gradient

\(\text{N/(m·K)}\)

\(\Theta \cdot T^2 / M\)

Cahn–Hilliard mobility

\(\text{m}^3\text{·s/kg}\)

\(M / (L^3 \cdot T)\)

Cahn–Hilliard interface thickness

\(\text{m}^{-1}\)

\(1 / L\)

Electromagnetic frequency

\(\text{s}^{-1}\)

\(L / c_0\) (see note below)

Electric field amplitude (E)

\(\text{V/m}\)

\(I \cdot T^3 / (M \cdot L)\)

Magnetic field amplitude (H)

\(\text{A/m}\)

\(L / I\)

Vacuum permittivity \(\varepsilon_0\)

\(\text{F/m}\)

\(M \cdot L^3 / (I^2 \cdot T^4)\)

Vacuum permeability \(\mu_0\)

\(\text{H/m}\)

\(T^2 \cdot I^2 / (M \cdot L)\)

Note

The electromagnetic frequency scaling uses a special formula, \(L / c_0\), where \(c_0 = 299\,792\,458\ \text{m/s}\) is the speed of light in vacuum. The time scale does not appear in this factor because the time-harmonic Maxwell formulation is time-independent by construction.

Warning

If the user chooses to do the rescaling by hand, make sure to adjust the frequency so the dimensionless wavenumber \(\kappa = \omega \sqrt{\varepsilon \mu}L\) remains unchanged when changing the length scale \(L\). This is necessary to preserve the physics of the problem as the electromagnetic solver always solves the system in dimensionless form and does not know about the length scale.

Examples#

Mesh in centimetres, properties in SI#

A mesh is built in centimetres so that a physical height of \(0.10\ \text{m}\) appears as \(10\) in the mesh file. All physical properties (viscosity, thermal conductivity, etc.) are available in SI units.

subsection dimensionality
  set length = 0.01
end

With this setting, a kinematic viscosity of \(1 \times 10^{-6}\ \text{m}^2/\text{s}\) is automatically rescaled by \(T/L^2 = 1/(0.01)^2 = 10^4\), yielding the equivalent value \(10^{-2}\ \text{cm}^2/\text{s}\) inside the solver.

Electromagnetic simulation in centimetres#

A time-harmonic Maxwell simulation is carried out on a centimetre-scale geometry. The electric field, permittivity, and permeability are all rescaled consistently.

subsection dimensionality
  set length = 0.01
end

The key scalings are:

  • Electric field \([\text{V/m}]\): scaling \(= I T^3/(M L) = 1/(0.01) = 100\). A field of \(1\ \text{V/m}\) becomes \(100\) in simulation units (which are not \([\text{V/m}]\) anymore, but rather \([\text{V_{cm}/cm}]\), a custom basis for the voltage).

  • Magnetic field \([\text{A/m}]\): scaling \(= L/I = 0.01/1 = 0.01\). \(H = 1\ \text{A/m}\) becomes \(0.01\) in simulation units.