Particle Lab is a collection of interactive particle models designed to explain physical, statistical and collective phenomena through images, parameters and real-time plots. The simulations prioritize clarity, numerical stability and teaching value; they are not substitutes for calibrated scientific solvers.
Contents
1. Quick start
- Run
ParticleLab.exe. - Choose a mode from the main Simulator selector.
- Use Pause/Resume to control evolution and Reset current to rebuild the initial state of the active demo.
- Change one parameter at a time and observe the scene, status panel and plots.
- Use Help > User guide - English to reopen this guide. F1 opens the Italian guide.
2. Interface and common commands
| Area or command | Purpose |
|---|---|
| Simulator | Selects one of the available models. The parameter panel automatically switches to the relevant page. |
| Pause/Resume | Stops or resumes integration without discarding the current state. |
| Reset current | Recreates the initial state of the active simulation and resets its simulation clock. |
| Release wall | Removes the barrier in Entropy and Hot/Cold; in Diffusion it disables the perforated wall. |
| Invert velocities | Reverses all particle velocities; especially useful for the entropy reversibility experiment. |
| Rendering | Controls glow, thermal colors, trails, box, axes, overlay, brightness and automatic rotation. |
| Physics | Sets particle count and radius, box size, restitution and collision-grid parameters. |
| Camera / Light | Sets camera position, yaw, pitch and light-source position. |
| View | Shows or hides live plots, teacher notes and the log. |
| File | Saves or loads settings as JSON and closes the application. |
The Teacher notes dock provides a contextual explanation for the active demo. Language / Lingua switches both the notes and dynamic interpretations between Italian and English.
3. Plots, diagnostics and CSV export
The Live graphs dock keeps a time history of the simulation. Main plots cover entropy, mixing and mode-specific diagnostics.
- Pause plots freezes graph updates only; it does not pause the simulation.
- Clear plots removes the current plot history.
- Export CSV saves all available samples, including mode-specific metrics.
- Diagnostic view selects coherent curve groups; some views use automatic Y scaling.
- Markers annotate events such as reset, wall release and velocity inversion.
4. Video capture
The Video page captures frames from the OpenGL view and uses FFmpeg to create an MP4 file when capture stops.
- Enter the path to
ffmpeg.exe, or leave it blank when FFmpeg is available through the WindowsPATH. - Choose the temporary folder, output MP4, frame rate and CRF quality.
- Select the temporary frame format: BMP favors speed, PNG is lossless and compressed, JPG is smaller but lossy.
- Enable Grab video. Capture proceeds while the simulation is running.
- Disable Grab video to finish capture and start encoding. Use the buttons to play the last video or open its folder.
Every N frames reduces sampling frequency; Scale percent reduces resolution; Max queue preserves GUI responsiveness by dropping frames when the writer queue is full. Auto even size prevents odd dimensions that are incompatible with some H.264 profiles.
5. Procedural sonification
The Sound page adds an optional audible interpretation of events. Sound is a perceptual mapping, not a physical measurement.
| Control | Meaning |
|---|---|
| Master gain | Overall output level. |
| Event pulse gain | Strength of impulses associated with impacts, tracks, detectors and DLA sticking events. |
| Noise bed / Activity to noise | Continuous noise floor and its sensitivity to simulation activity. |
| White to pink/dark | Spectral color of the noise, from bright to darker. |
| Tonal carrier | Continuous tonal component used by selected demos. |
| Geiger rain | Stochastic click rain, useful for radioactive decay. |
| Max pulses/frame | Anti-saturation limit for discrete events. |
For an effective lesson, first present the phenomenon without audio; then enable sonification and ask which variable appears to control the sound.
6. Guide to the 17 simulations
6.1 ParticleLab gas / Thermal glow
Shows: particles in a volume with wall and particle collisions; speed and kinetic energy are represented through color, brightness and trails.
Observe: estimated temperature, collision count, visual density and speed distribution.
Try: increase particle count and restitution; compare spheres with glow; change global speed. Large particle counts quickly increase collision cost.
6.2 Entropy / Free expansion
Shows: an initially confined cloud that occupies a larger volume after the wall is removed. Normalized spatial entropy tends to increase.
Concepts: microstates, macrostates, dynamic equilibrium, arrow of time and fragility of macroscopic reversibility.
Try: release the wall, wait for mixing, invert velocities first without perturbation and then with a small reversal perturbation. Compare H(t) and the left-side fraction.
6.3 Hot / Cold mixing
Shows: two populations with different initial energies separated by a barrier. After release they mix and their mean temperatures approach one another.
Try: change cold speed and hot speed; compare temperature difference, mixing index and convergence time.
6.4 Diffusion / Drift
Shows: a tracer cloud subject to diffusive noise and drift. A central wall may have one slit, two slits or multiple pores.
Metrics: RMS radius, mean center, particles before/beyond the wall and transmission.
Try: set drift to zero for near-symmetric diffusion; increase Drift X; narrow the openings; compare barrier types. Particles are tracers, not a complete collisional gas.
6.5 Sedimentation / Centrifuge
Shows: light and heavy species under gravity or centrifugal force, with Brownian agitation and damping.
Metrics: mean location of each species and separation index.
Try: increase mass contrast and then noise; compare vertical and radial separation. The qualitative model does not include solvent hydrodynamics.
6.6 Flocking / Collective motion
Shows: self-organization of agents applying local separation, alignment and cohesion rules.
Metrics: order index, clustering and mean speed.
Try: disable alignment, increase noise, compare cohesion and separation, and change perception radius. No central controller imposes group direction.
6.7 Reaction / Diffusion
Shows: A and B reactants that diffuse and may become product C when they meet within a reaction radius.
Metrics: A/B/C populations, conversion and reaction rate.
Try: change reaction radius and probability, diffusion noise and C decay. The model illustrates a local principle; it does not use molar concentrations or calibrated kinetics.
6.8 Flow field / Tracers
Shows: tracers carried by analytical fields: single vortex, double vortex, shear flow and convective cells.
Metrics: mean speed, vorticity index and mixing.
Try: compare presets, change field strength and scale, and add noise. Tracers do not feed back on the fluid, and Navier-Stokes equations are not solved.
6.9 Plasma / Charged particles
Shows: positive and negative charges subject to external fields, a qualitative self-field, magnetic field, noise and damping.
Metrics: charge separation, neutrality, mean speed and positive/negative populations.
Try: change field sign and strength, select different presets, and observe shielding, separation and curved motion. This is not a PIC code and does not quantitatively solve Maxwell's equations.
6.10 Lennard-Jones / Matter phases
Shows: particles with a reduced-unit 12-6 attractive/repulsive interaction; changing energy and damping produces gas-like states, clusters and quasi-solid order.
Metrics: potential and kinetic energy, reduced temperature, clustering, crystallinity and mean neighbor distance.
Try: change epsilon, sigma, cutoff, initial speed and damping. Keep a moderate particle count to preserve interaction performance and stability.
6.11 DLA / Fractal aggregation
Shows: random walkers born around a seed and sticking to the cluster, creating a branched structure.
Metrics: stuck particles, active walkers, cluster radius, growth rate and compactness.
Try: change random step, sticking distance and probability, spawn radius and kill radius. High sticking probability favors screened tips and open branching.
6.12 Radioactive decay / Cloud chamber
Shows: random decays with an adjustable half-life and stylized alpha, beta and gamma cloud-chamber tracks.
Metrics: remaining nuclei, decayed nuclei, active tracks, event rate and half-life progress.
Try: change half-life, emission speed, magnetic field, scattering, energy loss and track lifetime. The process is stochastic: identical settings do not produce identical event sequences after reset.
6.13 Mass spectrometer / m-q separation
Shows: ions with different mass-to-charge ratios accelerated and curved by electric and magnetic fields toward a detector.
Metrics: active/detected ions, mean impact position, beam spread, mean m/q and resolution index.
Try: change E, B, injection speed and spread; reverse B; observe impact-family displacement. This is a teaching model without SI calibration or real ion optics.
6.14 Granular DEM / Soft grains
Shows: soft grains with gravity, mass-spring-damper contact, dissipation, qualitative friction and container vibration.
Metrics: contacts, mean height, packing index and agitation.
Try: observe fall and settling; increase shaking to fluidize the bed; compare stiffness, damping and friction. This is not an industrial DEM with full rotations and Coulomb friction.
6.15 Photons in turbid medium
Shows: Monte Carlo photon packets that propagate, scatter, are absorbed, reflected or transmitted through a turbid medium.
Metrics: transmission, reflection and absorption counts/rates, plus mean penetration depth.
Try: change mu_a, mu_s and anisotropy g; compare isotropic and forward-dominant scattering. Coefficients are didactic and uncalibrated.
6.16 SPH fluid 2D
Shows: a two-dimensional particle fluid; density and pressure arise from neighbors within the smoothing radius.
Metrics: mean density, pressure, kinetic energy, fluid height and surface index.
Try: change rest density, stiffness, viscosity, gravity and smoothing radius. Extreme values may make the system stiff or numerically unstable.
6.17 N-body gravity
Shows: mutually attracting masses around a central mass, with softening and near-orbital initial speeds.
Metrics: kinetic, potential and total energy, mean radius, bound fraction and angular momentum.
Try: Initial speed below 1 favors collapse, above 1 favors escape; damping below 1 introduces inspiral; softening limits singular accelerations. The integrator is educational, not a precision astrophysical solver.
7. Suggested teaching method
Prediction
Before changing a parameter, ask which curve or structure should change and in which direction.
One variable
Change one control at a time; use Reset current to keep initial conditions comparable.
Image + measurement
Do not stop at the animation: connect each observation to a metric or CSV series.
Repetition
Repeat stochastic demos and discuss distributions and variability rather than a single outcome.
8. Files, settings and distribution
- Interface settings can be saved to and loaded from JSON through the File menu.
- The guides must remain in
./docnext to the executable:ParticleLab_Guide.htmlandParticleLab_Guide_EN.html. - The Visual Studio project automatically copies the
docfolder to the output directory after a build. - A distribution should include the executable, required Qt DLLs and plugins, the
docfolder and every other component from the original package. - Interface images are embedded Qt resources; Windows
.rcand.icoresources remain separately managed by the project.
9. Troubleshooting
| Problem | Check |
|---|---|
| The guide does not open | Verify that doc is next to ParticleLab.exe and that the default browser can open local HTML files. |
| No video is produced | Inspect the log, FFmpeg path, temporary-folder permissions, free disk space and overwrite setting. |
| The GUI becomes slow | Reduce particles, trails, glow, video resolution or captured frames; some demos are more expensive than others. |
| A simulation appears unstable | Restore defaults, reduce stiffness/fields/forces or increase damping/softening as appropriate for the mode. |
| No sound | Check enable state, master gain, the Windows audio device and Qt Multimedia backend availability. |
10. Limits, safety and license
Particle Lab is a teaching tool. It must not be used for safety design, diagnosis, medical decisions, certified engineering predictions or quantitative scientific calculation without independent model validation.
ParticleLab_Freeware_License.txt.Document revised for Particle Lab 6.4. Last updated: July 24, 2026.