Hydrodynamic database

class mafredo.Hyddb1[source]

This class contains all information for first order floating bodies. That is:

  • Added mass

  • Damping

  • Wave-forces

Typically all of the above are obtained from BEM package such as capytaine, wamit, diffrac, orcawave, etc.

Getting data in

The following methods exist for loading data from supported formats:

Load from mafredo’s own format (netcdf)

create_from()[source]

Load from capytaine

create_from_capytaine()[source]

Load from MARIN .hyd file

create_from_hyd()[source]

Load from Orcaflex .yml file

create_from_orcaflex_yml()[source]

From data

create_from_data(everything)[source]
set_data(everything)[source]
set_amass(omega, m6x6)[source]
set_damping(omega, m6x6)[source]

Modifications

expand360_using_symmetry()[source]
add_frequency()[source]
add_add_direction()
regrid_omega()[source]
regrid_direction()[source]

Plotting

plot()[source]

Getting data out

It is possible to obtain the data directly from the _mass , _damping and _force xarrays. But my be easier to use one of the following instead:

force()[source]
damping()[source]
amass()[source]

Saving to file

To .hyd format, hydrostatics to be supplied optionally

to_hyd_file()[source]

To .dhyd format

save_as()[source]