233 Real rpm =
interpolate_1d(velocity, rotor_RPM, avg_vel, n_spec_extra);
234 Real pitch =
interpolate_1d(velocity, blade_pitch, avg_vel, n_spec_extra);
236 Real Omega = rpm/Real(60.0)*
two*
PI;
237 Real
rho = Real(1.226);
241 Real rtip = Real(63.5);
243 Real twist =
interpolate_1d(bld_rad_loc, bld_twist, rad, n_bld_sections);
244 Real c =
interpolate_1d(bld_rad_loc, bld_chord, rad, n_bld_sections);
250 Real at, an, V1, Vt, Vr, psi, L, D, Cn, Ct;
251 Real ftip, fhub, F, Cl, Cd, at_new, an_new;
256 bool is_converged =
false;
258 for(
int i=0;i<100;i++) {
260 Vt = Omega*(
one+at)*rad;
261 Vr = std::pow(V1*V1+Vt*Vt,
myhalf);
263 psi = std::atan2(V1,Vt);
265 Real aoa = psi*Real(180.0)/
PI - twist + pitch;
267 Cl =
interpolate_1d(bld_airfoil_aoa, bld_airfoil_Cl, aoa, n_pts_airfoil);
268 Cd =
interpolate_1d(bld_airfoil_aoa, bld_airfoil_Cd, aoa, n_pts_airfoil);
275 Cn = Cl*std::cos(psi) + Cd*std::sin(psi);
276 Ct = Cl*std::sin(psi) - Cd*std::cos(psi);
278 ftip = B*(rtip-rad)/(
two*rad*std::sin(psi)+Real(1e-10));
279 fhub = B*(rad-rhub)/(
two*rad*std::sin(psi)+Real(1e-10));
284 F =
two/
PI*(std::acos(std::exp(-ftip)) + std::acos(std::exp(-fhub)) );
286 at_new =
one/ ( Real(4.0)*F*std::sin(psi)*std::cos(psi)/(s*Ct+Real(1e-10)) -
one );
287 an_new =
one/ (
one + Real(4.0)*F*amrex::Math::powi<2>(std::sin(psi))/(s*Cn + Real(1e-10)) );
288 at_new = std::max(Real(0.), at_new);
290 if(std::fabs(at_new-at) < Real(1e-5) and std::fabs(an_new-an) < Real(1e-5)) {
303 Abort(
"The iteration procedure for the generalized actuator disk did not converge. Exiting...");
311 Real Fn = L*std::cos(psi) + D*std::sin(psi);
312 Real Ft = L*std::sin(psi) - D*std::cos(psi);
316 std::array<Real, 2> Fn_and_Ft;
AMREX_ALWAYS_ASSERT(bx.length()[2]==khi+1)
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:15
constexpr amrex::Real three
Definition: ERF_NumericalConstants.H:39
constexpr amrex::Real two
Definition: ERF_NumericalConstants.H:38
constexpr amrex::Real one
Definition: ERF_NumericalConstants.H:37
constexpr amrex::Real myhalf
Definition: ERF_NumericalConstants.H:41
constexpr amrex::Real PI
Definition: ERF_NumericalConstants.H:46
@ rho
Definition: ERF_Kessler.H:25