|
|
:toc:
|
|
|
[[chp:opalcycl]]
|
|
|
|
|
|
:stem: latexmath
|
|
|
:sectnums:
|
|
|
|
|
|
[[chp:fieldsolver]]
|
|
|
Field Solver
|
|
|
------------
|
|
|
|
|
|
Space charge effects are included in the simulation by specifying a
|
|
|
field solver described in this chapter and attaching it to the track
|
|
|
command as described in Chapter [track]. By default, the code does not
|
|
|
assume any symmetry i.e. full 3D. In the near future it is planed to
|
|
|
implement also a slice (2D) model. This will allow the use of less
|
|
|
numbers of macro-particles in the simulation which reduces the
|
|
|
computational time significantly.
|
|
|
|
|
|
The space charge forces are calculated by solving the 3D Poisson
|
|
|
equation with open boundary conditions using a standard or integrated
|
|
|
Green function method. The image charge effects of the conducting
|
|
|
cathode are also included using a shifted Green function method. If more
|
|
|
than one Lorentz frame is defined, the total space charge forces are
|
|
|
then the summation of contributions from all Lorentz frames. More
|
|
|
details will be given in Version 2.0.0.
|
|
|
|
|
|
[[sec:fieldsolver:fftbased]]
|
|
|
FFT Based Particle-Mesh (PM) Solver
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
The Particle-Mesh (PM) solver is one of the oldest improvements over the
|
|
|
PP solver. Still one of the best references is the book by R.W. Hockney
|
|
|
& J.W. Eastwood [hockney]. The PM solver introduces a discretization of
|
|
|
space. The rectangular computation domain
|
|
|
latexmath:[\Omega:=[-L_x,L_x]\times[-L_y,L_y]\times[-L_t,L_t]], just
|
|
|
big enough to include all particles, is segmented into a regular mesh of
|
|
|
latexmath:[M=M_x\times M_y\times M_t] grid points. For the discussion
|
|
|
below we assume latexmath:[N=M_x=M_y=M_t].
|
|
|
|
|
|
The solution of Poisson’s equation is an essential component of any
|
|
|
self-consistent electrostatic beam dynamics code that models the
|
|
|
transport of intense charged particle beams in accelerators. If the
|
|
|
bunch is small compared to the transverse size of the beam pipe, the
|
|
|
conducting walls are usually neglected. In such cases the Hockney method
|
|
|
may be employed [hockney, eastwoodandbrownrigg,hockneyandeastwood]. In
|
|
|
that method, rather than computing latexmath:[N_p^2] point-to-point
|
|
|
interactions (where latexmath:[N_p] is the number of macro-particles),
|
|
|
the potential is instead calculated on a grid of size
|
|
|
latexmath:[(2 N)^d], where latexmath:[N] is the number of grid
|
|
|
points in each dimension of the physical mesh containing the charge, and
|
|
|
where latexmath:[d] is the dimension of the problem. Using the Hockney
|
|
|
method, the calculation is performed using Fast Fourier Transform (FFT)
|
|
|
techniques, with the computational effort scaling as
|
|
|
latexmath:[(2N)^d (log_2 2N)^d].
|
|
|
|
|
|
When the beam bunch fills a substantial portion of the beam pipe
|
|
|
transversely, or when the bunch length is long compared with the pipe
|
|
|
transverse size, the conducting boundaries cannot be ignored. Poisson
|
|
|
solvers have been developed previously to treat a bunch of charge in an
|
|
|
open-ended pipe with various geometries
|
|
|
[qiangandryne,qiangandgluckstern].
|
|
|
|
|
|
The solution of the Poisson equation,
|
|
|
|
|
|
latexmath:[\[%\label{ }
|
|
|
\nabla^2\phi=-\rho/\epsilon_0,\]]
|
|
|
|
|
|
for the scalar potential, latexmath:[\phi], due to a charge density,
|
|
|
latexmath:[\rho], and appropriate boundary conditions, can be
|
|
|
expressed as,
|
|
|
|
|
|
latexmath:[\[\phi(x,y,z)=\int\int\int{\mathrm{d}x' \,\mathrm{d}y' \,\mathrm{d}z'}\rho(x',y',z') G(x,x',y,y',z,z'),\]]
|
|
|
|
|
|
where latexmath:[G(x,x',y,y',z,z')] is the Green function, subject to
|
|
|
the appropriate boundary conditions, describing the contribution of a
|
|
|
source charge at location latexmath:[(x',y',z')] to the potential at
|
|
|
an observation location latexmath:[(x,y,z)].
|
|
|
|
|
|
For an isolated distribution of charge this reduces to
|
|
|
|
|
|
latexmath:[\[\phi(x,y,z)=\int\int\int{\mathrm{d}x' \,\mathrm{d}y' \,\mathrm{d}z'}\rho(x',y',z') G(x-x',y-y',z-z'),
|
|
|
\label{eq:convolutionsolution}\]]
|
|
|
|
|
|
where
|
|
|
|
|
|
latexmath:[\[G(u,v,w)={\frac{1}{\sqrt{u^2+v^2+w^2}}}.
|
|
|
\label{eq:isolatedgreenfunction}\]]
|
|
|
|
|
|
A simple discretization of Equation [convolutionsolution] on a Cartesian
|
|
|
grid with cell size latexmath:[(h_x,h_y,h_z)] leads to,
|
|
|
|
|
|
latexmath:[\[\phi_{i,j,k}=h_x h_y h_z \sum_{i'=1}^{M_x}\sum_{j'=1}^{M_y}\sum_{k'=1}^{M_t} \rho_{i',j',k'}G_{i-i',j-j',k-k'},
|
|
|
\label{eq:openbruteforceconvolution}\]]
|
|
|
|
|
|
where latexmath:[\rho_{i,j,k}] and latexmath:[G_{i-i',j-j',k-k'}]
|
|
|
denote the values of the charge density and the Green function,
|
|
|
respectively, defined on the grid latexmath:[M].
|
|
|
|
|
|
[[fft-based-convolutions-and-zero-padding]]
|
|
|
FFT-based Convolutions and Zero Padding
|
|
|
+++++++++++++++++++++++++++++++++++++++
|
|
|
|
|
|
FFTs can be used to compute convolutions by appropriate zero-padding of
|
|
|
the sequences. Discrete convolutions arise in solving the Poisson
|
|
|
equation, and one is typically interested in the following,
|
|
|
|
|
|
latexmath:[\[\bar{\phi}_j=\sum_{k=0}^{K-1}\bar{\rho}_k \bar{G}_{j-k}\quad,
|
|
|
\begin{array}{l}
|
|
|
j=0,\ldots,J-1 \\
|
|
|
k=0,\ldots,K-1 \\
|
|
|
j-k=-(K-1),\ldots,J-1 \\
|
|
|
\end{array}
|
|
|
\label{eq:bruteforceconvolution}\]]
|
|
|
|
|
|
where latexmath:[\bar{G}] corresponds to the free space Green
|
|
|
function, latexmath:[\bar{\rho}] corresponds to the charge density,
|
|
|
and latexmath:[\bar{\phi}] corresponds to the scalar potential. The
|
|
|
sequence latexmath:[\{\bar{\phi}_j\}] has latexmath:[J] elements,
|
|
|
latexmath:[\{\bar{\rho}_k\}] has latexmath:[K] elements, and
|
|
|
latexmath:[\{\bar{G}_m\}] has latexmath:[M=J+K-1] elements.
|
|
|
|
|
|
One can zero-pad the sequences to a length latexmath:[N\ge M] and use
|
|
|
FFT’s to efficiently obtain the latexmath:[\{\bar{\phi}_j\}] in the
|
|
|
unpadded region. This defines a zero-padded charge density,
|
|
|
latexmath:[\rho], latexmath:[\[\rho_k=\left\{
|
|
|
\begin{array}{l l}
|
|
|
\bar{\rho}_k & \quad \text{if }k=0,\ldots,K-1 \\
|
|
|
0 & \quad \text{if }k=K,\ldots,N-1. \\
|
|
|
\end{array}\right.\]] Define a periodic Green function,
|
|
|
latexmath:[G_m], as follows, latexmath:[\[G_m=\left\{
|
|
|
\begin{array}{l l}
|
|
|
\bar{G}_m & \quad \text{if }m=-(K-1),\ldots,J-1 \\
|
|
|
0 & \quad \text{if }m=J,\ldots,N-K, \\
|
|
|
G_{m+iN}=G_{m} & \quad \text{for } i \text{ integer }.
|
|
|
\end{array}\right.
|
|
|
\label{eq:periodicgreenfunction}G\]] Now consider the sum
|
|
|
latexmath:[\[{\phi}_j=\frac{1}{N}\sum_{k=0}^{N-1} W^{-jk}
|
|
|
\left(\sum_{n=0}^{N-1} \rho_n W^{nk}\right)
|
|
|
\left(\sum_{m=0}^{N-1} G_m W^{mk}\right),
|
|
|
~~~~~~0 \le j \le N-1,
|
|
|
\label{eq:fftconvolution}\]] where latexmath:[W=e^{-2\pi i/N}]. This
|
|
|
is just the FFT-based convolution of latexmath:[\{\rho_k\}] with
|
|
|
latexmath:[\{G_m\}]. Then, latexmath:[\[{\phi}_j=
|
|
|
\sum_{n=0}^{K-1}~
|
|
|
\sum_{m=0}^{N-1} \bar{\rho}_n G_m
|
|
|
\frac{1}{N}\sum_{k=0}^{N-1} W^{(m+n-j)k}
|
|
|
~~~~~~0 \le j \le N-1.\]] Now use the relation
|
|
|
latexmath:[\[\sum_{k=0}^{N-1} W^{(m+n-j)k}= N \delta_{m+n-j,iN}~~~~~(i~\rm an~integer).\]]
|
|
|
|
|
|
It follows that
|
|
|
latexmath:[\[{\phi}_j=\sum_{n=0}^{K-1}~\bar{\rho}_n G_{j-n+iN}
|
|
|
~~~~~~0 \le j \le N-1.\]] But latexmath:[G] is periodic with period
|
|
|
latexmath:[N]. Hence,
|
|
|
latexmath:[\[{\phi}_j=\sum_{n=0}^{K-1}~\bar{\rho}_n G_{j-n}
|
|
|
~~~~~~0 \le j \le N-1.
|
|
|
\label{eq:finaleqn}\]] In the physical (unpadded) region,
|
|
|
latexmath:[j\in \left[0,J-1\right]], so the quantity latexmath:[j-n]
|
|
|
in Equation [finaleqn] satisfies latexmath:[-(K-1)\le j-n \le J-1]. In
|
|
|
other words the values of latexmath:[G_{j-n}] are identical to
|
|
|
latexmath:[\bar{G}_{j-n}]. Hence, in the physical region the FFT-based
|
|
|
convolution, Equation [fftconvolution], matches the convolution in
|
|
|
Equation [bruteforceconvolution].
|
|
|
|
|
|
As stated above, the zero-padded sequences need to have a length
|
|
|
latexmath:[N \ge M], where latexmath:[M] is the number of elements
|
|
|
in the Green function sequence latexmath:[\left\{x_m\right\}]. In
|
|
|
particular, one can choose latexmath:[N=M], in which case the Green
|
|
|
function sequence is not padded at all, and only the charge density
|
|
|
sequence, latexmath:[\left\{r_k\right\}], is zero-padded, with
|
|
|
latexmath:[k=0,\ldots,K-1] corresponding to the physical region and
|
|
|
latexmath:[k=K,\ldots,M-1] corresponding to the zero-padded region.
|
|
|
|
|
|
The above FFT-based approach – zero-padding the charge density array,
|
|
|
and circular-shifting the Green function in accordance with
|
|
|
Equation [periodicgreenfunction] – will work in general. In addition, if
|
|
|
the Green function is a symmetric function of its arguments, the value
|
|
|
at the end of the Green function array (at grid point latexmath:[J-1])
|
|
|
can be dropped, since it will be recovered implicitly through the
|
|
|
symmetry of Equation [periodicgreenfunction]. In that case the approach
|
|
|
is identical to the Hockney method [hockney,
|
|
|
eastwoodandbrownrigg,hockneyandeastwood]. Lastly, note that the above
|
|
|
proof that the convolution, Equation [fftconvolution], is identical to
|
|
|
Equation [bruteforceconvolution] in the unpadded region, works even when
|
|
|
latexmath:[W^{-j k}] and latexmath:[W^{m k}] are replaced by
|
|
|
latexmath:[W^{j k}] and latexmath:[W^{-m k}], respectively, in
|
|
|
Equation [fftconvolution]. In other words, the FFT-based approach can be
|
|
|
used to compute
|
|
|
latexmath:[\[\bar{\phi}_j=\sum_{k=0}^{K-1}\bar{\rho}_k \bar{G}_{j+k}\quad,
|
|
|
\begin{array}{l}
|
|
|
j=0,\ldots,J-1 \\
|
|
|
k=0,\ldots,K-1 \\
|
|
|
j-k=-(K-1),\ldots,J-1 \\
|
|
|
\end{array}
|
|
|
\label{eq:bruteforcecorrelation}\]] simply by changing the direction of
|
|
|
the Fourier transform of the Green function and changing the direction
|
|
|
of the final Fourier transform.
|
|
|
|
|
|
[[algorithm-used-in-opal]]
|
|
|
Algorithm used in _OPAL_
|
|
|
++++++++++++++++++++++++
|
|
|
|
|
|
As a result, the solution of Equation [openbruteforceconvolution] is
|
|
|
then given by
|
|
|
|
|
|
latexmath:[\[\phi_{i,j,k}=h_x h_y h_z \text{FFT}^{-1} \{ ( \text{FFT}\{\rho_{i,j,k}\}) ( \text{FFT}\{G_{i,j,k}\}) \}
|
|
|
\label{eq:oneterm}\]]
|
|
|
|
|
|
where the notation has been introduced that
|
|
|
latexmath:[\text{FFT}\{ . \}] denotes a forward FFT in all 3
|
|
|
dimensions, and latexmath:[\text{FFT}^{-1}\{ . \}] denotes a backward
|
|
|
FFT in all 3 dimensions.
|
|
|
|
|
|
[[interpolation-schemes]]
|
|
|
Interpolation Schemes
|
|
|
+++++++++++++++++++++
|
|
|
|
|
|
More details will be given in Version 2.0.0.
|
|
|
|
|
|
[[iterative-space-charge-solver]]
|
|
|
Iterative Space Charge Solver
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
This is a scalable parallel solver for the Poisson equation within a
|
|
|
Particle-In-Cell (PIC) code for the simulation of electron beams in
|
|
|
particle accelerators of irregular shape. The problem is discretized by
|
|
|
Finite Differences. Depending on the treatment of the Dirichlet boundary
|
|
|
the resulting system of equations is symmetric or `mildly' non-symmetric
|
|
|
positive definite. In all cases, the system is solved by the
|
|
|
preconditioned conjugate gradient algorithm with smoothed aggregation
|
|
|
(SA) based algebraic multigrid (AMG) preconditioning. More details are
|
|
|
given in [Adelmann:2009p543].
|
|
|
|
|
|
[[energy-binning]]
|
|
|
Energy Binning
|
|
|
~~~~~~~~~~~~~~
|
|
|
|
|
|
The beam out of a cathode or in a plasma wake field accelerator can have
|
|
|
a large energy spread. In this case, the static approximation using one
|
|
|
Lorentz frame might not be sufficient. Multiple Lorentz frames can be
|
|
|
used so that within each Lorentz frame the energy spread is small and
|
|
|
hence the electrostatic approximation is valid. More details will be
|
|
|
given in Version 2.0.0.
|
|
|
|
|
|
[[sec:fieldsolvercmd]]
|
|
|
The `FIELDSOLVER` Command
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
See Table [fieldsolvercmd] for a summary of the Fieldsolver command.
|
|
|
|
|
|
.Fieldsolver command summary
|
|
|
[cols="<,<",options="header",]
|
|
|
|=======================================================================
|
|
|
|Command |Purpose
|
|
|
|`FIELDSOLVER` |Specify a fieldsolver
|
|
|
|
|
|
|`FSTYPE` |Specify the type of field solver: `FFT`, `FFTPERIODIC`, `MG`,
|
|
|
`FMG` (AMR only) and `NONE`
|
|
|
|
|
|
|`PARFFTX` |If `TRUE`, the dimension latexmath:[x] is distributed
|
|
|
among the processors
|
|
|
|
|
|
|`PARFFTY` |If `TRUE`, the dimension latexmath:[y] is distributed
|
|
|
among the processors
|
|
|
|
|
|
|`PARFFTZ` |If `TRUE`, the dimension latexmath:[z] is distributed
|
|
|
among the processors
|
|
|
|
|
|
|`MX` |Number of grid points in latexmath:[x] specifying rectangular
|
|
|
grid
|
|
|
|
|
|
|`MY` |Number of grid points in latexmath:[y] specifying rectangular
|
|
|
grid
|
|
|
|
|
|
|`MZ` |Number of grid points in latexmath:[z] specifying rectangular
|
|
|
grid
|
|
|
|
|
|
|`BCFFTX` |Boundary condition in latexmath:[x] [`OPEN`]
|
|
|
|
|
|
|`BCFFTY` |Boundary condition in latexmath:[y] [`OPEN`]
|
|
|
|
|
|
|`BCFFTZ` |Boundary condition in latexmath:[z] [`OPEN,PERIODIC`]
|
|
|
|
|
|
|`GREENSF` |Defines the Greens function for the FFT Solver
|
|
|
|
|
|
|`BBOXINCR` |Enlargement of the bounding box in %
|
|
|
|
|
|
|`GEOMETRY` |Geometry to be used as domain boundary
|
|
|
|
|
|
|`ITSOLVER` |Type of iterative solver
|
|
|
|
|
|
|`INTERPL` |Interpolation used for boundary points
|
|
|
|
|
|
|`TOL` |Tolerance for iterative solver
|
|
|
|
|
|
|`MAXITERS` |Maximum number of iterations of iterative solver
|
|
|
|
|
|
|`PRECMODE` |Behavior of the preconditioner
|
|
|
|
|
|
|`AMR_MAXLEVEL` |Maximum adaptive mesh refinement level (single level if
|
|
|
`AMR_MAXLEVEL` is zero)
|
|
|
|
|
|
|`AMR_MAXGRID` |Maximum grid size. It has to be smaller than `MX`, `MY`,
|
|
|
`MZ` when running in parallel
|
|
|
|
|
|
|`AMR_TAGGING` |Mesh-refinement strategy
|
|
|
|=======================================================================
|
|
|
|
|
|
[[sec:FSFSTYPE]]
|
|
|
Define the Fieldsolver to be used
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
At present only a FFT based solver is available. Future solvers will
|
|
|
include Finite Element solvers and a Multigrid solver with
|
|
|
Shortley-Weller boundary conditions for irregular domains.
|
|
|
|
|
|
[[sec:FSDomDEC]]
|
|
|
Define Domain Decomposition
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
The dimensions in latexmath:[x], latexmath:[y] and latexmath:[z]
|
|
|
can be parallel (`TRUE`) or serial `FALSE`. The default settings are:
|
|
|
parallel in latexmath:[z] and serial in latexmath:[x] and
|
|
|
latexmath:[y].
|
|
|
|
|
|
[[sec:FSMX]]
|
|
|
Define Number of Grid Points
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
Number of grid points in latexmath:[x], latexmath:[y] and
|
|
|
latexmath:[z] for a rectangular grid.
|
|
|
|
|
|
[[sec:FSBC]]
|
|
|
Define Boundary Conditions
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
Two boundary conditions can be selected independently among
|
|
|
latexmath:[x], latexmath:[y] namely: `OPEN` and for latexmath:[z]
|
|
|
`OPEN` & `PERIODIC`. In the case you select for latexmath:[z] periodic
|
|
|
you are about to model a DC-beam.
|
|
|
|
|
|
[[sec:FSGREEN]]
|
|
|
Define Greens Function
|
|
|
~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
Two Greens functions can be selected: `INTEGRATED`, `STANDARD`. The
|
|
|
integrated Green’s function is described in [qiang2005, qiang2006-1,
|
|
|
qiang2006-2]. Default setting is `INTEGRATED`.
|
|
|
|
|
|
[[sec:FSBBOX]]
|
|
|
Define Bounding Box Enlargement
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
The bounding box defines a minimal rectangular domain including all
|
|
|
particles. With `BBOXINCR` the bounding box can be enlarged by a factor
|
|
|
given in percent of the minimal rectangular domain.
|
|
|
|
|
|
[[sec:GEOMETRY]]
|
|
|
Define Geometry
|
|
|
~~~~~~~~~~~~~~~
|
|
|
|
|
|
The list of geometries defining the beam line boundary. For further
|
|
|
details see Chapter [geometry].
|
|
|
|
|
|
[[sec:ITSOLVER]]
|
|
|
Define Iterative Solver
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
The iterative solver for solving the preconditioned system: `CG`,
|
|
|
`BiCGSTAB` or `GMRES`.
|
|
|
|
|
|
[[sec:INTERPL]]
|
|
|
Define Interpolation for Boundary Points
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
The interpolation method for grid points near the boundary: `CONSTANT`,
|
|
|
`LINEAR` or `QUADRATIC`.
|
|
|
|
|
|
[[sec:TOL]]
|
|
|
Define Tolerance
|
|
|
~~~~~~~~~~~~~~~~
|
|
|
|
|
|
The tolerance for the iterative solver used by the `MG` solver.
|
|
|
|
|
|
[[sec:MAXITERS]]
|
|
|
Define Maximal Iterations
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
The maximal number of iterations the iterative solver performs.
|
|
|
|
|
|
[[sec:PRECMODE]]
|
|
|
Define Preconditioner Behavior
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
The behavior of the preconditioner can be: `STD`, `HIERARCHY` or
|
|
|
`REUSE`. This argument is only relevant when using the `MG` solver and
|
|
|
should *only be set if the consequences to simulation and solver are
|
|
|
evident*. A short description is given in
|
|
|
Table [preconditioner_behaviour].
|
|
|
|
|
|
.Preconditioner behavior command summary
|
|
|
[cols="<,<",options="header",]
|
|
|
|=======================================================================
|
|
|
|Value |Behavior
|
|
|
|`STD` |The preconditioner is rebuilt in every time step (enabled by
|
|
|
default)
|
|
|
|
|
|
|`HIERARCHY` |The hierarchy (tentative prolongator) is reused
|
|
|
|
|
|
|`REUSE` |The preconditioner is reused
|
|
|
|=======================================================================
|
|
|
|
|
|
[[sec:FSENBINS]]
|
|
|
Define the number of Energy Bins to use
|
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
Suppose latexmath:[\mathrm{d} E] the energy spread in the particle
|
|
|
bunch is to large, the electrostatic approximation is no longer valid.
|
|
|
One solution to that problem is to introduce latexmath:[k] energy bins
|
|
|
and perform latexmath:[k] separate field solves in which
|
|
|
latexmath:[\mathrm{d} E] is again small and hence the electrostatic
|
|
|
approximation valid. In case of a cyclotron see Section [cyclotron] the
|
|
|
number of energy bins must be at minimum the number of neighboring
|
|
|
bunches (`NNEIGHBB`) i.e.
|
|
|
latexmath:[\mathrm{ENBINS} \le mathrm{NNEIGHBB}].
|
|
|
|
|
|
The variable `MINSTEPFORREBIN` defines the number of integration step
|
|
|
that have to pass until all energy bins are merged into one.
|
|
|
|
|
|
[[sec:AMR]]
|
|
|
Define AMR Solver
|
|
|
~~~~~~~~~~~~~~~~~
|
|
|
|
|
|
The option `AMR=TRUE` enables further commands to be used in the
|
|
|
Fieldsolver command. In order to run a proper AMR simulation one
|
|
|
requires following ingredients:
|
|
|
|
|
|
* Upper bound of refinement, specified by `AMR_MAXLEVEL`
|
|
|
* Maximum allowable grid size, specified by `AMR_MAXGRID`. This size
|
|
|
holds for all levels in all directions.
|
|
|
* Mesh refinement strategy, specified by `AMR_TAGGING`. Depending on the
|
|
|
tagging scheme, further keywords can be used. A summary is given in
|
|
|
Table [tagging_strategies].
|
|
|
|
|
|
.Mesh refinement strategies
|
|
|
[cols="<,<",options="header",]
|
|
|
|=======================================================================
|
|
|
|Value |Behavior
|
|
|
|`POTENTIAL` |Mark each cell if
|
|
|
latexmath:[\phi^{level}_{cell}\ge\alpha\max\phi^{level}], where
|
|
|
latexmath:[\alpha\in[0, 1]] is the scaling factor `AMR_SCALING`
|
|
|
|
|
|
|`EFIELD` |Mark each cell if the electric field component of any
|
|
|
direction satisfies
|
|
|
latexmath:[E^{level}_{d, cell}\ge\alpha\max E_{d}^{level}], where
|
|
|
latexmath:[d=x, y, z] and latexmath:[\alpha\in[0, 1]] is the scaling
|
|
|
factor `AMR_SCALING`
|
|
|
|
|
|
|`MOMENTA` |It performs a loop over all particles of a level and
|
|
|
computes the dot product of the momenta. Every cell that contains a
|
|
|
particle with
|
|
|
latexmath:[||\mathbf{p}|| \ge \alpha \max_{level} ||\mathbf{p}||] is
|
|
|
refined. The scalar latexmath:[\alpha\in[0, 1]] is a user-defined
|
|
|
value `AMR_SCALING`.
|
|
|
|
|
|
|`CHARGE_DENSITY` |If the charge density of a cell is greater or equal
|
|
|
to the value specified with `AMD_DENSITY` the cell is tagged for
|
|
|
refinement
|
|
|
|
|
|
|`MIN_NUM_PARTICLES` |Cells with equal or more particles are
|
|
|
refined. The bound is specified with `AMR_MIN_NUM_PART`
|
|
|
|
|
|
|`MAX_NUM_PARTICLES` |Cells with equal or less particles are
|
|
|
refined. The bound is specified with `AMR_MAX_NUM_PART`
|
|
|
|======================================================================= |