Use cases
Answers for people who run simulations.
Step-by-step tutorials, troubleshooting guides, calculators and comparisons from practising computational physicists. Every guide states its assumptions, software versions and references.
100 of 100 guides shown
HPC, GPU & Linux
All HPC & GPU →HPC cluster setup: a practical plan for research groups
Plan and build a small HPC cluster for research: head and compute nodes, network, storage, provisioning, users, Slurm, software modules and monitoring.
Read guideSlurm installation and configuration: a working first cluster
Install and configure Slurm on Linux: Munge authentication, slurm.conf, partitions, cgroups, GPU (GRES) setup and accounting, with tests at every step.
Read guideHow to submit a Slurm job: batch scripts, GPUs, arrays and MPI
Write and submit a Slurm batch script with sbatch: CPU, MPI and GPU jobs, job arrays, dependencies, and how to check that your job ran correctly.
Read guideSlurm job pending: what each reason means and how to fix it
Why is your Slurm job stuck in PENDING? Decode Priority, Resources, QOS limits, ReqNodeNotAvail and Dependency, with the commands to fix each one.
Read guideSlurm job failed: how to find out why and fix it
Diagnose failed Slurm jobs from their state and exit code: OUT_OF_MEMORY, TIMEOUT, NODE_FAIL, exit codes 127, 137 and 139, missing output and module errors.
Read guideCUDA out of memory: diagnose and fix GPU memory errors
Fix "CUDA out of memory" in PyTorch and GPU simulation codes: find what fills GPU memory, then cut batch size, precision, activations or domain size.
Read guideGPU not detected in Linux: a layer-by-layer diagnosis
NVIDIA GPU not detected on Linux, nvidia-smi failing or torch.cuda.is_available() False? Check hardware, driver, Secure Boot, containers and CUDA builds.
Read guideNVIDIA driver installation on Ubuntu for computing workloads
Install NVIDIA drivers on Ubuntu for CUDA, simulation and ML: pick a driver branch, install with ubuntu-drivers or apt, add the CUDA toolkit, verify.
Read guideMPI installation and first examples: Open MPI, MPICH and mpi4py
Install MPI (Open MPI or MPICH) on Linux, compile and run hello-world and reduction examples in C and Python with mpi4py, and use MPI under Slurm.
Read guideMPI job hangs: how to find deadlocks and network problems
Diagnose MPI programs that hang: deadlocks from send/receive ordering, mismatched collectives, wrong network interfaces, firewalls and InfiniBand issues.
Read guideOpenMP parallel programming for scientific codes
Parallelise loops with OpenMP: parallel for, reductions, scheduling, avoiding race conditions, thread pinning and NUMA, with compilable examples and checks.
Read guidePython multiprocessing vs MPI: which should you use?
Python multiprocessing vs MPI (mpi4py) for scientific computing: scaling, communication, clusters, ease of use, and when to choose each.
Read guideHow to speed up Python code for scientific computing
Speed up scientific Python in the right order: profile, vectorise with NumPy, compile loops with Numba, improve algorithms, then parallelise or use GPUs.
Read guideGPU acceleration for Python: CuPy, Numba CUDA, PyTorch and JAX
Accelerate scientific Python on NVIDIA GPUs: CuPy as a NumPy drop-in, Numba CUDA kernels, PyTorch and JAX, with correct timing and common pitfalls.
Read guideCUDA vs OpenCL vs HIP (and SYCL, Kokkos): choosing a GPU programming model
Compare CUDA, HIP, OpenCL, SYCL, Kokkos and OpenMP offload for scientific GPU code: hardware support, performance portability, ecosystem and porting effort.
Read guideCPU vs GPU for scientific computing: when each is the right choice
When do GPUs beat CPUs for simulation and data analysis? Compare parallelism, memory bandwidth, FP64 performance, memory capacity, porting effort and cost.
Read guideHPC cluster hardware requirements: sizing nodes, network and storage
How to size an HPC cluster from your workloads: CPU and GPU nodes, memory per core, interconnect, parallel storage, power and cooling, with a checklist.
Read guideHPC cluster cost estimation: total cost of ownership and cost per core-hour
Estimate the full cost of an HPC cluster: hardware, power, cooling, staff, software and refresh, then convert it to cost per core-hour or GPU-hour.
Read guideCloud vs on-premise HPC: cost, performance and control compared
Cloud HPC vs an on-premise cluster for research: cost per core-hour, utilisation, interconnect performance, data, security and staffing compared.
Read guideLinux server performance monitoring for compute nodes and workstations
Monitor Linux server performance from the command line: CPU, memory, disk, network and GPU with top, vmstat, iostat, sar and nvidia-smi, plus what to look for.
Read guideLinux boot failure after a power outage: emergency mode, fsck and recovery
Recover a Linux server or workstation that will not boot after a power cut: emergency mode, file system checks, fstab and RAID problems, and prevention.
Read guideInstalling scientific software on Linux: packages, Spack, conda and containers
Choose the right way to install scientific software on Linux: system packages, conda, Spack, environment modules or Apptainer containers, with examples.
Read guideHow to benchmark GPU performance for scientific workloads
Benchmark a GPU properly: health checks with nvidia-smi and DCGM, memory bandwidth and FLOP/s tests, spec comparison, and real application runs.
Read guideStrong vs weak scaling in MPI and HPC: definitions, formulas and how to measure
Strong scaling fixes problem size; weak scaling fixes work per process. Amdahl and Gustafson laws, efficiency formulas, and how to run a scaling study.
Read guideHow to optimize HPC simulations: a profile-driven workflow
Optimise simulation codes systematically: baseline, profile, then fix algorithms, memory access, vectorisation, parallel efficiency, I/O and load balance.
Read guidePlasma & PIC simulation
All Plasma & PIC →Particle-in-cell simulation tutorial: write a 1D PIC code in Python
Build a working 1D electrostatic PIC code in about 60 lines of Python, then verify it against the plasma frequency: a hands-on particle-in-cell tutorial.
Read guideWhat is PIC simulation? The particle-in-cell method explained
Particle-in-cell (PIC) simulation explained: macro-particles, grids, the four-step cycle, stability limits, strengths, weaknesses and what PIC is used for.
Read guideFBPIC installation tutorial: CPU and GPU setup with Conda
Install FBPIC, the spectral quasi-cylindrical PIC code, with Conda on Linux: CPU and CUDA GPU setup, MPI, a first run and fixes for common installation errors.
Read guideFBPIC laser wakefield simulation: setting up and checking an LWFA run
Set up a laser wakefield run in FBPIC: grid and azimuthal modes, laser and plasma profile, moving window, diagnostics, resolution checks, analysis.
Read guideWarpX installation guide: Conda, Spack and CMake builds for CPU and GPU
Install WarpX the right way for your hardware: Conda for quick CPU runs, Spack or CMake for GPU clusters (CUDA, HIP, SYCL), and first-run checks.
Read guideWarpX vs FBPIC: which PIC code for laser–plasma acceleration?
WarpX vs FBPIC compared for laser wakefield and plasma acceleration: geometry, solvers, GPU support, scaling, features, learning curve and when to choose each.
Read guideEPOCH PIC simulation tutorial: build, input deck and first laser–plasma run
Get started with the EPOCH particle-in-cell code: compile it, write an input deck for a 2D laser–plasma run, launch with MPI, and read SDF output in Python.
Read guideSmilei PIC simulation tutorial: Python namelists, normalised units and happi
Run a first Smilei PIC simulation: compile, write a Python namelist in normalised units, launch with MPI and OpenMP, and analyse with happi.
Read guidePIConGPU simulation tutorial: from example to first GPU run
Start with PIConGPU, the GPU-native PIC code: environment profile, pic-create, pic-build, tbg submission, .param and .cfg files, openPMD output.
Read guidePIC simulation boundary conditions: fields and particles
Field and particle boundary conditions in PIC: periodic, PML and Silver-Müller absorbers, conductors, laser injection, outflow and thermal walls.
Read guidePIC numerical instability: symptoms, causes and fixes
Diagnose numerical instabilities in PIC simulations: CFL violation, finite-grid heating, numerical Cherenkov radiation, noise and boundary artefacts.
Read guidePIC simulation convergence test: a step-by-step procedure
How to run a convergence test for particle-in-cell simulations: refine cells, time step and particles per cell, compute observed order and report uncertainty.
Read guideHow many particles per cell does a PIC simulation need?
Choosing particles per cell (ppc) in PIC simulations: how noise scales, typical values for laser-plasma and discharges, and how to test your choice.
Read guideHow to choose the grid size for a PIC simulation
Choose the cell size for particle-in-cell simulations: Debye length, skin depth and laser-wavelength rules, the CFL time step, and how to test it.
Read guideLaser wakefield acceleration simulation: physics, setup and verification
How to simulate laser wakefield acceleration: key scalings, choosing 2D, quasi-3D or 3D PIC, resolution, moving windows, injection, diagnostics and convergence.
Read guideLaser–plasma interaction simulation: regimes, models and codes
Simulating laser-plasma interaction by regime: underdense wakefields, near-critical targets, solids and ion acceleration, model choice and resolution.
Read guidePlasma wakefield acceleration simulation (beam-driven PWFA)
Simulating beam-driven plasma wakefield acceleration: drive and witness bunches, blowout, beam loading, full vs quasi-static PIC, and verification.
Read guidePlasma simulation software comparison: PIC, Vlasov, fluid and MHD codes
Compare plasma simulation software by model and application: PIC, continuum Vlasov, gyrokinetic, fluid/MHD and commercial tools, and how to choose.
Read guideMagnetic reconnection simulation: MHD, Hall, hybrid and kinetic approaches
How magnetic reconnection is simulated: resistive and Hall MHD, hybrid and kinetic PIC, the GEM setup, key dimensionless parameters and checks.
Read guidePIC simulation GPU acceleration: codes, considerations and pitfalls
How PIC codes use GPUs: which codes are GPU-ready, memory limits, particle sorting, precision, load balancing, and estimating GPU needs for your run.
Read guideScientific AI & machine learning
All Scientific AI →Physics-informed neural networks tutorial: theory, code and pitfalls
Learn physics-informed neural networks: how PINN loss functions encode PDEs, a complete PyTorch example verified against an exact solution, and when PINNs fail.
Read guidePINN Python example: inferring a diffusion coefficient from noisy data
A complete PyTorch PINN example for an inverse problem: learn the solution of the heat equation and the unknown diffusivity from sparse, noisy measurements.
Read guidePINN vs finite element method: when to use which
Physics-informed neural networks vs finite elements: accuracy, cost, error control, geometry, inverse problems and maturity, with clear guidance on choosing.
Read guideAI for scientific simulations: where it helps and where it does not
Where AI adds value across the simulation lifecycle: setup, acceleration, surrogates, inverse problems, analysis and agents, and the validation it needs.
Read guideMachine learning surrogate models: types, uses and limits
What ML surrogate models are: Gaussian processes, neural networks, reduced-order models and neural operators, when they pay off and how to trust them.
Read guideNeural operator tutorial: learning maps between functions
What neural operators are, how they differ from PINNs, the main architectures (FNO, DeepONet, GNO) and a workflow from training data to validation.
Read guideFourier neural operator example in PyTorch (1D, from scratch)
Implement a 1D Fourier neural operator from scratch in PyTorch: spectral convolution layers, synthetic PDE data, training and held-out verification.
Read guideDeepONet tutorial: learning the antiderivative operator in PyTorch
Understand and implement DeepONet: branch and trunk networks, sensor points, training on the antiderivative operator, and testing on new functions.
Read guideAI digital twin simulation: architecture, data and validation
What an AI-assisted digital twin is: physics models, surrogates, live data and assimilation, plasma and engineering use cases, and validation.
Read guideScientific machine learning in Python: tools, workflow and good practice
A map of scientific ML in Python: PyTorch, JAX, DeepXDE, neuraloperator, PySINDy and scikit-learn, with a reproducible workflow and validation.
Read guideAI for plasma physics: applications, methods and open problems
How machine learning is used in plasma physics: fusion control and surrogates, laser-plasma optimisation, diagnostics, space plasma and kinetic simulation.
Read guideML-accelerated PIC simulations: what can be learned and what must stay physics
How machine learning can speed up particle-in-cell work: surrogates, learned solvers and closures, super-resolution and smarter choice of runs.
Read guideHow to train surrogate models for simulations: from design of experiments to validation
Train a surrogate for an expensive simulation: input ranges, Latin hypercube sampling, Gaussian processes or networks, validation and active learning.
Read guideAI model physics benchmarks: how to design a test that measures real understanding
How to build a physics benchmark for AI models: problem design, verified answers, contamination control, grading by units and tolerance, and reporting.
Read guideLLM physics reasoning evaluation: methods, error types and pitfalls
How to evaluate the physics reasoning of large language models: task types, step-level grading, unit and limit checks, robustness tests and error taxonomies.
Read guideDetecting hallucinations in scientific AI: checks for facts, physics and code
How to detect hallucinations in scientific AI output: fabricated citations, wrong constants, unit and physics violations, and code that runs but is wrong.
Read guideSynthetic physics dataset generation: from verified solvers to ML-ready data
Generate synthetic physics datasets for ML: verified solvers, parameter sampling, metadata, splits and physics checks, with a Python heat-equation example.
Read guideAI agents for scientific research: what they can do and how to keep them honest
How AI research agents plan, search literature, write and run code, and analyse results, where they fail, and the guardrails that make them useful.
Read guideAI for numerical simulation: learned solvers, closures and preconditioners
Where ML enters numerical methods: learned closures, preconditioners, time-steppers, mesh adaptation and error estimation, and their limits.
Read guidePhysics-constrained machine learning: building physics into models
Building physics into ML models: soft penalties, hard architectural constraints, conservation laws and symmetries, with examples and trade-offs.
Read guideCalculators & technical tools
All Calculators →Plasma frequency calculator
Calculate the electron plasma frequency ωpe and fpe from electron density, in cm⁻³ or m⁻³, with the formula, worked examples and when the result applies.
Read guideDebye length calculator
Calculate the electron Debye length from density and temperature (eV, keV or K) and the particles per Debye sphere, with formula and worked examples.
Read guidePlasma wavelength calculator
Calculate the plasma wavelength λp = 2πc/ωpe and wavenumber kp from electron density, with worked examples for laser wakefield and beam-driven accelerators.
Read guideCritical plasma density calculator
Calculate the critical plasma density for any laser wavelength, nc ≈ 1.115×10²¹/λ²[µm] cm⁻³, with relativistic transparency and worked examples.
Read guideLaser intensity to a₀ calculator
Convert laser intensity and wavelength to the normalised vector potential a₀ for linear or circular polarisation, with derivation, examples and limits.
Read guideLaser Rayleigh length calculator
Calculate the Rayleigh length zR = πw₀²/(M²λ), confocal parameter and far-field divergence of a Gaussian laser beam, with worked examples and assumptions.
Read guideLaser peak power calculator
Calculate the peak power of an ultrashort laser pulse from energy and FWHM duration (Gaussian, sech² or flat-top), and the peak intensity at a Gaussian focus.
Read guidePlasma skin depth calculator
Calculate the collisionless plasma skin depth c/ωpe from electron density, with examples from gas jets to solids and when collisions matter.
Read guideElectron cyclotron frequency calculator
Calculate cyclotron frequencies of electrons, protons, deuterons and alphas from the magnetic field (T or G), with ECRH and magnetosphere examples.
Read guideAlfvén speed calculator
Calculate the Alfvén speed vA = B/√(μ0ρ) from field, ion density and mass, with the relativistic correction and corona and tokamak examples.
Read guidePlasma beta calculator
Calculate plasma beta, the ratio of thermal to magnetic pressure, from density, electron and ion temperatures and field, with worked examples.
Read guidePIC simulation memory calculator
Estimate the memory a particle-in-cell simulation needs from cells, particles per cell, species and precision, and how much each GPU or node must hold.
Read guideGPU memory requirement calculator for simulations and neural networks
Estimate GPU memory for grid-based simulations (points × variables × precision) and for training neural networks (weights, gradients, optimizer state).
Read guideHPC computing cost calculator: from job size to core-hours and money
Turn job size into core-, node- and GPU-hours, then into cost for cloud, on-premise and national facilities: formulas, a worked example and hidden costs.
Read guideCFL time step calculator for FDTD and PIC simulations
Compute the Courant (CFL) time-step limit for Yee FDTD and electromagnetic PIC in 1D, 2D or 3D, check ωpΔt, and understand what the stability limit means.
Read guideIndustry applications
All Industries →Semiconductor plasma etching simulation: reactor, sheath and feature scales
How plasma etching is modelled for chip manufacturing: reactor-scale fluid models, PIC-MCC sheaths and ion energy distributions, feature profiles.
Read guidePlasma-enhanced CVD simulation: discharges, chemistry and film uniformity
How plasma-enhanced CVD is modelled: RF capacitive discharges, gas and surface chemistry, film uniformity, particle formation and validation.
Read guideHall thruster plasma simulation: electron transport, erosion and plumes
How Hall thrusters are simulated: anomalous electron transport, hybrid and kinetic PIC, oscillations, wall erosion, plumes and validation.
Read guideIon thruster simulation: discharge chambers, ion optics and grid erosion
How gridded ion thrusters are modelled: DC or RF discharge chambers, ion optics, charge-exchange grid erosion, neutralisers and plumes.
Read guideFusion plasma simulation: the modelling hierarchy from equilibrium to turbulence
How fusion plasmas are simulated: equilibrium, MHD stability, transport, gyrokinetic turbulence, edge and divertor, heating and surrogates.
Read guideTokamak edge plasma modelling: scrape-off layer, divertor and detachment
How the tokamak edge is modelled: scrape-off layer, divertor detachment, neutrals and impurities with SOLPS-type codes, turbulence and kinetics.
Read guideSpace weather simulation: from the solar corona to the ionosphere
How space weather is simulated: coronal and heliospheric models, CME propagation, magnetospheric MHD and kinetic codes, and forecast validation.
Read guideSolar corona plasma modelling: heating, loops, flares and eruptions
How the solar corona is modelled: heating theories, loop hydrodynamics, magnetic extrapolation, radiative MHD, flares, CMEs and forward modelling.
Read guideHigh-power microwave PIC simulation: sources, beams and breakdown
How high-power microwave sources are simulated with electromagnetic PIC: relativistic beams, magnetrons, BWOs, vircators and gyrotrons, with validation.
Read guideMultipactor simulation for RF devices: thresholds, susceptibility and mitigation
How multipactor in RF and space hardware is simulated: secondary emission, resonance conditions, susceptibility charts, PIC thresholds and design margins.
Read guideResearch & computing support
All Research support →Scientific simulation verification: how to prove your code solves the equations correctly
What simulation verification is and how to do it: code verification with analytical benchmarks and manufactured solutions, solution verification, and reporting.
Read guideVerification vs validation in simulation: the difference and why both matter
Verification asks if the equations are solved right; validation asks if they are the right equations. A clear comparison with examples and methods.
Read guideNumerical convergence study tutorial: observed order, Richardson extrapolation and GCI
Run a grid convergence study for any simulation: systematic refinement, observed order, Richardson extrapolation and GCI uncertainty, with code.
Read guideScientific code reproducibility: make every figure rerunnable
Make simulation results reproducible: version control, pinned environments, containers, seeds, one-command figure scripts, data archiving and tests.
Read guideHow to validate simulation results against experiments
A practical method to validate simulation results: choose validation data, estimate all uncertainties, compare with metrics, and state the validated range.
Read guideResearch simulation consulting: expert help from plan to verified result
Simulation consulting for research groups and R&D teams: study design, plasma and kinetic simulations, verification, HPC runs and clear reporting.
Read guideGPU code porting services for scientific and simulation codes
GPU porting for research codes: profiling, choosing CUDA, HIP, SYCL, Kokkos or OpenMP offload, incremental porting with regression tests, and scaling.
Read guideScientific code optimisation services: faster simulations without changing the physics
Performance optimisation for research codes: profiling, algorithms and memory layout, MPI and OpenMP scaling and I/O tuning, with regression tests.
Read guideHPC training for researchers: Linux, MPI, GPUs and simulation workflows
Hands-on HPC training for researchers: Linux, Slurm, MPI and OpenMP, GPU computing, performance, reproducibility and PIC simulation, online or on campus.
Read guideComputational physics research support: an expert team on call for your group
Ongoing computational physics support for research groups: simulation help, code review, reviewer responses, compute planning and student mentoring.
Read guide