Skip to content

Commit 2296803

Browse files
authored
Merge pull request #8 from suavecode/develop
Tutorial Updates for 1.0
2 parents ab8d221 + e490bc6 commit 2296803

16 files changed

+803
-3697
lines changed

BWB_CFD/BWB.py

Lines changed: 0 additions & 945 deletions
This file was deleted.

BWB_CFD/base_data.txt

Lines changed: 0 additions & 13 deletions
This file was deleted.

Regional_Jet_Optimization/Analyses.py

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Analyses.py
22
#
3-
# Created: Mar. 2016, M. Vegh
4-
# Modified:
3+
# Created: Mar 2016, M. Vegh
4+
# Modified: Aug 2017, E. Botero
55

66
# ----------------------------------------------------------------------
77
# Imports
@@ -20,15 +20,11 @@ def setup(configs):
2020
# build a base analysis for each config
2121
for tag,config in configs.items():
2222
analysis = base(config)
23+
if tag == 'cruise_spoilers':
24+
# this is done since drag is not sufficient for the desired profile
25+
analysis.aerodynamics.settings.spoiler_drag_increment = 0.005
2326
analyses[tag] = analysis
2427

25-
# adjust analyses for configs
26-
27-
# takeoff_analysis
28-
analyses.takeoff.aerodynamics.settings.drag_coefficient_increment = 0.0000
29-
30-
# landing analysis
31-
aerodynamics = analyses.landing.aerodynamics
3228

3329
return analyses
3430

@@ -51,16 +47,14 @@ def base(vehicle):
5147

5248
# ------------------------------------------------------------------
5349
# Weights
54-
weights = SUAVE.Analyses.Weights.Weights()
50+
weights = SUAVE.Analyses.Weights.Weights_Tube_Wing()
5551
weights.vehicle = vehicle
5652
analyses.append(weights)
5753

5854
# ------------------------------------------------------------------
5955
# Aerodynamics Analysis
6056
aerodynamics = SUAVE.Analyses.Aerodynamics.Fidelity_Zero()
6157
aerodynamics.geometry = vehicle
62-
63-
aerodynamics.settings.drag_coefficient_increment = 0.0000
6458
analyses.append(aerodynamics)
6559

6660
# ------------------------------------------------------------------
@@ -72,7 +66,7 @@ def base(vehicle):
7266
# ------------------------------------------------------------------
7367
# Energy
7468
energy= SUAVE.Analyses.Energy.Energy()
75-
energy.network = vehicle.propulsors #what is called throughout the mission (at every time step))
69+
energy.network = vehicle.propulsors
7670
analyses.append(energy)
7771

7872
# ------------------------------------------------------------------
@@ -86,5 +80,4 @@ def base(vehicle):
8680
atmosphere.features.planet = planet.features
8781
analyses.append(atmosphere)
8882

89-
# done!
9083
return analyses

Regional_Jet_Optimization/Missions.py

Lines changed: 6 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
# Missions.py
22
#
33
# Created: Mar 2016, M. Vegh
4-
# Modified:
5-
4+
# Modified: Aug 2017, E. Botero
65

76
# ----------------------------------------------------------------------
87
# Imports
@@ -28,13 +27,7 @@ def setup(analyses):
2827
base_mission = base(analyses)
2928
missions.base = base_mission
3029

31-
32-
33-
34-
35-
3630
return missions
37-
3831

3932
def base(analyses):
4033

@@ -169,7 +162,7 @@ def base(analyses):
169162

170163

171164
# ------------------------------------------------------------------
172-
# Cruise Segment: constant speed, constant altitude
165+
# Cruise Segment: Constant Speed, Constant Altitude
173166
# ------------------------------------------------------------------
174167

175168
segment = Segments.Cruise.Constant_Speed_Constant_Altitude()
@@ -189,7 +182,7 @@ def base(analyses):
189182
mission.append_segment(segment)
190183

191184
# ------------------------------------------------------------------
192-
# First Descent Segment: consant speed, constant segment rate
185+
# First Descent Segment: Constant Speed, Constant Rate
193186
# ------------------------------------------------------------------
194187

195188
segment = Segments.Descent.Constant_Speed_Constant_Rate()
@@ -209,16 +202,15 @@ def base(analyses):
209202
# add to mission
210203
mission.append_segment(segment)
211204

212-
213205
# ------------------------------------------------------------------
214-
# Second Descent Segment: consant speed, constant segment rate
206+
# Second Descent Segment: Constant Speed, Constant Rate
215207
# ------------------------------------------------------------------
216208

217209
segment = Segments.Descent.Constant_Speed_Constant_Rate()
218210
segment.tag = "descent_2"
219211

220212
# connect vehicle configuration
221-
segment.analyses.extend( analyses.cruise )
213+
segment.analyses.extend( analyses.cruise_spoilers )
222214

223215
# segment attributes
224216
segment.atmosphere = atmosphere
@@ -231,9 +223,8 @@ def base(analyses):
231223
# append to mission
232224
mission.append_segment(segment)
233225

234-
235226
# ------------------------------------------------------------------
236-
# Third Descent Segment: consant speed, constant segment rate
227+
# Third Descent Segment: Constant Speed, Constant Rate
237228
# ------------------------------------------------------------------
238229

239230
segment = Segments.Descent.Constant_Speed_Constant_Rate()
@@ -263,10 +254,6 @@ def base(analyses):
263254
### Reserve mission
264255
#------------------------------------------------------------------
265256

266-
# ------------------------------------------------------------------
267-
# First Climb Segment: constant Mach, constant segment angle
268-
# ------------------------------------------------------------------
269-
270257
# ------------------------------------------------------------------
271258
# First Climb Segment: Constant Speed, Constant Throttle
272259
# ------------------------------------------------------------------
@@ -288,8 +275,6 @@ def base(analyses):
288275

289276
# add to misison
290277
mission.append_segment(segment)
291-
292-
293278

294279
# ------------------------------------------------------------------
295280
# Cruise Segment: constant speed, constant altitude
@@ -318,7 +303,6 @@ def base(analyses):
318303

319304
mission.append_segment(segment)
320305

321-
322306
# ------------------------------------------------------------------
323307
# Final Descent Segment: consant speed, constant segment rate
324308
# ------------------------------------------------------------------
@@ -327,13 +311,9 @@ def base(analyses):
327311
segment.tag = "reserve_descent_1"
328312

329313
segment.analyses.extend( analyses.landing )
330-
analyses.landing.aerodynamics.settings.spoiler_drag_increment = 0.00
331-
332314

333315
segment.altitude_end = 0.0 * Units.km
334316
segment.descent_rate = 3.0 * Units['m/s']
335-
336-
337317
segment.mach_end = 0.24
338318
segment.mach_start = 0.3
339319

@@ -344,13 +324,8 @@ def base(analyses):
344324
### Reserve mission completed
345325
#------------------------------------------------------------------
346326

347-
348327
return mission
349328

350-
351-
352-
353-
354329
# ----------------------------------------------------------------------
355330
# Call Main
356331
# ----------------------------------------------------------------------

0 commit comments

Comments
 (0)