Skip to content
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# SUAVE Tutorials

See [suave.stanford.edu/guides](https://www.suave.stanford.edu/guides) for more information
See [suave.stanford.edu/guides](https://suave.stanford.edu/guides) for more information
6 changes: 3 additions & 3 deletions Regional_Jet_Optimization/Optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def setup():
return nexus

def variable_sweep(problem):
number_of_points=20
number_of_points=5
outputs=carpet_plot(problem, number_of_points, 0, 0) #run carpet plot, suppressing default plots
inputs =outputs.inputs
objective=outputs.objective
Expand All @@ -153,7 +153,7 @@ def variable_sweep(problem):
plt.xlabel('wing area (m^2)')
plt.ylabel('cruise_altitude (km)')

'''
#now plot optimization path (note that these data points were post-processed into a plottable format)
wing_1 = [95 , 95.00000149 , 95 , 95 , 95.00000149 , 95 , 95 , 95.00000149 , 95 , 106.674165 , 106.6741665 , 106.674165 , 106.674165 , 106.6741665 , 106.674165 , 106.674165 , 106.6741665 , 106.674165 , 105.6274294 , 105.6274309 , 105.6274294 , 105.6274294 , 105.6274309 , 105.6274294 , 105.6274294 , 105.6274309 , 105.6274294 , 106.9084316 , 106.9084331 , 106.9084316 , 106.9084316 , 106.9084331 , 106.9084316 , 106.9084316 , 106.9084331 , 106.9084316 , 110.520489 , 110.5204905 , 110.520489 , 110.520489 , 110.5204905 , 110.520489 , 110.520489 , 110.5204905 , 110.520489 , 113.2166831 , 113.2166845 , 113.2166831 , 113.2166831 , 113.2166845 , 113.2166831 , 113.2166831 , 113.2166845 , 113.2166831 , 114.1649262 , 114.1649277 , 114.1649262 , 114.1649262 , 114.1649277 , 114.1649262 , 114.1649262 , 114.1649277 , 114.1649262 , 114.2149828]
alt_1 = [11.0 , 11.0 , 11.000000149011612, 11.0 , 11.0 , 11.000000149011612, 11.0 , 11.0 , 11.000000149011612, 9.540665954351425 , 9.540665954351425 , 9.540666103363037 , 9.540665954351425 , 9.540665954351425 , 9.540666103363037 , 9.540665954351425 , 9.540665954351425 , 9.540666103363037 , 10.023015652305284, 10.023015652305284, 10.023015801316896, 10.023015652305284, 10.023015652305284, 10.023015801316896, 10.023015652305284, 10.023015652305284, 10.023015801316896, 10.190994033521863, 10.190994033521863, 10.190994182533474, 10.190994033521863, 10.190994033521863, 10.190994182533474, 10.190994033521863, 10.190994033521863, 10.190994182533474, 10.440582829327589, 10.440582829327589, 10.4405829783392 , 10.440582829327589, 10.440582829327589, 10.4405829783392 , 10.440582829327589, 10.440582829327589, 10.4405829783392 , 10.536514606250261, 10.536514606250261, 10.536514755261873, 10.536514606250261, 10.536514606250261, 10.536514755261873, 10.536514606250261, 10.536514606250261, 10.536514755261873, 10.535957839878783, 10.535957839878783, 10.535957988890395, 10.535957839878783, 10.535957839878783, 10.535957988890395, 10.535957839878783, 10.535957839878783, 10.535957988890395, 10.52829047]
Expand All @@ -168,7 +168,7 @@ def variable_sweep(problem):
opt_2 = plt.plot(wing_2, alt_2, 'k--', label='optimization path 2')
init_2 = plt.plot(wing_2[0], alt_2[0], 'ko', label= 'initial points')
final_2 = plt.plot(wing_2[-1], alt_2[-1], 'kx', label= 'final points')

'''
plt.legend(loc='upper left')
plt.show()

Expand Down
49 changes: 26 additions & 23 deletions Regional_Jet_Optimization/Procedure.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,31 @@ def simple_sizing(nexus):
configs=nexus.vehicle_configurations
base=configs.base

#find conditions
air_speed = nexus.missions.base.segments['cruise'].air_speed
altitude = nexus.missions.base.segments['climb_5'].altitude_end
atmosphere = SUAVE.Analyses.Atmospheric.US_Standard_1976()

freestream = atmosphere.compute_values(altitude)
freestream0 = atmosphere.compute_values(6000.*Units.ft) #cabin altitude


diff_pressure = np.max(freestream0.pressure-freestream.pressure,0)
fuselage = base.fuselages['fuselage']
fuselage.differential_pressure = diff_pressure

#now size engine
mach_number = air_speed/freestream.speed_of_sound

#now add to freestream data object
freestream.velocity = air_speed
freestream.mach_number = mach_number
freestream.gravity = 9.81

conditions = SUAVE.Analyses.Mission.Segments.Conditions.Aerodynamics() #assign conditions in form for propulsor sizing
conditions.freestream = freestream



for config in configs:
config.wings.horizontal_stabilizer.areas.reference = (26.0/92.0)*config.wings.main_wing.areas.reference
Expand All @@ -118,31 +143,9 @@ def simple_sizing(nexus):



air_speed = nexus.missions.base.segments['cruise'].air_speed
altitude = nexus.missions.base.segments['climb_5'].altitude_end
atmosphere = SUAVE.Analyses.Atmospheric.US_Standard_1976()

freestream = atmosphere.compute_values(altitude)
freestream0 = atmosphere.compute_values(6000.*Units.ft) #cabin altitude

fuselage = base.fuselages['fuselage']
diff_pressure = np.max(freestream0.pressure-freestream.pressure,0)

fuselage = config.fuselages['fuselage']
fuselage.differential_pressure = diff_pressure

#now size engine
mach_number = air_speed/freestream.speed_of_sound

#now add to freestream data object
freestream.velocity = air_speed
freestream.mach_number = mach_number
freestream.gravity = 9.81

conditions = SUAVE.Analyses.Mission.Segments.Conditions.Aerodynamics() #assign conditions in form for propulsor sizing
conditions.freestream = freestream



turbofan_sizing(config.propulsors['turbofan'], mach_number, altitude)
compute_turbofan_geometry(config.propulsors['turbofan'], conditions)
# diff the new data
Expand Down
2 changes: 1 addition & 1 deletion Solar_UAV_Optimization/Optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def setup():

# [ tag, scaling, units ]
problem.objective = np.array([
[ 'Nothing', 1. , Units.kg],####Optimize.py:
[ 'Nothing', 1. , Units.kg],
])

# -------------------------------------------------------------------
Expand Down
2 changes: 0 additions & 2 deletions tut_lithium_air_jet_sizing.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
import matplotlib
import pylab as plt

#from SUAVE.Methods.Propulsion.turbofan_sizing import turbofan_sizing
#from SUAVE.Methods.Propulsion.engine_sizing_ductedfan import engine_sizing_ductedfan

from SUAVE.Methods.Performance import estimate_take_off_field_length
from SUAVE.Methods.Performance import estimate_landing_field_length
Expand Down
Loading