GasDispersion.jl
A set of tools for atmospheric dispersion modeling of gaseous releases, such as might occur during an emergency at a chemical plant or more routinely from a stack.
https://github.com/aefarrell/GasDispersion.jl
Category: Atmosphere
Sub Category: Atmospheric Dispersion and Transport
Keywords
chemical-engineering process-safety
Last synced: about 17 hours ago
JSON representation
Repository metadata
gas dispersion models for modelling chemical releases
- Host: GitHub
- URL: https://github.com/aefarrell/GasDispersion.jl
- Owner: aefarrell
- License: mit
- Created: 2021-09-04T17:06:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-18T21:32:03.000Z (12 days ago)
- Last Synced: 2025-04-21T11:07:30.670Z (10 days ago)
- Topics: chemical-engineering, process-safety
- Language: Julia
- Homepage:
- Size: 12.8 MB
- Stars: 15
- Watchers: 2
- Forks: 0
- Open Issues: 1
- Releases: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
README.md
GasDispersion.jl
GasDispersion.jl is a set of tools for atmospheric dispersion modeling of
gaseous releases, such as might occur during an emergency at a chemical plant
or more routinely from a stack. This is intended to be the level of disperson
modeling used support consequence analysis or QRA such as is described in Lee's
Loss Prevention in the Process Industries or the CCPS Guidelines for
Consequence Analysis of Chemical Releases.
Installation
GasDispersion.jl can be installed using Julia's built-in package manager. In a
Julia session, enter the package manager mode by hitting ]
, then run the
command
pkg> add GasDispersion
Example usage
Suppose we wish to model the dispersion of gaseous propane from a leak from a storage tank, where the leak is from a 10mm hole that is 3.5m above the ground and the propane is at 25°C and 4barg. Assume the discharge coefficient $c_{D} = 0.85$. This scenario is adapted from CCPS Guidelines for Consequence Analysis of Chemical Releases
First we define the scenario
using GasDispersion
propane = Substance(name="propane",
molar_weight=0.044096, # kg/mol
liquid_density=526.13, # kg/m³
k=1.142,
boiling_temp=231.02, # K
latent_heat=425740, # J/kg
gas_heat_capacity=1678, # J/kg/K
liquid_heat_capacity=2520) # J/kg/K
Patm = 101325 # Pa
P1 = 4e5 + Patm # Pa
T1 = 25 + 273.15 # K
scn = scenario_builder(propane, JetSource;
phase = :gas,
diameter = 0.01, # m
dischargecoef = 0.85,
temperature = T1, # K
pressure = P1, # Pa
height = 3.5) # m, height of hole above the ground
This generates a Scenario
defined for a gas jet discharging into dry air
at standard conditions.
An alternative to supplying all of the substance properties, which can get
rather onerous, is to use the library of substances and equations of state
provided in Clapeyron.jl
using GasDispersion, Clapeyron
propane = Substance(PropaneRef()) # uses an empirical EoS for propane
propane = Substance(PR("propane"; idealmodel=ReidIdeal)) # uses the Peng-Robinson EoS
Once we have this defined we can determine the
concentration at any point downwind of the release point, assuming the release
is a continuous plume, using
p = plume(scn, GaussianPlume)
Where p
is a callable which returns the concentration (in vol fraction) at any point. For example at 100m downwind and at a height of 2m
p(100,0,2)
# output
0.0002006455298894473
See the documentation for details on the additional plume and puff models and worked examples.
Owner metadata
- Name: allan
- Login: aefarrell
- Email:
- Kind: user
- Description: I am a chemical engineer with an interest in coding. Recently I've been playing around with julia.
- Website: https://aefarrell.github.io/
- Location: Edmonton, AB
- Twitter:
- Company:
- Icon url: https://avatars.githubusercontent.com/u/75338859?u=d076bc9d13a9b931bed2f4b40d394b3829e50bcd&v=4
- Repositories: 4
- Last ynced at: 2025-04-25T05:38:43.711Z
- Profile URL: https://github.com/aefarrell
GitHub Events
Total
- Create event: 7
- Commit comment event: 3
- Release event: 1
- Issues event: 5
- Watch event: 3
- Delete event: 6
- Issue comment event: 10
- Push event: 22
- Pull request event: 12
Last Year
- Create event: 7
- Commit comment event: 3
- Release event: 1
- Issues event: 5
- Watch event: 3
- Delete event: 6
- Issue comment event: 10
- Push event: 22
- Pull request event: 12
Committers metadata
Last synced: 2 days ago
Total Commits: 176
Total Committers: 2
Avg Commits per committer: 88.0
Development Distribution Score (DDS): 0.051
Commits in past year: 28
Committers in past year: 2
Avg Commits per committer in past year: 14.0
Development Distribution Score (DDS) in past year: 0.143
Name | Commits | |
---|---|---|
allan | 7****l | 167 |
CompatHelper Julia | c****y@j****g | 9 |
Committer domains:
Issue and Pull Request metadata
Last synced: 1 day ago
Total issues: 26
Total pull requests: 34
Average time to close issues: about 2 months
Average time to close pull requests: about 8 hours
Total issue authors: 3
Total pull request authors: 2
Average comments per issue: 0.69
Average comments per pull request: 0.62
Merged pull request: 33
Bot issues: 0
Bot pull requests: 9
Past year issues: 8
Past year pull requests: 12
Past year average time to close issues: 17 days
Past year average time to close pull requests: 8 minutes
Past year issue authors: 2
Past year pull request authors: 2
Past year average comments per issue: 0.88
Past year average comments per pull request: 0.33
Past year merged pull request: 12
Past year bot issues: 0
Past year bot pull requests: 4
Top Issue Authors
- aefarrell (24)
- morripau (1)
- JuliaTagBot (1)
Top Pull Request Authors
- aefarrell (25)
- github-actions[bot] (9)
Top Issue Labels
- enhancement (10)
- todo (6)
- documentation (5)
- bug (4)
- compat (1)
Top Pull Request Labels
- enhancement (3)
- documentation (1)
- compat (1)
- todo (1)
- bug (1)
Package metadata
- Total packages: 1
-
Total downloads:
- julia: 3 total
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 6
juliahub.com: GasDispersion
gas dispersion models for modelling chemical releases
- Homepage:
- Documentation: https://docs.juliahub.com/General/GasDispersion/stable/
- Licenses: MIT
- Latest release: 0.3.0 (published 3 months ago)
- Last Synced: 2025-04-27T01:11:29.518Z (4 days ago)
- Versions: 6
- Dependent Packages: 0
- Dependent Repositories: 0
- Downloads: 3 Total
-
Rankings:
- Dependent repos count: 9.94%
- Average: 37.726%
- Dependent packages count: 38.915%
- Stargazers count: 48.526%
- Forks count: 53.523%
Dependencies
- actions/cache v1 composite
- actions/checkout v2 composite
- codecov/codecov-action v1 composite
- julia-actions/julia-buildpkg v1 composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/julia-runtest v1 composite
- julia-actions/setup-julia v1 composite
- julia-actions/setup-julia v1 composite
- JuliaRegistries/TagBot v1 composite
- actions/checkout v2 composite
- julia-actions/setup-julia latest composite
Score: 4.564348191467836