Skip to main content

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

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

damcalculator-0.0.1.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

damcalculator-0.0.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file damcalculator-0.0.1.tar.gz.

File metadata

  • Download URL: damcalculator-0.0.1.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.4

File hashes

Hashes for damcalculator-0.0.1.tar.gz
Algorithm Hash digest
SHA256 0d4d5cfe8ff7f64bc6a378c0832cf4826008b332b97cfb1b2e0ae023a39d827c
MD5 a2267be2e7598e006bdcd40c816f6e09
BLAKE2b-256 def89ed4bb4d3b1e248f3cbb66b20e4d2edfb39891bcf5a9b7149e68acbae5a8

See more details on using hashes here.

File details

Details for the file damcalculator-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: damcalculator-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.4

File hashes

Hashes for damcalculator-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0b0dcaab9db9c29ce866326b3beecb142494fb4c4931fc8210895755b10ec225
MD5 4f3fd523c844629d213f9279a612eed6
BLAKE2b-256 de0230872b4dddb70aba312c84c043865aa2f615359b8a324faf800c798ea071

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page