diff options
-rw-r--r-- | creator.py | 9 | ||||
-rw-r--r-- | evaluator.py | 9 | ||||
-rw-r--r-- | main.py | 12 |
3 files changed, 17 insertions, 13 deletions
@@ -75,13 +75,16 @@ class Coordinates: This function's output is piped to the 'save_coord' function below. ''' - print(20 * '-') - print(' CREATOR DATA ') + name = ' CREATOR DATA ' + num_of_dashes = len(name) + + print(num_of_dashes * '-') + print(name) print('Component:', str(self)) print('Chord length:', self.chord) print('Semi-span:', self.semi_span) print('Mass:', self.mass) - print(20 * '-') + print(num_of_dashes * '-') print('x_u the upper x-coordinates:\n', np.around(self.x_u, round)) print('z_u the upper z-coordinates:\n', np.around(self.z_u, round)) print('x_l the lower x-coordinates:\n', np.around(self.x_l, round)) diff --git a/evaluator.py b/evaluator.py index 01647a6..c21ca2e 100644 --- a/evaluator.py +++ b/evaluator.py @@ -60,14 +60,17 @@ class Airfoil: This function's output is piped to the 'save_data' function below. ''' - print(22 * '-') - print(' EVALUATOR DATA ') + name = ' CREATOR DATA ' + num_of_dashes = len(name) + + print(num_of_dashes * '-') + print(name) print('Evaluating:', self.airfoil) print('Chord length:', self.chord) print('Semi-span:', self.semi_span) print('Total airfoil mass:', self.mass_total) print('Centroid location:', np.around(self.centroid, round + 1)) - print(22 * '-') + print(num_of_dashes * '-') print('Rectangular lift:\n', np.around(self.lift_rectangular, round)) print('Elliptical lift:\n', np.around(self.lift_elliptical, round)) print('Combined lift:\n', np.around(self.lift, round)) @@ -59,6 +59,7 @@ def main(): af.add_naca(NACA_NUM) af.add_mass(AIRFOIL_MASS) # af.print_info(2) + # af.save_info(SAVE_PATH, _) # Create spar instance af.spar = creator.Spar() @@ -67,6 +68,7 @@ def main(): af.spar.add_coord(af.coord, 0.55) af.spar.add_mass(SPAR_MASS) # af.spar.print_info(2) + # af.spar.save_info(SAVE_PATH, _) # Create stringer instance af.stringer = creator.Stringer() @@ -75,22 +77,18 @@ def main(): af.stringer.add_area(STRINGER_AREA) af.stringer.add_mass(STRINGER_MASS) # af.stringer.print_info(2) + # af.stringer.save_info(SAVE_PATH, _) # Plot components with matplotlib # af.plot() - # Save component info - # af.save_info(SAVE_PATH, _) - # af.spar.save_info(SAVE_PATH, _) - # af.stringer.save_info(SAVE_PATH, _) - # evaluator.Evaluator instance contains airfoil analysis results. eval = evaluator.Airfoil(af) # The analysis is performed in the evaluator.py module. eval.analysis() eval.print_info(2) - eval.save_info(SAVE_PATH, _) - eval.plot() + # eval.save_info(SAVE_PATH, _) + # eval.plot() # Print final execution time print("--- %s seconds ---" % (time.time() - start_time)) |