ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
NullWindFarm Class Referenceabstract

#include <ERF_NullWindFarm.H>

Inheritance diagram for NullWindFarm:
Collaboration diagram for NullWindFarm:

Public Member Functions

 NullWindFarm ()
 
virtual ~NullWindFarm ()=default
 
virtual void advance (const amrex::Geometry &a_geom, const double &dt_advance, amrex::MultiFab &cons_in, amrex::MultiFab &mf_vars_windfarm, amrex::MultiFab &U_old, amrex::MultiFab &V_old, amrex::MultiFab &W_old, const amrex::MultiFab &mf_Nturb, const amrex::MultiFab &mf_SMark, const amrex::MultiFab *z_phys_nd, const amrex::MultiFab *z_phys_cc, const double &time)=0
 
virtual void set_turb_spec (const amrex::Real &rotor_rad, const amrex::Real &hub_height, const amrex::Real &thrust_coeff_standing, const amrex::Vector< amrex::Real > &wind_speed, const amrex::Vector< amrex::Real > &thrust_coeff, const amrex::Vector< amrex::Real > &power)
 
virtual void set_turb_loc (const amrex::Vector< amrex::Real > &xloc, const amrex::Vector< amrex::Real > &yloc)
 
virtual void set_turb_zloc (const amrex::Vector< amrex::Real > &zloc)
 Ground elevation under each turbine (the hub is hub_height above it) More...
 
virtual void set_turb_disk_angle (const amrex::Real &turb_disk_angle)
 
virtual void set_blade_spec (const amrex::Vector< amrex::Real > &bld_rad_loc, const amrex::Vector< amrex::Real > &bld_twist, const amrex::Vector< amrex::Real > &bld_chord)
 
virtual void set_blade_airfoil_spec (const amrex::Vector< amrex::Vector< amrex::Real >> &bld_airfoil_aoa, const amrex::Vector< amrex::Vector< amrex::Real >> &bld_airfoil_Cl, const amrex::Vector< amrex::Vector< amrex::Real >> &bld_airfoil_Cd)
 
virtual void set_turb_spec_extra (const amrex::Vector< amrex::Real > &velocity, const amrex::Vector< amrex::Real > &C_P, const amrex::Vector< amrex::Real > &C_T, const amrex::Vector< amrex::Real > &rotor_RPM, const amrex::Vector< amrex::Real > &blade_pitch)
 
void get_turb_spec (amrex::Real &rotor_rad, amrex::Real &hub_height, amrex::Real &thrust_coeff_standing, amrex::Vector< amrex::Real > &wind_speed, amrex::Vector< amrex::Real > &thrust_coeff, amrex::Vector< amrex::Real > &power)
 
void get_turb_loc (amrex::Vector< amrex::Real > &xloc, amrex::Vector< amrex::Real > &yloc)
 
void get_turb_disk_angle (amrex::Real &turb_disk_angle)
 
void get_blade_spec (amrex::Vector< amrex::Real > &bld_rad_loc, amrex::Vector< amrex::Real > &bld_twist, amrex::Vector< amrex::Real > &bld_chord)
 
void get_blade_airfoil_spec (amrex::Vector< amrex::Vector< amrex::Real >> &bld_airfoil_aoa, amrex::Vector< amrex::Vector< amrex::Real >> &bld_airfoil_Cl, amrex::Vector< amrex::Vector< amrex::Real >> &bld_airfoil_Cd)
 
void get_turb_spec_extra (amrex::Vector< amrex::Real > &velocity, amrex::Vector< amrex::Real > &C_P, amrex::Vector< amrex::Real > &C_T, amrex::Vector< amrex::Real > &rotor_RPM, amrex::Vector< amrex::Real > &blade_pitch)
 

Static Public Member Functions

static AMREX_GPU_DEVICE bool find_if_marked (amrex::Real x1, amrex::Real x2, amrex::Real y1, amrex::Real y2, amrex::Real x0, amrex::Real y0, amrex::Real nx, amrex::Real ny, amrex::Real d_hub_height, amrex::Real d_rotor_rad, amrex::Real z)
 

Protected Attributes

amrex::Vector< amrex::Real > m_xloc
 
amrex::Vector< amrex::Real > m_yloc
 
amrex::Vector< amrex::Real > m_zloc
 
