ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_GeneralAD.H
Go to the documentation of this file.
1 #ifndef ERF_GENERALAD_H
2 #define ERF_GENERALAD_H
3 
4 #include <AMReX_Geometry.H>
5 #include <AMReX_MultiFab.H>
6 #include "ERF_NullWindFarm.H"
7 
8 class GeneralAD : public NullWindFarm {
9 
10 public:
11 
12  GeneralAD () {}
13 
14  virtual ~GeneralAD () = default;
15 
16  void advance (const amrex::Geometry& geom,
17  const amrex::Real& dt_advance,
18  amrex::MultiFab& cons_in,
19  amrex::MultiFab& mf_vars_windfarm,
20  amrex::MultiFab& U_old,
21  amrex::MultiFab& V_old,
22  amrex::MultiFab& W_old,
23  const amrex::MultiFab& mf_Nturb,
24  const amrex::MultiFab& mf_SMark,
25  const amrex::Real& time) override;
26 
27  void compute_freestream_velocity (const amrex::MultiFab& cons_in,
28  const amrex::MultiFab& U_old,
29  const amrex::MultiFab& V_old,
30  const amrex::MultiFab& mf_SMark);
31 
32  void source_terms_cellcentered (const amrex::Geometry& geom,
33  const amrex::MultiFab& cons_in,
34  const amrex::MultiFab& mf_Smark,
35  amrex::MultiFab& mf_vars_generalAD);
36 
37  void update (const amrex::Real& dt_advance,
38  amrex::MultiFab& cons_in,
39  amrex::MultiFab& U_old,
40  amrex::MultiFab& V_old,
41  amrex::MultiFab& W_old,
42  const amrex::MultiFab& mf_vars);
43 
44  void compute_power_output (const amrex::Real& time);
45 
46 protected:
47  amrex::Vector<amrex::Real> xloc, yloc;
48  amrex::Real turb_disk_angle;
50  amrex::Vector<amrex::Real> wind_speed, thrust_coeff, power;
51  amrex::Vector<amrex::Real> freestream_velocity, freestream_phi, disk_cell_count;
52  amrex::Vector<amrex::Real> bld_rad_loc, bld_twist, bld_chord;
53  amrex::Vector<amrex::Vector<amrex::Real>> bld_airfoil_aoa, bld_airfoil_Cl, bld_airfoil_Cd;
54  amrex::Vector<amrex::Real> velocity, C_P, C_T, rotor_RPM, blade_pitch;
55 };
56 
57 #endif
58 
Definition: ERF_GeneralAD.H:8
amrex::Vector< amrex::Real > wind_speed
Definition: ERF_GeneralAD.H:50
amrex::Vector< amrex::Vector< amrex::Real > > bld_airfoil_Cl
Definition: ERF_GeneralAD.H:53
amrex::Vector< amrex::Real > power
Definition: ERF_GeneralAD.H:50
amrex::Vector< amrex::Real > freestream_velocity
Definition: ERF_GeneralAD.H:51
void update(const amrex::Real &dt_advance, amrex::MultiFab &cons_in, amrex::MultiFab &U_old, amrex::MultiFab &V_old, amrex::MultiFab &W_old, const amrex::MultiFab &mf_vars)
Definition: ERF_AdvanceGeneralAD.cpp:60
amrex::Vector< amrex::Real > xloc
Definition: ERF_GeneralAD.H:47
amrex::Vector< amrex::Real > thrust_coeff
Definition: ERF_GeneralAD.H:50
amrex::Vector< amrex::Real > disk_cell_count
Definition: ERF_GeneralAD.H:51
void source_terms_cellcentered(const amrex::Geometry &geom, const amrex::MultiFab &cons_in, const amrex::MultiFab &mf_Smark, amrex::MultiFab &mf_vars_generalAD)
Definition: ERF_AdvanceGeneralAD.cpp:317
amrex::Real rotor_rad
Definition: ERF_GeneralAD.H:49
amrex::Vector< amrex::Real > velocity
Definition: ERF_GeneralAD.H:54
amrex::Vector< amrex::Real > blade_pitch
Definition: ERF_GeneralAD.H:54
amrex::Vector< amrex::Real > C_P
Definition: ERF_GeneralAD.H:54
amrex::Vector< amrex::Real > bld_twist
Definition: ERF_GeneralAD.H:52
GeneralAD()
Definition: ERF_GeneralAD.H:12
void advance(const amrex::Geometry &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) override
Definition: ERF_AdvanceGeneralAD.cpp:9
void compute_freestream_velocity(const amrex::MultiFab &cons_in, const amrex::MultiFab &U_old, const amrex::MultiFab &V_old, const amrex::MultiFab &mf_SMark)
Definition: ERF_AdvanceGeneralAD.cpp:96
amrex::Vector< amrex::Real > bld_chord
Definition: ERF_GeneralAD.H:52
amrex::Vector< amrex::Real > bld_rad_loc
Definition: ERF_GeneralAD.H:52
virtual ~GeneralAD()=default
amrex::Real hub_height
Definition: ERF_GeneralAD.H:49
amrex::Vector< amrex::Real > freestream_phi
Definition: ERF_GeneralAD.H:51
amrex::Real turb_disk_angle
Definition: ERF_GeneralAD.H:48
amrex::Vector< amrex::Real > yloc
Definition: ERF_GeneralAD.H:47
amrex::Real thrust_coeff_standing
Definition: ERF_GeneralAD.H:49
amrex::Vector< amrex::Real > C_T
Definition: ERF_GeneralAD.H:54
amrex::Vector< amrex::Vector< amrex::Real > > bld_airfoil_aoa
Definition: ERF_GeneralAD.H:53
amrex::Real nominal_power
Definition: ERF_GeneralAD.H:49
amrex::Vector< amrex::Real > rotor_RPM
Definition: ERF_GeneralAD.H:54
void compute_power_output(const amrex::Real &time)
Definition: ERF_AdvanceGeneralAD.cpp:31
amrex::Vector< amrex::Vector< amrex::Real > > bld_airfoil_Cd
Definition: ERF_GeneralAD.H:53
Definition: ERF_NullWindFarm.H:9