Shortened Particle motion
This commit is contained in:
+52
-40
@@ -442,16 +442,15 @@ each particle is viewed as a cloud of constant density and with the same size
|
|||||||
as a grid cell (but freely movable relative to the grid). The shape and weight function
|
as a grid cell (but freely movable relative to the grid). The shape and weight function
|
||||||
that generate that view are given by
|
that generate that view are given by
|
||||||
\begin{equation}
|
\begin{equation}
|
||||||
S_{CIC}(x) = \left\{
|
S_{CIC}(x) =
|
||||||
\begin{array}{ll}
|
\begin{cases}
|
||||||
1 & |x|\leq 1/2 \\
|
1 & |x|\leq 1/2 \\
|
||||||
0 & \mathrm{else}
|
0 & \text{else}
|
||||||
\end{array},\quad W_{CIC}(x) = \left\{
|
\end{cases},\quad W_{CIC}(x) =
|
||||||
\begin{array}{ll}
|
\begin{cases}
|
||||||
1-|x| & |x|\leq 1 \\
|
1-|x| & |x|\leq 1 \\
|
||||||
0 & \mathrm{else}
|
0 & \text{else}
|
||||||
\end{array}
|
\end{cases}
|
||||||
\right.
|
|
||||||
\end{equation}
|
\end{equation}
|
||||||
and illustrated in Fig.~\ref{fig:num:S_CIC}.
|
and illustrated in Fig.~\ref{fig:num:S_CIC}.
|
||||||
%The associated weight function $W_{CIC}$ is
|
%The associated weight function $W_{CIC}$ is
|
||||||
@@ -587,55 +586,69 @@ noise.
|
|||||||
\label{sec:num:particle}
|
\label{sec:num:particle}
|
||||||
|
|
||||||
|
|
||||||
Once the electromagnetic fields have been interpolated to the locaton of the
|
Once the electromagnetic fields have been interpolated to the location of the
|
||||||
particle, it is necessary to update the position and velocity of the particle
|
particle, it is necessary to update the position and velocity of the particle
|
||||||
accordingly. Since the first publication of the particle push by
|
accordingly. Since the first publication of the particle push by
|
||||||
\cite{Boris_1970} bascially all codes use this method, possibly with minor
|
\cite{Boris_1970} basically all codes use this method, possibly with minor
|
||||||
adjustments.
|
adjustments.
|
||||||
|
|
||||||
Similar to the leap-frog procedure for the electromagnetic fields the particle
|
Similar to the leap-frog procedure for the electromagnetic fields the particle's position and velocity are updated according to
|
||||||
is updated according to
|
|
||||||
\begin{align}
|
\begin{align}
|
||||||
\vec{v}(t+\Delta{t}/2) &= \vec{v}(t-\Delta{t}/2) + \vec{F}(x(t),v(t))\cdot\Delta{t}/m \quad , \label{eq:num:velupdate}\\
|
\vec{v}(t+\Delta{t}/2) &= \vec{v}(t-\Delta{t}/2) + \vec{F}(x(t),v(t))\cdot\Delta{t}/m \quad , \label{eq:num:velupdate}\\
|
||||||
\vec{x}(t+\Delta{t})\phantom{/2} &= \vec{x}(t)\phantom{-\Delta{t}/2}\,\,\, + \vec{v}(t+\Delta{t}/2)\cdot\Delta{t} \quad . \label{eq:num:posupdate}
|
\vec{x}(t+\Delta{t})\phantom{/2} &= \vec{x}(t)\phantom{-\Delta{t}/2}\,\,\, + \vec{v}(t+\Delta{t}/2)\cdot\Delta{t} \quad . \label{eq:num:posupdate}
|
||||||
\end{align}
|
\end{align}
|
||||||
|
|
||||||
Without magnetic field, when the force $\vec{F}$ only depends on the particle
|
When the force depends only on position, this can be solved straight forward.
|
||||||
position $x(t)$, this is straight forward to solve. If there is however a
|
For velocity dependent forces - magnetic fields are the most important case -
|
||||||
magnetic field, the Lorentz force introduces a dependance on the velocity
|
there is dependence on $\vec{x}(t)$, which is not known. The interpolation
|
||||||
$\vec(t)$ that we do not know. The straight forward next step is to approximate
|
$\vec{v}(t) \approx 1/2\left(\vec{v}(t-\Delta{t}/2)+\vec{v}(t+\Delta{t}/2)\right)$, but
|
||||||
the velocity at this point in time by $\vec{v}(t) \approx
|
this leads to an implicit dependence of Eq.~\eqref{eq:num:velupdate} on
|
||||||
1/2\left(\vec{v}(t-\Delta{t}/2)+\vec{v}(t+\Delta{t}/2)\right)$, but now
|
$\vec{v}(t+\Delta{t}/2)$ on both sides.
|
||||||
Eq.~\eqref{eq:num:velupdate} has new new velocity $\vec{v}(t+\Delta{t}/2)$ on
|
|
||||||
both sides. The Boris push allows us to solve this implicit equation without
|
|
||||||
matrix inversion or iteration.
|
|
||||||
|
|
||||||
Since different modifications of the Boris push differ in how they handle the
|
%
|
||||||
relativistic case it is worthwhile to switch from velocities $\vec{v}$ to the
|
%Without magnetic field, when the force $\vec{F}$ only depends on the particle
|
||||||
relativistic momentum per rest mass $\vec{u} = \vec{p}/m = \gamma\vec{v}$.
|
%position $x(t)$, this is straight forward to solve. If there is however a
|
||||||
|
%magnetic field, the Lorentz force introduces a dependance on the velocity
|
||||||
|
%$\vec{v}(t)$ that we do not know. The straight forward next step is to approximate
|
||||||
|
%the velocity at this point in time by $\vec{v}(t) \approx
|
||||||
|
%1/2\left(\vec{v}(t-\Delta{t}/2)+\vec{v}(t+\Delta{t}/2)\right)$, but now
|
||||||
|
%Eq.~\eqref{eq:num:velupdate} has new new velocity $\vec{v}(t+\Delta{t}/2)$ on
|
||||||
|
%both sides. The Boris push allows us to solve this implicit equation without
|
||||||
|
%matrix inversion or iteration.
|
||||||
|
|
||||||
|
%The Boris push allows us to solve this implicit equation without matrix inversion or iteration. Since different modifications of the Boris push differ in how they handle the
|
||||||
|
%relativistic case it is worthwhile to switch from velocities $\vec{v}$ to the
|
||||||
|
%relativistic momentum per rest mass $\vec{u} = \vec{p}/m = \gamma\vec{v}$.
|
||||||
|
%This quantity does not suffer from the problem that it has a fixed upper value
|
||||||
|
%and thus we avoid the loss of precision due to the finite resolution of
|
||||||
|
%floating point numbers close to the speed of light.
|
||||||
|
%Eqs.~\eqref{eq:num:velupdate} and \eqref{eq:num:posupdate} then read
|
||||||
|
|
||||||
|
The Boris push allows us to solve this directly. In order to account for relativistic
|
||||||
|
versions, the formulation shall be done using relativistic momentum per rest mass $\vec{u} = \vec{p}/m = \gamma\vec{v}$.
|
||||||
This quantity does not suffer from the problem that it has a fixed upper value
|
This quantity does not suffer from the problem that it has a fixed upper value
|
||||||
and thus we avoid the loss of precission due to the finite resolution of
|
and thus we avoid the loss of precision due to the finite resolution of
|
||||||
floating point numbers close to the speed of light.
|
floating point numbers close to the speed of light.
|
||||||
Eqs.~\eqref{eq:num:velupdate} and \eqref{eq:num:posupdate} then read
|
Eqs.~\eqref{eq:num:velupdate} and \eqref{eq:num:posupdate} then read
|
||||||
\begin{align}
|
\begin{align}
|
||||||
\vec{u}(t+\Delta{t}/2) &= \vec{u}(t-\Delta{t}/2) + \vec{F}(x(t),v(t))\cdot\Delta{t}/m \quad , \\
|
\vec{u}(t+\Delta{t}/2) &= \vec{u}(t-\Delta{t}/2) + \vec{F}(x(t),v(t))\cdot\Delta{t}/m \quad , \\
|
||||||
\gamma(+\Delta{t}/2) &= \sqrt{1 + \frac{\vec{u}(t+\Delta{t}/2) \cdot \vec{u}(t+\Delta{t}/2)}{c^2}} \\
|
\gamma(t+\Delta{t}/2) &= \sqrt{1 + \frac{\vec{u}(t+\Delta{t}/2) \cdot \vec{u}(t+\Delta{t}/2)}{c^2}} \\
|
||||||
\vec{x}(t+\Delta{t})\phantom{/2} &= \vec{x}(t)\phantom{-\Delta{t}/2}\,\,\, + \vec{u}(t+\Delta{t}/2)\cdot\Delta{t}/\gamma(+\Delta{t}/2) \quad . \\
|
\vec{x}(t+\Delta{t})\phantom{/2} &= \vec{x}(t)\phantom{-\Delta{t}/2}\,\,\, + \vec{u}(t+\Delta{t}/2)\cdot\Delta{t}/\gamma(+\Delta{t}/2) \quad .
|
||||||
\end{align}
|
\end{align}
|
||||||
|
|
||||||
\begin{figure}[h!]
|
\begin{figure}[h!]
|
||||||
\centering
|
\centering
|
||||||
\includegraphics[width=0.5\hsize]{figure/numerics/boris_push.pdf}
|
\includegraphics[width=0.4\hsize]{figure/numerics/boris_push.pdf}
|
||||||
\caption{Illustration of the Boris push: The red arrows in the velocity diagram indicate the additional velocity $q/m \vec{E}(t) \Delta{t}/2$ that comes from the acceleration caused by the electric field $E(t)$ acting on the particle at the beginning and end of the Boris push. The vector $\vec{\Omega}$ is obtained by scaling the magnetic field $\vec{B}$ such that a crossproduct with it produces half the final rotation. This allows the construction of $\vec{v}_2$ that bisects the rotation and thus a accurate solution.}
|
\caption{Velocity diagram of the Boris push: The red arrows indicate the change in velocity $q/m \vec{E}(t) \Delta{t}/2$ from the acceleration by the electric field $E(t)$ at the beginning and end of the Boris push. The vector $\vec{\Omega}$ is a normalized magnetic field $\vec{B}$ such that a cross product with it produces half the final rotation. This allows the construction of $\vec{v}_2$ and the final accurate solution.}
|
||||||
\label{fig:num:boris_push}
|
\label{fig:num:boris_push}
|
||||||
\end{figure}
|
\end{figure}
|
||||||
|
|
||||||
The major insight that allows to solve the problem is that the magnetic field
|
The major insight that allows to solve the problem is that the magnetic field
|
||||||
can only change the direction of the velocity vector. It is therefore possible
|
can only change the direction of the velocity vector. It is therefore possible
|
||||||
to construct a suitable rotation using geometric considerations. The effect of
|
to construct a suitable rotation using geometric considerations. The effect of
|
||||||
the electric field is purely an accceleration in the direction of the electric
|
the electric field is purely an acceleration in the direction of the electric
|
||||||
field. To maintain reversability in time and second order accuracy it is split
|
field. To maintain reversibility in time and second order accuracy it is split
|
||||||
into two equal parts perform before and after handling the magentic field. Using this insight we can perform the following steps:
|
into two equal parts performed before and after handling the magnetic field. Using this insight we can perform the following steps:
|
||||||
\begin{align}
|
\begin{align}
|
||||||
\vec{u}_1 &= \vec{u}(t-\Delta{t}/2) + \frac{q}{m}\vec{E}(t)\frac{\Delta{t}}{2} \\
|
\vec{u}_1 &= \vec{u}(t-\Delta{t}/2) + \frac{q}{m}\vec{E}(t)\frac{\Delta{t}}{2} \\
|
||||||
\vec{\Omega} &= \tan{\left(\frac{q}{\gamma\,m}|B(t)|\frac{\Delta{t}}{2}\right)}\frac{\vec{B}}{|\vec{B}|} \label{eq:num:tanrotation} \\
|
\vec{\Omega} &= \tan{\left(\frac{q}{\gamma\,m}|B(t)|\frac{\Delta{t}}{2}\right)}\frac{\vec{B}}{|\vec{B}|} \label{eq:num:tanrotation} \\
|
||||||
@@ -646,16 +659,15 @@ into two equal parts perform before and after handling the magentic field. Using
|
|||||||
\end{align}
|
\end{align}
|
||||||
|
|
||||||
It is worth noting that the original algorithm by Boris contains the $\tan$ in
|
It is worth noting that the original algorithm by Boris contains the $\tan$ in
|
||||||
Eq.~\eqref{eq:num:tanrotation} and the suggestion to use to power series
|
Eq.~\eqref{eq:num:tanrotation} and the suggestion to expand at least up to
|
||||||
expansion at least up to fourth order. Many codes since then have made the
|
fourth order. Many codes since then have made the
|
||||||
approximation $\vec{\Omega} \approx q/(\gamma\,m)\,\vec{B}(t)\,\Delta{t}/2$,
|
approximation $\vec{\Omega} \approx q/(\gamma\,m)\,\vec{B}(t)\,\Delta{t}/2$,
|
||||||
This is cheaper, but only produces the correct gyro radius, not the correct
|
This produces only the correct gyro radius, not the correct gyro angle.
|
||||||
gyro angle.
|
|
||||||
|
|
||||||
The Lorentz factor $\gamma$ in Eq.~\eqref{eq:num:tanrotation} is given by
|
The Lorentz factor $\gamma$ in Eq.~\eqref{eq:num:tanrotation} is approximated by
|
||||||
$\gamma = \sqrt{1 + \vec{u}_1\cdot\vec{u}_1 / c^2}$. According to
|
$\gamma = \sqrt{1 + \vec{u}_1\cdot\vec{u}_1 / c^2}$, which according to
|
||||||
\cite{Vay_2008} this approximation can lead to spurious forces and he suggests
|
\cite{Vay_2008} can lead to spurious forces
|
||||||
a more complicated expression.
|
%and he suggests a more complicated expression.
|
||||||
%
|
%
|
||||||
% He therefor suggests to use
|
% He therefor suggests to use
|
||||||
% \begin{align}
|
% \begin{align}
|
||||||
|
|||||||
Reference in New Issue
Block a user