Skip to main content

A command-line tool to run batch processes of Capytaine simulations for hydrodynamic analysis.

Project description

fleetmaster

Release Build status codecov Commit activity License

A command-line tool to run batch processes of Capytaine simulations for hydrodynamic analysis.

Installation

Using uv:

uv sync

Run CLI commands with:

uv run fleetmaster --help

Typical usage

Run a simulation batch from a YAML settings file:

uv run fleetmaster run --settings-file examples/settings_rotations.yml

Run directly from CLI options:

uv run fleetmaster run examples/boxship_t_1_r_00_00_00.stl --wave-periods 8 --wave-directions 0 --water-depth inf --water-level 0 --forward-speed 0

Dhyd workflows

Fleetmaster supports two easy ways to create a standalone mafredo hydrodynamic database (.dhyd).

1) Write .dhyd while running simulations

Set output_dhyd_file in your settings file, or pass --output-dhyd-file on the CLI. If you only want auto-generated files based on the case names, use export_to_hyd or --export-to-hyd.

Example (settings file):

output_hdf5_file: "single_case.hdf5"
output_dhyd_file: "single_case.dhyd"

Example (settings file, automatic filename):

output_hdf5_file: "single_case.hdf5"
export_to_hyd: true

Example (CLI):

uv run fleetmaster run examples/boxship_t_1_r_00_00_00.stl --wave-periods 8 --wave-directions 0 --water-depth inf --water-level 0 --forward-speed 0 --output-dhyd-file examples/single_case.dhyd

Example (CLI, automatic filename based on case):

uv run fleetmaster run examples/boxship_t_1_r_00_00_00.stl --wave-periods 8 --wave-directions 0 --water-depth inf --water-level 0 --forward-speed 0 --export-to-hyd

Notes:

  • export_to_hyd writes a .dhyd file for every case while still writing all results to the HDF5 database.
  • Without an explicit output_dhyd_file, Fleetmaster uses <case_name>.dhyd next to the HDF5 output file.
  • With an explicit output_dhyd_file and multiple cases, Fleetmaster uses that filename as a base and appends the case name.
  • If a case already exists in the HDF5 and update_cases is disabled, that case is skipped.

Symmetry in .dhyd output

To write heading symmetry metadata to the generated .dhyd file, set:

heading_symmetry: true

Recommended in combination with:

grid_symmetry: true

With heading_symmetry: true, Fleetmaster writes XZ heading symmetry metadata to .dhyd.

2) Inspect cases or plot a theta/period grid

List simulation cases:

uv run fleetmaster list results.hdf5 --cases

Create a quick grid plot for one case:

uv run fleetmaster plot results.hdf5 boxship_wd_inf_wl_0_fs_0

Write the plot to a specific PNG:

uv run fleetmaster plot results.hdf5 boxship_wd_inf_wl_0_fs_0 --output boxship_grid.png

Create additional hydrodynamic plots using mafredo (enabled by default):

uv run fleetmaster plot results.hdf5 boxship_wd_inf_wl_0_fs_0 --show

Save the mafredo hydrodynamic figures as PNG files:

uv run fleetmaster plot results.hdf5 boxship_wd_inf_wl_0_fs_0 --save-hyd-plots

Write mafredo hydrodynamic figures to a custom directory:

uv run fleetmaster plot results.hdf5 boxship_wd_inf_wl_0_fs_0 --save-hyd-plots --hyd-output-dir output/hyd_plots

Disable mafredo hydrodynamic plotting and keep only the theta/period grid plot:

uv run fleetmaster plot results.hdf5 boxship_wd_inf_wl_0_fs_0 --no-hyd-plot

3) Export .dhyd from an existing HDF5 database (without rerunning Capytaine)

List cases in an existing HDF5:

uv run fleetmaster export-dhyd results.hdf5 --list-cases

Export one specific case:

uv run fleetmaster export-dhyd results.hdf5 --case boxship_wd_inf_wl_0_fs_0 --output boxship_case.dhyd

Export all cases in one go:

uv run fleetmaster export-dhyd results.hdf5

Overwrite an existing output file:

uv run fleetmaster export-dhyd results.hdf5 --case boxship_wd_inf_wl_0_fs_0 --output boxship_case.dhyd --overwrite

Example settings

For a ready-to-use single-case example, see:

  • examples/settings_single_case_nc.yml

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

fleetmaster-0.2.3.tar.gz (1.2 MB view details)

Uploaded Source

Built Distribution

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

fleetmaster-0.2.3-py3-none-any.whl (47.6 kB view details)

Uploaded Python 3

File details

Details for the file fleetmaster-0.2.3.tar.gz.

File metadata

  • Download URL: fleetmaster-0.2.3.tar.gz
  • Upload date:
  • Size: 1.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for fleetmaster-0.2.3.tar.gz
Algorithm Hash digest
SHA256 3f397b41d08022e2a94926a9b21d20fc14dfce83b2abe4b509993f5b2e35208b
MD5 ed9c489e51bd273fb1461b85c16b7682
BLAKE2b-256 7f85bde8616c3e63bcdcdfa3169b114419351efbdf7b988a97bf176414def3f3

See more details on using hashes here.

File details

Details for the file fleetmaster-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: fleetmaster-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 47.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.13

File hashes

Hashes for fleetmaster-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d079b9439006341eee722de3b56c0d082dece015d8de4c90486967cb8918bbd9
MD5 72bbe466365c731d5fbae3515ec9f0cd
BLAKE2b-256 00424c64904355602359bd13552195b2f06eb20f2e225634ad26da2090e5ed4f

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