Appearance
PRISM
PRISM (Plasma Research usIng Simulation Methods) is the electromagnetics and plasma application of ADAM. It solves Maxwell's equations for the electric displacement
What is implemented
| Area | Capabilities | Details |
|---|---|---|
| Physics | Maxwell's equations in SI or non-dimensional form, with a prescribed current density (coils) or the current and charge of PIC macro-particles; hyperbolic (GLM) divergence cleaning of | Physical models |
| Space | Centred finite differences or finite volumes of order 2–10 ([fdv]); WENO flux splitting (CPU only) | Numerical methods |
| Time | Runge–Kutta (SSP 11/22/33/54, low-storage 1/2/3, Yoshida on the CPU), CFL time step on the speed of light | Numerical methods |
| Grid | Octree/quadtree of Cartesian blocks, AMR at initialization (box and current-variation markers), 2:1 coarse–fine faces, FV reflux | Numerical methods |
| Coupling | Multi-realm runs glued by a forest manifest, α or β seam cadence | Numerical methods |
| Sources | Rectangular, circular, solenoid and helicon coils, DC or AC, with a smooth ramp; external rotating or uniform fields (acting on the particles) | Initial conditions and sources |
| Boundaries | Extrapolation, Neumann, Dirichlet (zero), first-order Silver–Müller, PEC, periodic; perfectly matched layers (four formulations) and a far-wave damping layer | Boundary conditions, Absorbing layers |
| Particles | Plasma (uniform, cylinder, slab, box) or a single test particle; Maxwellian or drift velocities; charge and current deposition from NGP to sixth order and Gaussian; charge-conserving currents with periodic faces; Runge–Kutta push | Particle-in-cell |
| t0 fields | The electric field of the initial charge and the magnetic field of the initial current, solved by FLAIL with PRISM's own operator | Numerical methods |
| Input | One INI file per realm, every value checked, refusals at initialization | Input reference |
| Output | XDMF + HDF5 field files (ParaView), restart files, slices, probes, residual, energy, divergence, RMS-field and charge-conservation histories | Outputs |
| Verification | Regression digests on both backends; oracle checks on AMR seams | Verification |
Quick start
Build (FoBiS, from the repository root):
bash
fobis build --mode prism-cpu-gnu # CPU backend
fobis build --mode prism-fnl-nvf --varset local_nvf # GPU backend (OpenACC, NVIDIA HPC SDK)Run the rotating-magnetic-field regression case:
bash
cd src/tests/prism/regression/rmf
mpirun -np 2 ../../../../../exe/adam_prism_cpu input.iniWithout an argument the executable reads input.ini in the working directory. A file with a [forest] section is a forest manifest and runs several realms.
Outputs
| File | Content | Enabled by |
|---|---|---|
<basename>-<it>-procNNNNNN.h5 + <basename>-<it>.xdmf | Field files: the state ([IO] save_fields = all) or D and B only (em), plus residuals, curls, divergences and the coils' current densities on request | [IO] it_save and the save_*_fields flags (input) |
| restart files | State and time, same rank count and grid to restart | [IO] restart_save |
<basename>-residuals.dat | L2 norm of every residual | [IO] residuals_save |
<basename>-energy_history.dat | the electric and magnetic energies | every 10 steps (fixed) |
<basename>-divergence_history.dat | max | every step |
<basename>-charge_conservation_history.dat | PIC: particle and deposited charge, continuity and Gauss residuals | PIC models |
<basename>-grms_history.dat, <basename>-magnetic_field_at_center_domain.dat | RMS of the field over a region; | [grms], [magnetic_field_at_center_domain] |
<basename>-probe_NN.dat | The state at a fixed point, trilinear | [probes] |
<basename>-plane_NN.dat | The state on a plane of probes (per save one row per probe), trilinear | [probes] |
rectangular_current_coil_N.dat, helicon_current_coil_N.dat | The current of rectangular and helicon coils | every step, when such a coil exists |
single_particle_output.dat | Position, velocity and fields of the test particle | problem_type = single_particle |
Pages
- Physical models: equations, state vector, constants, non-dimensional form, GLM cleaning.
- Numerical methods: the centred operators, WENO, time integration, AMR and seams, multi-realm runs, the t0 elliptic solves.
- Initial conditions and sources: field initial conditions, coils, external fields.
- Boundary conditions and absorbing layers: the face kinds, the PML, the far-wave layer.
- Particle-in-cell: particles, deposition, gather, push, particle boundaries, charge conservation.
- Input reference: every section and key, with the refused combinations.
- Backends: CPU and FNL, what each implements, the step structure, device data.
- Verification: the oracle checks.
Known limitations
- Seam div(B). At a 2:1 AMR face the centred operators no longer commute, and the seam injects an
source that converges under refinement but grows in time at fixed (#29, accepted as truncation; an upwinded GLM coupling is #99). [IO] seam_divB_tolmakes it visible (numerics). - Refinement at initialization only. PRISM has no runtime regrid; the t0 elliptic solves refuse a refined grid.
- Time integration. Only Runge–Kutta runs: leapfrog, Blanes–Moan and commutator-free Magnus are refused, for the fields and for the particles (#55).
- The GPU backend has no WENO and no Yoshida; its PML needs the FD operators and an SSP scheme (backends).
- The CPU charge-conserving deposit and the CPU coherent matched gather run on one block and one rank only.
- Coils (defects, #108): a circular coil injects no current, and the coils after the first take the first coil's amplitude, not their own
Amplitude. - The PML and far-wave-layer profiles are computed per rank, so a layer that spans the blocks of several ranks gives results that depend on the decomposition (#108).
- Verification. Analytic oracles (plane wave, cavity, PML reflection, Biot–Savart, Larmor orbit, plasma frequency) are #106.