Skip to content

Commit

Permalink
requiring 2.5 to work and updating plotting
Browse files Browse the repository at this point in the history
  • Loading branch information
planes committed Nov 4, 2021
1 parent d0d8497 commit 0b43a35
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 10 deletions.
6 changes: 5 additions & 1 deletion B737_AVL_Tutorial/tut_mission_B737_AVL.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@

# SUAVE Imports
import SUAVE
if not SUAVE.__version__=='2.5.0':
assert('These tutorials only work with the SUAVE 2.5.0 release')

from SUAVE.Core import Data, Units
from SUAVE.Plots.Mission_Plots import *
from SUAVE.Plots.Performance.Mission_Plots import *
from SUAVE.Methods.Propulsion.turbofan_sizing import turbofan_sizing
from SUAVE.Methods.Geometry.Two_Dimensional.Cross_Section.Propulsion import compute_turbofan_geometry
from SUAVE.Input_Output.Results import print_parasite_drag, \
Expand All @@ -22,6 +25,7 @@
import numpy as np
import pylab as plt


# ----------------------------------------------------------------------
# Main
# ----------------------------------------------------------------------
Expand Down
8 changes: 7 additions & 1 deletion BWB_CFD/BWB.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# ----------------------------------------------------------------------

import SUAVE
if not SUAVE.__version__=='2.5.0':
assert('These tutorials only work with the SUAVE 2.5.0 release')

import numpy as np
import pylab as plt
Expand All @@ -20,7 +22,11 @@
from SUAVE.Methods.Propulsion.turbofan_sizing import turbofan_sizing
from SUAVE.Methods.Geometry.Two_Dimensional.Cross_Section.Propulsion import compute_turbofan_geometry

from SUAVE.Plots.Mission_Plots import *
from SUAVE.Plots.Performance.Mission_Plots import *

if not SUAVE.__version__=='2.5.0':
assert('These tutorials only work with the SUAVE 2.5.0 release')


# ----------------------------------------------------------------------
# Main
Expand Down
2 changes: 2 additions & 0 deletions Regional_Jet_Optimization/Optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# ----------------------------------------------------------------------

import SUAVE
if not SUAVE.__version__=='2.5.0':
assert('These tutorials only work with the SUAVE 2.5.0 release')
from SUAVE.Core import Units, Data
import numpy as np
import Vehicles
Expand Down
2 changes: 1 addition & 1 deletion Regional_Jet_Optimization/Plot_Mission.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import SUAVE
from SUAVE.Core import Units
from SUAVE.Plots.Mission_Plots import *
from SUAVE.Plots.Performance.Mission_Plots import *
import pylab as plt

# ----------------------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions Solar_UAV_Optimization/Optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
# Imports
# ----------------------------------------------------------------------

import SUAVE
if not SUAVE.__version__=='2.5.0':
assert('These tutorials only work with the SUAVE 2.5.0 release')

from SUAVE.Core import Units, Data
import numpy as np
import Vehicles
Expand Down
2 changes: 1 addition & 1 deletion Solar_UAV_Optimization/Plot_Mission.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# Imports
# ----------------------------------------------------------------------

from SUAVE.Plots.Mission_Plots import *
from SUAVE.Plots.Performance.Mission_Plots import *
from SUAVE.Core import Units
import pylab as plt

Expand Down
7 changes: 6 additions & 1 deletion tut_concorde.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,18 @@
# ----------------------------------------------------------------------

import SUAVE
if not SUAVE.__version__=='2.5.0':
assert('These tutorials only work with the SUAVE 2.5.0 release')

from SUAVE.Core import Units, Data
from SUAVE.Plots.Mission_Plots import *
from SUAVE.Plots.Performance.Mission_Plots import *
from SUAVE.Methods.Propulsion.turbojet_sizing import turbojet_sizing

import numpy as np
import pylab as plt



# ----------------------------------------------------------------------
# Main
# ----------------------------------------------------------------------
Expand Down
8 changes: 5 additions & 3 deletions tut_mission_B737.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@

# SUAVE Imports
import SUAVE
if not SUAVE.__version__=='2.5.0':
assert('These tutorials only work with the SUAVE 2.5.0 release')
from SUAVE.Core import Data, Units
# The Data import here is a native SUAVE data structure that functions similarly to a dictionary.
# However, iteration directly returns values, and values can be retrieved either with the
Expand All @@ -28,7 +30,7 @@
# This is because SUAVE functions generally operate using metric units, so inputs must be
# converted. To use a length of 20 feet, set l = 20 * Units.ft . Additionally, to convert to SUAVE
# output back to a desired units, use l_ft = l_m / Units.ft
from SUAVE.Plots.Mission_Plots import *
from SUAVE.Plots.Performance.Mission_Plots import *
# These are a variety of plotting routines that simplify the plotting process for commonly
# requested metrics. Plots of specifically desired metrics can also be manually created.
from SUAVE.Methods.Propulsion.turbofan_sizing import turbofan_sizing
Expand Down Expand Up @@ -139,8 +141,8 @@ def base_analysis(vehicle):

# ------------------------------------------------------------------
# Energy
energy= SUAVE.Analyses.Energy.Energy()
energy.network = vehicle.propulsors
energy = SUAVE.Analyses.Energy.Energy()
energy.network = vehicle.networks
analyses.append(energy)

# ------------------------------------------------------------------
Expand Down
5 changes: 4 additions & 1 deletion tut_payload_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,18 @@
# ----------------------------------------------------------------------

import SUAVE
if not SUAVE.__version__=='2.5.0':
assert('These tutorials only work with the SUAVE 2.5.0 release')
from SUAVE.Core import Units, Data
from SUAVE.Methods.Propulsion.turbofan_sizing import turbofan_sizing
from SUAVE.Methods.Performance import payload_range
from SUAVE.Methods.Geometry.Two_Dimensional.Planform import wing_planform
from SUAVE.Plots.Mission_Plots import *
from SUAVE.Plots.Performance.Mission_Plots import *

import numpy as np
import pylab as plt


# ----------------------------------------------------------------------
# Main
# ----------------------------------------------------------------------
Expand Down
5 changes: 4 additions & 1 deletion tut_solar_uav.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,20 @@
# Imports
# ----------------------------------------------------------------------
import SUAVE
if not SUAVE.__version__=='2.5.0':
assert('These tutorials only work with the SUAVE 2.5.0 release')
from SUAVE.Core import Units, Data

import numpy as np
import pylab as plt
import time

from SUAVE.Plots.Mission_Plots import *
from SUAVE.Plots.Performance.Mission_Plots import *
from SUAVE.Components.Energy.Networks.Solar import Solar
from SUAVE.Methods.Propulsion import propeller_design
from SUAVE.Methods.Power.Battery.Sizing import initialize_from_mass


# ----------------------------------------------------------------------
# Main
# ----------------------------------------------------------------------
Expand Down

0 comments on commit 0b43a35

Please sign in to comment.