Skip to content

Conversation

@salhus
Copy link
Contributor

@salhus salhus commented Apr 13, 2022

AQWA uses a different convention to generate irregular waves using a spectrum import.
The WEC-Sim convention for spectrum import uses,
image
while the AQWA convention is,
image

This PR introduces a new property, waves.aqwaConvention, which when set to 1 will use the AQWA conventions to generate the irregular wave time history using an imported spectrum.

@salhus salhus requested a review from dav-og April 13, 2022 18:30
@nathanmtom
Copy link

@salhus If Aqwa uses the sign convention of -\omega t rather than \omega t then we should correct the coefficients in BEMIO rather than changing the way the wave elevation is calculated within WEC-Sim. We had this same issue with NEMOH which is why in the diffraction coefficients we multiple the imaginary component by -1 to resolve the difference between -\omega t versus \omega t. Unless you are trying to compare the exact same time history between Aqwa and WEC-Sim.

This was an issue brought up previously by collaborators at Oregon State University and also by researchers at Plymouth who had reached out to Yi-Hsiang with questions before, but I do not recall them being resolved. This might confirm our initial thoughts on how the Aqwa notation follows NEMOH convention and not WAMIT convention.

@salhus
Copy link
Contributor Author

salhus commented Apr 13, 2022

@nathanmtom
I agree about the bemio correction. I asked @kmruehl recently about how the aqwa bemio treats this. I think I should go through that code and see how this issue is being treated.

This PR was to resolve issues I faced in a recent project. The user provided spectrum information using aqwa convention. I couldn't get the irregular wave time-histories to match. So after I made these tweaks I could get them to match.

Thanks for telling me about those issues, it will make it easier for me to see the context. I will update this thread after I have spent some more time on the AQWA and NEMOH bemio codes.

@kmruehl kmruehl added the Wave Class Wave Classs (waveClass.m) label Apr 20, 2022
@salhus
Copy link
Contributor Author

salhus commented Apr 20, 2022

Hi @nathanmtom ,

Yes you were right. I flipped the sign on the phases and it all lines up now. Cheers. Let me know if you any other thoughts, or perhaps close this PR.

@nathanmtom
Copy link

Thanks for the update @salhus! I think that we still need to verify if the imaginary component of the excitation force needs to be multiplied by -1 given the definition of the incident wave. This is the discussion related to #152 , and I have highlighted below the section in READ_NEMOH where we implement a conversion to be consistent with WEC-Sim notation.

image

You can probably close this PR as it is only related to the wave elevation which you have fixed and start a new PR to resolve any changes with the hydrodynamic coefficient import.

@kmruehl kmruehl added Bug bug in WEC-Sim source, high priority BEM/BEMIO related to BEMIO or BEM hydro data labels Apr 20, 2022
@kmruehl
Copy link
Collaborator

kmruehl commented Apr 20, 2022

Thanks @salhus and @nathanmtom. If I'm reading this correctly you'd like to close this PR and open a new one to make the revisions to BEMIO? Since there is a good discussion on this thread, it may be useful to just make the revisions on this PR and merge it before v5.0.

Also, @salhus it looks like this PR is on a branch on the main WEC-Sim/WEC-Sim repository: https://github.com/WEC-Sim/WEC-Sim/tree/aqwa-sign-convention, and not on your fork. In the future, please do all WEC-Sim development on your fork.

@salhus
Copy link
Contributor Author

salhus commented Apr 20, 2022

@nathanmtom and @kmruehl

I ran bemio on the cylinder example for wamit, aqwa, and nemoh. I compared them using the compare feature. Unfortunately, the phases in aqwa have the opposite sign. NEMOH seems to have solved that issue like you indicated.

so here is a comparison of excitation force phases from wamit and aqwa

image

and here is the same comparison between the excitation phases of wamit and aqwa,

image

I am going to go check other ones as well. I will update this thread.

@kmruehl
Copy link
Collaborator

kmruehl commented Apr 20, 2022

@salhus Thank you. Can you migrate this to your fork too? I'd like to keep this thread though. You should be able to amend the PR's base to your fork.

@salhus
Copy link
Contributor Author

salhus commented Apr 20, 2022

@kmruehl
Yes, of course. I have the files I need.
You can go ahead an delete this branch.
I will create PR from my fork after making the changes for the imaginary parts and phases of excitation forces.

@salhus salhus closed this Apr 20, 2022
@salhus salhus deleted the aqwa-sign-convention branch April 20, 2022 22:02
@nathanmtom
Copy link

@salhus Thanks for sharing the phase of the excitation force. Given we would like to incorporate the AQWA changes into v5.0, if you compare the real and imaginary parts of the excitation force for the cylinder and the imaginary component is the opposite sign for AQWA than both WAMIT then I think it is safe to go ahead and apply the -1 modification in the readAQWA script.

@salhus salhus mentioned this pull request Apr 23, 2022
@salhus
Copy link
Contributor Author

salhus commented Apr 23, 2022

This PR is reintroduced as #855

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 Bug bug in WEC-Sim source, high priority Wave Class Wave Classs (waveClass.m)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants