diff --git a/src/airfoil_data/polargenerator.py b/src/airfoil_data/polargenerator.py index cac3d576d56f4a822acc81a90e352bcb21a2f57d..5e83e57cac86bdd7b703857956c2dc95be815ce8 100755 --- a/src/airfoil_data/polargenerator.py +++ b/src/airfoil_data/polargenerator.py @@ -1,3 +1,4 @@ +#!/usr/bin/python3 """Generate airfoil polars automatically using XFOIL Rotare requires the input of airfoil polars to interpolate properly the lift @@ -27,25 +28,30 @@ import os import numpy as np import aeropy.xfoil_module as xf +# Defaults for polar generation +# AOA +REYNOLDS = [re * 1000000 for re in [0.02, 0.1, 0.2, 0.5, 1, 2, 5, 10]] +AOA = list(np.arange(-16, 22, 0.5)) +MACH = 0.1 + def main(): """Creates polar files for each reynolds""" airfoil = parse_inputs() - reynolds = [re * 1000000 for re in [0.2, 0.5, 1, 1.5, 2, 5, 10]] - aoa = list(np.arange(-18, 25, 0.5)) i = 1 - for re in reynolds: - print("%d/%d - Calculating polar for Re=%ge6" % (i, len(reynolds), re / 1e6)) + for re in REYNOLDS: + print("%d/%d - Calculating polar for Re=%ge6" % (i, len(REYNOLDS), re / 1e6)) i = i + 1 if airfoil.startswith("naca"): xf.call( airfoil, - alfas=aoa, + alfas=AOA, output="Polar", Reynolds=re, + Mach=MACH, plots=False, NACA=True, iteration=500, @@ -54,9 +60,10 @@ def main(): if os.path.exists(airfoil) or os.path.exists(airfoil + ".dat"): xf.call( airfoil, - alfas=aoa, + alfas=AOA, output="Polar", Reynolds=re, + Mach=MACH, plots=False, NACA=False, iteration=500,