Skip to content

Commit 7a5a446

Browse files
authored
Merge pull request #18 from suavecode/develop
Develop
2 parents dc8409f + 9ed0a56 commit 7a5a446

File tree

10 files changed

+474
-500
lines changed

10 files changed

+474
-500
lines changed

B737_AVL_Tutorial/tut_mission_B737_AVL.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -213,17 +213,8 @@ def vehicle_setup():
213213
wing.symmetric = True
214214
wing.high_lift = True
215215
wing.dynamic_pressure_ratio = 1.0
216-
217-
# ------------------------------------------------------------------
218-
# Flaps
219-
# ------------------------------------------------------------------
220-
wing.flaps.chord = 0.30 # 30% of the chord
221-
wing.flaps.span_start = 0.10 # 10% of the span
222-
wing.flaps.span_end = 0.75
223-
wing.flaps.type = 'double_slotted'
224216

225-
# add to vehicle
226-
vehicle.append_component(wing)
217+
vehicle.append_component(wing)
227218

228219
# ------------------------------------------------------------------
229220
# Horizontal Stabilizer
@@ -242,8 +233,6 @@ def vehicle_setup():
242233
wing.chords.tip = .955 * Units.meter
243234
wing.chords.mean_aerodynamic = 8.0 * Units.meter
244235
wing.areas.reference = 32.488 * Units['meters**2']
245-
wing.areas.exposed = 199.7792 * Units['meters**2']
246-
wing.areas.wetted = 249.724 * Units['meters**2']
247236
wing.twists.root = 3.0 * Units.degrees
248237
wing.twists.tip = 3.0 * Units.degrees
249238
wing.origin = [32.83,0,1.14] # meters
@@ -262,7 +251,7 @@ def vehicle_setup():
262251
wing.tag = 'vertical_stabilizer'
263252

264253
wing.aspect_ratio = 1.91
265-
wing.sweeps.quarter_chord = 40. * Units.deg
254+
wing.sweeps.quarter_chord = 25. * Units.deg
266255
wing.thickness_to_chord = 0.08
267256
wing.taper = 0.25
268257
wing.span_efficiency = 0.9

Regional_Jet_Optimization/Procedure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def post_process(nexus):
230230
# Static stability calculations
231231
CMA = -10.
232232
for segment in results.base.segments.values():
233-
max_CMA = np.max(segment.conditions.stability.static.cm_alpha[:,0])
233+
max_CMA = np.max(segment.conditions.stability.static.Cm_alpha[:,0])
234234
if max_CMA > CMA:
235235
CMA = max_CMA
236236

Regional_Jet_Optimization/Vehicles.py

Lines changed: 177 additions & 203 deletions
Large diffs are not rendered by default.

Solar_UAV_Optimization/Missions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def mission(analyses,vehicle):
5757
# segment attributes
5858
segment.state.numerics.number_control_points = 50
5959
segment.dynamic_pressure = 115.0 * Units.pascals
60-
segment.start_time = time.strptime("Tue, Jun 21 11:00:00 2017", "%a, %b %d %H:%M:%S %Y",)
60+
segment.start_time = time.strptime("Tue, Jun 21 11:00:00 2020", "%a, %b %d %H:%M:%S %Y",)
6161
segment.altitude = 1000.0 * Units.feet
6262
segment.distance = 1000.0 * Units.km
6363
segment.charge_ratio = 1.0

Solar_UAV_Optimization/Procedure.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,7 @@ def simple_sizing(nexus):
105105

106106
# Resize the motor
107107
motor = vec.propulsors.network.motor
108-
kv = motor.speed_constant
109-
motor = size_from_kv(motor, kv)
108+
motor = size_from_kv(motor)
110109

111110
# diff the new data
112111
vec.store_diff()

Solar_UAV_Optimization/Vehicles.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def base_setup():
5252
# Main Wing
5353
# ------------------------------------------------------------------
5454

55-
wing = SUAVE.Components.Wings.Wing()
55+
wing = SUAVE.Components.Wings.Main_Wing()
5656
wing.tag = 'main_wing'
5757

5858
wing.areas.reference = vehicle.reference_area
@@ -84,7 +84,7 @@ def base_setup():
8484
# Horizontal Stabilizer
8585
# ------------------------------------------------------------------
8686

