Skip to content

Commit

Permalink
Merge pull request #18 from suavecode/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
planes authored Mar 22, 2020
2 parents dc8409f + 9ed0a56 commit 7a5a446
Show file tree
Hide file tree
Showing 10 changed files with 474 additions and 500 deletions.
15 changes: 2 additions & 13 deletions B737_AVL_Tutorial/tut_mission_B737_AVL.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,17 +213,8 @@ def vehicle_setup():
wing.symmetric = True
wing.high_lift = True
wing.dynamic_pressure_ratio = 1.0

# ------------------------------------------------------------------
# Flaps
# ------------------------------------------------------------------
wing.flaps.chord = 0.30 # 30% of the chord
wing.flaps.span_start = 0.10 # 10% of the span
wing.flaps.span_end = 0.75
wing.flaps.type = 'double_slotted'

# add to vehicle
vehicle.append_component(wing)
vehicle.append_component(wing)

# ------------------------------------------------------------------
# Horizontal Stabilizer
Expand All @@ -242,8 +233,6 @@ def vehicle_setup():
wing.chords.tip = .955 * Units.meter
wing.chords.mean_aerodynamic = 8.0 * Units.meter
wing.areas.reference = 32.488 * Units['meters**2']
wing.areas.exposed = 199.7792 * Units['meters**2']
wing.areas.wetted = 249.724 * Units['meters**2']
wing.twists.root = 3.0 * Units.degrees
wing.twists.tip = 3.0 * Units.degrees
wing.origin = [32.83,0,1.14] # meters
Expand All @@ -262,7 +251,7 @@ def vehicle_setup():
wing.tag = 'vertical_stabilizer'

wing.aspect_ratio = 1.91
wing.sweeps.quarter_chord = 40. * Units.deg
wing.sweeps.quarter_chord = 25. * Units.deg
wing.thickness_to_chord = 0.08
wing.taper = 0.25
wing.span_efficiency = 0.9
Expand Down
2 changes: 1 addition & 1 deletion Regional_Jet_Optimization/Procedure.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def post_process(nexus):
# Static stability calculations
CMA = -10.
for segment in results.base.segments.values():
max_CMA = np.max(segment.conditions.stability.static.cm_alpha[:,0])
max_CMA = np.max(segment.conditions.stability.static.Cm_alpha[:,0])
if max_CMA > CMA:
CMA = max_CMA

Expand Down
380 changes: 177 additions & 203 deletions Regional_Jet_Optimization/Vehicles.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Solar_UAV_Optimization/Missions.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def mission(analyses,vehicle):
# segment attributes
segment.state.numerics.number_control_points = 50
segment.dynamic_pressure = 115.0 * Units.pascals
segment.start_time = time.strptime("Tue, Jun 21 11:00:00 2017", "%a, %b %d %H:%M:%S %Y",)
segment.start_time = time.strptime("Tue, Jun 21 11:00:00 2020", "%a, %b %d %H:%M:%S %Y",)
segment.altitude = 1000.0 * Units.feet
segment.distance = 1000.0 * Units.km
segment.charge_ratio = 1.0
Expand Down
3 changes: 1 addition & 2 deletions Solar_UAV_Optimization/Procedure.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,7 @@ def simple_sizing(nexus):

# Resize the motor
motor = vec.propulsors.network.motor
kv = motor.speed_constant
motor = size_from_kv(motor, kv)
motor = size_from_kv(motor)

# diff the new data
vec.store_diff()
Expand Down
10 changes: 5 additions & 5 deletions Solar_UAV_Optimization/Vehicles.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def base_setup():
# Main Wing
# ------------------------------------------------------------------

wing = SUAVE.Components.Wings.Wing()
wing = SUAVE.Components.Wings.Main_Wing()
wing.tag = 'main_wing'

wing.areas.reference = vehicle.reference_area
Expand Down Expand Up @@ -84,7 +84,7 @@ def base_setup():
# Horizontal Stabilizer
# ------------------------------------------------------------------

wing = SUAVE.Components.Wings.Wing()
wing = SUAVE.Components.Wings.Horizontal_Tail()
wing.tag = 'horizontal_stabilizer'

wing.aspect_ratio = 10.
Expand Down Expand Up @@ -116,7 +116,7 @@ def base_setup():
# Vertical Stabilizer
# ------------------------------------------------------------------

wing = SUAVE.Components.Wings.Wing()
wing = SUAVE.Components.Wings.Vertical_Tail()
wing.tag = 'vertical_stabilizer'

wing.aspect_ratio = 10.
Expand Down Expand Up @@ -181,8 +181,8 @@ def base_setup():

# Component 4 the Motor
motor = SUAVE.Components.Energy.Converters.Motor_Lo_Fid()
kv = 800. * Units['rpm/volt'] # RPM/volt is standard
motor = size_from_kv(motor, kv)
motor.speed_constant = 800. * Units['rpm/volt'] # RPM/volt is standard
motor = size_from_kv(motor)
motor.gear_ratio = 1. # Gear ratio, no gearbox
motor.gearbox_efficiency = 1. # Gear box efficiency, no gearbox
motor.motor_efficiency = 0.825;
Expand Down
24 changes: 10 additions & 14 deletions tut_concorde.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,21 +154,23 @@ def vehicle_setup():
vehicle.mass_properties.cargo = 1000. * Units.kilogram

# envelope properties
vehicle.envelope.ultimate_load = 3.5
vehicle.envelope.limit_load = 1.5
vehicle.envelope.ultimate_load = 3.75
vehicle.envelope.limit_load = 2.5

