Key Points
Introduction to WarpX
๐ฎ The particle-in-cell method is used to simulate the dynamics of charged particles and their self-consistent fields
๐ WarpX is an open-source particle-in-cell code
โจ WarpX is used in a variety of scientific domains
๐๏ธ WarpX is a high-performance code and can leverage HPC
Introduction to ImpactX
- ๐งฒ ImpactX models how particle beams evolve through accelerator components.
- ๐ฏ The lattice, incoming bunch, and enabled effects define the physical model.
- ๐ฐ Particle count, collective-field calculations, and diagnostics determine the workload.
Install
๐ฏ WarpX is easy to install via Conda:
conda -c conda-forge warpx
๐ The documentation is the first place to look for answers, otherwise check out our issues and discussions and ask there.
Set Up a Simulation from Scratch
The WarpX examples and the documentation gallery are the best starting points for a new simulation.
Setting up a simulation is an iterative process: run, visualize, understand whatโs wrong, fix it, repeat.
When the simulation doesnโt show the expected physics, check the basics first: enough timesteps? resolved scales? adequate particles per cell? temperature not too high?
The documentation parameter reference is your constant companion for understanding and modifying input files.
A Two-stream Instability
๐ก The two-stream instability converts the kinetic energy of counter-streaming beams into electrostatic wave energy.
๐ฌ The instability growth rate depends on the ratio of drift velocity to thermal velocity: \(v_d / v_{\mathrm{th}} \gg 1\) is needed for the instability to develop.
๐ Reduced diagnostics (FieldEnergy,
FieldMaximum) let you track the instability growth in real
time without post-processing full datasets.
๐ The documentation is the first place to look for answers, otherwise check out our issues and discussions and ask there.
๐ท To analyze and visualize the simulation results in openPMD format, you can use the openPMD-viewer library for Python.
A Weibel Instability
๐ก The Weibel instability generates magnetic fields from a momentum anisotropy โ unlike the two-stream instability, which generates electrostatic fields.
๐ฌ The instability produces current filaments with a characteristic size of order the plasma skin depth \(c/\omega_{pe}\).
๐ Reduced diagnostics (FieldEnergy,
FieldMaximum) are an efficient way to monitor the
instability growth without storing large field dumps.
โก Choosing parameters wisely (\(v_d \gg v_{\mathrm{th}}\), sufficient resolution and box size) is essential for observing the instability clearly.
๐ The documentation is the first place to look for answers, otherwise check out our issues and discussions and ask there.
๐ท To analyze and visualize the simulation results in openPMD format, you can use the openPMD-viewer library for Python.
A Magnetic Mirror
๐ก The external B field is loaded from an openPMD file, while the protons are defined as test particles.
๐ท To analyze and visualize the simulation results in openPMD format, you
can use the openPMD-viewer
library for Python or you can open .pmd files directly in
Paraview.
A FODO Cell
๐ฏ Particle tracking follows individual particles, while envelope tracking follows the beam envelope - particle tracking is more detailed but computationally expensive.
๐ฌ A FODO cell is a periodic focusing structure with alternating focusing and defocusing quadrupole magnets.
โก WarpX allows you to turn space charge effects on/off and define arbitrary external fields.
๐ WarpX is a full PIC code best suited for strong space charge effects and complex electromagnetic interactions. For cases with negligible space charge, ImpactX may be a more efficient choice.
๐ The documentation is the first place to look for answers, otherwise check out our issues and discussions and ask there.
๐ท To analyze and visualize the simulation results in openPMD format, you can use the openPMD-viewer library for Python.
A Laser-Driven Ion Accelerator
๐ก TNSA accelerates ions via a strong electrostatic sheath field created by hot electrons escaping the rear surface of a laser-irradiated thin target.
๐ฌ Key parameters controlling the maximum ion energy are the laser intensity (\(a_0\)), the target thickness, and the target density.
โ๏ธ Charge-conserving current deposition (esirkepov) and
proper boundary conditions (PML, absorbing) are essential for this type
of simulation.
โก This is a computationally expensive simulation โ be prepared to iterate on resolution and target density to find a balance between physical fidelity and computational cost.
๐ The documentation is the first place to look for answers, otherwise check out our issues and discussions and ask there.
๐ท To analyze and visualize the simulation results in openPMD format, you can use the openPMD-viewer library for Python.
A Laser Wakefield Accelerator
- ๐ A laser drives a plasma wake; its longitudinal field can accelerate electrons.
- ๐งฉ The grid, particles, and time steps determine which features are resolved and how much computation is required.
- ๐ Density, field, and energy plots provide complementary evidence; an energy spectrum alone does not identify an accelerated bunch.
- ๐๏ธ Save the baseline and vary one setting at a time to interpret changes.
A Beam Transport Line
- ๐งฒ Magnets change particle trajectories; drifts allow those changes to develop into different beam sizes.
- ๐ Screen histograms and rms-size curves connect the bunch to the lattice.
- ๐งฉ More macroparticles sample the same bunch more finely.
- ๐ The model omits collective fields, radiation, and apertures; interpret its diagnostics within those limits.
A Beam-Beam Collision
๐ There are several details one needs to take care when setting up a beam-beam simulation
๐ The documentation is the first place to look for answers, otherwise check out our issues and discussions and ask there.
๐ท To analyze and visualize the simulation results in openPMD format, you can use the openPMD-viewer library for Python.
OSSFE 2025 - Using WarpX, a general purpose particle-in-cell code
๐ WarpX is a open-source high-performance particle-in-cell code
๐ฏ WarpX is easy to install via Conda:
conda -c conda-forge warpx
๐ The documentation is the first place to look for answers, otherwise check out our issues and discussions and ask there.
๐ท To analyze and visualize the simulation results in openPMD format, you
can use the openPMD-viewer
library for Python or you can open .pmd files directly in
Paraview.
UCB 2026 -- Two-Stream Instability Live Tutorial
Setting up a simulation is an iterative process: start from an existing example, modify, run, visualize, and refine.
The WarpX documentation and the examples gallery are the best starting points.
When things donโt look right, check the basics: enough timesteps, adequate resolution, and appropriate temperature.
US-FCC 2026: Beam-Beam and Tracking Tutorial
- WarpX resolves one collision in detail and writes both particle snapshots and collider-specific reduced diagnostics.
- The laptop input prioritizes runtime and teaching value over numerical convergence.
- Matching particle IDs between diagnostics makes the normalized kick slope a direct check of the linear beam-beam model.
- Keeping different QED products in separate species makes their spectra and weighted yields easier to inspect.
- The luminosity, Bhabha cross-section, lifetime, and pair-distribution checks connect the openPMD and reduced diagnostics to accelerator observables.
- Using one MAD-X sequence and one matched covariance model makes the Tutorial 2 beta-function comparison sensitive to differences in lattice translation and linear transport.
- The Tutorial 3 adapter converts normalized momentum and geometric slope separately; this prevents beamstrahlung energy loss from contaminating the transverse drift.
- A beamstrahlung-induced \(\sigma_z\) oscillation is not automatically a coupling error: a local increase in energy spread creates a longitudinal mismatch that the arc map rotates into bunch length.
- Per-collision handoff logs distinguish an instantaneous coordinate jump from subsequent synchrotron motion.
LLNL HPC Innovation Center 2026: WarpX/ImpactX Tutorial
- ๐งฉ Physics and numerical representation determine the workload; hardware determines how that workload is executed.
- ๐ Record the input, hardware, elapsed runtime, and output alongside the plots.
- ๐พ More particles, finer grids, and more frequent diagnostics have different scientific benefits and computational costs.
- ๐ Compare the same problem to measure a hardware speedup; compare physical observables to judge whether a numerical change matters scientifically.