ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_AdvanceFitch.cpp File Reference
#include <ERF_Fitch.H>
#include <ERF_IndexDefines.H>
#include <ERF_Constants.H>
#include <ERF_Interpolation_1D.H>
Include dependency graph for ERF_AdvanceFitch.cpp:

Functions

AMREX_FORCE_INLINE AMREX_GPU_DEVICE Real compute_A (const Real z, const Real hub_height, const Real rotor_rad)
 
AMREX_FORCE_INLINE AMREX_GPU_DEVICE Real compute_Aijk (const Real z_k, const Real z_kp1, const Real hub_height, const Real rotor_rad)
 

Function Documentation

◆ compute_A()

AMREX_FORCE_INLINE AMREX_GPU_DEVICE Real compute_A ( const Real  z,
const Real  hub_height,
const Real  rotor_rad 
)
13 {
14 
15  Real d = std::min(std::fabs(z - hub_height), rotor_rad);
16  Real theta = std::acos(d/rotor_rad);
17  Real A_s = rotor_rad*rotor_rad*theta - d*std::pow(std::max(rotor_rad*rotor_rad - d*d,0.0), 0.5);
18  Real A = PI*rotor_rad*rotor_rad/2.0 - A_s;
19 
20  return A;
21 }
constexpr amrex::Real PI
Definition: ERF_Constants.H:6
@ theta
Definition: ERF_MM5.H:20

Referenced by compute_Aijk().

Here is the caller graph for this function:

◆ compute_Aijk()

AMREX_FORCE_INLINE AMREX_GPU_DEVICE Real compute_Aijk ( const Real  z_k,
const Real  z_kp1,
const Real  hub_height,
const Real  rotor_rad 
)
29 {
30 
31  Real A_k = compute_A(z_k, hub_height, rotor_rad);
32  Real A_kp1 = compute_A(z_kp1, hub_height, rotor_rad);
33 
34  Real check = (z_k - hub_height)*(z_kp1 - hub_height);
35  Real A_ijk;
36  if(check > 0){
37  A_ijk = std::fabs(A_k -A_kp1);
38  }
39  else{
40  A_ijk = A_k + A_kp1;
41  }
42 
43  return A_ijk;
44 }
AMREX_FORCE_INLINE AMREX_GPU_DEVICE Real compute_A(const Real z, const Real hub_height, const Real rotor_rad)
Definition: ERF_AdvanceFitch.cpp:10

Referenced by Fitch::source_terms_cellcentered().

Here is the call graph for this function:
Here is the caller graph for this function: