223 Real rpm =
interpolate_1d(velocity, rotor_RPM, avg_vel, n_spec_extra);
224 Real pitch =
interpolate_1d(velocity, blade_pitch, avg_vel, n_spec_extra);
226 Real Omega = rpm/60.0*2.0*
PI;
233 Real twist =
interpolate_1d(bld_rad_loc, bld_twist, rad, n_bld_sections);
234 Real c =
interpolate_1d(bld_rad_loc, bld_chord, rad, n_bld_sections);
238 Real s = 0.5*c*B/(
PI*rad);
240 Real at, an, V1, Vt, Vr, psi, L, D, Cn, Ct;
241 Real ftip, fhub,
F, Cl, Cd, at_new, an_new;
246 bool is_converged =
false;
248 for(
int i=0;i<100;i++) {
250 Vt = Omega*(1.0+at)*rad;
251 Vr = std::pow(V1*V1+Vt*Vt,0.5);
253 psi = std::atan2(V1,Vt);
255 Real aoa = psi*180.0/
PI - twist + pitch;
257 Cl =
interpolate_1d(bld_airfoil_aoa, bld_airfoil_Cl, aoa, n_pts_airfoil);
258 Cd =
interpolate_1d(bld_airfoil_aoa, bld_airfoil_Cd, aoa, n_pts_airfoil);
265 Cn = Cl*std::cos(psi) + Cd*std::sin(psi);
266 Ct = Cl*std::sin(psi) - Cd*std::cos(psi);
268 ftip = B*(rtip-rad)/(2.0*rad*std::sin(psi)+1e-10);
269 fhub = B*(rad-rhub)/(2.0*rad*std::sin(psi)+1e-10);
271 AMREX_ALWAYS_ASSERT(std::fabs(std::exp(-fhub))<=1.0);
272 AMREX_ALWAYS_ASSERT(std::fabs(std::exp(-ftip))<=1.0);
274 F = 2.0/
PI*(std::acos(std::exp(-ftip)) + std::acos(std::exp(-fhub)) );
276 at_new = 1.0/ ( 4.0*
F*std::sin(psi)*std::cos(psi)/(s*Ct+1e-10) - 1.0 );
277 an_new = 1.0/ ( 1.0 + 4.0*
F*std::pow(std::sin(psi),2)/(s*Cn + 1e-10) );
278 at_new = std::max(0.0, at_new);
280 if(std::fabs(at_new-at) < 1e-5 and std::fabs(an_new-an) < 1e-5) {
293 Abort(
"The iteration procedure for the generalized actuator disk did not converge. Exiting...");
298 L = 0.5*
rho*Vr*Vr*c*Cl;
299 D = 0.5*
rho*Vr*Vr*c*Cd;
301 Real Fn = L*std::cos(psi) + D*std::sin(psi);
302 Real Ft = L*std::sin(psi) - D*std::cos(psi);
306 std::array<Real, 2> Fn_and_Ft;
constexpr amrex::Real PI
Definition: ERF_Constants.H:6
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE amrex::Real interpolate_1d(const amrex::Real *alpha, const amrex::Real *beta, const amrex::Real alpha_interp, const int alpha_size)
Definition: ERF_Interpolation_1D.H:12
@ rho
Definition: ERF_Kessler.H:30