@@ -144,6 +144,7 @@ def __init__(self, filename, radii_list, num_points_top_bottom):
144144 self ._initial_camber_points_plane (radius )
145145 self ._initial_airfoil_points_plane (radius )
146146 self ._extract_parameters_and_transform_profile (radius )
147+ self ._store_properties (radius )
147148 self ._airfoil_top_and_bottom_points ()
148149 self .xup [ind_sec , :] = self .ascissa
149150 self .xdown [ind_sec , :] = self .ascissa
@@ -463,7 +464,7 @@ def _initial_airfoil_points_plane(self, radius):
463464 self .leading_edge_point_on_plane +
464465 self .trailing_edge_point_on_plane ) / 2.0
465466
466- def _extract_parameters_and_transform_profile (self , radius ):
467+ def _store_properties (self , radius ):
467468 """
468469 Private method which extracts the parameters (pitch, rake, skew ,...) related
469470 to a specific section of the blade, and then transforms the camber points
@@ -475,78 +476,6 @@ def _extract_parameters_and_transform_profile(self, radius):
475476 Basically all points and edges of the profile section are transformed
476477 to fulfill the properties of the specific sectionwe are considering.
477478 """
478- self .pitch_angle = np .arctan2 (
479- self .leading_edge_point_on_plane [1 ] -
480- self .trailing_edge_point_on_plane [1 ],
481- self .leading_edge_point_on_plane [0 ] -
482- self .trailing_edge_point_on_plane [0 ])
483- self .skew = self .mid_chord_point_on_plane [1 ]
484- self .rake_induced_by_skew = self .skew / np .tan (self .pitch_angle )
485-
486- self .airfoil_points_on_plane [:, 1 :2 ] -= self .skew
487- self .camber_points_on_plane [:, 1 :2 ] -= self .skew
488- self .leading_edge_point_on_plane [1 ] -= self .skew
489- self .trailing_edge_point_on_plane [1 ] -= self .skew
490- self .mid_chord_point_on_plane [1 ] -= self .skew
491-
492- self .airfoil_points_on_plane [:, 0 :1 ] -= self .rake_induced_by_skew
493- self .camber_points_on_plane [:, 0 :1 ] -= self .rake_induced_by_skew
494- self .leading_edge_point_on_plane [0 ] -= self .rake_induced_by_skew
495- self .trailing_edge_point_on_plane [0 ] -= self .rake_induced_by_skew
496- self .mid_chord_point_on_plane [0 ] -= self .rake_induced_by_skew
497-
498- self .rake = self .mid_chord_point_on_plane [0 ]
499-
500- self .airfoil_points_on_plane [:, 0 :1 ] -= self .rake
501- self .camber_points_on_plane [:, 0 :1 ] -= self .rake
502- self .leading_edge_point_on_plane [0 ] -= self .rake
503- self .trailing_edge_point_on_plane [0 ] -= self .rake
504- self .mid_chord_point_on_plane [0 ] -= self .rake
505-
506- rotation_matrix = np .zeros ((2 , 2 ))
507- rotation_matrix [0 ][0 ] = np .cos (- self .pitch_angle )
508- rotation_matrix [0 ][1 ] = - np .sin (- self .pitch_angle )
509- rotation_matrix [1 ][0 ] = np .sin (- self .pitch_angle )
510- rotation_matrix [1 ][1 ] = np .cos (- self .pitch_angle )
511-
512- self .airfoil_points_on_plane = self .airfoil_points_on_plane .dot (
513- rotation_matrix .transpose ())
514- self .camber_points_on_plane = self .camber_points_on_plane .dot (
515- rotation_matrix .transpose ())
516- self .leading_edge_point_on_plane = self .leading_edge_point_on_plane .dot (
517- rotation_matrix .transpose ())
518- self .trailing_edge_point_on_plane = self .trailing_edge_point_on_plane .dot (
519- rotation_matrix .transpose ())
520- self .mid_chord_point_on_plane = self .mid_chord_point_on_plane .dot (
521- rotation_matrix .transpose ())
522-
523- self .chord_length = ((self .leading_edge_point_on_plane [0 ] -
524- self .trailing_edge_point_on_plane [0 ])** 2 +
525- (self .leading_edge_point_on_plane [1 ] -
526- self .trailing_edge_point_on_plane [1 ])** 2 )** .5
527-
528- self .airfoil_points_on_plane [:, 0 :2 ] /= self .chord_length
529- self .camber_points_on_plane [:, 0 :2 ] /= self .chord_length
530- self .leading_edge_point_on_plane [0 :1 ] /= self .chord_length
531- self .trailing_edge_point_on_plane [0 :1 ] /= self .chord_length
532- self .mid_chord_point_on_plane [0 :1 ] /= self .chord_length
533-
534- self .airfoil_points_on_plane [:, 0 :1 ] *= - 1.0
535- self .camber_points_on_plane [:, 0 :1 ] *= - 1.0
536- self .leading_edge_point_on_plane [0 ] *= - 1.0
537- self .trailing_edge_point_on_plane [0 ] *= - 1.0
538- self .mid_chord_point_on_plane [0 ] *= - 1.0
539-
540- self .airfoil_points_on_plane [:, 0 :1 ] += 0.5
541- self .camber_points_on_plane [:, 0 :1 ] += 0.5
542- self .leading_edge_point_on_plane [0 ] += 0.5
543- self .trailing_edge_point_on_plane [0 ] += 0.5
544- self .mid_chord_point_on_plane [0 ] += 0.5
545-
546- self .camber_points_on_plane = np .matrix (self .camber_points_on_plane )
547- self .camber_points_on_plane [0 , 0 ] = 0.0
548- self .camber_points_on_plane [- 1 , 0 ] = 1.0
549-
550479 # Save the properties we wanted for each section
551480 self .pitch_angles_list .append (self .pitch_angle )
552481 self .pitch_list .append (
@@ -559,14 +488,6 @@ def _extract_parameters_and_transform_profile(self, radius):
559488 self .rake = - self .rake / 1000.0
560489 self .rake_list .append (self .rake )
561490 self .chord_length_list .append (self .chord_length / 1000.0 )
562- self .camber_points_on_plane = np .sort (
563- self .camber_points_on_plane .view ('float64,float64' ),
564- order = ['f0' ],
565- axis = 0 ).view (np .float64 )
566- self .f_camber = interp1d (
567- np .squeeze (np .asarray (self .camber_points_on_plane [:, 0 ])),
568- np .squeeze (np .asarray (self .camber_points_on_plane [:, 1 ])),
569- kind = 'cubic' )
570491
571492 def _airfoil_top_and_bottom_points (self ):
572493 """
0 commit comments