better print_info() file titles

Commit
6946f206a17c5155fc4e517d72c5674fb8cd759b
Author
Marius Peter <blendoit@gmail.com>
Author date
Committer
Marius Peter <blendoit@gmail.com>
Committer date
Changed files
creator.py
index 1a4ddb74..fd09e2cd 100644..100644
@@ -75,13 +75,16 @@
75 75
76 76 This function's output is piped to the 'save_coord' function below.
77 77 '''
78 Removed: print(20 * '-')
79 Removed: print(' CREATOR DATA ')
78 Added: name = ' CREATOR DATA '
79 Added: num_of_dashes = len(name)
80 Added:
81 Added: print(num_of_dashes * '-')
82 Added: print(name)
80 83 print('Component:', str(self))
81 84 print('Chord length:', self.chord)
82 85 print('Semi-span:', self.semi_span)
83 86 print('Mass:', self.mass)
84 Removed: print(20 * '-')
87 Added: print(num_of_dashes * '-')
85 88 print('x_u the upper x-coordinates:\n', np.around(self.x_u, round))
86 89 print('z_u the upper z-coordinates:\n', np.around(self.z_u, round))
87 90 print('x_l the lower x-coordinates:\n', np.around(self.x_l, round))
evaluator.py
index 01647a69..c21ca2e0 100644..100644
@@ -60,14 +60,17 @@
60 60 This function's output is piped to the 'save_data' function below.
61 61 '''
62 62
63 Removed: print(22 * '-')
64 Removed: print(' EVALUATOR DATA ')
63 Added: name = ' CREATOR DATA '
64 Added: num_of_dashes = len(name)
65 Added:
66 Added: print(num_of_dashes * '-')
67 Added: print(name)
65 68 print('Evaluating:', self.airfoil)
66 69 print('Chord length:', self.chord)
67 70 print('Semi-span:', self.semi_span)
68 71 print('Total airfoil mass:', self.mass_total)
69 72 print('Centroid location:', np.around(self.centroid, round + 1))
70 Removed: print(22 * '-')
73 Added: print(num_of_dashes * '-')
71 74 print('Rectangular lift:\n', np.around(self.lift_rectangular, round))
72 75 print('Elliptical lift:\n', np.around(self.lift_elliptical, round))
73 76 print('Combined lift:\n', np.around(self.lift, round))
main.py
index 2cf4a2e2..8805f11c 100644..100644
@@ -59,6 +59,7 @@
59 59 af.add_naca(NACA_NUM)
60 60 af.add_mass(AIRFOIL_MASS)
61 61 # af.print_info(2)
62 Added: # af.save_info(SAVE_PATH, _)
62 63
63 64 # Create spar instance
64 65 af.spar = creator.Spar()
@@ -67,6 +68,7 @@
67 68 af.spar.add_coord(af.coord, 0.55)
68 69 af.spar.add_mass(SPAR_MASS)
69 70 # af.spar.print_info(2)
71 Added: # af.spar.save_info(SAVE_PATH, _)
70 72
71 73 # Create stringer instance
72 74 af.stringer = creator.Stringer()
@@ -75,22 +77,18 @@
75 77 af.stringer.add_area(STRINGER_AREA)
76 78 af.stringer.add_mass(STRINGER_MASS)
77 79 # af.stringer.print_info(2)
80 Added: # af.stringer.save_info(SAVE_PATH, _)
78 81
79 82 # Plot components with matplotlib
80 83 # af.plot()
81 84
82 Removed: # Save component info
83 Removed: # af.save_info(SAVE_PATH, _)
84 Removed: # af.spar.save_info(SAVE_PATH, _)
85 Removed: # af.stringer.save_info(SAVE_PATH, _)
86 Removed:
87 85 # evaluator.Evaluator instance contains airfoil analysis results.
88 86 eval = evaluator.Airfoil(af)
89 87 # The analysis is performed in the evaluator.py module.
90 88 eval.analysis()
91 89 eval.print_info(2)
92 Removed: eval.save_info(SAVE_PATH, _)
93 Removed: eval.plot()
90 Added: # eval.save_info(SAVE_PATH, _)
91 Added: # eval.plot()
94 92
95 93 # Print final execution time
96 94 print("--- %s seconds ---" % (time.time() - start_time))