amrex::Real m_turb_disk_angle
 
amrex::Real m_hub_height
 
amrex::Real m_rotor_rad
 
amrex::Real m_thrust_coeff_standing
 
amrex::Real m_nominal_power
 
amrex::Vector< amrex::Real > m_wind_speed
 
amrex::Vector< amrex::Real > m_thrust_coeff
 
amrex::Vector< amrex::Real > m_power
 
amrex::Vector< amrex::Real > m_bld_rad_loc
 
amrex::Vector< amrex::Real > m_bld_twist
 
amrex::Vector< amrex::Real > m_bld_chord
 
amrex::Vector< amrex::Vector< amrex::Real > > m_bld_airfoil_aoa
 
amrex::Vector< amrex::Vector< amrex::Real > > m_bld_airfoil_Cl
 
amrex::Vector< amrex::Vector< amrex::Real > > m_bld_airfoil_Cd
 
amrex::Vector< amrex::Real > m_velocity
 
amrex::Vector< amrex::Real > m_C_P
 
amrex::Vector< amrex::Real > m_C_T
 
amrex::Vector< amrex::Real > m_rotor_RPM
 
amrex::Vector< amrex::Real > m_blade_pitch
 

Constructor & Destructor Documentation

◆ NullWindFarm()

NullWindFarm::NullWindFarm ( )
inline
32 {}

◆ ~NullWindFarm()

virtual NullWindFarm::~NullWindFarm ( )
virtualdefault

Member Function Documentation

◆ advance()

virtual void NullWindFarm::advance ( const amrex::Geometry &  a_geom,
const double &  dt_advance,
amrex::MultiFab &  cons_in,
amrex::MultiFab &  mf_vars_windfarm,
amrex::MultiFab &  U_old,
amrex::MultiFab &  V_old,
amrex::MultiFab &  W_old,
const amrex::MultiFab &  mf_Nturb,
const amrex::MultiFab &  mf_SMark,
const amrex::MultiFab *  z_phys_nd,
const amrex::MultiFab *  z_phys_cc,
const double &  time 
)
pure virtual

Implemented in SimpleAD, GeneralAD, Fitch, EWP, and WindFarm.

◆ find_if_marked()

static AMREX_GPU_DEVICE bool NullWindFarm::find_if_marked ( amrex::Real  x1,
amrex::Real  x2,
amrex::Real  y1,
amrex::Real  y2,
amrex::Real  x0,
amrex::Real  y0,
amrex::Real  nx,
amrex::Real  ny,
amrex::Real  d_hub_height,
amrex::Real  d_rotor_rad,
amrex::Real  z 
)
inlinestatic
171 {
172 
173  // Plane is (x-x0)*nx + (y-y0)*ny = zero And the planes to intersect are
174  // x = x1, x = x2, y = y1, y = y2. The intersections are
175  // (xval1,y1), (xval2,y2), (x1,yval1) and (x2,yval2)
176 
177  amrex::Real xval1 = x0 - (y1-y0)*ny/(nx+amrex::Real(1e-10));
178  amrex::Real xval2 = x0 - (y2-y0)*ny/(nx+amrex::Real(1e-10));
179 
180  amrex::Real yval1 = y0 - (x1-x0)*nx/(ny+amrex::Real(1e-10));
181  amrex::Real yval2 = y0 - (x2-x0)*nx/(ny+amrex::Real(1e-10));
182 
183  if( xval1 >=x1 and xval1 <=x2 ) {
184  if(std::pow((xval1-x0)*(xval1-x0) + (y1-y0)*(y1-y0) + (z-d_hub_height)*(z-d_hub_height),myhalf) < d_rotor_rad ) {
185  return true;
186  }
187  }
188  if( xval2 >=x1 and xval2 <=x2 ) {
189  if(std::pow((xval2-x0)*(xval2-x0) + (y2-y0)*(y2-y0) + (z-d_hub_height)*(z-d_hub_height),myhalf) < d_rotor_rad ) {
190  return true;
191  }
192  }
193  if (yval1 >=y1 and yval1 <=y2) {
194  if(std::pow((x1-x0)*(x1-x0) + (yval1-y0)*(yval1-y0) + (z-d_hub_height)*(z-d_hub_height),myhalf) < d_rotor_rad ) {
195  return true;
196  }
197  }
198  if (yval2 >=y1 and yval2 <=y2) {
199  if(std::pow((x2-x0)*(x2-x0) + (yval2-y0)*(yval2-y0) + (z-d_hub_height)*(z-d_hub_height),myhalf) < d_rotor_rad ) {
200  return true;
201  }
202  }
203 
204  return false;
205 }
const int nx
Definition: ERF_InitCustomPertVels_CloudChamber.H:14
const int ny
Definition: ERF_InitCustomPertVels_CloudChamber.H:15
constexpr amrex::Real myhalf
Definition: ERF_NumericalConstants.H:41

