A Python library for solving catenary equations
Project description
pycatenary
Features
This python package solves catenary equations for cables at static equilibrium.
- Elasticity taken into account
- Contact with floor/seabed taken into account
- Handles partly or fully lifted lines
- Multisegmented cables possible
Installation
Through pip:
pip install pycatenary
or by running the following command in the root folder of the pycatenary project
python setup.py install --user
Getting Started
To create a cable:
from pycatenary import cable
# define properties of cable
length = 6.98 # length of line
w = 1.036 # submerged weight
EA = 560e3 # axial stiffness
floor = True # if True, contact is possible at the level of the anchor
anchor = [0., 0., 0.]
fairlead = [5.2, 1., 2.65]
# create cable instance
l1 = cable.MooringLine(L=length,
w=w,
EA=EA,
anchor=anchor,
fairlead=fairlead,
floor=floor)
# compute calculations
l1.computeSolution()
Position of fairlead and anchor can be changed as follows:
# change fairlead position
l1.setFairleadCoords([5.4, 1., 2.65])
# recompute solution
l1.computeSolution()
Other useful functions:
# get tension along line (between 0. and total line length)
s = 5.
T = l1.getTension(s)
# get xyz coordinates along line
xyz = l1.s2xyz(s)
For extra functionality, please refer to the documentation: https://tridelat.github.io/pycatenary
Plotting
With matplotlib installed, the cable can be plotted in 2D:
# plot cable cable.MooringLine instance l1
l1.plot2D()
Or in 3D:
# plot cable cable.MooringLine instance l1
l1.plot3D()
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
pycatenary-0.4.0.tar.gz
(9.3 kB
view details)
Built Distribution
File details
Details for the file pycatenary-0.4.0.tar.gz
.
File metadata
- Download URL: pycatenary-0.4.0.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
7375ccd0855165cc218d3ccfb62aeee2462dcf6e5e62ae717fb4e248a7c0a828
|
|
MD5 |
7ff9ef3d65034d0572446d1c288a1ab4
|
|
BLAKE2b-256 |
c6f4994251b924abb572e17f3abc767fd8544c4db7e6c6184e9c74c702f506bf
|
File details
Details for the file pycatenary-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: pycatenary-0.4.0-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
5d6a502a0837f7857eb10498fb17fe4afba3330cdedc7ad8cc323c908921e600
|
|
MD5 |
66b131183ccd67f6b7d4cf224746db9d
|
|
BLAKE2b-256 |
c010122761331d4a9a7a5e64f5aac5b52cb94d08f405e9e410116003d43539d1
|