# basic parameters
vehicle.reference_area = 358.25 * Units['meter**2']
vehicle.passengers = 100
vehicle.systems.control = "fully powered"
vehicle.systems.accessories = "long range"
vehicle.reference_area = 358.25
vehicle.passengers = 100
vehicle.systems.control = "fully powered"
vehicle.systems.accessories = "long range"
vehicle.maximum_cross_sectional_area = 13.9
vehicle.total_length = 61.66


# ------------------------------------------------------------------
# Main Wing
# ------------------------------------------------------------------

wing = SUAVE.Components.Wings.Wing()
wing = SUAVE.Components.Wings.Main_Wing()
wing.tag = 'main_wing'

wing.aspect_ratio = 1.83
Expand Down Expand Up @@ -203,7 +205,7 @@ def vehicle_setup():
# Vertical Stabilizer
# ------------------------------------------------------------------

wing = SUAVE.Components.Wings.Wing()
wing = SUAVE.Components.Wings.Vertical_Tail()
wing.tag = 'vertical_stabilizer'

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

config.wings['main_wing'].flaps.angle = 0. * Units.deg
config.wings['main_wing'].slats.angle = 0. * Units.deg

config.V2_VS_ratio = 1.21
config.maximum_lift_coefficient = 2.

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

config = SUAVE.Components.Configs.Config(base_config)
config.tag = 'landing'

config.wings['main_wing'].flaps_angle = 0. * Units.deg
config.wings['main_wing'].slats_angle = 0. * Units.deg

config.Vref_VS_ratio = 1.23
config.maximum_lift_coefficient = 2.
Expand Down
56 changes: 39 additions & 17 deletions tut_mission_B737.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# Created: Aug 2014, SUAVE Team
# Modified: Aug 2017, SUAVE Team
# Mar 2020, E. Botero

# ----------------------------------------------------------------------
# Imports
Expand Down Expand Up @@ -235,13 +236,34 @@ def vehicle_setup():
# ------------------------------------------------------------------
# Flaps
# ------------------------------------------------------------------
wing.flaps.chord = 0.30 # 30% of the chord
wing.flaps.span_start = 0.10 # 10% of the span
wing.flaps.span_end = 0.75
wing.flaps.type = 'double_slotted'


flap = SUAVE.Components.Wings.Control_Surfaces.Flap()
flap.tag = 'flap'
flap.span_fraction_start = 0.10
flap.span_fraction_end = 0.75
flap.deflection = 0.0 * Units.degrees
flap.configuration_type = 'double_slotted'
flap.chord_fraction = 0.30
wing.append_control_surface(flap)

slat = SUAVE.Components.Wings.Control_Surfaces.Slat()
slat.tag = 'slat'
slat.span_fraction_start = 0.324
slat.span_fraction_end = 0.963
slat.deflection = 0.0 * Units.degrees
slat.chord_fraction = 0.1
wing.append_control_surface(slat)

aileron = SUAVE.Components.Wings.Control_Surfaces.Aileron()
aileron.tag = 'aileron'
aileron.span_fraction_start = 0.7
aileron.span_fraction_end = 0.963
aileron.deflection = 0.0 * Units.degrees
aileron.chord_fraction = 0.16
wing.append_control_surface(aileron)

# add to vehicle
vehicle.append_component(wing)
vehicle.append_component(wing)

# ------------------------------------------------------------------
# Horizontal Stabilizer
Expand Down Expand Up @@ -547,8 +569,8 @@ def configs_setup(vehicle):
# ------------------------------------------------------------------
config = SUAVE.Components.Configs.Config(base_config)
config.tag = 'takeoff'
config.wings['main_wing'].flaps.angle = 20. * Units.deg
config.wings['main_wing'].slats.angle = 25. * Units.deg
config.wings['main_wing'].control_surfaces.flap.deflection = 20. * Units.deg
config.wings['main_wing'].control_surfaces.slat.deflection = 25. * Units.deg
config.max_lift_coefficient_factor = 1.

configs.append(config)
Expand All @@ -558,9 +580,9 @@ def configs_setup(vehicle):
# ------------------------------------------------------------------
config = SUAVE.Components.Configs.Config(base_config)
config.tag = 'cutback'
config.wings['main_wing'].flaps.angle = 20. * Units.deg
config.wings['main_wing'].slats.angle = 20. * Units.deg
config.max_lift_coefficient_factor = 1. #0.95
config.wings['main_wing'].control_surfaces.flap.deflection = 20. * Units.deg
config.wings['main_wing'].control_surfaces.slat.deflection = 20. * Units.deg
config.max_lift_coefficient_factor = 1.

configs.append(config)

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

config.wings['main_wing'].flaps.angle = 30. * Units.deg
config.wings['main_wing'].slats.angle = 25. * Units.deg
config.max_lift_coefficient_factor = 1. #0.95
config.wings['main_wing'].control_surfaces.flap.deflection = 30. * Units.deg
config.wings['main_wing'].control_surfaces.slat.deflection = 25. * Units.deg
config.max_lift_coefficient_factor = 1.

configs.append(config)

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

config.wings['main_wing'].flaps.angle = 20. * Units.deg
config.wings['main_wing'].slats.angle = 20. * Units.deg
config.max_lift_coefficient_factor = 1. #0.95
config.wings['main_wing'].control_surfaces.flap.deflection = 20. * Units.deg
config.wings['main_wing'].control_surfaces.slat.deflection = 20. * Units.deg
config.max_lift_coefficient_factor = 1.

configs.append(config)

Expand Down
Loading

0 comments on commit 7a5a446

Please sign in to comment.