From 30fc9a15a65670ebe3226b85e76b2155b4e4251d Mon Sep 17 00:00:00 2001 From: Michael B Kuhn <31661049+mbkuhn@users.noreply.github.com> Date: Tue, 10 Dec 2024 11:22:14 -0700 Subject: [PATCH] fix multiple errors in eta for stokes waves (#1392) * fix parenthesis error in eta for stokes waves * divide eta terms by wavenumber --- amr-wind/ocean_waves/relaxation_zones/stokes_waves_K.H | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/amr-wind/ocean_waves/relaxation_zones/stokes_waves_K.H b/amr-wind/ocean_waves/relaxation_zones/stokes_waves_K.H index 5657d21013..310ecdc17a 100644 --- a/amr-wind/ocean_waves/relaxation_zones/stokes_waves_K.H +++ b/amr-wind/ocean_waves/relaxation_zones/stokes_waves_K.H @@ -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