◆ get_blade_airfoil_spec()

void NullWindFarm::get_blade_airfoil_spec ( amrex::Vector< amrex::Vector< amrex::Real >> &  bld_airfoil_aoa,
amrex::Vector< amrex::Vector< amrex::Real >> &  bld_airfoil_Cl,
amrex::Vector< amrex::Vector< amrex::Real >> &  bld_airfoil_Cd 
)
inline
147  {
148  bld_airfoil_aoa = m_bld_airfoil_aoa;
149  bld_airfoil_Cl = m_bld_airfoil_Cl;
150  bld_airfoil_Cd = m_bld_airfoil_Cd;
151  }
amrex::Vector< amrex::Vector< amrex::Real > > m_bld_airfoil_aoa
Definition: ERF_NullWindFarm.H:214
amrex::Vector< amrex::Vector< amrex::Real > > m_bld_airfoil_Cd
Definition: ERF_NullWindFarm.H:214
amrex::Vector< amrex::Vector< amrex::Real > > m_bld_airfoil_Cl
Definition: ERF_NullWindFarm.H:214

◆ get_blade_spec()

void NullWindFarm::get_blade_spec ( amrex::Vector< amrex::Real > &  bld_rad_loc,
amrex::Vector< amrex::Real > &  bld_twist,
amrex::Vector< amrex::Real > &  bld_chord 
)
inline
138  {
139  bld_rad_loc = m_bld_rad_loc;
140  bld_twist = m_bld_twist;
141  bld_chord = m_bld_chord;
142  }
amrex::Vector< amrex::Real > m_bld_rad_loc
Definition: ERF_NullWindFarm.H:213
amrex::Vector< amrex::Real > m_bld_twist
Definition: ERF_NullWindFarm.H:213
amrex::Vector< amrex::Real > m_bld_chord
Definition: ERF_NullWindFarm.H:213

◆ get_turb_disk_angle()

void NullWindFarm::get_turb_disk_angle ( amrex::Real &  turb_disk_angle)
inline
131  {
132  turb_disk_angle = m_turb_disk_angle;
133  }
amrex::Real m_turb_disk_angle
Definition: ERF_NullWindFarm.H:210

◆ get_turb_loc()

void NullWindFarm::get_turb_loc ( amrex::Vector< amrex::Real > &  xloc,
amrex::Vector< amrex::Real > &  yloc 
)
inline
125  {
126  xloc = m_xloc;
127  yloc = m_yloc;
128  }
amrex::Vector< amrex::Real > m_yloc
Definition: ERF_NullWindFarm.H:209
amrex::Vector< amrex::Real > m_xloc
Definition: ERF_NullWindFarm.H:209

◆ get_turb_spec()

void NullWindFarm::get_turb_spec ( amrex::Real &  rotor_rad,
amrex::Real &  hub_height,
amrex::Real &  thrust_coeff_standing,
amrex::Vector< amrex::Real > &  wind_speed,
amrex::Vector< amrex::Real > &  thrust_coeff,
amrex::Vector< amrex::Real > &  power 
)
inline
114  {
115  rotor_rad = m_rotor_rad;
116  hub_height = m_hub_height;
117  thrust_coeff_standing = m_thrust_coeff_standing;
118  wind_speed = m_wind_speed;
119  thrust_coeff = m_thrust_coeff;
120  power = m_power;
121  }
amrex::Real m_rotor_rad
Definition: ERF_NullWindFarm.H:211
amrex::Real m_thrust_coeff_standing
Definition: ERF_NullWindFarm.H:211
amrex::Vector< amrex::Real > m_power
Definition: ERF_NullWindFarm.H:212
amrex::Vector< amrex::Real > m_thrust_coeff
Definition: ERF_NullWindFarm.H:212
amrex::Vector< amrex::Real > m_wind_speed
Definition: ERF_NullWindFarm.H:212
amrex::Real m_hub_height
Definition: ERF_NullWindFarm.H:211

