Skip to content

Conversation

@salhus
Copy link
Contributor

@salhus salhus commented May 23, 2023

The commit addresses issue #1028 in a better way.
Although, BEMIO was reading the AQWA data correctly, the writeBEMIOH5 did not do the necessary transpose.

BEMIO was reading the AQWA data correctly, but the writeBEMIOH5.m function was not doing the necessary transpose.
For reference, here is a check that readAQWA function was working correctly.

  • In the images that follow, the black background images are from MATLAB, and white background images are from the H5 file viewer.

image

However, when I looked at the h5 file in an h5 file viewer, the writeBEMIOH5 function should have taken a transpose.

image

Following the fix I made, here is how the hydrostatics matrix looks, confirming that the writeBEMIOH5 and readBEMIOH5 are working as intended.

image

and here is the h5 file viewer,

image

The commit addresses issue #1028 in a better way.
Although, BEMIO was reading the AQWA data correctly, the writeBEMIOH5 did not do the necessary transpose.
@salhus salhus requested a review from nathanmtom May 23, 2023 17:46
@nathanmtom
Copy link

@salhus This PR does not appear to rollback the other PR merged to resolve the question on the hydrostatic stiffness matrix. Does this PR mean it still needs those changes or are you planning to rollback that PR then merge here?

@nathanmtom
Copy link

@salhus It does appear that the readBEMIOH5.m file in this branch does not have the extra line to zero out the final yaw row, but in WEC-Sim 'Dev' that line can be found. Given this is a small change I am requesting if you can close this issue, and submit a new PR after setting up a branch with an updated 'Dev' branch.

Also, have you checked to see if this impacts the hydrostatic matrix for NEMOH, Capytaine, and WAMIT? When I reviewed the hydrostatic matrix for the AQWA and NEMOH, we appear to be importing the 6x6 matrix where as for WAMIT it is only the upper right diagonal. Therefore, we shouldn't need any transpose for AQWA and NEMOH and a fix should then occur only in the readWAMIT.m to correct for the different importation of the hydrostatic stiffness matrix.

@salhus
Copy link
Contributor Author

salhus commented May 24, 2023

@nathanmtom,
re: New PR,
Sure, sorry about the confusion.

re: Hydrostatics matrix transpose,
Although, the readAQWA.m imports the hydrostatics matrix correctly to MATLAB workspace, as I show above, the writeBEMIOH5.m currently writes it as a transpose to the h5 file. The h5file is being written in two stages, 1. Importing data to MATLAB, 2. and, then writing the h5 file from the MATLAB workspace.
So the fix needs to be done for readWAMIT and writeBEMIOh5.

I describe this more clearly in the new PR.

@salhus salhus closed this May 24, 2023
@salhus salhus deleted the aqwa_Hydrostatics branch May 30, 2023 15:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants