Model charged particles on a fixed grid. Compute self-consistent electric forces from deposited charge density. Tune steps and resolution to capture plasma behavior well.
Np ≤ 5000, Ng ≤ 2048, steps ≤ 2000.
| L (m) | Ng | Np | dt (s) | steps | n₀ (m⁻³) | q (C) | m (kg) | Tₑ (eV) | vᵈ (m/s) | scheme | iters | smooth |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | 128 | 2000 | 1e-10 | 200 | 1e15 | -1.602e-19 | 9.109e-31 | 5 | 0 | CIC | 200 | 0 |
| 0.5 | 256 | 4000 | 5e-11 | 300 | 5e15 | -1.602e-19 | 9.109e-31 | 2 | 2e5 | CIC | 300 | 1 |
| 2 | 128 | 1500 | 2e-10 | 150 | 5e14 | 1.602e-19 | 1.673e-27 | 1 | 0 | NGP | 250 | 0 |
This tool implements a simplified 1D electrostatic Particle-in-Cell loop with periodic boundaries. Particles are represented by macroparticles, and their charge is deposited onto a grid.
ρ(x) from particles using NGP or CIC weighting.d²φ/dx² = −ρ/ε₀ on the grid.E = −dφ/dx by central differences.dv/dt = (q/m)E, then position with dx/dt = v.K = ½ m Σ v², field energy Uₑ = ½ ε₀ Σ E² dx.
Derived plasma scales: ωp = √(n₀ q² / (ε₀ m)) and λD = √(ε₀ kT / (n₀ q²)) with kT = e·Tₑ.
dt·ωp, reduce dt.
If dx is much larger than λD, increase Ng.
Particle‑in‑Cell (PIC) models a plasma by tracking many macroparticles while solving fields on a mesh. Each macroparticle stands for a large number of real particles, so you can study collective behavior without simulating every electron. The calculator uses a 1D electrostatic loop with periodic boundaries for clarity.
Every step follows four actions: deposit particle charge to the grid, solve Poisson’s equation to get potential, differentiate to obtain the electric field, then gather that field back to particles and advance their motion. This split makes PIC efficient because the field solve scales with grid size while particle push scales with particle count.
The grid spacing is dx = L/Ng. A practical target is keeping dx on the order of the Debye length λD,
because λD sets the shielding scale in many plasmas. If dx is too large, short‑scale structure is smeared,
and field noise can dominate. Increasing Ng improves spatial fidelity but increases compute and memory.
A common stability indicator is the dimensionless product dt·ωp, where ωp = √(n0 q²/(ε0 m)).
Smaller values generally behave better in explicit updates. If dt·ωp is high, particle trajectories can overshoot
the self‑consistent field response and energy drift becomes more visible in the diagnostics table.
PIC is a Monte‑Carlo style method: finite particles introduce fluctuations in charge density and electric field.
A useful rule of thumb is maintaining multiple particles per cell; for example, 5–50 particles per cell often yields
noticeably smoother fields than 1–2. The calculator reports energies and max|E| so you can see noise trends while tuning Np.
With NGP (nearest‑grid‑point), each particle deposits entirely into one cell, which is fast but noisy. CIC (cloud‑in‑cell) linearly shares charge between adjacent cells and usually reduces high‑frequency noise. When you pair CIC with light smoothing, you can often keep acceptable noise with fewer particles than NGP.
Runtime scales roughly as O(Np) for pushing particles plus O(Ng·iters) for the Poisson iterations.
Doubling Np nearly doubles push time, while doubling Ng increases both deposition/gather work and the field solve.
For web usage, modest values (such as Np ≤ 5000 and Ng ≤ 2048) keep results responsive.
Use the diagnostics to check trends rather than single values. If kinetic energy rises while field energy falls,
the system may be converting field energy into particle motion. Large swings in Etot suggest a timestep that is too large,
insufficient field iterations, or aggressive smoothing. Adjust one parameter at a time for clean comparisons.
It is the number of real particles represented by one simulated particle. Here it is based on n0·L/Np, so changing density, domain length, or particle count changes the effective charge per macroparticle.
Finite particles produce statistical fluctuations in deposited charge. Increasing particles per cell, choosing CIC, and adding a small number of smoothing passes usually reduces noise while preserving the overall plasma response.
Start small, then increase gradually while watching dt·ωp and energy drift. If total energy changes rapidly or max|E| becomes erratic, reduce dt or increase Poisson iterations for a more consistent field.
The Debye length estimates the scale over which charge imbalances are screened. If dx is much larger than λD, shielding physics is under‑resolved and results can look overly smooth or unstable.
The electric potential must satisfy a discrete Poisson equation on the grid. Iterative updates are simple to implement and can be accurate enough for demonstrations, as long as you use sufficient iterations for convergence.
Smoothing filters short‑wavelength noise in ρ and E. A small number of passes can help readability, but too much smoothing may damp real small‑scale structure and alter energy exchange rates.
No. It is an educational 1D electrostatic loop intended for parameter intuition. Research codes typically include higher dimensions, advanced pushers, better solvers, boundary options, collisions, and careful normalization.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.