Skip to content

Commit

Permalink
Merge pull request #8 from suavecode/develop
Browse files Browse the repository at this point in the history
Tutorial Updates for 1.0
  • Loading branch information
planes authored Aug 15, 2017
2 parents ab8d221 + e490bc6 commit 2296803
Show file tree
Hide file tree
Showing 16 changed files with 803 additions and 3,697 deletions.
945 changes: 0 additions & 945 deletions BWB_CFD/BWB.py

This file was deleted.

13 changes: 0 additions & 13 deletions BWB_CFD/base_data.txt

This file was deleted.

21 changes: 7 additions & 14 deletions Regional_Jet_Optimization/Analyses.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Analyses.py
#
# Created: Mar. 2016, M. Vegh
# Modified:
# Created: Mar 2016, M. Vegh
# Modified: Aug 2017, E. Botero

# ----------------------------------------------------------------------
# Imports
Expand All @@ -20,15 +20,11 @@ def setup(configs):
# build a base analysis for each config
for tag,config in configs.items():
analysis = base(config)
if tag == 'cruise_spoilers':
# this is done since drag is not sufficient for the desired profile
analysis.aerodynamics.settings.spoiler_drag_increment = 0.005
analyses[tag] = analysis

# adjust analyses for configs

# takeoff_analysis
analyses.takeoff.aerodynamics.settings.drag_coefficient_increment = 0.0000

# landing analysis
aerodynamics = analyses.landing.aerodynamics

return analyses

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

# ------------------------------------------------------------------
# Weights
weights = SUAVE.Analyses.Weights.Weights()
weights = SUAVE.Analyses.Weights.Weights_Tube_Wing()
weights.vehicle = vehicle
analyses.append(weights)

# ------------------------------------------------------------------
# Aerodynamics Analysis
aerodynamics = SUAVE.Analyses.Aerodynamics.Fidelity_Zero()
aerodynamics.geometry = vehicle

aerodynamics.settings.drag_coefficient_increment = 0.0000
analyses.append(aerodynamics)

# ------------------------------------------------------------------
Expand All @@ -72,7 +66,7 @@ def base(vehicle):
# ------------------------------------------------------------------
# Energy
energy= SUAVE.Analyses.Energy.Energy()
energy.network = vehicle.propulsors #what is called throughout the mission (at every time step))
energy.network = vehicle.propulsors
analyses.append(energy)

# ------------------------------------------------------------------
Expand All @@ -86,5 +80,4 @@ def base(vehicle):
atmosphere.features.planet = planet.features
analyses.append(atmosphere)

# done!
return analyses
37 changes: 6 additions & 31 deletions Regional_Jet_Optimization/Missions.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Missions.py
#
# Created: Mar 2016, M. Vegh
# Modified:

# Modified: Aug 2017, E. Botero

# ----------------------------------------------------------------------
# Imports
Expand All @@ -28,13 +27,7 @@ def setup(analyses):
base_mission = base(analyses)
missions.base = base_mission






return missions


def base(analyses):

Expand Down Expand Up @@ -169,7 +162,7 @@ def base(analyses):


# ------------------------------------------------------------------
# Cruise Segment: constant speed, constant altitude
# Cruise Segment: Constant Speed, Constant Altitude
# ------------------------------------------------------------------

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

# ------------------------------------------------------------------
# First Descent Segment: consant speed, constant segment rate
# First Descent Segment: Constant Speed, Constant Rate
# ------------------------------------------------------------------

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


# ------------------------------------------------------------------
# Second Descent Segment: consant speed, constant segment rate
# Second Descent Segment: Constant Speed, Constant Rate
# ------------------------------------------------------------------

segment = Segments.Descent.Constant_Speed_Constant_Rate()
segment.tag = "descent_2"

# connect vehicle configuration
segment.analyses.extend( analyses.cruise )
segment.analyses.extend( analyses.cruise_spoilers )

# segment attributes
segment.atmosphere = atmosphere
Expand All @@ -231,9 +223,8 @@ def base(analyses):
# append to mission
mission.append_segment(segment)


# ------------------------------------------------------------------
# Third Descent Segment: consant speed, constant segment rate
# Third Descent Segment: Constant Speed, Constant Rate
# ------------------------------------------------------------------

segment = Segments.Descent.Constant_Speed_Constant_Rate()
Expand Down Expand Up @@ -263,10 +254,6 @@ def base(analyses):
### Reserve mission
#------------------------------------------------------------------

# ------------------------------------------------------------------
# First Climb Segment: constant Mach, constant segment angle
# ------------------------------------------------------------------

# ------------------------------------------------------------------
# First Climb Segment: Constant Speed, Constant Throttle
# ------------------------------------------------------------------
Expand All @@ -288,8 +275,6 @@ def base(analyses):

# add to misison
mission.append_segment(segment)



# ------------------------------------------------------------------
# Cruise Segment: constant speed, constant altitude
Expand Down Expand Up @@ -318,7 +303,6 @@ def base(analyses):

mission.append_segment(segment)


# ------------------------------------------------------------------
# Final Descent Segment: consant speed, constant segment rate
# ------------------------------------------------------------------
Expand All @@ -327,13 +311,9 @@ def base(analyses):
segment.tag = "reserve_descent_1"

segment.analyses.extend( analyses.landing )
analyses.landing.aerodynamics.settings.spoiler_drag_increment = 0.00


segment.altitude_end = 0.0 * Units.km
segment.descent_rate = 3.0 * Units['m/s']


segment.mach_end = 0.24
segment.mach_start = 0.3

Expand All @@ -344,13 +324,8 @@ def base(analyses):
### Reserve mission completed
#------------------------------------------------------------------


return mission





# ----------------------------------------------------------------------
# Call Main
# ----------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 2296803

Please sign in to comment.