def myAirfoilFunctionBoxWing(Epsilon, LEPoint, ChordFunct, ChordFactor, DihedralFunct, TwistFunct): # Defines the variation of cross section as a function of Epsilon AirfoilChordLength = (ChordFactor*ChordFunct(Epsilon)) / \ np.cos(np.radians(TwistFunct(Epsilon))) SmoothingPasses = 1 Camber1 = 5.0 Camber2 = -5.0 Transition1 = 0.45 Transition2 = 0.55 # Known values of dihedral at start, transition and end locations EpsArray = np.array([0, Transition1, Transition2, 1]) CamberArray = np.array([Camber1, Camber1, Camber2, Camber2]) Camber = np.interp(Epsilon, EpsArray, CamberArray) prof = str(int(round(Camber))) + '310' Af = primitives.Airfoil(LEPoint, AirfoilChordLength, DihedralFunct(Epsilon), TwistFunct(Epsilon), Naca4Profile=prof) return Af
def SimpleAirfoilFunction(Epsilon, LEPoint, ChordFunct, ChordFactor, DihedralFunct, TwistFunct): """constant cross section with Epsilon""" AfChord = ChordFunct(Epsilon) * ChordFactor Af = primitives.Airfoil(LEPoint, ChordLength=AfChord, Rotation=DihedralFunct(Epsilon), Twist=TwistFunct(Epsilon), Naca4Profile='0012') return Af
def myAirfoilFunctionAirliner(Epsilon, LEPoint, ChordFunct, ChordFactor, DihedralFunct, TwistFunct): """Defines the variation of cross section as a function of Epsilon""" AfChord = ((ChordFactor*ChordFunct(Epsilon)) / np.cos(np.radians(TwistFunct(Epsilon)))) Af = primitives.Airfoil(LEPoint, ChordLength=AfChord, Rotation=DihedralFunct(Epsilon), Twist=TwistFunct(Epsilon), CRMProfile=True, CRM_Epsilon=Epsilon) return Af
def myAirfoilFunctionTP(Epsilon, LEPoint, ChordFunct, ChordFactor, DihedralFunct, TwistFunct): """Defines the variation of cross section as a function of Epsilon""" AirfoilChordLength = (ChordFactor * ChordFunct(Epsilon) / np.cos(np.radians(TwistFunct(Epsilon)))) AirfoilSeligName = 'sc20010' # TODO : SmoothingPasses = 3 Af = primitives.Airfoil(LEPoint, ChordLength=AirfoilChordLength, Rotation=DihedralFunct(Epsilon), Twist=TwistFunct(Epsilon), SeligProfile=AirfoilSeligName) return Af
# ============================================================================== # Example: airfoil from Selig-formatted coordinate file. Leading edge point # in origin, unit chord along x axis, no rotation around the x or y axes. # Coordinates for Drela DAE11 low Reynolds number section, two smoothing # iterations. # ============================================================================== LEPoint = [0., 0., 0.] ChordLength = 1 Rotation = 0 Twist = 0 AirfoilSeligName = 'dae11' # SmoothingPasses = 1 #TODO # Instantiate class to set up a generic airfoil with these basic parameters Af = primitives.Airfoil(LEPoint, ChordLength, Rotation, Twist, SeligProfile=AirfoilSeligName) display.DisplayShape(Af.Curve, update=True) display.DisplayShape(Af.ChordLine, update=True, color='black') start_display() # If using interactive mode i.e. ipython, Airfoil can be removed with: # display.Context.Erase(Af1_disp.GetObject().GetHandle()) # Af1.Curve.GetObject().Delete() # Not sure if this truly collects the garbage yet # # # Or Clear the display: # display.EraseAll()