-
Notifications
You must be signed in to change notification settings - Fork 184
OSWEC Test Case - Irregular Waves #1516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Thanks @jleonqu, these results are interesting. The magnitude of response appears to be similar for both version, but the phase is different. Did we change the way we handle phase seed between these versions? |
|
Yes, we changed how the phase seed is handled. In v4.0, rng(obj.phaseSeed) was used, which is not reproducible in parallel runs because each worker has an independent RNG stream. The new implementation uses RandStream('Threefry') with substreams to ensure deterministic and reproducible wave profiles across both serial (wecSim) and parallel (wecSimPCT) simulations. The issue was identified in #1329 and it was solved in PR #1467 |
|
We have confirmed that the way the phase seed is handled in both versions is not the cause of the differences in results. Another possible reason could be how the wave spreading is handled. @jtgrasb will continue working on this PR. |
|
@jleonqu Thank you for creating the PR. I verified that the updates seem to be due to differences in the the phase seed is handled in v4.0 and the current version. PR #1467 updated the phase generation so that it is consistent for both serial and parallel simulation runs. I verified that this is the only difference by implementing this change in v4.0 and running the OSWEC case in both irregular and irregular spread cases:
I've updated the org results to use v4.0 with the updated phase and this should be ready to merge once the tests pass. |
|
Wonderful news, thanks @jtgrasb! |
|
@jtgrasb thanks for the update. Is the difference in all DOFs? |
|
The difference is observed in all dofs. I narrowed it down to a difference in the wave spectrum creation. Below shows the same wave spectrum created in dev vs. v4.0: The reason for the difference is PR #365 which changes the A_PM term of for the Pierson-Moskowitz spectrum creation: By adjusting the phase seeding method and the A_PM term calculation in v4.0 to the updated version's methods, I am able to achieve matching between v4.0 and the current versions: Merging this PR once the tests pass. |
|
Thank you @jtgrasb! |





There is an issue when comparing the results between WEC-Sim v4.0 and v6.1.2 for the OSWEC under irregular waves with wave directional spreading. The comparison is shown in the figure below:
The next step to determine the main reason for the difference in results is to compare the results for regular waves.