4.3. Field Solver - Poisson Equation
To numerically solve electrostatic problems, PICLas offers a solver for Poisson’s equation
where the charge density \(\rho\) is given by the charged particles within the system. To enable a simulation using the Poisson field solver, the code must be compiled using the following setting
PICLAS_EQNSYSNAME = poisson
PICLAS_TIMEDISCMETHOD = Euler-Explicit, Leapfrog, Boris-Leapfrog, Higuera-Cary, RK3, RK4
where one of the available time discretization methods for the particle evolution must be chosen for PICLAS_TIMEDISCMETHOD, which
are also referred to as particle pushers.
There are different options available that yield different functionalities.
|
Electric field |
Magnetic field |
Order of Convergence |
|---|---|---|---|
|
yes |
no |
1 |
|
yes |
no |
2 |
|
yes |
yes |
2 |
|
yes |
yes |
2 |
|
yes |
yes |
3 |
|
yes |
yes |
4 |
Note that high-order time discretization methods in general allow for a larger time step and are usually more costly per time step. To see the available parameter input file options, simply run
./bin/piclas --help HDG
4.3.1. PETSc Solver
A multitude of different numerical methods to solve the resulting system of linear equations is given by the implemented PETSc library [8], [9], [10]. For detailed installation steps of PETSc within PICLas, see Section Installing PETSc. To use PETSc, another flag must be set during the compilation of PICLas
LIBS_USE_PETSC = ON
and the parameter input file for the simulation requires setting
PrecondType = 1
epsCG = 1e-6 ! default = 1e-50
MaxIterCG = 10000 ! default
where the following options are possible:
|
Preconditioner |
Solver |
|---|---|---|
|
||
|
||
|
BoomerAMG (requires Hypre, configuration), Fallback: Block Jacobi |
|
|
Direct Cholesky (requires MUMPS) |
- |
The parameters epsCG and MaxIterCG correspond to the absolute tolerance (atol) and the maximum number of iterations (maxits) as described in the PETSc manual. In general, it is recommended to the use the direct solver PrecondType = 10 (if the case fits into the memory) or the preconditioner iterative solver combination PrecondType = 1. When a large number of computational nodes is used, PrecondType = 2 can offer a performance benefit, while PrecondType = 3 might offer better convergence properties for large, complex cases.
Other potential combinations and/or specific preconditioner/solver options can be easily implemented in the routine PETScSetSolver. An overview over the available options is available in the Summary of Sparse Linear Solvers Available In PETSc.
4.3.2. Internal CG Solver
The formerly used numerical method for solving the resulting system of linear equations, is the Conjugate Gradient Method. The following input parameter can be set to control the simulation
epsCG = 1e-6 ! default value for the abort residual
MaxIterCG = 500 ! default value for the number of CG solver iterations
where epsCG is the residual of the CG solver and MaxIterCG are the maximum number of iteration performed in one time step to
solve the system.
Furthermore, the residual can be either set absolute (default) or relative via
useRelativeAbortCrit = F ! default
Note that the same parameter setting for epsCG will result in a higher residual without the PETSC library as compared with PETSC solver.
4.3.3. Symmetric Simulations
The Poisson solver is suitable for 3D, 2D/1D, and axially symmetric 2D simulations, but the field solver generally works in 3D Cartesian coordinates when no specific settings are selected.
For 2D axisymmetric simulations, the solver can be switched from \(x,y\) coordinates to \(x,r\) by setting the parameter Particles-Symmetry2DAxisymmetric.
Note that the mesh should be arranged in a way that \(x\) is the axial direction, \(y\) is the radial \(r\) direction and, \(z\) is the third symmetric or periodic dimension.
|
Coordinates |
Equation |
|---|---|---|
|
\(x,y\) |
\(\dfrac{d^2\Phi}{dx^2}+\dfrac{d^2\Phi}{dy^2} = \dfrac{\rho(x,y)}{\varepsilon_{0}}\) |
|
\(x,r\) |
\(\dfrac{d^2\Phi}{dx^2}+\dfrac{1}{r}\dfrac{d}{dr}\left(r\dfrac{d\Phi}{dr}\right) = \dfrac{\rho(x,r)}{\varepsilon_{0}}\) |
When particles are present in the simulation, an additional parameter Particles-Symmetry-Order (default is 3) sets the
dimensionality for particle behaviour
|
Coordinates |
|
|---|---|---|
1 |
1D |
|
2 |
2D |
|
3 |
3D (default) |
|
There are different deposition methods available and their compatibility with the parameters Particles-Symmetry-Order and Particles-Symmetry2DAxisymmetric is described in
Section Compatibility with Field Solver Symmetry Settings
Examples: Use the following parameter for these types of simulations
! 2D Cartesian
Particles-Symmetry-Order = 2
! 2D Axisymmetrc
Particles-Symmetry-Order = 2
Particles-Symmetry2DAxisymmetric = T
! 1D
Particles-Symmetry-Order = 1