Skip to main content

GPlume

This repository contains a Python implementation of the Gaussian Plume Model for atmospheric dispersion of contaminants (PM2.5), along with an inverse modeling approach to estimate emission rates from receptor measurements. The model calculates the contaminant concentration at receptor locations based on emission rates and wind conditions. It assumes 4 sources, which can be customized according to the code that generates an input box. This code works for multiple sources and multiple receptors.

Code Description

The main code file gpm.py includes the following components:

  1. Contaminant Parameters: Set the parameters related to the contaminant being modeled, such as gravitational acceleration, dynamic viscosity of air, density of the contaminant, diameter of particles, deposition velocity, and molar mass of the contaminant.

  2. Source and Receptor Data: Define the locations and characteristics of the emission source and receptors where deposition measurements are made. This includes the number of sources, x-y-z coordinates, labels, and emission rates.

  3. gplume Function: This function computes the contaminant concentration (in kg/m^3) at a given set of receptor locations using the standard Gaussian plume solution. It takes into account the source characteristics, receptor locations, and wind speed.

  4. forward_atmospheric_dispersion Function: This function calculates and plots the ground-level contaminant concentration contours based on the Gaussian Plume Model. It takes the wind speed as an input and calls the gplume function to calculate the concentrations. The resulting contours are displayed using the matplotlib library.

The inverse.py file introduces an inverse modeling approach to estimate emission rates from observed contaminant concentrations at receptor locations. The key components in this file are:

  1. ermak Function: This function computes the contaminant concentration at receptor locations using the Ermak dispersion model. It takes into account the emission rates, wind speed, and other parameters.

  2. Objective Function: The objective_function calculates the difference between predicted and observed contaminant concentrations based on the Ermak model. It sets up an optimization problem to find the optimal emission rates that minimize this difference.

  3. Optimization: The minimize function from the scipy.optimize module is used to find the optimal emission rates that best fit the observed receptor measurements.

Installing

Install and update from PyPI using an installer such as pip:

$ pip install -U gplume

A Simple Example: Input these commands in the Terminal

# Compute and plot forward modeling
python3 -c "from gplume import gpm"
# Compute and plot inverse modeling
python3 -c "from gplume import inverse"

Contributing

Contributions to this project are welcome. If you find any issues or have suggestions for improvements, feel free to create a pull request or submit an issue on the GitHub repository. https://github.com/VaibhavVasdev/Gaussian-Plume_Model

Contact

For any inquiries or questions, please contact Vaibhav Vasdev at vaibhavvasdev63@gmail.com.

Release files for gplume 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gplume 1.0.2
File Size Uploaded
gplume-1.0.2.tar.gz 11.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gplume 1.0.2
File Interpreter ABI Platform
gplume-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 23.2 kB

Release files / gplume-1.0.2.tar.gz

Download URL gplume-1.0.2.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
cb0ada6aa1c386198819d8618bfa0dbd6afab46af46f7f019fbedf91cb07f61f
BLAKE2b-256 checksum
How to use checksums
040358504c8b3d3e3c75dfce6a01fda2cea45bea79d61322d71d7d27473cb822
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / gplume-1.0.2-py3-none-any.whl

Download URL gplume-1.0.2-py3-none-any.whl
Size 12.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
560062b1d313a4b49e9a790a4ec89c2717a060dbff3e8621e85d91aebbaeaab2
BLAKE2b-256 checksum
How to use checksums
a580eddf97503d81b7cd5ad4502e48fd51b0ebb554791b6305ef87b74968fa00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page