Key Points
Introduction to WarpX
๐ฎ The particle-in-cell method is used to simulate the self-consistent dynamics of relativistic charged particles
๐ WarpX is a open-source high-performance particle-in-cell code
โจ WarpX is used in a variety of scientif domains
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 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.