A dam calculator
Project description
damCalculator
A useful tool to calculate the dam's slidding and overturning safety factors, also can derive all the complicated forces applied to a single dam. The project is programmed in an object-oriented way, so most of the time when you want to pass parameters from one object to another, remember this "parameter" may also be an object.
Installation
Use pip to install damCalculator:
.. code:: bash pip install damcalculator
Example
Here's an simple example of how to use this package on the St.Francis dam.
Import some bascis packages:
..code::python from matplotlib import pyplot as plt import damCalculator
Prepare for plotting:
..code::python fig,ax=plt.subplots() plt.close(fig)
Define some inner parameters of the St.Francis dam:
..code::python damGeometry=damCalculator.geometry.damGeometry(H=850.3048,h=1700.3048,l=150.3048,a=100.3048,b=1350.3048,c=300.3048,hu=2000.3048,hd=200.3048) concrete=damCalculator.material.concrete(density=2400) water=damCalculator.material.water(density=1000)
The distribution of uplift water pressure, choose one from the two below, or you can create your own:
..code::python upliftForce=damCalculator.force.upliftForce(upliftPressure=[(0,598017.6,0)],damGeometry=damGeometry) upliftForce=damCalculator.force.upliftForce(upliftPressure=[(0,0)],damGeometry=damGeometry)
Create model instance:
..code::python model=damCalculator.model(damGeometry=damGeometry,concrete=concrete,water=water,upliftForce=upliftForce,fig=fig,ax=ax)
Print overturning safety factor and slipping safety factor:
..code::python print(model.overtuningFactor.oFactor) print(model.slipFactor.sFactor)
Plot the shape of the dam
..code::python model.plotDam.showDam()
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for damcalculator-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b0dcaab9db9c29ce866326b3beecb142494fb4c4931fc8210895755b10ec225 |
|
MD5 | 4f3fd523c844629d213f9279a612eed6 |
|
BLAKE2b-256 | de0230872b4dddb70aba312c84c043865aa2f615359b8a324faf800c798ea071 |