|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
#include <cmath>#include <limits>#include <string>#include <AMReX_GpuQualifiers.H>#include <AMReX_Array4.H>#include <AMReX_Box.H>#include <AMReX_GpuLaunch.H>#include <AMReX_REAL.H>#include <ERF_CanopyTurbStruct.H>#include <ERF_IndexDefines.H>

Go to the source code of this file.
Namespaces | |
| canopy_turbulence | |
Functions | |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real | canopy_turbulence::limited_length (amrex::Real length, amrex::Real f_drag, amrex::Real alpha) |
| AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real | canopy_turbulence::tke_source (amrex::Real rho, amrex::Real rhok_old, amrex::Real f_drag, amrex::Real wind, amrex::Real beta_p, amrex::Real beta_d, amrex::Real dt) |
| AMREX_INLINE void | AddCanopyTKESources (const amrex::Box &bx, const amrex::Array4< amrex::Real > &cell_src, const amrex::Array4< const amrex::Real > &cell_data, const amrex::Array4< const amrex::Real > &cell_old, const amrex::Array4< const amrex::Real > &u, const amrex::Array4< const amrex::Real > &v, const amrex::Array4< const amrex::Real > &w, const amrex::Array4< const amrex::Real > &f_arr, const amrex::Array4< const amrex::Real > &t_blank_arr, const CanopyTurbulence &canopy, amrex::Real dt) |
| AMREX_INLINE void AddCanopyTKESources | ( | const amrex::Box & | bx, |
| const amrex::Array4< amrex::Real > & | cell_src, | ||
| const amrex::Array4< const amrex::Real > & | cell_data, | ||
| const amrex::Array4< const amrex::Real > & | cell_old, | ||
| const amrex::Array4< const amrex::Real > & | u, | ||
| const amrex::Array4< const amrex::Real > & | v, | ||
| const amrex::Array4< const amrex::Real > & | w, | ||
| const amrex::Array4< const amrex::Real > & | f_arr, | ||
| const amrex::Array4< const amrex::Real > & | t_blank_arr, | ||
| const CanopyTurbulence & | canopy, | ||
| amrex::Real | dt | ||
| ) |
Add the canopy TKE source to the RhoKE component of the staged cell source on one box. Called by make_sources inside its loop over the boxes, so it adds no pass over the level; cells outside the forest (f <= 0) return before the velocities are read. Fully immersed cells (terrain_blank = 1) get no source, where ERF_AdvanceDycore.cpp also zeroes the eddy diffusivities.
| [in] | bx | cell-centred box to fill |
| [in,out] | cell_src | staged source terms for the conserved state |
| [in] | cell_data | conserved state of the stage (Rho_comp is read) |
| [in] | cell_old | conserved state at the start of the step (RhoKE_comp is read) |
| [in] | u | x-face velocity |
| [in] | v | y-face velocity |
| [in] | w | z-face velocity |
| [in] | f_arr | cell-centred forest drag field f = C_d LAD |
| [in] | t_blank_arr | immersed-forcing blanking, or an empty Array4 without immersed forcing |
| [in] | canopy | canopy turbulence inputs |
| [in] | dt | time step of the stage the source enters |
Referenced by make_sources().

