Skip to content

Conversation

@salhus
Copy link
Contributor

@salhus salhus commented Jun 8, 2024

Latest version of capytaine writes hydrostatics data in the .nc file. This PR adds some code to read the hydrostatics data directly from the .nc file and removes the need to have a separate function that first writes a .dat file in python.

@salhus salhus requested a review from akeeste June 8, 2024 23:50
@kmruehl kmruehl added the BEM/BEMIO related to BEMIO or BEM hydro data label Jun 26, 2024
@akeeste
Copy link
Contributor

akeeste commented Jul 12, 2024

Thanks @salhus. I pushed a few updates to this PR:

  • updated error handling for Khs
  • combined the code that searches the .nc and .dat files for Khs into one segment for more robust error handling
  • added the same Khs workflow for the other hydrostatics parameters that are read from Hydrostatics.dat

If a user properly adds all hydrostatics data to their Capytaine dataset (hydrostatic_stiffness, center_of_mass, center_of_buoyancy, volume), users should not need any custom .dat files.

@mancellin It would be much more robust for BEMIO to read center_of_mass, center_of_buoyancy, and volume if they were added to the output dataset by default.

Noting that right now the Khs will not read from the .nc file properly if bodies have <6 DOFs. This is an ongoing problem and I'm working on a broader fix for readCapytaine in this case.

@akeeste
Copy link
Contributor

akeeste commented Jul 12, 2024

I will merge once the tests are passing

@mancellin
Copy link
Contributor

It would be much more robust for BEMIO to read center_of_mass, center_of_buoyancy, and volume if they were added to the output dataset by default.

I was delaying this until I have a proper way to handle also the multiple body cases, but maybe we can implement something already for the single rigid body case.

@akeeste
Copy link
Contributor

akeeste commented Jul 15, 2024

thanks @mancellin, great to hear that it is in progress. No rush from my perspective. When this is added on the Capytaine side we will update the BEMIO function accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BEM/BEMIO related to BEMIO or BEM hydro data

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants