Skip to content

Commit

Permalink
fix multiple errors in eta for stokes waves (#1392)
Browse files Browse the repository at this point in the history
* fix parenthesis error in eta for stokes waves

* divide eta terms by wavenumber
  • Loading branch information
mbkuhn authored Dec 10, 2024
1 parent efd5ab1 commit 30fc9a1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions amr-wind/ocean_waves/relaxation_zones/stokes_waves_K.H
Original file line number Diff line number Diff line change
Expand Up @@ -397,11 +397,12 @@ AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE void stokes_waves(
eta = (eps * std::cos(phase) // first order term
+ std::pow(eps, 2) * b22 * std::cos(2. * phase) // second order term
+ std::pow(eps, 3) * b31 * (std::cos(phase) - std::cos(3. * phase)) +
std::pow(eps, 4) * b42 *
(std::cos(2. * phase) + b44 * std::cos(4. * phase)) +
std::pow(eps, 4) *
(b42 * std::cos(2. * phase) + b44 * std::cos(4. * phase)) +
std::pow(eps, 5) *
(-(b53 + b55) * std::cos(phase) + b53 * std::cos(3 * phase) +
b55 * std::cos(5 * phase))) +
b55 * std::cos(5 * phase))) /
wavenumber +
zsl;

// Compute cosines
Expand Down

0 comments on commit 30fc9a1

Please sign in to comment.