A compact Python demo that visualizes how a continuously released synthetic tracer plume changes shape in a prescribed two-dimensional variable wind field.
The model combines particle advection, random-walk diffusion, eddy/shear flow, density reconstruction, and four-frame visualization. It is intended as a scientific-computing and data-visualization demonstration, not an operational dispersion model.
A plume is not shaped by release location alone. Transport direction, diffusion, wind-field variation, eddies, and visualization choices all affect the final output.
This demo makes those assumptions visible in a small reproducible model.
The four-frame output shows the synthetic plume at 2, 5, 10, and 15 minutes. Color shows display-scaled relative density, while arrows show local wind direction and relative strength.
The script releases particles from a point source at (0, 0), advances them through a two-dimensional velocity field, adds random-walk diffusion, and reconstructs the plume as four smoothed density snapshots.
The wind field combines:
- Base eastward transport
- Crosswind variation
- A localized downrange eddy
- Mild shear
- Weak stochastic velocity perturbations
The density map is built from particle positions with a 2D histogram, Gaussian smoothing, shared percentile normalization, and gamma display scaling. The display scaling helps show faint outer plume structure alongside the brighter core.
- Lagrangian particle advection
- Random-walk diffusion
- Prescribed two-dimensional wind-field construction
- Eddy/shear flow visualization
- Density reconstruction from particle positions
- Gaussian smoothing
- Shared normalization across time snapshots
- Scientific visualization with NumPy and Matplotlib
- Reproducible synthetic-model documentation
Running the script creates:
figures/synthetic_variable_wind_plume_four_frame.png
figures/synthetic_variable_wind_plume_four_frame.pdf
outputs/run_summary.txt
Install dependencies, then run the script:
pip install -r requirements.txt
python src/variable_wind_plume.pyKey settings are defined near the top of src/variable_wind_plume.py:
- Domain:
x = -500 to 3500 m,y = -1500 to 1500 m - Source:
(0, 0) - Timestep:
5 s - Total simulation time:
15 min - Snapshots:
2, 5, 10, 15 min - Release rate:
150 particlesper timestep - Diffusion coefficient:
K = 24 m^2/s - Density display: global percentile normalization plus gamma scaling
synthetic-plume-variable-wind/
├── README.md
├── LICENSE
├── requirements.txt
├── src/
│ └── variable_wind_plume.py
├── figures/
│ ├── synthetic_variable_wind_plume_four_frame.png
│ └── synthetic_variable_wind_plume_four_frame.pdf
└── outputs/
└── run_summary.txt
This is a synthetic visualization demo. It does not model real terrain, atmospheric stability, deposition, chemical behavior, detector response, emergency response, or site-specific meteorology.
The plume should be interpreted as a controlled computational example for understanding advection, diffusion, wind-field structure, and visualization choices.
