Skip to main content

A Python library for solving catenary equations

Project description


Build Status PyPI GitHub


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


Through pip:

pip install pycatenary

or by running the following command in the root folder of the pycatenary project

python 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,

# compute calculations

Position of fairlead and anchor can be changed as follows:

# change fairlead position
l1.setFairleadCoords([5.4, 1., 2.65])

# recompute solution

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:


With matplotlib installed, the cable can be plotted in 2D:

# plot cable cable.MooringLine instance l1


Or in 3D:

# plot cable cable.MooringLine instance l1


Project details

Download files

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

Files for pycatenary, version 0.4.0
Filename, size File type Python version Upload date Hashes
Filename, size pycatenary-0.4.0-py3-none-any.whl (9.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pycatenary-0.4.0.tar.gz (9.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page