Skip to content

Commit

Permalink
updating nacelles
Browse files Browse the repository at this point in the history
  • Loading branch information
planes committed Nov 7, 2021
1 parent 0b43a35 commit efd5f29
Show file tree
Hide file tree
Showing 7 changed files with 162 additions and 69 deletions.
27 changes: 25 additions & 2 deletions B737_AVL_Tutorial/tut_mission_B737_AVL.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import numpy as np
import pylab as plt

from copy import deepcopy

# ----------------------------------------------------------------------
# Main
Expand Down Expand Up @@ -308,6 +309,30 @@ def vehicle_setup():

# add to vehicle
vehicle.append_component(fuselage)


# ------------------------------------------------------------------
# Nacelles
# ------------------------------------------------------------------
nacelle = SUAVE.Components.Nacelles.Nacelle()
nacelle.tag = 'nacelle_1'
nacelle.length = 2.71
nacelle.inlet_diameter = 1.90
nacelle.diameter = 2.05
nacelle.areas.wetted = 1.1*np.pi*nacelle.diameter*nacelle.length
nacelle.origin = [[13.72, -4.86,-1.9]]
nacelle.flow_through = True
nacelle_airfoil = SUAVE.Components.Airfoils.Airfoil()
nacelle_airfoil.naca_4_series_airfoil = '2410'
nacelle.append_airfoil(nacelle_airfoil)

nacelle_2 = deepcopy(nacelle)
nacelle_2.tag = 'nacelle_2'
nacelle_2.origin = [[13.72, 4.86,-1.9]]

vehicle.append_component(nacelle)
vehicle.append_component(nacelle_2)


# ------------------------------------------------------------------
# Turbofan Network
Expand All @@ -320,8 +345,6 @@ def vehicle_setup():
# setup
turbofan.number_of_engines = 2
turbofan.bypass_ratio = 5.4
turbofan.engine_length = 2.71 * Units.meter
turbofan.nacelle_diameter = 2.05 * Units.meter
turbofan.origin = [[13.72, 4.86,-1.9],[13.72, -4.86,-1.9]]

#compute engine areas
Expand Down
29 changes: 24 additions & 5 deletions BWB_CFD/BWB.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@

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')
from copy import deepcopy


# ----------------------------------------------------------------------
Expand Down Expand Up @@ -334,6 +333,29 @@ def vehicle_setup():

# add to vehicle
vehicle.append_component(wing)

# ------------------------------------------------------------------
# Nacelle
# ------------------------------------------------------------------
nacelle = SUAVE.Components.Nacelles.Nacelle()
nacelle.diameter = 3.96 * Units.meters
nacelle.length = 289. * Units.inches
nacelle.tag = 'nacelle'
nacelle.origin = [[133.0 *Units.feet, 25.0*Units.feet, 6.5*Units.feet]]
nacelle.areas.wetted = nacelle.length *(2*np.pi*nacelle.diameter/2.)

nacelle_2 = deepcopy(nacelle)
nacelle_2.tag = 'nacelle_2'
nacelle_2.origin = [[145.0 *Units.feet, 0.0*Units.feet, 6.5*Units.feet]]

nacelle_3 = deepcopy(nacelle)
nacelle_3.tag = 'nacelle_3'
nacelle_3.origin = [[133.0 *Units.feet, -25.0*Units.feet, 6.5*Units.feet]]

vehicle.append_component(nacelle)
vehicle.append_component(nacelle_2)
vehicle.append_component(nacelle_3)


# ------------------------------------------------------------------
# Turbofan Network
Expand All @@ -345,9 +367,6 @@ def vehicle_setup():
# setup
turbofan.number_of_engines = 3.0
turbofan.bypass_ratio = 8.1
turbofan.engine_length = 289. * Units.inches
turbofan.nacelle_diameter = 3.96 * Units.meters
#turbofan.cooling_ratio = 1.0
turbofan.origin = [[133.0 *Units.feet, 25.0*Units.feet, 6.5*Units.feet],[145.0 *Units.feet, 0.0*Units.feet, 6.5*Units.feet],[133.0 *Units.feet, -25.0*Units.feet, 6.5*Units.feet]]

# working fluid
Expand Down
43 changes: 29 additions & 14 deletions Regional_Jet_Optimization/Vehicles.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
from SUAVE.Methods.Propulsion.turbofan_sizing import turbofan_sizing
from SUAVE.Methods.Geometry.Two_Dimensional.Planform import wing_planform

from copy import deepcopy

# ----------------------------------------------------------------------
# Define the Vehicle
# ----------------------------------------------------------------------
Expand Down Expand Up @@ -196,33 +198,45 @@ def base_setup():