◆ get_turb_spec_extra()

void NullWindFarm::get_turb_spec_extra ( amrex::Vector< amrex::Real > &  velocity,
amrex::Vector< amrex::Real > &  C_P,
amrex::Vector< amrex::Real > &  C_T,
amrex::Vector< amrex::Real > &  rotor_RPM,
amrex::Vector< amrex::Real > &  blade_pitch 
)
inline
158  {
159  velocity = m_velocity;
160  C_P = m_C_P;
161  C_T = m_C_T;
162  rotor_RPM = m_rotor_RPM;
163  blade_pitch = m_blade_pitch;
164  }
amrex::Vector< amrex::Real > m_C_P
Definition: ERF_NullWindFarm.H:215
amrex::Vector< amrex::Real > m_C_T
Definition: ERF_NullWindFarm.H:215
amrex::Vector< amrex::Real > m_blade_pitch
Definition: ERF_NullWindFarm.H:215
amrex::Vector< amrex::Real > m_rotor_RPM
Definition: ERF_NullWindFarm.H:215
amrex::Vector< amrex::Real > m_velocity
Definition: ERF_NullWindFarm.H:215

◆ set_blade_airfoil_spec()

virtual void NullWindFarm::set_blade_airfoil_spec ( const amrex::Vector< amrex::Vector< amrex::Real >> &  bld_airfoil_aoa,
const amrex::Vector< amrex::Vector< amrex::Real >> &  bld_airfoil_Cl,
const amrex::Vector< amrex::Vector< amrex::Real >> &  bld_airfoil_Cd 
)
inlinevirtual

Reimplemented in WindFarm.

92  {
93  m_bld_airfoil_aoa = bld_airfoil_aoa;
94  m_bld_airfoil_Cl = bld_airfoil_Cl;
95  m_bld_airfoil_Cd = bld_airfoil_Cd;
96  }

◆ set_blade_spec()

virtual void NullWindFarm::set_blade_spec ( const amrex::Vector< amrex::Real > &  bld_rad_loc,
const amrex::Vector< amrex::Real > &  bld_twist,
const amrex::Vector< amrex::Real > &  bld_chord 
)
inlinevirtual

Reimplemented in WindFarm.

83  {
84  m_bld_rad_loc = bld_rad_loc;
85  m_bld_twist = bld_twist;
86  m_bld_chord = bld_chord;
87  }

◆ set_turb_disk_angle()

virtual void NullWindFarm::set_turb_disk_angle ( const amrex::Real &  turb_disk_angle)
inlinevirtual

Reimplemented in WindFarm.

76  {
77  m_turb_disk_angle = turb_disk_angle;
78  }

◆ set_turb_loc()

virtual void NullWindFarm::set_turb_loc ( const amrex::Vector< amrex::Real > &  xloc,
const amrex::Vector< amrex::Real > &  yloc 
)
inlinevirtual

Reimplemented in WindFarm.

64  {
65  m_xloc = xloc;
66  m_yloc = yloc;
67  }

◆ set_turb_spec()

virtual void NullWindFarm::set_turb_spec ( const amrex::Real &  rotor_rad,
const amrex::Real &  hub_height,
const amrex::Real &  thrust_coeff_standing,
const amrex::Vector< amrex::Real > &  wind_speed,
const amrex::Vector< amrex::Real > &  thrust_coeff,
const amrex::Vector< amrex::Real > &  power 
)
inlinevirtual

Reimplemented in WindFarm.

53  {
54  m_rotor_rad = rotor_rad;
55  m_hub_height = hub_height;
56  m_thrust_coeff_standing = thrust_coeff_standing;
57  m_wind_speed = wind_speed;
58  m_thrust_coeff = thrust_coeff;
59  m_power = power;
60  }

◆ set_turb_spec_extra()

