ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_NullWindFarm.H File Reference
#include <ERF_DataStruct.H>
#include <AMReX_Geometry.H>
#include <AMReX_MultiFab.H>
#include <AMReX_Gpu.H>
Include dependency graph for ERF_NullWindFarm.H:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  NullWindFarm
 

Functions

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real windfarm_face_height_above_ground (const amrex::Array4< const amrex::Real > &zp, int i, int j, int kf, int klo, amrex::Real dz) noexcept
 

Function Documentation

◆ windfarm_face_height_above_ground()

AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real windfarm_face_height_above_ground ( const amrex::Array4< const amrex::Real > &  zp,
int  i,
int  j,
int  kf,
int  klo,
amrex::Real  dz 
)
noexcept

Height above the ground of the horizontal face kf at the center of column (i,j). With z_phys_nd (zp) it is the mean of the four nodes of the face minus that of the bottom face klo; without it, the uniform spacing dz above the domain bottom. Wind farm hub heights are measured from the ground, as in WindFarm::fill_SMark_multifab*.

18 {
19  if (zp) {
20  auto zface = [&] (int k) {
21  return amrex::Real(0.25) * (zp(i,j,k) + zp(i+1,j,k) + zp(i,j+1,k) + zp(i+1,j+1,k));
22  };
23  return zface(kf) - zface(klo);
24  }
25  return (kf - klo) * dz;
26 }
@ zface
Definition: ERF_EBStruct.H:29
const int klo
Definition: ERF_InitCustomPert_KE.H:9
@ dz
Definition: ERF_AdvanceWDM6.cpp:273

Referenced by EWP::source_terms_cellcentered(), and Fitch::source_terms_cellcentered().

Here is the caller graph for this function: