Skip to content

Commit

Permalink
solar UAVs
Browse files Browse the repository at this point in the history
  • Loading branch information
planes committed Dec 25, 2020
1 parent e7b1a21 commit 8e8c2b8
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 15 deletions.
6 changes: 6 additions & 0 deletions Solar_UAV_Optimization/Analyses.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# ----------------------------------------------------------------------

import SUAVE
from SUAVE.Core import Units
import numpy as np

# ----------------------------------------------------------------------
# Setup Analyses
Expand Down Expand Up @@ -54,6 +56,10 @@ def base(vehicle):
# ------------------------------------------------------------------
aerodynamics = SUAVE.Analyses.Aerodynamics.Fidelity_Zero()
aerodynamics.geometry = vehicle
aerodynamics.settings.number_spanwise_vortices = 10
aerodynamics.settings.number_chordwise_vortices = 2
aerodynamics.process.compute.lift.inviscid_wings.training.angle_of_attack = np.array([[-5., 0.0, 5.0, 10.0, 75.]]).T * Units.deg
aerodynamics.process.compute.lift.inviscid_wings.training.Mach = np.array([[0.0, 0.2, 0.3, 0.9, 1.3, 1.35, 1.5, 2.0]]).T
analyses.append(aerodynamics)

# ------------------------------------------------------------------
Expand Down
3 changes: 2 additions & 1 deletion Solar_UAV_Optimization/Missions.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ def mission(analyses,vehicle):
# connect vehicle configuration
segment.analyses.extend(analyses.base)

# segment attributes
# segment attributes
ones_row = segment.state.numerics.ones_row
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 2020", "%a, %b %d %H:%M:%S %Y",)
Expand Down
10 changes: 5 additions & 5 deletions Solar_UAV_Optimization/Optimize.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ def setup():

# [ tag , initial, [lb,ub], scaling, units ]
problem.inputs = np.array([
[ 'wing_area' , 0.62, ( 0.1, 1.5 ), 0.5, Units.meter ],
[ 'aspect_ratio' , 13.5, ( 5.0, 20.0 ), 10.0, Units.less ],
[ 'dynamic_pressure', 115.0, ( 1.0, 2000.0 ), 125.0, Units.pascals ],
[ 'solar_ratio' , 0.0, ( 0.0, 0.97), 1.0, Units.less ],
[ 'kv' , 900.0, ( 10.0, 1500.0 ), 800.0, Units['rpm/volt']],
[ 'wing_area' , 0.5, ( 0.1, 1.5 ), 0.5, Units.meter ],
[ 'aspect_ratio' , 10.0, ( 5.0, 20.0 ), 10.0, Units.less ],
[ 'dynamic_pressure', 125.0, ( 1.0, 2000.0 ), 125.0, Units.pascals ],
[ 'solar_ratio' , 0.0, ( 0.0, 0.97), 1.0, Units.less ],
[ 'kv' , 800.0, ( 10.0, 10000.0 ), 800.0, Units['rpm/volt']],
])

# -------------------------------------------------------------------
Expand Down
16 changes: 8 additions & 8 deletions Solar_UAV_Optimization/Vehicles.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ def base_setup():
# Vehicle-level Properties
# ------------------------------------------------------------------
# mass properties
vehicle.mass_properties.takeoff = 6.75 * Units.kg
vehicle.mass_properties.operating_empty = 6.75 * Units.kg
vehicle.mass_properties.max_takeoff = 6.75 * Units.kg
vehicle.mass_properties.takeoff = 4.00 * Units.kg
vehicle.mass_properties.operating_empty = 4.00 * Units.kg
vehicle.mass_properties.max_takeoff = 4.00 * Units.kg

# basic parameters
vehicle.reference_area = 1.0
Expand Down Expand Up @@ -178,17 +178,17 @@ def base_setup():

# Component 5 the Motor
motor = SUAVE.Components.Energy.Converters.Motor_Lo_Fid()
motor.speed_constant = 800. * Units['rpm/volt'] # RPM/volt is standard
motor.speed_constant = 900. * 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;
motor.motor_efficiency = 0.8;
net.motor = motor

# Component 6 the Payload
payload = SUAVE.Components.Energy.Peripherals.Payload()
payload.power_draw = 0. #Watts
payload.mass_properties.mass = 0.0 * Units.kg
payload.mass_properties.mass = 1.0 * Units.kg
net.payload = payload

# Component 7 the Avionics
Expand All @@ -198,8 +198,8 @@ def base_setup():

# Component 8 the Battery
bat = SUAVE.Components.Energy.Storages.Batteries.Constant_Mass.Lithium_Ion()
bat.mass_properties.mass = 5.0 * Units.kg
bat.specific_energy = 250. *Units.Wh/Units.kg
bat.mass_properties.mass = 3.0 * Units.kg
bat.specific_energy = 200. *Units.Wh/Units.kg
bat.resistance = 0.003
initialize_from_mass(bat,bat.mass_properties.mass)
net.battery = bat
Expand Down
2 changes: 1 addition & 1 deletion tut_solar_uav.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from SUAVE.Plots.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_energy_and_power, initialize_from_mass
from SUAVE.Methods.Power.Battery.Sizing import initialize_from_mass

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

0 comments on commit 8e8c2b8

Please sign in to comment.