|
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>
Namespaces | |
| erf_detail_CoarseFineFaces | |
Functions | |
| std::map< int, Vector< Box > > | erf_detail_CoarseFineFaces::make_cf_zface_patches (const BoxArray &fba, const Box &fdom) |
| void | erf_detail_CoarseFineFaces::clamp_outside_domain (MultiFab &mf, const Box &cdom, bool per_x, bool per_y) |
| void | erf_detail_CoarseFineFaces::copy_slabs_into (MultiFab &dst, const MultiFab &slabs, const Vector< int > &slab_box) |
| void | erf_detail_CoarseFineFaces::scale_by_column_mapfac (MultiFab &f, const MultiFab &mx, const MultiFab &my, const Periodicity &per, bool divide) |
| MultiFab | erf_detail_CoarseFineFaces::weighted_mass_flux (const MultiFab &m, const MultiFab &area, const MultiFab &mf) |
| MultiFab | erf_detail_CoarseFineFaces::weighted_zflux (const MultiFab &w, const MultiFab &mx, const MultiFab &my) |
| void | erf_detail_CoarseFineFaces::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 or pseudo-incompressible projection works with the contravariant flux through each z-face,
Omega = rho0 w - rho0 u dz/dx - rho0 v dz/dy
(formed from (rho u), then multiplied by beta, on a pseudo-incompressible level), 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).