ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_AdvanceFitch.cpp File Reference
#include <ERF_Fitch.H>
#include <ERF_IndexDefines.H>
#include <cmath>
#include <ERF_NumericalConstants.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 
)
14 {
15 
16  Real d = std::min(std::fabs(z - hub_height), rotor_rad);
17  Real theta = std::acos(d/rotor_rad);
18  Real A_s = rotor_rad*rotor_rad*theta - d*std::pow(std::max(rotor_rad*rotor_rad - d*d,Real(0.)), Real(0.5));
19  Real A = PI*rotor_rad*rotor_rad/two - A_s;
20 
21  return A;
22 }
constexpr amrex::Real two
Definition: ERF_NumericalConstants.H:31
constexpr amrex::Real PI
Definition: ERF_NumericalConstants.H:39
amrex::Real Real
Definition: ERF_ShocInterface.H:19
@ theta
Definition: ERF_SLM.H:19
constexpr int A
Definition: ERF_TwoStreamColumn.H:603

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

Referenced by Fitch::source_terms_cellcentered().

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