Skip to content

Commit 517e67b

Browse files
committed
updated existing tutorials
1 parent ee8e53b commit 517e67b

11 files changed

Lines changed: 36 additions & 44 deletions

File tree

B737_AVL_Tutorial/tut_mission_B737_AVL.py

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,11 @@
88

99
# SUAVE Imports
1010
import SUAVE
11-
assert SUAVE.__version__=='2.5.0', 'These tutorials only work with the SUAVE 2.5.0 release'
11+
assert SUAVE.__version__=='2.5.2', 'These tutorials only work with the SUAVE 2.5.2 release'
1212

13-
from SUAVE.Core import Data, Units
13+
from SUAVE.Core import Units
1414
from SUAVE.Plots.Performance.Mission_Plots import *
1515
from SUAVE.Methods.Propulsion.turbofan_sizing import turbofan_sizing
16-
from SUAVE.Methods.Geometry.Two_Dimensional.Cross_Section.Propulsion import compute_turbofan_geometry
17-
from SUAVE.Input_Output.Results import print_parasite_drag, \
18-
print_compress_drag, \
19-
print_engine_data, \
20-
print_mission_breakdown, \
21-
print_weight_breakdown
2216

2317
# Python Imports
2418
import numpy as np
@@ -113,15 +107,16 @@ def base_analysis(vehicle):
113107
# Aerodynamics Analysis
114108
aerodynamics = SUAVE.Analyses.Aerodynamics.AVL()
115109
aerodynamics.process.compute.lift.inviscid.settings.filenames.avl_bin_name = 'CHANGE ME TO YOUR DIRECTORY'
116-
#aerodynamics.process.compute.lift.inviscid.settings.spanwise_vortex_density = 3
110+
#aerodynamics.settings.number_spanwise_vortices = 5
111+
#aerodynamics.settings.number_chordwise_vortices = 3
117112
aerodynamics.geometry = vehicle
118113
analyses.append(aerodynamics)
119114

120115
# ------------------------------------------------------------------
121116
# Stability Analysis
122117
stability = SUAVE.Analyses.Stability.AVL()
123118
stability.settings.filenames.avl_bin_name = 'CHANGE ME TO YOUR DIRECTORY'
124-
#stability.settings.spanwise_vortex_density = 3
119+
125120
stability.geometry = vehicle
126121
analyses.append(stability)
127122

@@ -179,22 +174,6 @@ def vehicle_setup():
179174
vehicle.systems.control = "fully powered"
180175
vehicle.systems.accessories = "medium range"
181176

182-
# ------------------------------------------------------------------
183-
# Landing Gear
184-
# ------------------------------------------------------------------
185-
# used for noise calculations
186-
landing_gear = SUAVE.Components.Landing_Gear.Landing_Gear()
187-
landing_gear.tag = "main_landing_gear"
188-
189-
landing_gear.main_tire_diameter = 1.12000 * Units.m
190-
landing_gear.nose_tire_diameter = 0.6858 * Units.m
191-
landing_gear.main_strut_length = 1.8 * Units.m
192-
landing_gear.nose_strut_length = 1.3 * Units.m
193-
landing_gear.main_units = 2 #number of main landing gear units
194-
landing_gear.nose_units = 1 #number of nose landing gear
195-
landing_gear.main_wheels = 2 #number of wheels on the main landing gear
196-
landing_gear.nose_wheels = 2 #number of wheels on the nose landing gear
197-
vehicle.landing_gear = landing_gear
198177

199178
# ------------------------------------------------------------------
200179
# Main Wing

BWB_CFD/BWB.py

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

1010
import SUAVE
11-
assert SUAVE.__version__=='2.5.0', 'These tutorials only work with the SUAVE 2.5.0 release'
11+
assert SUAVE.__version__=='2.5.2', 'These tutorials only work with the SUAVE 2.5.2 release'
1212

1313
import numpy as np
1414
import pylab as plt

BWB_CFD/base_data.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# AoA Mach CL CD
2+
0.00000000 0.30000000 0.00415459 0.00111181
3+
0.00000000 0.50000000 0.00413721 0.00147859
4+
0.00000000 0.70000000 0.00453948 0.00248097
5+
0.00000000 0.85000000 0.00746666 0.01186390
6+
0.05235988 0.30000000 0.20388958 0.00432118
7+
0.05235988 0.50000000 0.21483924 0.00532740
8+
0.05235988 0.70000000 0.24112666 0.00817240
9+
0.05235988 0.85000000 0.30532633 0.03115450
10+
0.10471976 0.30000000 0.40011425 0.01441278
11+
0.10471976 0.50000000 0.41798452 0.01788826
12+
0.10471976 0.70000000 0.45717927 0.02884358
13+
0.10471976 0.85000000 0.52613515 0.07289007

