**4. QBlade aerodynamic code**

Based on the Blade Element Momentum (BEM) method for the performance prediction of horizontal axis wind turbines (HAWT) and the Double Multiple Streamtube (DMS) method for the performance prediction of vertical axis wind turbine (VAWT), QBlade is an open-source used for wind turbine simulation and distributed under the General Public License with (GPL) free access [31–33]. The code includes extensive post-processing functionality for the rotor and wind turbine simulations, including different rotor blades and variables. The main modules of the QBlade computer code are given in **Table 1** [32]; the modules include the airfoil design, the viscous-inviscid coupled panel method XFOIL analysis, the airfoil polar extrapolation above the stall point, the HAWT and VAWT rotor blade design,

**Table 1.** *QBlade objects structure and modules.*

*Aerodynamic Analysis and Performance Prediction of VAWT and HAWT Using CARDAAV… DOI: http://dx.doi.org/10.5772/intechopen.96343*

the BEM simulation, the structural blade design and analysis, the simulation, and the turbulent wind field generator.

The theoretical formulation in QBlade is based on BEM and DMS. The rotor blade is discretized into a finite number of blade elements with defined cross-sections according to the radial position, profile, chord, twist, and length. Using the momentum theory, each blade section's relative wind speed is computed, which is then used to calculate the angle of attack and the Determination of the airfoil lift and drag coefficients. Once these parameters are known, the aerodynamic normal and tangential forces are computed, then the thrust and torque of an element are determined. Similar to CARDAAV code, in QBlade, the iteration variables of the BEM method are the two induction factors, axial *a*, and radial *a*<sup>0</sup> as shown in **Figure 3** where *α* is the angle of attack, ∅ is the inflow angle, *θ* is the pitch angle, and *β* is the twist angle. The wind velocity at the rotor blade is given by *V*ð Þ 1 � *a* in the horizontal direction, and the angular velocity is given by Ω*r* 1 þ *a*<sup>0</sup> ð Þ.

Based on **Figure 3**, the inflow angle ∅ and the relative velocity *VR* are given by the equations

$$\mathcal{Q} = \tan^{-1} \left[ V\_{\infty} \frac{\mathbf{1} - a}{\Omega r (\mathbf{1} + a')} \right] \tag{20}$$

$$V\_R = V\_\infty \frac{1 - a}{\sin \mathcal{Q}} \tag{21}$$

Using the momentum and BEM theory and the solidity *<sup>σ</sup><sup>r</sup>* <sup>¼</sup> *Bc* <sup>2</sup>*π<sup>r</sup>* with *B* the number of blades and *c* the chord length, the axial and radial induction factors *a* and *a*<sup>0</sup> are computed from

$$a = \frac{1}{\frac{4\sin^2\mathcal{Q}}{\sigma\_r C\_N} + 1} \text{ and } a' = \frac{1}{\frac{4\sin\mathcal{Q}\cos\mathcal{Q}}{\sigma\_r C\_T} - 1} \tag{22}$$

where the normal and tangential force coefficients of the blade section are given by

$$\mathbf{C}\_{N} = \mathbf{C}\_{L}\cos\mathfrak{D} + \mathbf{C}\_{D}\sin\mathfrak{D} \tag{23}$$

$$\mathbf{C}\_{T} = \mathbf{C}\_{L}\sin\mathfrak{D} - \mathbf{C}\_{D}\cos\mathfrak{D} \tag{24}$$

The iteration technique used in the above equations is first to initialize the axial and radial induction factor *a* and *a*<sup>0</sup> , then computer the inflow angle from Eq. (20),

**Figure 3.** *Angles, velocity components, and forces acting on the HAWT rotor blade section.*

**Figure 4.** *Flowchart of the iterative algorithm used in QBlade.*

the local angle of attack by subtracting the twist angle from inflow angle, use aerodynamic coefficients from tabulated airfoil data, compute *a* and *a*<sup>0</sup> from Eq. (22), compare the new axial and radial induction factors with the previous one, if not satisfied, return to step 2 by recalculating the inflow angle again in Eq. (20) and repeat the process if satisfied compute aerodynamic loads and performance of the wind turbine. For the vortices that form at the rotor's tip, resulting in added drag, the Prandtl tip loss factor is introduced [29, 33]. **Figure 4** shows a flowchart of the algorithm used in QBlade.
