Skip to content

Commit 8679240

Browse files
Merge branch 'develop' of github.com:suavecode/Tutorials into develop
2 parents cb0e43c + 450f1c5 commit 8679240

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

tut_lithium_air_jet.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# full_setup.py
1+
# tut_lithium_air_jet.py
22
#
3-
# Created: SUave Team, Aug 2014
4-
# Modified:
3+
# Created: Jun 2015, SUAVE Team
4+
# Modified:
55

6-
""" setup file for a mission with a E190
6+
""" setup file for a mission with an all electric airliner
77
"""
88

99

@@ -726,6 +726,7 @@ def plot_mission(results,configs,line_style='bo-'):
726726
else:
727727
line_width = 1.
728728

729+
729730
# ------------------------------------------------------------------
730731
# Throttle
731732
# ------------------------------------------------------------------
@@ -756,16 +757,16 @@ def plot_mission(results,configs,line_style='bo-'):
756757

757758

758759
# ------------------------------------------------------------------
759-
# Fuel Burn Rate
760+
# Mass Rate
760761
# ------------------------------------------------------------------
761-
plt.figure("Fuel Burn Rate")
762+
plt.figure("Mass Rate")
762763
axes = plt.gca()
763764
for i in range(len(results.segments)):
764765
time = results.segments[i].conditions.frames.inertial.time[:,0] / Units.min
765-
mdot = results.segments[i].conditions.weights.vehicle_mass_rate[:,0]
766+
mdot = -results.segments[i].conditions.weights.vehicle_mass_rate[:,0]
766767
axes.plot(time, mdot, line_style)
767768
axes.set_xlabel('Time (mins)')
768-
axes.set_ylabel('Fuel Burn Rate (kg/s)')
769+
axes.set_ylabel('Mass Rate (kg/s)')
769770
axes.grid(True)
770771

771772

@@ -893,6 +894,7 @@ def plot_mission(results,configs,line_style='bo-'):
893894
axes.set_ylabel('CD')
894895
axes.grid(True)
895896

897+
896898
# ------------------------------------------------------------------
897899
# Flight Conditions
898900
# ------------------------------------------------------------------
@@ -902,11 +904,12 @@ def plot_mission(results,configs,line_style='bo-'):
902904
time = segment.conditions.frames.inertial.time[:,0] / Units.min
903905
altitude = segment.conditions.freestream.altitude[:,0] / Units.km
904906
mach = segment.conditions.freestream.mach_number[:,0]
905-
aoa = segment.conditions.aerodynamics.angle_of_attack[:,0] / Units.deg
907+
distance = segment.conditions.frames.inertial.position_vector[:,0] / Units.km
906908

907909
axes = fig.add_subplot(3,1,1)
908-
axes.plot( time , aoa , line_style , lw=line_width )
909-
axes.set_ylabel('Angle of Attack (deg)')
910+
axes.plot( time, distance, line_style )
911+
axes.set_ylabel('Distance (km)')
912+
axes.grid(True)
910913

911914
axes = fig.add_subplot(3,1,2)
912915
axes.plot( time , altitude , line_style , lw=line_width )
@@ -958,4 +961,4 @@ def plot_mission(results,configs,line_style='bo-'):
958961

959962
if __name__ == '__main__':
960963
main()
961-
plt.show(block=True)
964+
plt.show()

0 commit comments

Comments
 (0)