virtual void NullWindFarm::set_turb_spec_extra ( const amrex::Vector< amrex::Real > &  velocity,
const amrex::Vector< amrex::Real > &  C_P,
const amrex::Vector< amrex::Real > &  C_T,
const amrex::Vector< amrex::Real > &  rotor_RPM,
const amrex::Vector< amrex::Real > &  blade_pitch 
)
inlinevirtual

Reimplemented in WindFarm.

103  {
104  m_velocity = velocity;
105  m_C_P = C_P;
106  m_C_T = C_T;
107  m_rotor_RPM = rotor_RPM;
108  m_blade_pitch = blade_pitch;
109  }

◆ set_turb_zloc()

virtual void NullWindFarm::set_turb_zloc ( const amrex::Vector< amrex::Real > &  zloc)
inlinevirtual

Ground elevation under each turbine (the hub is hub_height above it)

Reimplemented in WindFarm.

71  {
72  m_zloc = zloc;
73  }
amrex::Vector< amrex::Real > m_zloc
Definition: ERF_NullWindFarm.H:209

Member Data Documentation

◆ m_blade_pitch

amrex::Vector<amrex::Real> NullWindFarm::m_blade_pitch
protected

◆ m_bld_airfoil_aoa

amrex::Vector<amrex::Vector<amrex::Real> > NullWindFarm::m_bld_airfoil_aoa
protected

◆ m_bld_airfoil_Cd

amrex::Vector<amrex::Vector<amrex::Real> > NullWindFarm::m_bld_airfoil_Cd
protected

◆ m_bld_airfoil_Cl

amrex::Vector<amrex::Vector<amrex::Real> > NullWindFarm::m_bld_airfoil_Cl
protected

◆ m_bld_chord

amrex::Vector<amrex::Real> NullWindFarm::m_bld_chord
protected

Referenced by get_blade_spec(), and set_blade_spec().

◆ m_bld_rad_loc

amrex::Vector<amrex::Real> NullWindFarm::m_bld_rad_loc
protected

Referenced by get_blade_spec(), and set_blade_spec().

◆ m_bld_twist

amrex::Vector<amrex::Real> NullWindFarm::m_bld_twist
protected

Referenced by get_blade_spec(), and set_blade_spec().

◆ m_C_P

amrex::Vector<amrex::Real> NullWindFarm::m_C_P
protected

◆ m_C_T

amrex::Vector<amrex::Real> NullWindFarm::m_C_T
protected

◆ m_hub_height

amrex::Real NullWindFarm::m_hub_height
protected

Referenced by get_turb_spec(), and set_turb_spec().

◆ m_nominal_power

amrex::Real NullWindFarm::m_nominal_power
protected

◆ m_power

amrex::Vector<amrex::Real> NullWindFarm::m_power
protected

Referenced by get_turb_spec(), and set_turb_spec().

◆ m_rotor_rad

amrex::Real NullWindFarm::m_rotor_rad
protected

Referenced by get_turb_spec(), and set_turb_spec().

◆ m_rotor_RPM

amrex::Vector<amrex::Real> NullWindFarm::m_rotor_RPM
protected

◆ m_thrust_coeff

amrex::Vector<amrex::Real> NullWindFarm::m_thrust_coeff
protected

Referenced by get_turb_spec(), and set_turb_spec().

◆ m_thrust_coeff_standing

amrex::Real NullWindFarm::m_thrust_coeff_standing
protected

Referenced by get_turb_spec(), and set_turb_spec().

◆ m_turb_disk_angle

amrex::Real NullWindFarm::m_turb_disk_angle
protected

◆ m_velocity

amrex::Vector<amrex::Real> NullWindFarm::m_velocity
protected

◆ m_wind_speed

amrex::Vector<amrex::Real> NullWindFarm::m_wind_speed
protected

Referenced by get_turb_spec(), and set_turb_spec().

◆ m_xloc

amrex::Vector<amrex::Real> NullWindFarm::m_xloc
protected

Referenced by get_turb_loc(), and set_turb_loc().

◆ m_yloc

amrex::Vector<amrex::Real> NullWindFarm::m_yloc
protected

Referenced by get_turb_loc(), and set_turb_loc().

◆ m_zloc

amrex::Vector<amrex::Real> NullWindFarm::m_zloc
protected

Referenced by set_turb_zloc().


The documentation for this class was generated from the following file: