A command-line tool to run batch processes of Capytaine simulations for hydrodynamic analysis.
Project description
fleetmaster
A command-line tool to run batch processes of Capytaine simulations for hydrodynamic analysis.
- Github repository: https://github.com/dave-Lab-and-Engineering/fleetmaster/
- Documentation https://dave-lab-and-engineering.github.io/fleetmaster/
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_hydwrites a.dhydfile for every case while still writing all results to the HDF5 database.- Without an explicit
output_dhyd_file, Fleetmaster uses<case_name>.dhydnext to the HDF5 output file. - With an explicit
output_dhyd_fileand multiple cases, Fleetmaster uses that filename as a base and appends the case name. - If a case already exists in the HDF5 and
update_casesis 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fleetmaster-0.3.1.tar.gz.
File metadata
- Download URL: fleetmaster-0.3.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f010001a512c02f3e9ec6d9041d4fdf6c2160b722f652670fcdd8d6030f41341
|
|
| MD5 |
5ebcd16a2e5780983941b85d27dfcf93
|
|
| BLAKE2b-256 |
70e215c27496642c8f8c2db59e6591f9e56eae4ed46f51f3314b39ad2d744c54
|
File details
Details for the file fleetmaster-0.3.1-py3-none-any.whl.
File metadata
- Download URL: fleetmaster-0.3.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad1b3904a6b3ebca1e216989db21b0bc46ce2d6e4d1c59f4a7ff6d59ec3c35bf
|
|
| MD5 |
0e1569293ec8fec2702dbfcde367f2cd
|
|
| BLAKE2b-256 |
f31330c3de9385223337ba36fc9062dd36b8eb971f6c520e7f6dd50aa10b8204
|