Particle Lab

User and teaching guide to the particle simulations

Version 6.4 - English

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.

Units: unless explicitly stated otherwise, time, distance, fields, temperature and coefficients use numerical or reduced units. Results should be interpreted qualitatively and comparatively, not as SI measurements.

Contents

1. Quick start2. Interface and common commands3. Plots, diagnostics and CSV export4. Video capture5. Procedural sonification6. Guide to the 17 simulations7. Suggested teaching method8. Files, settings and distribution9. Troubleshooting10. Limits, safety and license

1. Quick start

  1. Run ParticleLab.exe.
  2. Choose a mode from the main Simulator selector.
  3. Use Pause/Resume to control evolution and Reset current to rebuild the initial state of the active demo.
  4. Change one parameter at a time and observe the scene, status panel and plots.
  5. Use Help > User guide - English to reopen this guide. F1 opens the Italian guide.
Suggested first experiment: select Entropy / Free expansion, inspect the confined state, click Release wall, and compare the visual expansion with the entropy plot.

2. Interface and common commands

Area or commandPurpose
SimulatorSelects one of the available models. The parameter panel automatically switches to the relevant page.
Pause/ResumeStops or resumes integration without discarding the current state.
Reset currentRecreates the initial state of the active simulation and resets its simulation clock.
Release wallRemoves the barrier in Entropy and Hot/Cold; in Diffusion it disables the perforated wall.
Invert velocitiesReverses all particle velocities; especially useful for the entropy reversibility experiment.
RenderingControls glow, thermal colors, trails, box, axes, overlay, brightness and automatic rotation.
PhysicsSets particle count and radius, box size, restitution and collision-grid parameters.
Camera / LightSets camera position, yaw, pitch and light-source position.
ViewShows or hides live plots, teacher notes and the log.
FileSaves 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.

Good practice: save one CSV per configuration and include the mode and changed parameter in the file name. Comparing homogeneous time series is more useful than comparing isolated screenshots.

4. Video capture

The Video page captures frames from the OpenGL view and uses FFmpeg to create an MP4 file when capture stops.

  1. Enter the path to ffmpeg.exe, or leave it blank when FFmpeg is available through the Windows PATH.
  2. Choose the temporary folder, output MP4, frame rate and CRF quality.
  3. Select the temporary frame format: BMP favors speed, PNG is lossless and compressed, JPG is smaller but lossy.
  4. Enable Grab video. Capture proceeds while the simulation is running.
  5. 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.

ControlMeaning
Master gainOverall output level.
Event pulse gainStrength of impulses associated with impacts, tracks, detectors and DLA sticking events.
Noise bed / Activity to noiseContinuous noise floor and its sensitivity to simulation activity.
White to pink/darkSpectral color of the noise, from bright to darker.
Tonal carrierContinuous tonal component used by selected demos.
Geiger rainStochastic click rain, useful for radioactive decay.
Max pulses/frameAnti-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 Gas / Thermal glow6.2 Entropy6.3 Hot / Cold6.4 Diffusion / Drift6.5 Sedimentation6.6 Flocking6.7 Reaction6.8 Flow field6.9 Plasma6.10 Lennard-Jones6.11 DLA6.12 Decay / Chamber6.13 Mass spectrometer6.14 Granular DEM6.15 Photon medium6.16 SPH fluid 2D6.17 N-body gravity

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

9. Troubleshooting

ProblemCheck
The guide does not openVerify that doc is next to ParticleLab.exe and that the default browser can open local HTML files.
No video is producedInspect the log, FFmpeg path, temporary-folder permissions, free disk space and overwrite setting.
The GUI becomes slowReduce particles, trails, glow, video resolution or captured frames; some demos are more expensive than others.
A simulation appears unstableRestore defaults, reduce stiffness/fields/forces or increase damping/softening as appropriate for the mode.
No soundCheck 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.

Copyright: © 2026 Manuele Turini. All rights reserved. The software is freeware, not public domain. The full license is available under Help > About and in ParticleLab_Freeware_License.txt.

Document revised for Particle Lab 6.4. Last updated: July 24, 2026.