Skip to main content

pylot-db

Read side of the hydrodynamic database: open a library, rank stored floating conditions against a vessel pose, and deliver a mafredo.Hyddb1.

Install this if you only use hydrodynamic databases. It does not require capytaine, pymeshup or DAVE.

pip install pylot-db

Getting a mafredo database out of a stored library

A library holds many solved conditions. You do not pick one by name — you say how the vessel is floating, and the library ranks what it has against that.

import numpy as np
from pylot_db import Library

with Library.open("tanker.pylot") as library:
    ranking = library.select(
        z_origin=-11.6,      # z of the vessel origin in diffraction space [m]
        heel=0.0,            # slope, not degrees
        trim=0.004,          # slope, not degrees
        water_depth=np.inf,
        forward_speed=0.0,
    )

    if not ranking:
        raise SystemExit(ranking.reason)  # why nothing matched, in words

    best = ranking.best
    if not best.usable:
        raise SystemExit(best.reason)     # matched, but cannot produce a database

    selection = library.deliver(best, rho=1.025)   # t/m3

hyddb = selection.hyddb                   # a mafredo.Hyddb1
point = selection.application_point       # (3,) vessel-local, where forces apply

hyddb is an ordinary mafredo.Hyddb1, so from here it is mafredo's API:

hyddb.amass(omega=0.5)          # (6, 6) added mass at 0.5 rad/s
hyddb.damping(omega=0.5)        # (6, 6) radiation damping
hyddb.force(omega=0.5, wave_direction=180.0)   # (6,) complex excitation

Four things worth knowing before you trust a number:

  • heel and trim are slopes, everywhere in this API. Degrees appear in user interfaces and nowhere else.
  • rho is in t/m³ and is applied on delivery. Results are stored per unit density, so the library itself has no density to be wrong about.
  • The delivered database always covers the full 360° of wave direction, even when only 0–180° was solved, and direction means direction of travel.
  • application_point is vessel-local and is where the forces in hyddb apply. It is not the origin, and using the wrong one is a moment error that looks plausible.

ranking.candidates is every condition that survived the hard filters, best first, and nothing is dropped for scoring badly. When the closest match is a poor one, that is a fact about your library, and this package's position is that you should be able to see it rather than have it silently handled.

What is where

docs/api.md The reference: every public name, with its units
docs/README.md Where the specification lives and why it is not here

Building a library — meshing and solving — is pylot-bem, which depends on this package and never the reverse. A file written there opens here on a machine with no BEM solver installed, which is the whole point of the split.

Licence

MIT. Copyright 2026 Ruben de Bruin / DAVE Lab.

Download files

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

Source Distribution

pylot_db-2026.7.0.tar.gz (121.0 kB view details)

Uploaded Source

Built Distribution

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

pylot_db-2026.7.0-py3-none-any.whl (49.5 kB view details)

Uploaded Python 3

File details

Details for the file pylot_db-2026.7.0.tar.gz.

File metadata

  • Download URL: pylot_db-2026.7.0.tar.gz
  • Upload date:
  • Size: 121.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pylot_db-2026.7.0.tar.gz
Algorithm Hash digest
SHA256 2b6b385ec73a9ed0e88f04153d3324b9a3525ecba7f73e11a96683908e8eef88
MD5 893ad125c9e2d06515630f4b0614fa01
BLAKE2b-256 134188b7effa62580181a819ad7236f51a80e69166d57bab161cfe95a443febb

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylot_db-2026.7.0.tar.gz:

Publisher: publish.yml on dave-open/pylot-db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pylot_db-2026.7.0-py3-none-any.whl.

File metadata

  • Download URL: pylot_db-2026.7.0-py3-none-any.whl
  • Upload date:
  • Size: 49.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for pylot_db-2026.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2f56eec3df57b0eab9eb0be27a6d57684710e0be7f7d1a19a2c8d0674625fa0c
MD5 48a4c46ffa7513892c5c2f1dd5cdd847
BLAKE2b-256 4c262af55b3e7d8a95c74a8a8122ddb1294ac15435be49d9af474c09058d1abc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pylot_db-2026.7.0-py3-none-any.whl:

Publisher: publish.yml on dave-open/pylot-db

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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