gofai / glasstone Goto Github PK
View Code? Open in Web Editor NEWPython library for modelling nuclear weapons effects
License: MIT License
Python library for modelling nuclear weapons effects
License: MIT License
e.g., s = r_soviet_overpressure(float(20000), 1.0, float(0), False, "kT", "m", "psi")
Error does not appear to be yield or HOB dependent, purely overpressure below a certain threshold.
File "D:\data\SIOP\ottawa.py", line 19, in
s = r_soviet_overpressure(float(20000), 1.2, float(0), False, "kT", "m", "psi")
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python310\lib\site-packages\glasstone-0.0.1-py3.10.egg\glasstone\overpressure.py", line 869, in r_soviet_overpressure
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python310\lib\site-packages\glasstone-0.0.1-py3.10.egg\glasstone\overpressure.py", line 826, in _rsovietmach
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python310\lib\site-packages\glasstone-0.0.1-py3.10.egg\glasstone\overpressure.py", line 771, in _rsoviet_mach_sh7
glasstone.utilities.ValueOutsideGraphError: -1.0738201869691235
Hi. I recentely found your code while looking for info on nuclear blast effects and I believe there is a bug in _dpt. The function uses the variable t at line 555 in the overpressure.py source but it is never defined (that I can see) before it is used. I presume its missing from the function argument list. ie the function definition should be ,
def _dpt(shob, sgr, x_m, ta_air, dp_q, pair, b, t):
The function reference in _dynamicpressureatscaledtime should also be corrected.
BTW if you are looking for a report that has a (mostly) legible copy of the DNA 1KT standard Fortran source, look for University of Toronto IAS Report UTIAS Technical Note. 259, April 1986 Title : "Quick Reproduction of Blast-wave Flow-Field Properties of Nuclear, TNT and ANFO Explosions" by Clinton P.T. Groth. I found a PDF vi Google Search
Hi, was just curious at all if you were intending on continuing this project at all. Accuracy of models aside, there were a few code things that I'm happy to work on in another merge request if you aren't think of deprecating any of the work here.
First up, nice package, I'm quite interested in the science behind this and it's great to see it implemented in Python!
I've just tested all of the examples in a Python 3, and a couple of them fail due to the calls to xrange and keys.sort(), which are now deprecated in the language. It's a pretty simple fix however, and doesn't break backwards compatibility to Python 2.7 or have any performance consequences. I can make a pull request if you wish, but the changes are straighforward (all are in radiation.py I believe).
Thanks for the interesting code.
Is this a bug in the calculation of _altitude_sd?
glasstone/glasstone/overpressure.py
Line 308 in ec08b40
I'm thinking that should be
return _altitude_sp(alt)**(-1.0/3)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.