Skip to content

Commit 72801c0

Browse files
authored
Waves as terrain: analytical form drag model defaults to off (#1558)
* prevent form drag from being incorporated * default to turn off form drag for terrain as waves; documentation of input file option * spellcheck
1 parent 0d78316 commit 72801c0

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

amr-wind/equation_systems/icns/source_terms/DragForcing.H

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ private:
5151
int m_sponge_north{1};
5252
bool m_is_laminar{false};
5353
bool m_terrain_is_waves{false};
54+
bool m_apply_MOSD{false};
5455
};
5556

5657
} // namespace amr_wind::pde::icns

amr-wind/equation_systems/icns/source_terms/DragForcing.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ DragForcing::DragForcing(const CFDSim& sim)
120120
terrain_phys.wave_negative_elevation_name();
121121
m_target_levelset = &sim.repo().get_field(target_levelset_name);
122122
m_terrain_is_waves = true;
123+
// Inviscid form drag model can help when waves are smaller than cells,
124+
// i.e., too small to be resolved with cell blanking
125+
pp.query("wave_model_inviscid_form_drag", m_apply_MOSD);
123126
}
124127
}
125128

@@ -149,6 +152,7 @@ void DragForcing::operator()(
149152
const auto& terrainz0 = (*m_terrainz0)(lev).const_array(mfi);
150153

151154
const bool is_waves = m_terrain_is_waves;
155+
const bool model_form_drag = m_apply_MOSD;
152156
const auto& target_vel_arr = is_waves
153157
? (*m_target_vel)(lev).const_array(mfi)
154158
: amrex::Array4<amrex::Real>();
@@ -252,7 +256,7 @@ void DragForcing::operator()(
252256
const amrex::Real z0 = std::max(terrainz0(i, j, k), z0_min);
253257
const amrex::Real ustar = viscous_drag_calculations(
254258
Dxz, Dyz, ux1r, uy1r, ux2r, uy2r, z0, dx[2], kappa, tiny);
255-
if (is_waves) {
259+
if (model_form_drag) {
256260
form_drag_calculations(
257261
Dxz, Dyz, i, j, k, target_lvs_arr, dx, ux1r, uy1r);
258262
}

docs/sphinx/user/inputs_Momentum_Sources.rst

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,24 @@ Section: Momentum Sources
252252
This term turns off the sponge layer. This term is required for terrain simulations with periodic
253253
boundary conditions. The default value is 0.
254254

255+
.. input_param:: DragForcing.wave_model_inviscid_form_drag
256+
257+
**type:** Boolean, optional, default = false
258+
259+
This input file option turns on or off an inviscid model for the form drag of waves in the domain.
260+
The formulation of this model is adapted from the Moving Surface Drag (MOSD) model developed by
261+
`Ayala et al (2024) <https://doi.org/10.1007/s10546-024-00884-8>`_.
262+
263+
When the OceanWaves physics module is active, and the volume fraction variable ("vof") is not in the simulation,
264+
DragForcing will represent ocean waves as moving terrain. This is automatic and independent of DragForcing
265+
input arguments. When waves are represented as moving terrain and
266+
there is sufficient mesh resolution to resolve the shape of the wave, the blanking of cells performed
267+
by the DragForcing routine will naturally introduce the form drag of the waves into the flow. However,
268+
when the waves are not sufficiently resolved, such as when the wave amplitude is less than the cell height,
269+
the analytical model for the form drag, activated by setting this option to true, can be used to compensate
270+
for the lack of resolution. Therefore, this option should remain set to false except in scenarios
271+
when the form drag is known to be under-resolved.
272+
255273

256274
The following arguments are influential when ``GravityForcing`` is included in :input_param:`ICNS.source_terms`.
257275

0 commit comments

Comments
 (0)