Skip to content

Commit 0b43a35

Browse files
committed
requiring 2.5 to work and updating plotting
1 parent d0d8497 commit 0b43a35

File tree

10 files changed

+39
-10
lines changed

10 files changed

+39
-10
lines changed

B737_AVL_Tutorial/tut_mission_B737_AVL.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88

99
# SUAVE Imports
1010
import SUAVE
11+
if not SUAVE.__version__=='2.5.0':
12+
assert('These tutorials only work with the SUAVE 2.5.0 release')
13+
1114
from SUAVE.Core import Data, Units
12-
from SUAVE.Plots.Mission_Plots import *
15+
from SUAVE.Plots.Performance.Mission_Plots import *
1316
from SUAVE.Methods.Propulsion.turbofan_sizing import turbofan_sizing
1417
from SUAVE.Methods.Geometry.Two_Dimensional.Cross_Section.Propulsion import compute_turbofan_geometry
1518
from SUAVE.Input_Output.Results import print_parasite_drag, \
@@ -22,6 +25,7 @@
2225
import numpy as np
2326
import pylab as plt
2427

28+
2529
# ----------------------------------------------------------------------
2630
# Main
2731
# ----------------------------------------------------------------------

BWB_CFD/BWB.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
# ----------------------------------------------------------------------
99

1010
import SUAVE
11+
if not SUAVE.__version__=='2.5.0':
12+
assert('These tutorials only work with the SUAVE 2.5.0 release')
1113

1214
import numpy as np
1315
import pylab as plt
@@ -20,7 +22,11 @@
2022
from SUAVE.Methods.Propulsion.turbofan_sizing import turbofan_sizing
2123
from SUAVE.Methods.Geometry.Two_Dimensional.Cross_Section.Propulsion import compute_turbofan_geometry
2224

23-
from SUAVE.Plots.Mission_Plots import *
25+
from SUAVE.Plots.Performance.Mission_Plots import *
26+
27+
if not SUAVE.__version__=='2.5.0':
28+
assert('These tutorials only work with the SUAVE 2.5.0 release')
29+
2430

2531
# ----------------------------------------------------------------------
2632
# Main

Regional_Jet_Optimization/Optimize.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
# ----------------------------------------------------------------------
99

1010
import SUAVE
11+
if not SUAVE.__version__=='2.5.0':
12+
assert('These tutorials only work with the SUAVE 2.5.0 release')
1113
from SUAVE.Core import Units, Data
1214
import numpy as np
1315
import Vehicles

Regional_Jet_Optimization/Plot_Mission.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
import SUAVE
1111
from SUAVE.Core import Units
12-
from SUAVE.Plots.Mission_Plots import *
12+
from SUAVE.Plots.Performance.Mission_Plots import *
1313
import pylab as plt
1414

1515
# ----------------------------------------------------------------------

Solar_UAV_Optimization/Optimize.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
# Imports
88
# ----------------------------------------------------------------------
99

10+
import SUAVE
11+
if not SUAVE.__version__=='2.5.0':
12+
assert('These tutorials only work with the SUAVE 2.5.0 release')
13+
1014
from SUAVE.Core import Units, Data
1115
import numpy as np
1216
import Vehicles

Solar_UAV_Optimization/Plot_Mission.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Imports
88
# ----------------------------------------------------------------------
99

10-
from SUAVE.Plots.Mission_Plots import *
10+
from SUAVE.Plots.Performance.Mission_Plots import *
1111
from SUAVE.Core import Units
1212
import pylab as plt
1313

tut_concorde.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,18 @@
1212
# ----------------------------------------------------------------------
1313

1414
import SUAVE
15+
if not SUAVE.__version__=='2.5.0':
16+
assert('These tutorials only work with the SUAVE 2.5.0 release')
17+
1518
from SUAVE.Core import Units, Data
16-
from SUAVE.Plots.Mission_Plots import *
19+
from SUAVE.Plots.Performance.Mission_Plots import *
1720
from SUAVE.Methods.Propulsion.turbojet_sizing import turbojet_sizing
1821

1922
import numpy as np
2023
import pylab as plt
2124

25+
26+
2227
# ----------------------------------------------------------------------
2328
# Main
2429
# ----------------------------------------------------------------------

tut_mission_B737.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919

2020
# SUAVE Imports
2121
import SUAVE
22+
if not SUAVE.__version__=='2.5.0':
23+
assert('These tutorials only work with the SUAVE 2.5.0 release')
2224
from SUAVE.Core import Data, Units
2325
# The Data import here is a native SUAVE data structure that functions similarly to a dictionary.
2426
# However, iteration directly returns values, and values can be retrieved either with the
@@ -28,7 +30,7 @@
2830
# This is because SUAVE functions generally operate using metric units, so inputs must be
2931
# converted. To use a length of 20 feet, set l = 20 * Units.ft . Additionally, to convert to SUAVE
3032
# output back to a desired units, use l_ft = l_m / Units.ft
31-
from SUAVE.Plots.Mission_Plots import *
33+
from SUAVE.Plots.Performance.Mission_Plots import *
3234
# These are a variety of plotting routines that simplify the plotting process for commonly
3335
# requested metrics. Plots of specifically desired metrics can also be manually created.
3436
from SUAVE.Methods.Propulsion.turbofan_sizing import turbofan_sizing
@@ -139,8 +141,8 @@ def base_analysis(vehicle):
139141

140142
# ------------------------------------------------------------------
141143
# Energy
142-
energy= SUAVE.Analyses.Energy.Energy()
143-
energy.network = vehicle.propulsors
144+
energy = SUAVE.Analyses.Energy.Energy()
145+
energy.network = vehicle.networks
144146
analyses.append(energy)
145147

146148
# ------------------------------------------------------------------

tut_payload_range.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,18 @@
99
# ----------------------------------------------------------------------
1010

1111
import SUAVE
12+
if not SUAVE.__version__=='2.5.0':
13+
assert('These tutorials only work with the SUAVE 2.5.0 release')
1214
from SUAVE.Core import Units, Data
1315
from SUAVE.Methods.Propulsion.turbofan_sizing import turbofan_sizing
1416
from SUAVE.Methods.Performance import payload_range
1517
from SUAVE.Methods.Geometry.Two_Dimensional.Planform import wing_planform
16-
from SUAVE.Plots.Mission_Plots import *
18+
from SUAVE.Plots.Performance.Mission_Plots import *
1719

1820
import numpy as np
1921
import pylab as plt
2022

23+
2124
# ----------------------------------------------------------------------
2225
# Main
2326
# ----------------------------------------------------------------------

tut_solar_uav.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,20 @@
77
# Imports
88
# ----------------------------------------------------------------------
99
import SUAVE
10+
if not SUAVE.__version__=='2.5.0':
11+
assert('These tutorials only work with the SUAVE 2.5.0 release')
1012
from SUAVE.Core import Units, Data
1113

1214
import numpy as np
1315
import pylab as plt
1416
import time
1517

16-
from SUAVE.Plots.Mission_Plots import *
18+
from SUAVE.Plots.Performance.Mission_Plots import *
1719
from SUAVE.Components.Energy.Networks.Solar import Solar
1820
from SUAVE.Methods.Propulsion import propeller_design
1921
from SUAVE.Methods.Power.Battery.Sizing import initialize_from_mass
2022

23+
2124
# ----------------------------------------------------------------------
2225
# Main
2326
# ----------------------------------------------------------------------

0 commit comments

Comments
 (0)