87-
wing = SUAVE.Components.Wings.Wing()
87+
wing = SUAVE.Components.Wings.Horizontal_Tail()
8888
wing.tag = 'horizontal_stabilizer'
8989

9090
wing.aspect_ratio = 10.
@@ -116,7 +116,7 @@ def base_setup():
116116
# Vertical Stabilizer
117117
# ------------------------------------------------------------------
118118

119-
wing = SUAVE.Components.Wings.Wing()
119+
wing = SUAVE.Components.Wings.Vertical_Tail()
120120
wing.tag = 'vertical_stabilizer'
121121

122122
wing.aspect_ratio = 10.
@@ -181,8 +181,8 @@ def base_setup():
181181

182182
# Component 4 the Motor
183183
motor = SUAVE.Components.Energy.Converters.Motor_Lo_Fid()
184-
kv = 800. * Units['rpm/volt'] # RPM/volt is standard
185-
motor = size_from_kv(motor, kv)
184+
motor.speed_constant = 800. * Units['rpm/volt'] # RPM/volt is standard
185+
motor = size_from_kv(motor)
186186
motor.gear_ratio = 1. # Gear ratio, no gearbox
187187
motor.gearbox_efficiency = 1. # Gear box efficiency, no gearbox
188188
motor.motor_efficiency = 0.825;

tut_concorde.py

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -154,21 +154,23 @@ def vehicle_setup():
154154
vehicle.mass_properties.cargo = 1000. * Units.kilogram
155155

156156
# envelope properties
157-
vehicle.envelope.ultimate_load = 3.5
158-
vehicle.envelope.limit_load = 1.5
157+
vehicle.envelope.ultimate_load = 3.75
158+
vehicle.envelope.limit_load = 2.5
159159

160160
# basic parameters
161-
vehicle.reference_area = 358.25 * Units['meter**2']
162-
vehicle.passengers = 100
163-
vehicle.systems.control = "fully powered"
164-
vehicle.systems.accessories = "long range"
161+
vehicle.reference_area = 358.25
162+
vehicle.passengers = 100
163+
vehicle.systems.control = "fully powered"
164+
vehicle.systems.accessories = "long range"
165+
vehicle.maximum_cross_sectional_area = 13.9
166+
vehicle.total_length = 61.66
165167

166168

167169
# ------------------------------------------------------------------
168170
# Main Wing
169171
# ------------------------------------------------------------------
170172

171-
wing = SUAVE.Components.Wings.Wing()
173+
wing = SUAVE.Components.Wings.Main_Wing()
172174
wing.tag = 'main_wing'
173175

174176
wing.aspect_ratio = 1.83
@@ -203,7 +205,7 @@ def vehicle_setup():
203205
# Vertical Stabilizer
204206
# ------------------------------------------------------------------
205207

206-
wing = SUAVE.Components.Wings.Wing()
208+
wing = SUAVE.Components.Wings.Vertical_Tail()
207209
wing.tag = 'vertical_stabilizer'
208210

209211
wing.aspect_ratio = 0.74
@@ -452,9 +454,6 @@ def configs_setup(vehicle):
452454
config = SUAVE.Components.Configs.Config(base_config)
453455
config.tag = 'takeoff'
454456

455-
config.wings['main_wing'].flaps.angle = 0. * Units.deg
456-
config.wings['main_wing'].slats.angle = 0. * Units.deg
457-
458457
config.V2_VS_ratio = 1.21
459458
config.maximum_lift_coefficient = 2.
460459

@@ -466,9 +465,6 @@ def configs_setup(vehicle):
466465

467466
config = SUAVE.Components.Configs.Config(base_config)
468467
config.tag = 'landing'
469-
470-
config.wings['main_wing'].flaps_angle = 0. * Units.deg
471-
config.wings['main_wing'].slats_angle = 0. * Units.deg
472468

473469
config.Vref_VS_ratio = 1.23
474470
config.maximum_lift_coefficient = 2.

tut_mission_B737.py

Lines changed: 39 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#
33
# Created: Aug 2014, SUAVE Team
44
# Modified: Aug 2017, SUAVE Team
5+
# Mar 2020, E. Botero
56

