Units

Numerical values

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

\[ \begin{align}\begin{aligned}t &= \hat t \Delta t\\x &= \hat x \Delta x\end{aligned}\end{align} \]

Here physical time and position are on the left hand side and hat denotes a numerical (or code) value used in 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 speed of light we get numerical speed of light or CFL (Courant–Friedrichs–Lewy number):

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

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

Rest of the physical values are written as:

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

Note the same fiducial value for magnetic and electric fields.

Choosing the fiducial values

Derivatives transform as:

\[ \begin{align}\begin{aligned}\frac{\partial}{\partial t} & = \frac{1}{\Delta t} \frac{\partial}{\partial \hat t}\\\frac{\partial}{\partial x} & = \frac{1}{\Delta x} \frac{\partial}{\partial \hat x}\\\nabla &= \frac{1}{\Delta \hat x}\hat \nabla\end{aligned}\end{align} \]

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\]