|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
#include "ERF_Utils.H"#include <AMReX_iMultiFab.H>#include <AMReX_MultiFabUtil.H>#include <AMReX_Reduce.H>
Functions | |
| void | cons_to_prim (const MultiFab &cons_state, MultiFab &S_prim, int ng) |
| void | fill_wall_dist_ghost_cells (MultiFab &wdist, const Geometry &geom) |
| void | make_qt (const MultiFab &cons_state, MultiFab &qt, int n_qstate_into_total) |
| void | if_average_down (const MultiFab &S_fine, MultiFab &S_crse, const MultiFab &beta_fine, const MultiFab &beta_crse, const MultiFab &vol_fine, int scomp, int ncomp, const IntVect &ratio) |
| std::pair< int, Real > | if_cf_surface_mismatch (const MultiFab &fine_tb, const BoxArray &fine_grids, const BoxArray &crse_grids, const DistributionMapping &crse_dmap, const Geometry &crse_geom, const IntVect &ratio, Real warn) |
| void | immersed_wall_dist (MultiFab &wdist, const MultiFab &terrain_blank, const MultiFab &z_phys_nd, const MultiFab &z_phys_cc, const Box &domain, Real small_volfrac, MultiFab *wall_height, const MultiFab *wall_height_crse) |
| void | make_ib_wall_face_masks (const MultiFab &terrain_blank, MultiFab &mask13, MultiFab &mask23, MultiFab &mask33, const Box &domain, Real small_volfrac, int spacing, Real dz, Real z0) |
| void cons_to_prim | ( | const MultiFab & | cons_state, |
| MultiFab & | S_prim, | ||
| int | ng | ||
| ) |
Convert conservative variables to primitive variables.
| [in] | cons_state | MultiFab containing conservative state variables |
| [out] | S_prim | MultiFab to be filled with primitive state variables |
| [in] | ng | Number of ghost cells |
Referenced by ERF::advance_dycore(), ERF::compute_max_buoyancy_gradp_diagnostic(), and ERF::FillPlot3DVars().


| void fill_wall_dist_ghost_cells | ( | MultiFab & | wdist, |
| const Geometry & | geom | ||
| ) |
Fill the ghost cells of the wall distance field.
The wall distance is only computed on the valid region of each box (whether from the analytic shortcuts, the Poisson solve, or the thin-body correction), so without this the ghost cells still hold the large sentinel value they were initialized with. Any operator that reads wall distance from a grown box – e.g. the RANS Dirichlet-k boundary condition in SurfaceLayer::update_fluxes – would then propagate that sentinel into the state.
Ghost cells shared with a neighboring box or across a periodic boundary are filled by FillBoundary; ghost cells outside the domain in a non-periodic direction are filled by zero-order extrapolation. Note that the analytic wall distances vary only with k, so the extrapolation is exact in those cases.
| [in,out] | wdist | MultiFab holding the wall distance |
| [in] | geom | Geometry at this level |
Referenced by ERF::make_wall_dist(), and ERF::poisson_wall_dist().


| void if_average_down | ( | const MultiFab & | S_fine, |
| MultiFab & | S_crse, | ||
| const MultiFab & | beta_fine, | ||
| const MultiFab & | beta_crse, | ||
| const MultiFab & | vol_fine, | ||
| int | scomp, | ||
| int | ncomp, | ||
| const IntVect & | ratio | ||
| ) |
Fluid-mass-weighted average down over immersed-forcing levels (see ERF_Utils.H).
Referenced by ERF::AverageDownTo().


| std::pair<int, Real> if_cf_surface_mismatch | ( | const MultiFab & | fine_tb, |
| const BoxArray & | fine_grids, | ||
| const BoxArray & | crse_grids, | ||
| const DistributionMapping & | crse_dmap, | ||
| const Geometry & | crse_geom, | ||
| const IntVect & | ratio, | ||
| Real | warn | ||
| ) |
Referenced by ERF::check_if_cf_mismatch().


| void immersed_wall_dist | ( | MultiFab & | wdist, |
| const MultiFab & | terrain_blank, | ||
| const MultiFab & | z_phys_nd, | ||
| const MultiFab & | z_phys_cc, | ||
| const Box & | domain, | ||
| Real | small_volfrac, | ||
| MultiFab * | wall_height, | ||
| const MultiFab * | wall_height_crse | ||
| ) |
Referenced by ERF::poisson_wall_dist().


| void make_ib_wall_face_masks | ( | const MultiFab & | terrain_blank, |
| MultiFab & | mask13, | ||
| MultiFab & | mask23, | ||
| MultiFab & | mask33, | ||
| const Box & | domain, | ||
| Real | small_volfrac, | ||
| int | spacing, | ||
| Real | dz, | ||
| Real | z0 | ||
| ) |
Referenced by ERF::make_ib_wall_face_masks_lev().


| void make_qt | ( | const MultiFab & | cons_state, |
| MultiFab & | qt, | ||
| int | n_qstate_into_total | ||
| ) |
Compute the total water mixing ratio from conservative variables.
| [in] | cons_state | MultiFab containing conservative state variables |
| [out] | qt | MultiFab to store the total water mixing ratio |
| [in] | n_qstate_into_total | Number of moisture components to include in the total |
Referenced by ERF::compute_max_buoyancy_gradp_diagnostic(), ERF::compute_max_pressure_gradient_diagnostic(), and ERF::FillPlot3DVars().
