wecopttool.run_bem
- run_bem(fb, freq=[inf], wave_dirs=[0], rho=1025.0, g=9.81, depth=inf, write_info=None, njobs=1)[source]
Run Capytaine for a range of frequencies and wave directions.
This simplifies running Capytaine and ensures the output are in the correct convention (see
wecopttool.change_bem_convention()
).It creates the test matrix, calls
capytaine.bodies.bodies.FloatingBody.keep_immersed_part()
, callscapytaine.bem.solver.BEMSolver.fill_dataset()
, and changes the sign convention usingwecopttool.change_bem_convention()
.- Parameters:
fb (FloatingBody) – The WEC as a Capytaine floating body (mesh + DOFs).
freq (Iterable[float]) – List of frequencies [\(Hz\)] to evaluate BEM at.
wave_dirs (Iterable[float]) – List of wave directions [degrees] to evaluate BEM at.
rho (float) – Water density in \(kg/m^3\).
g (float) – Gravitational acceleration in \(m/s^2\).
depth (float) – Water depth in \(m\).
write_info (Mapping[str, bool] | None) – Which additional information to write. Options are:
['hydrostatics', 'mesh', 'wavelength', 'wavenumber']
. Seecapytaine.io.xarray.assemble_dataset()
for more details.njobs (int) – Number of jobs to run in parallel. See
capytaine.bem.solver.BEMSolver.fill_dataset()
- Return type:
Dataset
See also