ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_ImmersedProjection.cpp File Reference
#include "ERF.H"
#include "ERF_ImmersedWallCell.H"
#include "ERF_ImmersedBuildingMasks.H"
Include dependency graph for ERF_ImmersedProjection.cpp:

Detailed Description

Implicit immersed-forcing drag in the anelastic projection (erf.if_implicit_projection, erf-model/ERF#4919 for terrain, #4887 for buildings).

The terrain immersed forcing drags the momentum of the solid faces toward zero at the rate rate = beta_face * if_Cd_momentum / (dx dy dz)^(1/3). Applied explicitly, the drag is undone by the projection, which treats the solid as fluid; the post-projection freeze of the solid faces then leaves the surface faces (solid on one side only) unbalanced, so the solid row under the surface becomes a mass sink and source. With the drag inside the projection,

m^{n+1} = (m* - grad phi) / (1 + dt rate) = sigma (m* - grad phi),
div(sigma grad phi) = div(sigma m*),

the projected momenta are divergence free everywhere, the solid included, and no freeze is needed. The faces where the source term applies the wall law instead of the drag keep sigma = 1. For buildings (erf.buildings_type = ImmersedForcing, erf-model/ERF#4887) the rate is the linear drag of ImmersedForcingBuildings_{X,Y,Z}mom (partial-wall and interior faces, from the masks of ERF_ImmersedBuildingMasks.H), and the faces between two solid cells take the full rate.