|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
#include "ERF.H"#include "ERF_Utils.H"#include "ERF_TI_slow_headers.H"#include <AMReX_FillPatchUtil.H>#include <AMReX_Interpolater.H>#include <limits>
Functions | |
| static MultiFab | weighted_mass_flux (const MultiFab &m, const MultiFab &area, const MultiFab &mf) |
| static void | fill_cf_momentum (ERFFillPatcher &patcher, MultiFab &mom, const MultiFab &area, const MultiFab &mapfac, bool mass_flux, double time_d, const Vector< BCRec > &bcs) |
A refined level that stops inside the domain in z (a level refined over part of the depth) has coarse/fine faces at its top and bottom. On a terrain-fitted mesh the anelastic projection works with the contravariant flux through each z-face,
Omega = rho0 w - rho0 u dz/dx - rho0 v dz/dy,
which needs the horizontal momenta one face below and above the level and, for the solve to have a solution, fluxes through the level's boundary that add up to the coarse level's.
cf_zface_coarse_data builds both from the coarse level, on thin planes around the level's top and bottom only: the horizontal momenta in the layer just outside the level, and the coarse Omega on its coarse/fine faces in z. project_momenta uses them through set_cf_zghost_projection and set_cf_zface_omega; every fine-level fill uses them through FillSetMomentaCF, right after the coarse/fine faces are set from the coarse level and before any ghost fill, so the time step carries theta and the other scalars with the fluxes the projection balanced.
ERF used to keep the coarse (rho w) that FillSet puts on these faces: the fine level then rebuilt Omega from its own u, v and slopes, the fluxes no longer added up to the coarse ones, and the difference stayed in the level as a uniform divergence (2.8e-6 1/s on the test hill).
|
static |
Fill the coarse/fine faces of one horizontal momentum component. Where cf_interp_mass_flux holds, the fill gives the mass flux, which is multiplied by the fine map factor and divided by the fine area on the faces it set; all other faces keep their values exactly.
Referenced by ERF::FillSetHorizontalMomentaCF().


|
static |
The mass flux a (rho u) / m of a horizontal momentum component, on the faces of its valid region and the ghost faces that the momentum, the area and the map factor all hold.
| m | Face momenta, (rho u) or (rho v) |
| area | Face areas, ax or ay |
| mf | Map factor on those faces, m_uy or m_vx |
Referenced by ERF::average_down_mass_flux(), ERF::cf_anelastic_stage_registration(), and ERF::RegisterCoarseMomentumCF().

