|
ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
|
#include <AMReX.H>#include <AMReX_BCRec.H>#include "ERF_DataStruct.H"#include "ERF_IndexDefines.H"#include "ERF_NumericalConstants.H"#include "ERF_SurfaceLayer.H"#include "ERF_PBLModels.H"

Go to the source code of this file.
Functions | |
| template<typename PBLDerivativeDzInvFunctor > | |
| void | AddTurbKESources (const amrex::Box &bx, const amrex::Box &domain, const amrex::Array4< const amrex::Real > &u, const amrex::Array4< const amrex::Real > &v, const amrex::Array4< const amrex::Real > &cell_data, const amrex::Array4< const amrex::Real > &cell_prim, const amrex::Array4< amrex::Real > &cell_rhs, const amrex::Array4< const amrex::Real > &SmnSmn_a, const amrex::Array4< const amrex::Real > &hfx_z, const amrex::Array4< const amrex::Real > &qfx1_z, const amrex::Array4< const amrex::Real > &diss, const amrex::Array4< const amrex::Real > &tau13, const amrex::Array4< const amrex::Real > &tau23, const amrex::Array4< const amrex::Real > &mu_turb, const SolverChoice &solverChoice, const int level, const amrex::Array4< const amrex::Real > &tm_arr, const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > grav_gpu, const amrex::BCRec *bc_ptr, const bool use_SurfLayer, const amrex::Vector< std::unique_ptr< SurfaceLayer >> &SurfLayer, const PBLDerivativeDzInvFunctor &pbl_derivative_dz_inv) |
| void AddTurbKESources | ( | const amrex::Box & | bx, |
| const amrex::Box & | domain, | ||
| const amrex::Array4< const amrex::Real > & | u, | ||
| const amrex::Array4< const amrex::Real > & | v, | ||
| const amrex::Array4< const amrex::Real > & | cell_data, | ||
| const amrex::Array4< const amrex::Real > & | cell_prim, | ||
| const amrex::Array4< amrex::Real > & | cell_rhs, | ||
| const amrex::Array4< const amrex::Real > & | SmnSmn_a, | ||
| const amrex::Array4< const amrex::Real > & | hfx_z, | ||
| const amrex::Array4< const amrex::Real > & | qfx1_z, | ||
| const amrex::Array4< const amrex::Real > & | diss, | ||
| const amrex::Array4< const amrex::Real > & | tau13, | ||
| const amrex::Array4< const amrex::Real > & | tau23, | ||
| const amrex::Array4< const amrex::Real > & | mu_turb, | ||
| const SolverChoice & | solverChoice, | ||
| const int | level, | ||
| const amrex::Array4< const amrex::Real > & | tm_arr, | ||
| const amrex::GpuArray< amrex::Real, AMREX_SPACEDIM > | grav_gpu, | ||
| const amrex::BCRec * | bc_ptr, | ||
| const bool | use_SurfLayer, | ||
| const amrex::Vector< std::unique_ptr< SurfaceLayer >> & | SurfLayer, | ||
| const PBLDerivativeDzInvFunctor & | pbl_derivative_dz_inv | ||
| ) |
Add the production and dissipation sources of the subgrid TKE (Deardorff or k-eqn RANS) or of the MYNN QKE to the RhoKE RHS.
These sources consume the face fluxes written by the scalar diffusion of the same RK stage, so they must be called after every DiffusionSrcForState_* call of the stage has returned: the RhoTheta call in erf_slow_rhs_pre (hfx_z) and the RhoQ1 call in erf_slow_rhs_post (qfx1_z).
| [in] | bx | cell center box to loop over |
| [in] | domain | box of the whole domain |
| [in] | u | velocity in x-dir |
| [in] | v | velocity in y-dir |
| [in] | cell_data | conserved cell center vars |
| [in] | cell_prim | primitive cell center vars |
| [in,out] | cell_rhs | RHS for cell center vars |
| [in] | SmnSmn_a | strain rate magnitude |
| [in] | hfx_z | rho<w'theta'> on z-faces |
| [in] | qfx1_z | rho<w'qv'> on z-faces (may be null) |
| [in] | diss | dissipation of TKE |
| [in] | tau13 | rho<u'w'>; holds the surface-layer stress on the zlo face |
| [in] | tau23 | rho<v'w'>; holds the surface-layer stress on the zlo face |
| [in] | mu_turb | turbulent viscosity |
| [in] | solverChoice | container of solver and diffusion parameters |
| [in] | level | AMR level |
| [in] | tm_arr | theta mean array |
| [in] | grav_gpu | gravity vector |
| [in] | bc_ptr | container with boundary conditions |
| [in] | use_SurfLayer | whether surface-layer fluxes are applied in the diffusion |
| [in] | SurfLayer | surface layer objects, one per face |
| [in] | pbl_derivative_dz_inv | inverse vertical spacings for the mesh type |
Referenced by erf_slow_rhs_post().

