Skip to content

[BUG] Combine_BEM fails with non WAMIT codes #601

@akeeste

Description

@akeeste

Note: italicized text below is include as an example and should be updated before submission. If you feel any section is not applicable to your request, please replace with 'N/A' rather than delete a section.

Describe the bug
When using the Combine_BEM() function with non-WAMIT input, Ainf is not initialized and throws an error.

Previously, for non-WAMIT input hydro.Ainf was initialized to the highest frequency added mass value in Normalize.m. This was removed when the new Ainf implementation as added in radiation_IRF.m. The Combine_BEM function now attempts to concatenate Ainf values that do not exist in non-WAMIT input.

WEC-Sim file(s)
Radiation_IRF.m, Combine_BEM.m, Normalize.m

To Reproduce
Steps to reproduce the behavior:

  1. Go to examples/NEMOH/ellipsoid/bemio.m
  2. Uncomment the lines combining NEMOH and WAMIT BEM output
  3. Run bemio in the command line

Expected behavior
I expected bemio and Radiation_IRF to run without issue and generate an .h5 file.

Screenshots
If applicable, add screenshots to help explain your problem. For example, a screen shot of the exact error message from the MATLAB command line.

Workstation Information (this section MUST BE completed):

  • OS: Windows 10
  • MATLAB/Simulink Release 2020b
  • WEC-Sim Release v4.2

Additional context
Suggested fix:
The Combine_BEM function should catch undefined Ainf values, or Normalize should initialize Ainf to 0 (this would be overwritten in Radiation_IRF).

Metadata

Metadata

Assignees

Labels

BEM/BEMIOrelated to BEMIO or BEM hydro dataBugbug in WEC-Sim source, high priorityWAMIT

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions