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 amrex::Real &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::Real &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_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::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
13 {}

◆ ~NullWindFarm()

virtual NullWindFarm::~NullWindFarm ( )
virtualdefault

Member Function Documentation

◆ advance()

virtual void NullWindFarm::advance ( const amrex::Geometry &  a_geom,
const amrex::Real &  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::Real &  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
144 {
145 
146  // Plane is (x-x0)*nx + (y-y0)*ny = 0. And the planes to intersect are
147  // x = x1, x = x2, y = y1, y = y2. The intersections are
148  // (xval1,y1), (xval2,y2), (x1,yval1) and (x2,yval2)
149 
150  amrex::Real xval1 = x0 - (y1-y0)*ny/(nx+1e-10);
151  amrex::Real xval2 = x0 - (y2-y0)*ny/(nx+1e-10);
152 
153  amrex::Real yval1 = y0 - (x1-x0)*nx/(ny+1e-10);
154  amrex::Real yval2 = y0 - (x2-x0)*nx/(ny+1e-10);
155 
156  if( xval1 >=x1 and xval1 <=x2 ) {
157  if(std::pow((xval1-x0)*(xval1-x0) + (y1-y0)*(y1-y0) + (z-d_hub_height)*(z-d_hub_height),0.5) < d_rotor_rad ) {
158  return true;
159  }
160  }
161  if( xval2 >=x1 and xval2 <=x2 ) {
162  if(std::pow((xval2-x0)*(xval2-x0) + (y2-y0)*(y2-y0) + (z-d_hub_height)*(z-d_hub_height),0.5) < d_rotor_rad ) {
163  return true;
164  }
165  }
166  if (yval1 >=y1 and yval1 <=y2) {
167  if(std::pow((x1-x0)*(x1-x0) + (yval1-y0)*(yval1-y0) + (z-d_hub_height)*(z-d_hub_height),0.5) < d_rotor_rad ) {
168  return true;
169  }
170  }
171  if (yval2 >=y1 and yval2 <=y2) {
172  if(std::pow((x2-x0)*(x2-x0) + (yval2-y0)*(yval2-y0) + (z-d_hub_height)*(z-d_hub_height),0.5) < d_rotor_rad ) {
173  return true;
174  }
175  }
176 
177  return false;
178 }

◆ 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
120  {
121  bld_airfoil_aoa = m_bld_airfoil_aoa;
122  bld_airfoil_Cl = m_bld_airfoil_Cl;
123  bld_airfoil_Cd = m_bld_airfoil_Cd;
124  }
amrex::Vector< amrex::Vector< amrex::Real > > m_bld_airfoil_aoa
Definition: ERF_NullWindFarm.H:187
amrex::Vector< amrex::Vector< amrex::Real > > m_bld_airfoil_Cd
Definition: ERF_NullWindFarm.H:187
amrex::Vector< amrex::Vector< amrex::Real > > m_bld_airfoil_Cl
Definition: ERF_NullWindFarm.H:187

◆ 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
111  {
112  bld_rad_loc = m_bld_rad_loc;
113  bld_twist = m_bld_twist;
114  bld_chord = m_bld_chord;
115  }
amrex::Vector< amrex::Real > m_bld_rad_loc
Definition: ERF_NullWindFarm.H:186
amrex::Vector< amrex::Real > m_bld_twist
Definition: ERF_NullWindFarm.H:186
amrex::Vector< amrex::Real > m_bld_chord
Definition: ERF_NullWindFarm.H:186

◆ get_turb_disk_angle()

void NullWindFarm::get_turb_disk_angle ( amrex::Real &  turb_disk_angle)
inline
104  {
105  turb_disk_angle = m_turb_disk_angle;
106  }
amrex::Real m_turb_disk_angle
Definition: ERF_NullWindFarm.H:183

◆ get_turb_loc()

void NullWindFarm::get_turb_loc ( amrex::Vector< amrex::Real > &  xloc,
amrex::Vector< amrex::Real > &  yloc 
)
inline
98  {
99  xloc = m_xloc;
100  yloc = m_yloc;
101  }
amrex::Vector< amrex::Real > m_yloc
Definition: ERF_NullWindFarm.H:182
amrex::Vector< amrex::Real > m_xloc
Definition: ERF_NullWindFarm.H:182

◆ 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
87  {
88  rotor_rad = m_rotor_rad;
89  hub_height = m_hub_height;
90  thrust_coeff_standing = m_thrust_coeff_standing;
91  wind_speed = m_wind_speed;
92  thrust_coeff = m_thrust_coeff;
93  power = m_power;
94  }
amrex::Real m_rotor_rad
Definition: ERF_NullWindFarm.H:184
amrex::Real m_thrust_coeff_standing
Definition: ERF_NullWindFarm.H:184
amrex::Vector< amrex::Real > m_power
Definition: ERF_NullWindFarm.H:185
amrex::Vector< amrex::Real > m_thrust_coeff
Definition: ERF_NullWindFarm.H:185
amrex::Vector< amrex::Real > m_wind_speed
Definition: ERF_NullWindFarm.H:185
amrex::Real m_hub_height
Definition: ERF_NullWindFarm.H:184

◆ 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
131  {
132  velocity = m_velocity;
133  C_P = m_C_P;
134  C_T = m_C_T;
135  rotor_RPM = m_rotor_RPM;
136  blade_pitch = m_blade_pitch;
137  }
amrex::Vector< amrex::Real > m_C_P
Definition: ERF_NullWindFarm.H:188
amrex::Vector< amrex::Real > m_C_T
Definition: ERF_NullWindFarm.H:188
amrex::Vector< amrex::Real > m_blade_pitch
Definition: ERF_NullWindFarm.H:188
amrex::Vector< amrex::Real > m_rotor_RPM
Definition: ERF_NullWindFarm.H:188
amrex::Vector< amrex::Real > m_velocity
Definition: ERF_NullWindFarm.H:188

◆ 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.

65  {
66  m_bld_airfoil_aoa = bld_airfoil_aoa;
67  m_bld_airfoil_Cl = bld_airfoil_Cl;
68  m_bld_airfoil_Cd = bld_airfoil_Cd;
69  }

◆ 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.

56  {
57  m_bld_rad_loc = bld_rad_loc;
58  m_bld_twist = bld_twist;
59  m_bld_chord = bld_chord;
60  }

◆ set_turb_disk_angle()

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

Reimplemented in WindFarm.

49  {
50  m_turb_disk_angle = turb_disk_angle;
51  }

◆ 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.

43  {
44  m_xloc = xloc;
45  m_yloc = yloc;
46  }

◆ 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.

32  {
33  m_rotor_rad = rotor_rad;
34  m_hub_height = hub_height;
35  m_thrust_coeff_standing = thrust_coeff_standing;
36  m_wind_speed = wind_speed;
37  m_thrust_coeff = thrust_coeff;
38  m_power = power;
39  }

◆ 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.

76  {
77  m_velocity = velocity;
78  m_C_P = C_P;
79  m_C_T = C_T;
80  m_rotor_RPM = rotor_RPM;
81  m_blade_pitch = blade_pitch;
82  }

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().


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