67
# ----------------------------------------------------------------------
78
# Imports
@@ -235,13 +236,34 @@ def vehicle_setup():
235236
# ------------------------------------------------------------------
236237
# Flaps
237238
# ------------------------------------------------------------------
238-
wing.flaps.chord = 0.30 # 30% of the chord
239-
wing.flaps.span_start = 0.10 # 10% of the span
240-
wing.flaps.span_end = 0.75
241-
wing.flaps.type = 'double_slotted'
242-
239+
240+
flap = SUAVE.Components.Wings.Control_Surfaces.Flap()
241+
flap.tag = 'flap'
242+
flap.span_fraction_start = 0.10
243+
flap.span_fraction_end = 0.75
244+
flap.deflection = 0.0 * Units.degrees
245+
flap.configuration_type = 'double_slotted'
246+
flap.chord_fraction = 0.30
247+
wing.append_control_surface(flap)
248+
249+
slat = SUAVE.Components.Wings.Control_Surfaces.Slat()
250+
slat.tag = 'slat'
251+
slat.span_fraction_start = 0.324
252+
slat.span_fraction_end = 0.963
253+
slat.deflection = 0.0 * Units.degrees
254+
slat.chord_fraction = 0.1
255+
wing.append_control_surface(slat)
256+
257+
aileron = SUAVE.Components.Wings.Control_Surfaces.Aileron()
258+
aileron.tag = 'aileron'
259+
aileron.span_fraction_start = 0.7
260+
aileron.span_fraction_end = 0.963
261+
aileron.deflection = 0.0 * Units.degrees
262+
aileron.chord_fraction = 0.16
263+
wing.append_control_surface(aileron)
264+
243265
# add to vehicle
244-
vehicle.append_component(wing)
266+
vehicle.append_component(wing)
245267

246268
# ------------------------------------------------------------------
247269
# Horizontal Stabilizer
@@ -547,8 +569,8 @@ def configs_setup(vehicle):
547569
# ------------------------------------------------------------------
548570
config = SUAVE.Components.Configs.Config(base_config)
549571
config.tag = 'takeoff'
550-
config.wings['main_wing'].flaps.angle = 20. * Units.deg
551-
config.wings['main_wing'].slats.angle = 25. * Units.deg
572+
config.wings['main_wing'].control_surfaces.flap.deflection = 20. * Units.deg
573+
config.wings['main_wing'].control_surfaces.slat.deflection = 25. * Units.deg
552574
config.max_lift_coefficient_factor = 1.
553575

554576
configs.append(config)
@@ -558,9 +580,9 @@ def configs_setup(vehicle):
558580
# ------------------------------------------------------------------
559581
config = SUAVE.Components.Configs.Config(base_config)
560582
config.tag = 'cutback'
561-
config.wings['main_wing'].flaps.angle = 20. * Units.deg
562-
config.wings['main_wing'].slats.angle = 20. * Units.deg
563-
config.max_lift_coefficient_factor = 1. #0.95
583+
config.wings['main_wing'].control_surfaces.flap.deflection = 20. * Units.deg
584+
config.wings['main_wing'].control_surfaces.slat.deflection = 20. * Units.deg
585+
config.max_lift_coefficient_factor = 1.
564586

565587
configs.append(config)
566588

@@ -571,9 +593,9 @@ def configs_setup(vehicle):
571593
config = SUAVE.Components.Configs.Config(base_config)
572594
config.tag = 'landing'
573595

574-
config.wings['main_wing'].flaps.angle = 30. * Units.deg
575-
config.wings['main_wing'].slats.angle = 25. * Units.deg
576-
config.max_lift_coefficient_factor = 1. #0.95
596+
config.wings['main_wing'].control_surfaces.flap.deflection = 30. * Units.deg
597+
config.wings['main_wing'].control_surfaces.slat.deflection = 25. * Units.deg
598+
config.max_lift_coefficient_factor = 1.
577599

578600
configs.append(config)
579601

@@ -584,9 +606,9 @@ def configs_setup(vehicle):
584606
config = SUAVE.Components.Configs.Config(base_config)
585607
config.tag = 'short_field_takeoff'
586608

587-
config.wings['main_wing'].flaps.angle = 20. * Units.deg
588-
config.wings['main_wing'].slats.angle = 20. * Units.deg
589-
config.max_lift_coefficient_factor = 1. #0.95
609+
config.wings['main_wing'].control_surfaces.flap.deflection = 20. * Units.deg
610+
config.wings['main_wing'].control_surfaces.slat.deflection = 20. * Units.deg
611+
config.max_lift_coefficient_factor = 1.
590612

591613
configs.append(config)
592614

0 commit comments

Comments
 (0)