capytaine.io.legacy module¶
Import or export Nemoh.cal files for backward compatibility with Nemoh 2.
- capytaine.io.legacy.export_as_Nemoh_directory(problem, directory_name, omega_range=None)[source]¶
Export radiation problems as Nemoh 2.0 directory (experimental).
TODO: Diffraction problem.
- Parameters:
problem (RadiationProblem) – the problem that should be exported
directory_name (string) – path to the directory
omega_range (list of float or array of float, optional) – the exported problem will be set up with the following linear range: linspace(min(omega_range), max(omega_range), len(omega_range))
- capytaine.io.legacy.export_hydrostatics(hydrostatics_directory, bodies)[source]¶
Export rigid body hydrostatics in Nemoh’s format (KH.dat and Hydrostatics.dat).
- Parameters:
hydrostatics_directory (string) – Path to the directory in which the data will be written (two files per body)
bodies (FloatingBody or list of FloatingBody) – The body or the list of bodies. Each body is assumed to be a single rigid body with 6 dofs. Each FloatingBody object is expected to have an inertia_matrix and a hydrostatic_stiffness parameter.
- Return type:
None