From 38d1b9fd0b70aab4a01fd507f039750c2508bd1c Mon Sep 17 00:00:00 2001 From: Michael B Kuhn <31661049+mbkuhn@users.noreply.github.com> Date: Mon, 3 Feb 2025 14:31:06 -0700 Subject: [PATCH] Underwater terrain-aware wave forcing (#1475) * turn off apply_relaxation_zones where terrain blanking (or terrain drag forcing) happens * modify ow boundary for underwater terrain * add regression test --- .../boundary_ops/OceanWavesBoundary.H | 8 + .../boundary_ops/OceanWavesBoundary.cpp | 55 +- .../relaxation_zones/relaxation_zones_ops.cpp | 27 +- test/CMakeLists.txt | 1 + .../ow_current_bathymetry/channel.amrwind | 2146 +++++++++++++++++ .../ow_current_bathymetry.inp | 62 + 6 files changed, 2291 insertions(+), 8 deletions(-) create mode 100755 test/test_files/ow_current_bathymetry/channel.amrwind create mode 100755 test/test_files/ow_current_bathymetry/ow_current_bathymetry.inp diff --git a/amr-wind/ocean_waves/boundary_ops/OceanWavesBoundary.H b/amr-wind/ocean_waves/boundary_ops/OceanWavesBoundary.H index c97d218c1d..22301138fe 100644 --- a/amr-wind/ocean_waves/boundary_ops/OceanWavesBoundary.H +++ b/amr-wind/ocean_waves/boundary_ops/OceanWavesBoundary.H @@ -2,6 +2,7 @@ #define OCEANWAVESBOUNDARY_H #include "amr-wind/core/Field.H" +#include "amr-wind/core/IntField.H" #include "amr-wind/CFDSim.H" #include "AMReX_Gpu.H" #include @@ -61,10 +62,17 @@ private: const amrex::AmrCore& m_mesh; Field& m_ow_velocity; Field& m_ow_vof; + IntField* m_terrain_blank_ptr{nullptr}; // Should be active unless boundary planes are used bool m_activate_ow_bndry{true}; + // Check for single-phase simulation + bool m_vof_exists{true}; + + // Check for terrain + bool m_terrain_exists{false}; + // Store time corresponding to current boundary data amrex::Real m_bndry_time{0.0}; diff --git a/amr-wind/ocean_waves/boundary_ops/OceanWavesBoundary.cpp b/amr-wind/ocean_waves/boundary_ops/OceanWavesBoundary.cpp index aeb85d0a93..5f97144b72 100644 --- a/amr-wind/ocean_waves/boundary_ops/OceanWavesBoundary.cpp +++ b/amr-wind/ocean_waves/boundary_ops/OceanWavesBoundary.cpp @@ -42,7 +42,8 @@ void OceanWavesBoundary::post_init_actions() m_repo.get_field("velocity") .register_fill_patch_op( m_mesh, m_time, *this); - if (m_repo.field_exists("vof")) { + m_vof_exists = m_repo.field_exists("vof"); + if (m_vof_exists) { m_repo.get_field("vof") .register_fill_patch_op( m_mesh, m_time, *this); @@ -50,6 +51,11 @@ void OceanWavesBoundary::post_init_actions() .register_fill_patch_op( m_mesh, m_time, *this); } + + m_terrain_exists = m_repo.int_field_exists("terrain_blank"); + if (m_terrain_exists) { + m_terrain_blank_ptr = &m_repo.get_int_field("terrain_blank"); + } } } @@ -73,6 +79,8 @@ void OceanWavesBoundary::set_velocity( const int nghost = 1; const auto& domain = geom.growPeriodicDomain(nghost); + const bool terrain_and_vof_exist = m_terrain_exists && m_vof_exists; + for (amrex::OrientationIter oit; oit != nullptr; ++oit) { auto ori = oit(); if ((bctype[ori] != BC::mass_inflow) && @@ -85,10 +93,14 @@ void OceanWavesBoundary::set_velocity( const auto& dbx = ori.isLow() ? amrex::adjCellLo(domain, idir, nghost) : amrex::adjCellHi(domain, idir, nghost); + auto shift_to_interior = + amrex::IntVect::TheDimensionVector(idir) * (ori.isLow() ? 1 : -1); + for (amrex::MFIter mfi(mfab); mfi.isValid(); ++mfi) { auto gbx = amrex::grow(mfi.validbox(), nghost); - const auto& bx = - utils::face_aware_boundary_box_intersection(gbx, dbx, ori); + amrex::IntVect shift_to_cc = {0, 0, 0}; + const auto& bx = utils::face_aware_boundary_box_intersection( + shift_to_cc, gbx, dbx, ori); if (!bx.ok()) { continue; } @@ -98,12 +110,25 @@ void OceanWavesBoundary::set_velocity( const auto& arr = mfab[mfi].array(); const int numcomp = mfab.nComp(); + const auto terrain_blank_flags = + terrain_and_vof_exist + ? (*m_terrain_blank_ptr)(lev).const_array(mfi) + : amrex::Array4(); + amrex::ParallelFor( bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept { + const amrex::IntVect iv{i, j, k}; for (int n = 0; n < numcomp; n++) { - if (targ_vof(i, j, k) > constants::TIGHT_TOL) { - arr(i, j, k, dcomp + n) = - targ_arr(i, j, k, orig_comp + n); + if (targ_vof(iv) > constants::TIGHT_TOL) { + arr(iv, dcomp + n) = targ_arr(iv, orig_comp + n); + } + if (terrain_and_vof_exist) { + // Terrain-blanked adjacent cell means 0 velocity + if (terrain_blank_flags( + iv + shift_to_cc + shift_to_interior) == + 1) { + arr(iv, dcomp + n) = 0.0; + } } } }); @@ -225,6 +250,7 @@ void OceanWavesBoundary::set_inflow_sibling_velocity( BL_PROFILE("amr-wind::OceanWavesBoundary::set_inflow_sibling_velocity"); + const bool terrain_and_vof_exist = m_terrain_exists && m_vof_exists; const auto& bctype = fld.bc_type(); const auto& geom = fld.repo().mesh().Geom(lev); @@ -238,6 +264,10 @@ void OceanWavesBoundary::set_inflow_sibling_velocity( const int idir = ori.coordDir(); const auto& domain_box = geom.Domain(); + + auto shift_to_interior = + amrex::IntVect::TheDimensionVector(idir) * (ori.isLow() ? 1 : -1); + for (int fdir = 0; fdir < AMREX_SPACEDIM; ++fdir) { // Only face-normal velocities populated here @@ -268,6 +298,11 @@ void OceanWavesBoundary::set_inflow_sibling_velocity( const auto& targ_arr = m_ow_velocity(lev).const_array(mfi); const auto& marr = mfab[mfi].array(); + const auto terrain_blank_flags = + terrain_and_vof_exist + ? (*m_terrain_blank_ptr)(lev).const_array(mfi) + : amrex::Array4(); + amrex::ParallelFor( bx, [=] AMREX_GPU_DEVICE( const int i, const int j, const int k) noexcept { @@ -277,6 +312,14 @@ void OceanWavesBoundary::set_inflow_sibling_velocity( if (targ_vof(cc_iv) > constants::TIGHT_TOL) { marr(i, j, k, 0) = targ_arr(cc_iv, fdir); } + if (terrain_and_vof_exist) { + // Terrain-blanked boundary-adjacent cell should set + // boundary velocity to 0 + if (terrain_blank_flags( + cc_iv + shift_to_interior) == 1) { + marr(i, j, k, 0) = 0.0; + } + } }); } } diff --git a/amr-wind/ocean_waves/relaxation_zones/relaxation_zones_ops.cpp b/amr-wind/ocean_waves/relaxation_zones/relaxation_zones_ops.cpp index d5929329dd..5a4a28430c 100644 --- a/amr-wind/ocean_waves/relaxation_zones/relaxation_zones_ops.cpp +++ b/amr-wind/ocean_waves/relaxation_zones/relaxation_zones_ops.cpp @@ -91,6 +91,15 @@ void apply_relaxation_zones(CFDSim& sim, const RelaxZonesBaseData& wdata) auto& velocity = sim.repo().get_field("velocity"); auto& density = sim.repo().get_field("density"); + amr_wind::IntField* terrain_blank_ptr{nullptr}; + amr_wind::IntField* terrain_drag_ptr{nullptr}; + const bool terrain_exists = sim.repo().int_field_exists("terrain_blank"); + // Get fields to prevent forcing in or near underwater terrain + if (terrain_exists) { + terrain_blank_ptr = &sim.repo().get_int_field("terrain_blank"); + terrain_drag_ptr = &sim.repo().get_int_field("terrain_drag"); + } + for (int lev = 0; lev < nlevels; ++lev) { const auto& dx = geom[lev].CellSizeArray(); const auto& problo = geom[lev].ProbLoArray(); @@ -101,6 +110,13 @@ void apply_relaxation_zones(CFDSim& sim, const RelaxZonesBaseData& wdata) const auto target_volfrac_arrs = ow_vof(lev).const_arrays(); const auto target_vel_arrs = ow_vel(lev).const_arrays(); + const auto terrain_blank_flags = + terrain_exists ? (*terrain_blank_ptr)(lev).const_arrays() + : amrex::MultiArray4(); + const auto terrain_drag_flags = + terrain_exists ? (*terrain_drag_ptr)(lev).const_arrays() + : amrex::MultiArray4(); + const amrex::Real gen_length = wdata.gen_length; const amrex::Real beach_length = wdata.beach_length; const amrex::Real beach_length_factor = wdata.beach_length_factor; @@ -125,8 +141,15 @@ void apply_relaxation_zones(CFDSim& sim, const RelaxZonesBaseData& wdata) const auto target_volfrac = target_volfrac_arrs[nbx]; const auto target_vel = target_vel_arrs[nbx]; + bool in_or_near_terrain{false}; + if (terrain_exists) { + in_or_near_terrain = + (terrain_blank_flags[nbx](i, j, k) == 1 || + terrain_drag_flags[nbx](i, j, k) == 1); + } + // Generation region - if (x <= problo[0] + gen_length) { + if (x <= problo[0] + gen_length && !in_or_near_terrain) { const amrex::Real Gamma = utils::gamma_generate(x - problo[0], gen_length); // Get bounded new vof, incorporate with increment @@ -164,7 +187,7 @@ void apply_relaxation_zones(CFDSim& sim, const RelaxZonesBaseData& wdata) } } // Outlet region - if (x + beach_length >= probhi[0]) { + if (x + beach_length >= probhi[0] && !in_or_near_terrain) { const amrex::Real Gamma = utils::gamma_absorb( x - (probhi[0] - beach_length), beach_length, beach_length_factor); diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 131121aaaf..0bc655d433 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -254,6 +254,7 @@ add_test_re(ow_linear) add_test_re(ow_linear_init_waves) add_test_re(ow_stokes) add_test_re(ow_current_wing) +add_test_re(ow_current_bathymetry) add_test_re(scalar_advection_uniform) add_test_re(scalar_advection_refined) add_test_re(freestream_bds) diff --git a/test/test_files/ow_current_bathymetry/channel.amrwind b/test/test_files/ow_current_bathymetry/channel.amrwind new file mode 100755 index 0000000000..c62ba9f59e --- /dev/null +++ b/test/test_files/ow_current_bathymetry/channel.amrwind @@ -0,0 +1,2146 @@ +64 +32 +0.00 +1.59 +3.17 +4.76 +6.35 +7.94 +9.52 +11.11 +12.70 +14.29 +15.87 +17.46 +19.05 +20.63 +22.22 +23.81 +25.40 +26.98 +28.57 +30.16 +31.75 +33.33 +34.92 +36.51 +38.10 +39.68 +41.27 +42.86 +44.44 +46.03 +47.62 +49.21 +50.79 +52.38 +53.97 +55.56 +57.14 +58.73 +60.32 +61.90 +63.49 +65.08 +66.67 +68.25 +69.84 +71.43 +73.02 +74.60 +76.19 +77.78 +79.37 +80.95 +82.54 +84.13 +85.71 +87.30 +88.89 +90.48 +92.06 +93.65 +95.24 +96.83 +98.41 +100.00 +-25.00 +-23.39 +-21.77 +-20.16 +-18.55 +-16.94 +-15.32 +-13.71 +-12.10 +-10.48 +-8.87 +-7.26 +-5.65 +-4.03 +-2.42 +-0.81 +0.81 +2.42 +4.03 +5.65 +7.26 +8.87 +10.48 +12.10 +13.71 +15.32 +16.94 +18.55 +20.16 +21.77 +23.39 +25.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 +-10.00 +-11.61 +-13.23 +-14.84 +-16.45 +-18.06 +-19.68 +-21.29 +-22.90 +-24.52 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-25.00 +-24.52 +-22.90 +-21.29 +-19.68 +-18.06 +-16.45 +-14.84 +-13.23 +-11.61 +-10.00 diff --git a/test/test_files/ow_current_bathymetry/ow_current_bathymetry.inp b/test/test_files/ow_current_bathymetry/ow_current_bathymetry.inp new file mode 100755 index 0000000000..50a4748042 --- /dev/null +++ b/test/test_files/ow_current_bathymetry/ow_current_bathymetry.inp @@ -0,0 +1,62 @@ +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# SIMULATION STOP # +#.......................................# +time.stop_time = 20 # Max (simulated) time to evolve +time.max_step = 10 # Max number of time steps + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# TIME STEP COMPUTATION # +#.......................................# +time.fixed_dt = 0.1 # Use this constant dt if > 0 +time.cfl = 0.95 # CFL factor +time.use_force_cfl = false +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# INPUT AND OUTPUT # +#.......................................# +time.plot_interval = 10 # Steps between plot files +time.checkpoint_interval = -1 # Steps between checkpoint files +io.outputs = ow_velocity ow_vof velocity_src_term + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# PHYSICS # +#.......................................# +transport.model = TwoPhaseTransport +turbulence.model = Laminar + +incflo.physics = MultiPhase OceanWaves TerrainDrag +TerrainDrag.terrain_file = "channel.amrwind" +OceanWaves.label = Wave1 +OceanWaves.Wave1.type = LinearWaves +OceanWaves.Wave1.wave_height=1.0 +OceanWaves.Wave1.wave_length=50.0 +OceanWaves.Wave1.water_depth=25.0 +OceanWaves.Wave1.relax_zone_gen_length=5.0 +OceanWaves.Wave1.numerical_beach_length=5.0 +OceanWaves.Wave1.numerical_beach_length_factor=2.0 +OceanWaves.Wave1.current=2.0 +MultiPhase.density_fluid1=1025.0 +MultiPhase.density_fluid2=1.225 + +ICNS.source_terms = GravityForcing DragForcing +ICNS.use_perturb_pressure = 1 +DragForcing.is_laminar = 1 + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# ADAPTIVE MESH REFINEMENT # +#.......................................# +amr.n_cell = 64 32 32 # Grid cells at coarsest AMRlevel +amr.max_level = 0 + +#¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨¨# +# GEOMETRY # +#.......................................# +geometry.prob_lo = 0.0 -25.0 -25.0 # Lo corner coordinates +geometry.prob_hi = 100.0 25.0 25.0 # Hi corner coordinates +geometry.is_periodic = 0 0 0 # Periodicity x y z (0/1) + +xlo.type = "wave_generation" +xhi.type = "pressure_outflow" +ylo.type = "slip_wall" +yhi.type = "slip_wall" +zlo.type = "slip_wall" +zhi.type = "slip_wall" \ No newline at end of file