deepsafety 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- deepsafety-0.1.0/LICENSE +21 -0
- deepsafety-0.1.0/MANIFEST.in +2 -0
- deepsafety-0.1.0/PKG-INFO +61 -0
- deepsafety-0.1.0/README.md +25 -0
- deepsafety-0.1.0/deepsafety/deepsafety.egg-info/PKG-INFO +61 -0
- deepsafety-0.1.0/deepsafety/deepsafety.egg-info/SOURCES.txt +20 -0
- deepsafety-0.1.0/deepsafety/deepsafety.egg-info/dependency_links.txt +1 -0
- deepsafety-0.1.0/deepsafety/deepsafety.egg-info/top_level.txt +2 -0
- deepsafety-0.1.0/deepsafety/dispersion/__init__.py +0 -0
- deepsafety-0.1.0/deepsafety/dispersion/dense_gas.py +0 -0
- deepsafety-0.1.0/deepsafety/dispersion/neutrally_buoyant.py +28 -0
- deepsafety-0.1.0/deepsafety/dispersion/toxic_effects.py +0 -0
- deepsafety-0.1.0/deepsafety/dispersion/utils.py +0 -0
- deepsafety-0.1.0/deepsafety/fire_and_explosion/__init__.py +0 -0
- deepsafety-0.1.0/deepsafety/fire_and_explosion/explosion_characterization.py +0 -0
- deepsafety-0.1.0/deepsafety/fire_and_explosion/flammability.py +8 -0
- deepsafety-0.1.0/deepsafety/fire_and_explosion/ignition_sources.py +0 -0
- deepsafety-0.1.0/deepsafety/fire_and_explosion/utils.py +0 -0
- deepsafety-0.1.0/pyproject.toml +25 -0
- deepsafety-0.1.0/setup.cfg +4 -0
- deepsafety-0.1.0/tests/test_dispersion.py +0 -0
- deepsafety-0.1.0/tests/test_fire_and_explosion.py +0 -0
deepsafety-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 MrCleanRoom
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: deepsafety
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A Python library for industrial and safety calculations
|
|
5
|
+
Author-email: Pkbythebay29 <kannan@haztechrisk.org>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2025 MrCleanRoom
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: Homepage, https://github.com/pkbythebay29/deepsafety
|
|
29
|
+
Keywords: process safety,dispersion,flammability,explosions,toxicology
|
|
30
|
+
Classifier: Programming Language :: Python :: 3
|
|
31
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
32
|
+
Classifier: Operating System :: OS Independent
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
License-File: LICENSE
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
|
|
37
|
+
# DeepSafety
|
|
38
|
+
**DeepSafety** is an open-source Python library for performing industrial and process safety calculations. It includes models and tools for analyzing hazardous material dispersion, fire and explosion behavior, toxicological impacts, and mitigation strategies. The library is designed to be modular, extensible, and suitable for academic, industrial, and emergency response use cases.
|
|
39
|
+
|
|
40
|
+
## Features (Planned and In Progress)
|
|
41
|
+
|
|
42
|
+
- Atmospheric dispersion models (Pasquill–Gifford)
|
|
43
|
+
- Puff and plume models (ground level and elevated sources)
|
|
44
|
+
- Neutrally buoyant and dense gas behavior
|
|
45
|
+
- Toxic effect criteria
|
|
46
|
+
- AEGLs, ERPGs, IDLH, TLVs, PELs, and toxic endpoints
|
|
47
|
+
- Flammability and ignition analysis
|
|
48
|
+
- Limits, autoignition, inerting, ignition energy
|
|
49
|
+
- Explosion modeling
|
|
50
|
+
- TNT equivalency, VCEs, BLEVEs, deflagration/detonation
|
|
51
|
+
- Blast damage, overpressure, and mitigation
|
|
52
|
+
- Fire triangle modeling and spray/mist behavior
|
|
53
|
+
- Release prevention and emergency response planning
|
|
54
|
+
|
|
55
|
+
## License
|
|
56
|
+
|
|
57
|
+
This project is licensed under the MIT License.
|
|
58
|
+
|
|
59
|
+
## Contributing
|
|
60
|
+
|
|
61
|
+
Contributions are welcome. Please fork the repository, open a pull request, and include tests for any new functionality.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# DeepSafety
|
|
2
|
+
**DeepSafety** is an open-source Python library for performing industrial and process safety calculations. It includes models and tools for analyzing hazardous material dispersion, fire and explosion behavior, toxicological impacts, and mitigation strategies. The library is designed to be modular, extensible, and suitable for academic, industrial, and emergency response use cases.
|
|
3
|
+
|
|
4
|
+
## Features (Planned and In Progress)
|
|
5
|
+
|
|
6
|
+
- Atmospheric dispersion models (Pasquill–Gifford)
|
|
7
|
+
- Puff and plume models (ground level and elevated sources)
|
|
8
|
+
- Neutrally buoyant and dense gas behavior
|
|
9
|
+
- Toxic effect criteria
|
|
10
|
+
- AEGLs, ERPGs, IDLH, TLVs, PELs, and toxic endpoints
|
|
11
|
+
- Flammability and ignition analysis
|
|
12
|
+
- Limits, autoignition, inerting, ignition energy
|
|
13
|
+
- Explosion modeling
|
|
14
|
+
- TNT equivalency, VCEs, BLEVEs, deflagration/detonation
|
|
15
|
+
- Blast damage, overpressure, and mitigation
|
|
16
|
+
- Fire triangle modeling and spray/mist behavior
|
|
17
|
+
- Release prevention and emergency response planning
|
|
18
|
+
|
|
19
|
+
## License
|
|
20
|
+
|
|
21
|
+
This project is licensed under the MIT License.
|
|
22
|
+
|
|
23
|
+
## Contributing
|
|
24
|
+
|
|
25
|
+
Contributions are welcome. Please fork the repository, open a pull request, and include tests for any new functionality.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: deepsafety
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A Python library for industrial and safety calculations
|
|
5
|
+
Author-email: Pkbythebay29 <kannan@haztechrisk.org>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2025 MrCleanRoom
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
|
|
28
|
+
Project-URL: Homepage, https://github.com/pkbythebay29/deepsafety
|
|
29
|
+
Keywords: process safety,dispersion,flammability,explosions,toxicology
|
|
30
|
+
Classifier: Programming Language :: Python :: 3
|
|
31
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
32
|
+
Classifier: Operating System :: OS Independent
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
License-File: LICENSE
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
|
|
37
|
+
# DeepSafety
|
|
38
|
+
**DeepSafety** is an open-source Python library for performing industrial and process safety calculations. It includes models and tools for analyzing hazardous material dispersion, fire and explosion behavior, toxicological impacts, and mitigation strategies. The library is designed to be modular, extensible, and suitable for academic, industrial, and emergency response use cases.
|
|
39
|
+
|
|
40
|
+
## Features (Planned and In Progress)
|
|
41
|
+
|
|
42
|
+
- Atmospheric dispersion models (Pasquill–Gifford)
|
|
43
|
+
- Puff and plume models (ground level and elevated sources)
|
|
44
|
+
- Neutrally buoyant and dense gas behavior
|
|
45
|
+
- Toxic effect criteria
|
|
46
|
+
- AEGLs, ERPGs, IDLH, TLVs, PELs, and toxic endpoints
|
|
47
|
+
- Flammability and ignition analysis
|
|
48
|
+
- Limits, autoignition, inerting, ignition energy
|
|
49
|
+
- Explosion modeling
|
|
50
|
+
- TNT equivalency, VCEs, BLEVEs, deflagration/detonation
|
|
51
|
+
- Blast damage, overpressure, and mitigation
|
|
52
|
+
- Fire triangle modeling and spray/mist behavior
|
|
53
|
+
- Release prevention and emergency response planning
|
|
54
|
+
|
|
55
|
+
## License
|
|
56
|
+
|
|
57
|
+
This project is licensed under the MIT License.
|
|
58
|
+
|
|
59
|
+
## Contributing
|
|
60
|
+
|
|
61
|
+
Contributions are welcome. Please fork the repository, open a pull request, and include tests for any new functionality.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.md
|
|
4
|
+
pyproject.toml
|
|
5
|
+
deepsafety/deepsafety.egg-info/PKG-INFO
|
|
6
|
+
deepsafety/deepsafety.egg-info/SOURCES.txt
|
|
7
|
+
deepsafety/deepsafety.egg-info/dependency_links.txt
|
|
8
|
+
deepsafety/deepsafety.egg-info/top_level.txt
|
|
9
|
+
deepsafety/dispersion/__init__.py
|
|
10
|
+
deepsafety/dispersion/dense_gas.py
|
|
11
|
+
deepsafety/dispersion/neutrally_buoyant.py
|
|
12
|
+
deepsafety/dispersion/toxic_effects.py
|
|
13
|
+
deepsafety/dispersion/utils.py
|
|
14
|
+
deepsafety/fire_and_explosion/__init__.py
|
|
15
|
+
deepsafety/fire_and_explosion/explosion_characterization.py
|
|
16
|
+
deepsafety/fire_and_explosion/flammability.py
|
|
17
|
+
deepsafety/fire_and_explosion/ignition_sources.py
|
|
18
|
+
deepsafety/fire_and_explosion/utils.py
|
|
19
|
+
tests/test_dispersion.py
|
|
20
|
+
tests/test_fire_and_explosion.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import math
|
|
2
|
+
|
|
3
|
+
def puff_dispersion_ground(x, y, z, Q, u, sigma_y, sigma_z):
|
|
4
|
+
"""
|
|
5
|
+
Case 1: Instantaneous point source at ground level.
|
|
6
|
+
"""
|
|
7
|
+
try:
|
|
8
|
+
coefficient = Q / ( (2 * math.pi) ** 1.5 * sigma_y * sigma_z )
|
|
9
|
+
exponent = -0.5 * ( (y / sigma_y)**2 + (z / sigma_z)**2 )
|
|
10
|
+
return coefficient * math.exp(exponent)
|
|
11
|
+
except ZeroDivisionError:
|
|
12
|
+
return 0.0
|
|
13
|
+
|
|
14
|
+
def calculate_sigma_y(x, stability_class):
|
|
15
|
+
"""
|
|
16
|
+
Returns the lateral dispersion coefficient sigma_y (m).
|
|
17
|
+
Based on Pasquill-Gifford parameters.
|
|
18
|
+
"""
|
|
19
|
+
coeffs = {
|
|
20
|
+
'A': (0.22, 0.0001),
|
|
21
|
+
'B': (0.16, 0.0001),
|
|
22
|
+
'C': (0.11, 0.0001),
|
|
23
|
+
'D': (0.08, 0.0001),
|
|
24
|
+
'E': (0.06, 0.0001),
|
|
25
|
+
'F': (0.04, 0.0001),
|
|
26
|
+
}
|
|
27
|
+
a, b = coeffs.get(stability_class.upper(), (0.08, 0.0001))
|
|
28
|
+
return a * x ** (1 + b)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
def flammability_limits(temp_c, LFL_20C, UFL_20C):
|
|
2
|
+
"""
|
|
3
|
+
Estimate LFL and UFL at a given temperature.
|
|
4
|
+
Based on Le Chatelier’s Principle.
|
|
5
|
+
"""
|
|
6
|
+
LFL = LFL_20C * (273.15 + 20) / (273.15 + temp_c)
|
|
7
|
+
UFL = UFL_20C * (273.15 + temp_c) / (273.15 + 20)
|
|
8
|
+
return round(LFL, 3), round(UFL, 3)
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "deepsafety"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "A Python library for industrial and safety calculations"
|
|
9
|
+
authors = [
|
|
10
|
+
{ name="Pkbythebay29", email="kannan@haztechrisk.org" }
|
|
11
|
+
]
|
|
12
|
+
license = { file="LICENSE" }
|
|
13
|
+
readme = "README.md"
|
|
14
|
+
keywords = ["process safety", "dispersion", "flammability", "explosions", "toxicology"]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
"License :: OSI Approved :: MIT License",
|
|
18
|
+
"Operating System :: OS Independent",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
[project.urls]
|
|
22
|
+
Homepage = "https://github.com/pkbythebay29/deepsafety"
|
|
23
|
+
|
|
24
|
+
[tool.setuptools.packages.find]
|
|
25
|
+
where = ["deepsafety"]
|
|
File without changes
|
|
File without changes
|