Skip to content

Conversation

@meatballgithub
Copy link

I was recently doing a WEC-array simulation with four bodies being at distinct locations. There should be phase differences in excitation forces, while the simulation indicated that excitation forces have the same phase. The issue lies in that the frequency-domain excitation force data represents the amplitude-phase-frequency characteristics with respect to the wave elevation at the body's COG, while in WEC-Sim excitation force is always calculated using wave elevation at the coordinate origin. This will result in phase errors if the body is not situated at the origin. Therefore, I did this commit to make the frequency-domain excitation force data matching with the origin. A brief readme and a simulation test project are attached. Due to the file format and size restriction, please delete '.zip' in 'test.z01' and 'test.z02' for unzipping the simulation files.
readme.pdf
four-body sim test.z01.zip
four-body sim test.z02.zip
four-body sim test.zip

@hfchen20
Copy link

@meatballgithub You are using AQWA. The correction may not apply to other BEM codes such as NEMOH, in which you can specifically define the point location the forces are calculated at.

@meatballgithub
Copy link
Author

You are using AQWA. The correction may not apply to other BEM codes such as NEMOH, in which you can specifically define the point location the forces are calculated at.

@hfchen20 Yes, I'm using AQWA with this issue. I'm not familiar with NEMOH or their BEM codes, and I have some questions:
As the frequency-domain data of excitation force,
$F_e(j\omega)=F_{e,\rm amp}(\omega)e^{jF_{e,\rm phase}(\omega)}=F_{e,\rm RE}(\omega)+jF_{e,\rm IM}(\omega)$,
represents the amplitude-phase characteristics subject to the waves acting on the body, the force in time-domain should be calculated based on wave elevation at the body's origin (COG), however in WEC-sim, the wave elevation used for excitation force calculation is always the wave elevation at the coordinate origin. You mentioned that it can be defined in NEMOH, does that imply that NEMOH automatically modifies $F_e(j\omega)$ to match waves at coordinate origin rather than body's COG?

@meatballgithub meatballgithub marked this pull request as ready for review December 29, 2023 01:45
@hfchen20
Copy link

You mentioned that it can be defined in NEMOH, does that imply that NEMOH automatically modifies
to match waves at coordinate origin rather than body's COG?

I think in NEMOH, if the reference location and body CoG are consistently defined, the excitation force's phase angles are calculated correctly. I do see a phase difference between excitation forces on two bodies spaced apart. If the reference locations for all bodies are defined as the global origin, then probably there exists a need to correct the phase angle.

I don't have experience with other BEM codes.

@meatballgithub
Copy link
Author

You mentioned that it can be defined in NEMOH, does that imply that NEMOH automatically modifies
to match waves at coordinate origin rather than body's COG?

I think in NEMOH, if the reference location and body CoG are consistently defined, the excitation force's phase angles are calculated correctly. I do see a phase difference between excitation forces on two bodies spaced apart. If the reference locations for all bodies are defined as the global origin, then probably there exists a need to correct the phase angle.

I don't have experience with other BEM codes.

I wonder if the phase differences are in WEC-Sim or NEMOH. AQWA can calculate excitation force itself without using WEC-Sim, and there will be correct phase differences for multi bodies, however, once importing the BEM data into WEC-Sim, there is no phase difference.

@hfchen20
Copy link

I didn't delve into the readBEM code so do not have a definite answer. It seems to me that wec-sim only reads the force magnitude/phase data, for AQWA or NEMOH, even WAMIT, and does not do anything to correct the phase angle.

It may be worth to read carefully the code to compare what you have in AQWA and what is read into MATLAB. If there is a need to correct the phase, it may make more sense to correct it in 'readAQWA.m' before you have a full picture about other BEM codes.

@meatballgithub
Copy link
Author

meatballgithub commented Dec 29, 2023

I didn't delve into the readBEM code so do not have a definite answer. It seems to me that wec-sim only reads the force magnitude/phase data, for AQWA or NEMOH, even WAMIT, and does not do anything to correct the phase angle.

It may be worth to read carefully the code to compare what you have in AQWA and what is read into MATLAB. If there is a need to correct the phase, it may make more sense to correct it in 'readAQWA.m' before you have a full picture about other BEM codes.

‘readAWQA’ does not modify the raw BEM data and the excitation force phases are different in AQWA's time-domain sim and Matlab/WEC-Sim for bodies not at the origin. Indeed, WEC-Sim only reads the force mag/phase data for all BEM codes, my concern is that WEC-Sim calculates the force using the wave data at the coordinate origin rather than the body's origin, what I did in this commit is actually to compute the excitation force using the wave data at the body's origin. According to my understanding, the force mag/phase data in frequency-domain is defined as the mag/phase characteristics related to the wave at the body's origin. This can cause phase issues for bodies not situated at the coordinate origin. If this discrepancy doesn't occur in NEMOH, it implies that the frequency-domain data is defined inconsistently in different BEM software?. I'm confused and I hope someone can provide clarification. Moreover, it would be better if someone could share multi-body BEM data from NEMOH, WAMIT, or other sources for me to conduct a more comprehensive analysis of this phase issue.

@salhus salhus self-requested a review January 10, 2024 15:36
@kmruehl kmruehl added the BEM/BEMIO related to BEMIO or BEM hydro data label Jan 10, 2024
@dforbush2
Copy link
Contributor

see also the largeXYDisplacement option if the phase offset is the result of large surge/sway displacements. Otherwise, you should have correct phase data from the bodies' layout within the BEM. I'm a little unclear about the condition under which phase data will not be correct, unless this is a specific limitation of AQWA. if that is the case, I would strongly advise this correction is applied in readAQWA as it is functioning in other BEM.

@jtgrasb
Copy link
Contributor

jtgrasb commented May 3, 2024

@meatballgithub Thank you for working on this PR. Since the issue is present specifically for AQWA inputs, I created a new PR #1253 to resolve the issues in our readAQWA.m script, and I am closing this PR. I appreciate your example case here and explanation as it helped me understand the issue better. Please let us know if the new PR does not resolve your issues.

@jtgrasb jtgrasb closed this May 3, 2024
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.

6 participants