Propulsion#
- class tuduam.propulsion.BEM(data_path: str, propclass: Propeller, rho: float, dyn_vis: float, V_fr: float, n_stations: int, a: float, T=None, P=None)[source]#
Bases:
object
A class for performing Blade Element Momentum (BEM) analysis on a propeller. For initialization of the BEM class please keep the number of stations above 20. Also, if any error occurs with the propeller class, carefully check whether all parameters have been properly loaded in. Please specify either a thrust level or power level.
- Parameters:
- data_pathstr
Path to the directory containing all Xfoil data for the various Reynolds numbers. Please note the format of the file names given to polar files. They should only contain the Reynolds number in the name, no other numbers such as the airfoil code.
- propclassPropeller
The propeller data structure with the propeller radius, number of blades, RPM cruise, and non-dimensional hub radius specified.
- rhofloat
Density at the cruise height [kg/m^3].
- dyn_visfloat
Dynamic viscosity [N s/m^2].
- V_frfloat
Freestream velocity [m/s].
- n_stationsint
Number of stations to calculate [-] (preferably > 20).
- afloat
Speed of sound [m/s].
- Tfloat, optional
Thrust delivered by the propeller [N], defaults to None.
- Pfloat, optional
Power delivered to the propeller [W], defaults to None.
- Attributes:
- propellerPropeller
The propeller data structure.
- Bint
Number of blades.
- Rfloat
Propeller radius.
- Dfloat
Propeller diameter.
- Omegafloat
Angular velocity in rad/s.
- xi_0float
Non-dimensional hub radius.
- rhofloat
Density at the cruise height [kg/m^3].
- dyn_visfloat
Dynamic viscosity [N s/m^2].
- Vfloat
Freestream velocity [m/s].
- lambfloat
Speed ratio.
- N_sint
Number of stations to calculate [-].
- afloat
Speed of sound [m/s].
- dir_pathstr
Path to the directory containing all Xfoil data.
- alpha_interpNearestNDInterpolator
Interpolator for angle of attack based on CL and Reynolds number.
- cd_interpNearestNDInterpolator
Interpolator for CD based on CL and Reynolds number.
- F(r, zeta)[source]#
Prandtl relation for tip loss factor.
- Parameters:
- rfloat
Radial position.
- zetafloat
Induced inflow ratio.
- Returns:
- float
Tip loss factor.
- F_int(xi, zeta)[source]#
Tip loss factor for integration.
- Parameters:
- xifloat
Non-dimensional radius.
- zetafloat
Induced inflow ratio.
- Returns:
- float
Tip loss factor for integration.
- G_int(xi, zeta)[source]#
G function for integration.
- Parameters:
- xifloat
Non-dimensional radius.
- zetafloat
Induced inflow ratio.
- Returns:
- float
G function value for integration.
- I_prim_1(xi, zeta, eps)[source]#
Integral I_prim_1 for internal variable calculation.
- Parameters:
- xifloat
Non-dimensional radius.
- zetafloat
Induced inflow ratio.
- epsfloat
Average value.
- Returns:
- float
Integral I_prim_1 value.
- I_prim_2(xi, zeta, eps)[source]#
Integral I_prim_2 for internal variable calculation.
- Parameters:
- xifloat
Non-dimensional radius.
- zetafloat
Induced inflow ratio.
- epsfloat
Average value.
- Returns:
- float
Integral I_prim_2 value.
- J_prim_1(xi, zeta, eps)[source]#
Integral J_prim_1 for internal variable calculation.
- Parameters:
- xifloat
Non-dimensional radius.
- zetafloat
Induced inflow ratio.
- epsfloat
Average value.
- Returns:
- float
Integral J_prim_1 value.
- J_prim_2(xi, zeta, eps)[source]#
Integral J_prim_2 for internal variable calculation.
- Parameters:
- xifloat
Non-dimensional radius.
- zetafloat
Induced inflow ratio.
- epsfloat
Average value.
- Returns:
- float
Integral J_prim_2 value.
- M(r)[source]#
Mach number as a function of radius.
- Parameters:
- rfloat
Radial position.
- Returns:
- float
Mach number.
- PG(M)[source]#
Prandtl-Glauert correction factor.
- Parameters:
- Mfloat
Mach number.
- Returns:
- float
Prandtl-Glauert correction factor.
- RN(Wc)[source]#
Reynolds number as a function of local speed and chord.
- Parameters:
- Wcfloat
Local speed times chord.
- Returns:
- float
Reynolds number.
- Wc(F, phi, zeta, Cl)[source]#
Product of local speed at the blade and chord.
- Parameters:
- Ffloat
Tip loss factor.
- phifloat
Angle of local velocity.
- zetafloat
Induced inflow ratio.
- Clfloat
Lift coefficient.
- Returns:
- float
Product of local speed and chord.
- Xi(r)[source]#
Non-dimensional radius.
- Parameters:
- rfloat
Radial position.
- Returns:
- float
Non-dimensional radius.
- efficiency(Tc, Pc)[source]#
Calculate propeller efficiency.
- Parameters:
- Tcfloat
Thrust coefficient.
- Pcfloat
Power coefficient.
- Returns:
- float
Propeller efficiency.
- f(r, zeta)[source]#
Exponent used in the Prandtl tip loss factor calculation.
- Parameters:
- rfloat
Radial position.
- zetafloat
Induced inflow ratio.
- Returns:
- float
Exponent value.
- f_int(xi, zeta)[source]#
Exponent used in the Prandtl tip loss factor calculation for integration.
- Parameters:
- xifloat
Non-dimensional radius.
- zetafloat
Induced inflow ratio.
- Returns:
- float
Exponent value for integration.
- optimise_blade(zeta_init)[source]#
Optimize the blade design by iteratively running the BEM design procedure and updating the inflow ratio (zeta) until convergence is achieved.
- Parameters:
- zeta_initfloat
Initial inflow ratio.
- Returns:
- dict
Dictionary containing the results of the BEM analysis, including chord, pitch, alpha, drag-to-lift ratio, effective velocity, solidity, Cl, Cd, propeller efficiency, thrust coefficient, power coefficient, and updated zeta.
- phi(r, zeta)[source]#
Angle of local velocity of the blade with respect to the disk plane.
- Parameters:
- rfloat
Radial position.
- zetafloat
Induced inflow ratio.
- Returns:
- float
Angle of local velocity.
- phi_int(xi, zeta)[source]#
Angle of local velocity for integration.
- Parameters:
- xifloat
Non-dimensional radius.
- zetafloat
Induced inflow ratio.
- Returns:
- float
Angle of local velocity for integration.
- phi_t(zeta)[source]#
Pitch angle of the blade tip.
- Parameters:
- zetafloat
Induced inflow ratio.
- Returns:
- float
Pitch angle of the blade tip.
- run_BEM(zeta)[source]#
Runs the design procedure for the propeller using Blade Element Momentum (BEM) theory from an arbitrary start zeta.
- Parameters:
- zetafloat
Initial inflow ratio.
- Returns:
- dict
Dictionary containing the results of the BEM analysis, including chord, pitch, alpha, drag-to-lift ratio, effective velocity, solidity, Cl, Cd, propeller efficiency, thrust coefficient, power coefficient, and updated zeta.
- class tuduam.propulsion.OffDesignAnalysisBEM(dir_path: str, propclass: Propeller, V: float, rpm: float, rho: float, dyn_vis: float, a: float)[source]#
Bases:
object
A class encapsulating the arbitrary analysis of a propeller blade as described in Adkins and Liebeck (1994).
General notes
Interferences factors were clipped to -0.7 and 0.7. Viterna and Janetzke11 give empirical arguments for clipping the magnitude of a and a’ at the value of 0.7 in order to better convergence. See a_fac and a_prime_fac
Future improvement
TODO: Also compare to sample example in original paper of Adkins and Liebeck (1994)
TODO: Refactor such that rpm and V can be changed in the self.analyse_propeller method. Reinstantiating the class would not be necessary in that case
TODO: Make the off design analysis robust enough so a scipy.optimize could perhaps be used in the future.
- a_fac(Cl: ndarray, Cd: ndarray, phi: ndarray, c: ndarray, r: ndarray, phi_t: ndarray) ndarray [source]#
Returns the rotational interferene factor. Note that Viterna and Janetzke11 give empirical arguments for clipping the magnitude of a and a’ at the value of 0.7 in order to better convergence.
Viterna, A., and Janetzke, D., “Theoretical and Experimental Power from Large Horizontal-Axis Wind Turbines,” Proceedings from the Large Horizontal-Axis Wind Turbine Conference, DOE/NASA-LeRC, July 1981.
- Parameters:
Cl (np.ndarray) – _description_
Cd (np.ndarray) – _description_
phi (np.ndarray) – _description_
c (np.ndarray) – _description_
r (np.ndarray) – _description_
phi_t (np.ndarray) – _description_
- Returns:
_description_
- Return type:
np.ndarray
- a_prim_fac(Cl, Cd, phi, c, r, phi_t)[source]#
Returns the rotational interferene factor. Note that Viterna and Janetzke11 give empirical arguments for clipping the magnitude of a and a’ at the value of 0.7 in order to better convergence.
Viterna, A., and Janetzke, D., “Theoretical and Experimental Power from Large Horizontal-Axis Wind Turbines,” Proceedings from the Large Horizontal-Axis Wind Turbine Conference, DOE/NASA-LeRC, July 1981.
- Parameters:
Cl (_type_) – _description_
Cd (_type_) – _description_
phi (_type_) – _description_
c (_type_) – _description_
r (_type_) – _description_
phi_t (_type_) – _description_
- Returns:
_description_
- Return type:
_type_
- analyse_propeller(delta_pitch: float, max_iter=100, abs_extrapolation=0) dict [source]#
Analyse the propeller according to the procedure specified in Adkins and Liebeck (1994), returns a dictionary with the keys as specified below.
- Parameters:
delta_pitch – A change in pitch of the entire blade in radians. A positive value will further in crease the pitch
and vice versa. :type delta_pitch: float :param abs_extrapolation: The maximum extrapolation out of the given dataset allowed before a near zero thrust is returned in degrees :type abs_extrapolation: float :return: A dictionary with the following keys:
“thrust”: thrust created by the propeller, “torque”: torque required for the propeller , “eff”: propulsive efficiency of the propeller, “thrust_coeff”: thrust coefficient of the propeller, “power_coeff”: power coefficien of the propeller, “AoA”: Angle of attack at each station of the propeller, “lift_coeff”: Lift coefficient at each station of the propeller, “drag_coeff”: Drag coefficient at each station of the propller,
- Return type:
dict
- class tuduam.propulsion.PlotBlade(propclass: Propeller, path_coord: str)[source]#
Bases:
object
A class to plot the blade of a propeller based on its specifications and airfoil coordinates.
- Parameters:
- propclassPropeller
Propeller class with all the attributes defined.
- path_coordstr
Path to the coordinates of the airfoil in the format starting at the top trailing edge, moving to the top leading edge and then looping back to the bottom trailing edge.
- Attributes:
- chordsnp.ndarray
Array of chord lengths at different radial positions.
- pitchsnp.ndarray
Array of pitch values at different radial positions.
- radial_coordsnp.ndarray
Array of radial coordinates from the hub to the tip of the blade.
- Rfloat
Radius of the propeller.
- xi_0float
Twist angle at the root of the blade.
- tc_ratiofloat
Thickness-to-chord ratio of the airfoil.
- path_coordstr
Path to the airfoil coordinate file.
- load_airfoil() ndarray [source]#
Returns an array using a path to the coordinate file of the airfoil.
- Returns:
- np.ndarray
Array with the airfoil coordinates.
- plot_3D(tst=False)[source]#
Plot a 3D plot of one propeller blade. The user can drag the mouse around to see the blade from various angles.
- Parameters:
- tstbool, optional
A boolean used for testing to suppress the output, defaults to False.
- Returns:
- None
- plot_3D_plotly(tst=False)[source]#
Plot a 3D plot of one propeller blade. The user can drag the mouse around to see the blade from various angles.
- Parameters:
- tstbool, optional
A boolean used for testing to suppress the output, defaults to False.
- Returns:
- None
- plot_blade(tst=False) None [source]#
Returns two plots: one top-down view of the propeller showing the amount of twist and the various chords, and one plot showing a side view of the propeller.
- Parameters:
- tstbool, optional
A boolean used for testing to suppress the output, defaults to False.
- Returns:
- None
- tuduam.propulsion.alpha_xfoil_interp(dir_path: str) NearestNDInterpolator [source]#
Interpolates the angle of attack (alpha) from Xfoil output data.
- Parameters:
- dir_pathstr
The path of the directory to read from; can be absolute or relative.
- Returns:
- NearestNDInterpolator
Interpolator for angle of attack based on CL and Reynolds number.
- tuduam.propulsion.cd_xfoil_interp(dir_path: str) NearestNDInterpolator [source]#
Interpolates the drag coefficient (CD) from Xfoil output data.
- Parameters:
- dir_pathstr
Directory of the files containing the Xfoil polar data.
- Returns:
- NearestNDInterpolator
Interpolator for CD based on CL and Reynolds number.
- tuduam.propulsion.cl_xfoil_interp(dir_path: str) NearestNDInterpolator [source]#
Interpolates the lift coefficient (CL) from Xfoil output data.
- Parameters:
- dir_pathstr
Directory of the files containing the Xfoil polar data.
- Returns:
- NearestNDInterpolator
Interpolator for CL based on angle of attack and Reynolds number.
- tuduam.propulsion.extract_data_dir(dir_path: str) ndarray [source]#
This function pulls data from multiple files within a directory as outputted by Xfoil and puts them in one array. Information on how to do this can be found in the notebooks.
Assumptions
The function expects the name to at least have Rexxxx where the x’s represent the Reynolds number.
- Parameters:
- dir_pathstr
The path of the directory to read from; can be absolute or relative.
- Returns:
- np.ndarray
An m x 8 array where the columns are the following: [alpha, CL, CD, CDp, CM, Top_xtr, bot_xtr, Reynolds number].