Skip to content
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

Improvements to wave generation - ocean waves #1264

Merged
merged 8 commits into from
Oct 2, 2024

Conversation

mbkuhn
Copy link
Contributor

@mbkuhn mbkuhn commented Sep 27, 2024

Summary

I found that some cases are not stable, with problems arising from the wave generation region. This PR modifies the forcing in 2 ways to make it more reasonable and more robust.

Pull request type

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe):

Checklist

The following is included:

  • new unit-test(s)
  • new regression test(s)
  • documentation for new capability

This PR was tested by running:

  • the unit tests
    • on GPU
    • on CPU
  • the regression tests
    • on GPU
    • on CPU

Additional background

Creates diffs for ow_* regression tests, which are expected

@mbkuhn mbkuhn marked this pull request as ready for review October 1, 2024 19:51
@mbkuhn
Copy link
Contributor Author

mbkuhn commented Oct 1, 2024

This PR also has some refactoring (introducing loops over the three components of velocity) and another bug fix (making the ramp function work as intended).

@mbkuhn mbkuhn requested a review from mpolimeno October 1, 2024 19:53
@rybchuk
Copy link
Contributor

rybchuk commented Oct 1, 2024

Looking forward to this! Thanks for putting this together.

@mbkuhn
Copy link
Contributor Author

mbkuhn commented Oct 1, 2024

@rybchuk have you had stability issues within the forcing regions?

@rybchuk
Copy link
Contributor

rybchuk commented Oct 1, 2024

I've had simulations where the CFL kept blowing up after a while. I tried to get those simulations to stabilize, but never was able to. My workaround was dialing back the wave amplitude from 6.4 m (as well as 3.2 m) to 1.6 m. I figured that my code was crashing because of wave physics (are they allowed to get that big?) instead of something tied to numerics

@rybchuk
Copy link
Contributor

rybchuk commented Oct 1, 2024

I couldn't tell you if these simulations were crashing because of behavior in the wave input region, wave dissipation region, or elsewhere though

@mbkuhn
Copy link
Contributor Author

mbkuhn commented Oct 1, 2024

Gotcha. It's very possible it's related to this.

@mbkuhn mbkuhn requested a review from marchdf October 2, 2024 19:55
@mbkuhn
Copy link
Contributor Author

mbkuhn commented Oct 2, 2024

@marchdf Aside from the small tweaks and refactoring of things, this PR has two modifications to how the wave forcing is applied:

  1. When liquid is added to a cell, assume it has the target velocity, not the current velocity of the cell
  2. Avoid forcing the velocity to a target velocity when the target velocity is invalid (because the current cell is not within the target wave).

Also, I've done several things to check this manually.

@marchdf
Copy link
Contributor

marchdf commented Oct 2, 2024

Sounds good! I can't run any tests right now with the downtime. We can merge and deal with the consequences or wait it out. Up to you.

@mbkuhn mbkuhn merged commit d4aa6fc into Exawind:main Oct 2, 2024
15 checks passed
@mbkuhn mbkuhn deleted the ow_generation_improvements branch October 22, 2024 14:53
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.

4 participants