Exawind / amr-wind

AMReX-based structured wind solver
https://exawind.github.io/amr-wind
Other
103 stars 78 forks source link

Ocean Waves Improvements, esp. Stokes Waves #1019

Closed mbkuhn closed 2 months ago

mbkuhn commented 2 months ago

Summary

Bug fix for stokes waves, adding feature of wave length calculation, generalizing and de-hardcoding ocean waves code

Pull request type

Bugfix + Feature

Please check the type of change your PR introduces:

Checklist

The following should accompany this PR:

This PR was tested by running:

Additional background

With small water depths, the stokes waves velocities seemed reasonable before the bug fix, but with a depth of 10 m, the velocities in x were on the order of 1e20, due to the mix-up of variables m and n.

Issue Number: N/A

mbkuhn commented 2 months ago

@gdeskos would you be able to take a glance at this PR, mainly the function that calculates wavelength?