Regional_Jet_Optimization/Optimize.py

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

1010
import SUAVE
11-
assert SUAVE.__version__=='2.5.0', 'These tutorials only work with the SUAVE 2.5.0 release'
11+
assert SUAVE.__version__=='2.5.2', 'These tutorials only work with the SUAVE 2.5.2 release'
1212
from SUAVE.Core import Units, Data
1313
import numpy as np
1414
import Vehicles
@@ -30,7 +30,7 @@ def main():
3030
## Base Input Values
3131
output = problem.objective()
3232

33-
## Uncomment to view contours of the design space
33+
# Uncomment to view contours of the design space
3434
#variable_sweep(problem)
3535

3636
# Uncomment for the first optimization

Solar_UAV_Optimization/Optimize.py

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

1010
import SUAVE
11-
assert SUAVE.__version__=='2.5.0', 'These tutorials only work with the SUAVE 2.5.0 release'
11+
assert SUAVE.__version__=='2.5.2', 'These tutorials only work with the SUAVE 2.5.2 release'
1212

1313
from SUAVE.Core import Units, Data
1414
import numpy as np

Solar_UAV_Optimization/Plot_Mission.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,13 @@ def plot_mission(results,line_style='bo-'):
1919
# Plot Solar Conditions
2020
plot_solar_flux(results)
2121

22-
# Plot Aircraft Electronics
23-
plot_battery_pack_conditions(results)
22+
# Plot Aerodynamic Forces
23+
plot_aerodynamic_forces(results, line_style)
24+
25+
# Plot Aerodynamic Coefficients
26+
plot_aerodynamic_coefficients(results, line_style)
2427

2528
return
2629

2730
if __name__ == '__main__':
28-
main()
2931
plt.show()

Solar_UAV_Optimization/Vehicles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ def base_setup():
205205
# Component 8 the Battery
206206
bat = SUAVE.Components.Energy.Storages.Batteries.Constant_Mass.Lithium_Ion()
207207
bat.mass_properties.mass = 3.0 * Units.kg
208-
bat.specific_energy = 200. *Units.Wh/Units.kg
208+
bat.specific_energy = 400. *Units.Wh/Units.kg
209209
bat.resistance = 0.003
210210
initialize_from_mass(bat,bat.mass_properties.mass)
211211
net.battery = bat

tut_concorde.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@
1212
# ----------------------------------------------------------------------
1313

1414
import SUAVE
15-
assert SUAVE.__version__=='2.5.0', 'These tutorials only work with the SUAVE 2.5.0 release'
16-
from SUAVE.Core import Units, Data
15+
assert SUAVE.__version__=='2.5.2', 'These tutorials only work with the SUAVE 2.5.2 release'
16+
from SUAVE.Core import Units
1717
from SUAVE.Plots.Performance.Mission_Plots import *
1818
from SUAVE.Methods.Propulsion.turbojet_sizing import turbojet_sizing
1919

20-
import numpy as np
2120
import pylab as plt
2221

2322
from copy import deepcopy

tut_mission_B737.py

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

2020
# SUAVE Imports
2121
import SUAVE
22-
assert SUAVE.__version__=='2.5.0', 'These tutorials only work with the SUAVE 2.5.0 release'
22+
assert SUAVE.__version__=='2.5.2', 'These tutorials only work with the SUAVE 2.5.2 release'
2323
from SUAVE.Core import Data, Units
2424
# The Data import here is a native SUAVE data structure that functions similarly to a dictionary.
2525
# However, iteration directly returns values, and values can be retrieved either with the

tut_payload_range.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,13 @@
99
# ----------------------------------------------------------------------
1010

1111
import SUAVE
12-
assert SUAVE.__version__=='2.5.0', 'These tutorials only work with the SUAVE 2.5.0 release'
13-
from SUAVE.Core import Units, Data
12+
assert SUAVE.__version__=='2.5.2', 'These tutorials only work with the SUAVE 2.5.2 release'
13+
from SUAVE.Core import Units
1414
from SUAVE.Methods.Propulsion.turbofan_sizing import turbofan_sizing
1515
from SUAVE.Methods.Performance import payload_range
1616
from SUAVE.Methods.Geometry.Two_Dimensional.Planform import wing_planform
1717
from SUAVE.Plots.Performance.Mission_Plots import *
1818

19-
import numpy as np
2019
import pylab as plt
2120

2221

0 commit comments

Comments
 (0)