# add to vehicle
vehicle.append_component(fuselage)



# -----------------------------------------------------------------
# Design the Nacelle
# -----------------------------------------------------------------
nacelle = SUAVE.Components.Nacelles.Nacelle()
nacelle.diameter = 2.05
nacelle.length = 2.71
nacelle.tag = 'nacelle_1'
nacelle.inlet_diameter = 2.0
nacelle.origin = [[12.0,4.38,-2.1]]
Awet = 1.1*np.pi*nacelle.diameter*nacelle.length # 1.1 is simple coefficient
nacelle.areas.wetted = Awet
nacelle_airfoil = SUAVE.Components.Airfoils.Airfoil()
nacelle_airfoil.naca_4_series_airfoil = '2410'
nacelle.append_airfoil(nacelle_airfoil)

nacelle_2 = deepcopy(nacelle)
nacelle_2.tag = 'nacelle_2'
nacelle_2.origin = [[12.0,-4.38,-2.1]]

vehicle.append_component(nacelle)
vehicle.append_component(nacelle_2)


# ------------------------------------------------------------------
# Turbofan Network
# ------------------------------------------------------------------


#initialize the gas turbine network
gt_engine = SUAVE.Components.Energy.Networks.Turbofan()
gt_engine.tag = 'turbofan'
gt_engine.origin = [[12.0,4.38,-2.1],[12.0,-4.38,-2.1]]
gt_engine.number_of_engines = 2.0
gt_engine.bypass_ratio = 5.4
gt_engine.engine_length = 2.71
gt_engine.nacelle_diameter = 2.05
gt_engine.inlet_diameter = 2.0

#compute engine areas)
Awet = 1.1*np.pi*gt_engine.nacelle_diameter*gt_engine.engine_length # 1.1 is simple coefficient

#Assign engine area
gt_engine.areas.wetted = Awet

#set the working fluid for the network
working_fluid = SUAVE.Attributes.Gases.Air()

#add working fluid to the network
gt_engine.working_fluid = working_fluid
gt_engine.working_fluid = SUAVE.Attributes.Gases.Air()


#Component 1 : ram, to convert freestream static to stagnation quantities
Expand Down Expand Up @@ -332,6 +346,7 @@ def base_setup():
fuel.mass_properties.mass = vehicle.mass_properties.max_takeoff-vehicle.mass_properties.max_fuel
fuel.origin = vehicle.wings.main_wing.mass_properties.center_of_gravity
fuel.mass_properties.center_of_gravity= vehicle.wings.main_wing.aerodynamic_center

# ------------------------------------------------------------------
# Vehicle Definition Complete
# ------------------------------------------------------------------
Expand Down
37 changes: 31 additions & 6 deletions tut_concorde.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import numpy as np
import pylab as plt


from copy import deepcopy

# ----------------------------------------------------------------------
# Main
Expand Down Expand Up @@ -125,7 +125,7 @@ def base_analysis(vehicle):
# ------------------------------------------------------------------
# Energy
energy= SUAVE.Analyses.Energy.Energy()
energy.network = vehicle.propulsors #what is called throughout the mission (at every time step))
energy.network = vehicle.networks #what is called throughout the mission (at every time step))
analyses.append(energy)

# ------------------------------------------------------------------
Expand Down Expand Up @@ -265,6 +265,35 @@ def vehicle_setup():

# add to vehicle
vehicle.append_component(fuselage)

# ------------------------------------------------------------------
# the nacelle
# ------------------------------------------------------------------

nacelle = SUAVE.Components.Nacelles.Nacelle()
nacelle.diameter = 1.3
nacelle.tag = 'nacelle_L1'
nacelle.origin = [[36.56, 22, -1.9]]
nacelle.length = 12.0
nacelle.inlet_diameter = 1.1
nacelle.areas.wetted = 30.
vehicle.append_component(nacelle)

nacelle_2 = deepcopy(nacelle)
nacelle_2.tag = 'nacelle_2'
nacelle_2.origin = [[37.,5.3,-1.3]]
vehicle.append_component(nacelle_2)

nacelle_3 = deepcopy(nacelle)
nacelle_3.tag = 'nacelle_3'
nacelle_3.origin = [[37.,-5.3,-1.3]]
vehicle.append_component(nacelle_3)

nacelle_4 = deepcopy(nacelle)
nacelle_4.tag = 'nacelle_4'
nacelle_4.origin = [[37.,-6.,-1.3]]
vehicle.append_component(nacelle_4)


