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.

Metadata

Release files for pylot-db 2026.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pylot-db 2026.9.0
File Size Uploaded
pylot_db-2026.9.0.tar.gz 126.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pylot-db 2026.9.0
File Interpreter ABI Platform
pylot_db-2026.9.0-py3-none-any.whl Python 3 none any Details

Total release size: 178.4 kB

Release files / pylot_db-2026.9.0.tar.gz

Download URL pylot_db-2026.9.0.tar.gz
Size 126.5 kB
Tags Source
SHA-256 checksum
How to use checksums
589f9468da8ebfa66bb5f0479ec9ff99bad4e128d27314706f4278e8982f596d
BLAKE2b-256 checksum
How to use checksums
cb043071c380aa7afb6a652868fec79b5e67924b2c03a8bd91ed07472eb20dca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

Release files / pylot_db-2026.9.0-py3-none-any.whl

Download URL pylot_db-2026.9.0-py3-none-any.whl
Size 51.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1ba0b14270af3188793d829f8e62ada1028fba30ac7c04fa8ae72619f996e6e9
BLAKE2b-256 checksum
How to use checksums
715b78138625dbb7d3d51d43a0baf951db5ad14ec5a982121dc2dfdd78b71df3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2026.9.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page