Units

Numerical values

Runko does not actually use cgs-Gaussian units in the simulation. Instead, values are normalized with fiducial values:

\[t = \hat t \Delta t \quad x = \hat x \Delta x\]

Here physical time and position are on the left-hand side, and the hat denotes a numerical (or code) value used inside Runko.

For coordinate velocity:

\[v = \frac{dx}{dt} = \frac{d\hat x}{d\hat t} \frac{\Delta x}{\Delta t} = \hat v \frac{\Delta x}{\Delta t}\]

Applying this to the speed of light gives the numerical speed of light, or the CFL (Courant–Friedrichs–Lewy) number:

\[\hat c = c \frac{\Delta t}{\Delta x}\]

and we can write \(v = \hat v \frac{c}{\hat c}\).

The rest of the physical values are written as:

\[\begin{split}\begin{split} B &= \hat B B_0 \\ E &= \hat E B_0 \\ J &= \hat J J_0 \\ A &= \hat A A_0 \end{split} \quad \begin{split} q &= \hat q q_0 \\ m &= \hat m m_0 \\ n &= \frac{\hat n}{(\Delta x)^3} \end{split}\end{split}\]

Note that the magnetic and electric fields share the same fiducial value.

Choosing the fiducial values

Derivatives transform as:

\[\frac{\partial}{\partial t} = \frac{1}{\Delta t} \frac{\partial}{\partial \hat t} \quad \frac{\partial}{\partial x} = \frac{1}{\Delta x} \frac{\partial}{\partial \hat x} \quad \nabla = \frac{1}{\Delta \hat x}\hat \nabla\]

Now we can write the dynamical Maxwell’s equations as:

\[ \begin{align}\begin{aligned}\frac{\partial \hat B}{\partial \hat t} &= -\hat c \hat \nabla \times \hat E\\\frac{\partial \hat E}{\partial \hat t} &= +\hat c \hat \nabla \times \hat B - \frac{4\pi J_0}{B_0} \Delta t\hat J\end{aligned}\end{align} \]

and acceleration due to Lorentz force as:

\[\frac{\partial \hat u}{\partial \hat t} = \frac{\hat c \hat q q_0 B_0}{c \hat m m_0} \Delta t \left(\hat E + \frac{\hat v}{\hat c} \times \hat B\right)\]

By choosing \(B_0 = \frac{m_0c}{q_0 \hat c \Delta t}\) and \(J_0 = \frac{B_0}{4\pi \Delta t}\) the equations above can be written as:

\[ \begin{align}\begin{aligned}\frac{\partial \hat B}{\partial \hat t} &= -\hat c \hat \nabla \times \hat E\\\frac{\partial \hat E}{\partial \hat t} &= +\hat c \hat \nabla \times \hat B - \hat J\\\frac{\partial \hat u}{\partial \hat t} &= \frac{\hat q}{\hat m} \left(\hat E + \frac{\hat v}{\hat c} \times \hat B\right)\end{aligned}\end{align} \]

Current density is \(J = qnv = \frac{q_0}{\Delta t (\Delta x)^2} \hat q \hat n \hat v\). By demanding that numerical current density can be written as \(\hat J = \hat n \hat q \hat v\) we can deduce that

\[J_0 = \frac{q_0}{\Delta t (\Delta x)^2}\]

Equating this with \(J_0\) defined earlier, we can solve for:

\[\Delta x = 4 \pi \frac{q_0^2}{m_0}\left(\frac{\hat c}{c}\right)\]

Magnetic field in terms of vector potential is \(B = \nabla \times A = \frac{A_0}{\Delta x} \hat \nabla \times \hat A\). By demanding that numerical magnetic field can be written as \(\hat B = \hat \nabla \times \hat A\) we can deduce that:

\[A_0 = \Delta x B_0\]