# ------------------------------------------------------------------
# Turbojet Network
Expand All @@ -277,10 +306,6 @@ def vehicle_setup():
# setup
turbojet.number_of_engines = 4.0
turbojet.engine_length = 12.0
turbojet.nacelle_diameter = 1.3 * Units.meter
turbojet.inlet_diameter = 1.1 * Units.meter
turbojet.areas = Data()
turbojet.areas.wetted = 12.5*4.7*2. * Units['meter**2'] # 4.7 is outer perimeter on one side
turbojet.origin = [[37.,6.,-1.3],[37.,5.3,-1.3],[37.,-5.3,-1.3],[37.,-6.,-1.3]] # meters

# working fluid
Expand Down
33 changes: 26 additions & 7 deletions tut_mission_B737.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
# Rather than conventional sizing, this script builds the turbofan energy network. This process is
# covered in more detail in a separate tutorial. It does not size the turbofan geometry.

from copy import deepcopy

# ----------------------------------------------------------------------
# Main
Expand Down Expand Up @@ -396,6 +397,30 @@ def vehicle_setup():

# add to vehicle
vehicle.append_component(fuselage)


# ------------------------------------------------------------------
# Nacelles
# ------------------------------------------------------------------
nacelle = SUAVE.Components.Nacelles.Nacelle()
nacelle.tag = 'nacelle_1'
nacelle.length = 2.71
nacelle.inlet_diameter = 1.90
nacelle.diameter = 2.05
nacelle.areas.wetted = 1.1*np.pi*nacelle.diameter*nacelle.length
nacelle.origin = [[13.72, -4.86,-1.9]]
nacelle.flow_through = True
nacelle_airfoil = SUAVE.Components.Airfoils.Airfoil()
nacelle_airfoil.naca_4_series_airfoil = '2410'
nacelle.append_airfoil(nacelle_airfoil)

nacelle_2 = deepcopy(nacelle)
nacelle_2.tag = 'nacelle_2'
nacelle_2.origin = [[13.72, 4.86,-1.9]]

vehicle.append_component(nacelle)
vehicle.append_component(nacelle_2)


# ------------------------------------------------------------------
# Turbofan Network
Expand All @@ -409,17 +434,11 @@ def vehicle_setup():
# High-level setup
turbofan.number_of_engines = 2
turbofan.bypass_ratio = 5.4
turbofan.engine_length = 2.71 * Units.meter
turbofan.nacelle_diameter = 2.05 * Units.meter
turbofan.origin = [[13.72, 4.86,-1.9],[13.72, -4.86,-1.9]] * Units.meter

# Approximate the wetted area
turbofan.areas.wetted = 1.1*np.pi*turbofan.nacelle_diameter*turbofan.engine_length


# Establish the correct working fluid
turbofan.working_fluid = SUAVE.Attributes.Gases.Air()


# Components use estimated efficiencies. Estimates by technology level can be
# found in textbooks such as those by J.D. Mattingly

Expand Down
20 changes: 4 additions & 16 deletions tut_payload_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
# ----------------------------------------------------------------------

import SUAVE
if not SUAVE.__version__=='2.5.0':
assert('These tutorials only work with the SUAVE 2.5.0 release')
#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
Expand Down Expand Up @@ -129,7 +129,7 @@ def base_analysis(vehicle):
# ------------------------------------------------------------------
# Propulsion Analysis
energy= SUAVE.Analyses.Energy.Energy()
energy.network = vehicle.propulsors
energy.network = vehicle.networks
analyses.append(energy)

# ------------------------------------------------------------------
Expand Down Expand Up @@ -335,21 +335,9 @@ def vehicle_setup():
gt_engine.origin = [[12.0,4.38,-2.1],[12.0,-4.38,-2.1]]
gt_engine.number_of_engines = 2.0
gt_engine.bypass_ratio = 5.4
gt_engine.engine_length = 2.71
gt_engine.nacelle_diameter = 2.05
gt_engine.inlet_diameter = 2.0

#compute engine areas)
Amax = (np.pi/4.)*gt_engine.nacelle_diameter**2.
Awet = 1.1*np.pi*gt_engine.nacelle_diameter*gt_engine.engine_length # 1.1 is simple coefficient
#Assign engine area
gt_engine.areas.wetted = Awet
#set the working fluid for the network
working_fluid = SUAVE.Attributes.Gases.Air()

#add working fluid to the network
gt_engine.working_fluid = working_fluid

gt_engine.working_fluid = SUAVE.Attributes.Gases.Air()

#Component 1 : ram, to convert freestream static to stagnation quantities
ram = SUAVE.Components.Energy.Converters.Ram()
Expand Down
Loading

0 comments on commit efd5f29

Please sign in to comment.