Skip to content

Commit

Permalink
Merge f1b48fa into 0a89219
Browse files Browse the repository at this point in the history
  • Loading branch information
rachealerhard committed Apr 18, 2022
2 parents 0a89219 + f1b48fa commit b03ccbf
Show file tree
Hide file tree
Showing 44 changed files with 2,416 additions and 1,170 deletions.
1 change: 1 addition & 0 deletions regression/automatic_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
'scripts/rocket_network/Rocketdyne_F1.py',
'scripts/rocket_network/Rocketdyne_J2.py',
'scripts/segments/segment_test.py',
'scripts/segments/transition_segment_test.py',
'scripts/slipstream/slipstream_test.py',
'scripts/slipstream/propeller_interactions.py',
'scripts/solar_network/solar_network.py',
Expand Down
2 changes: 1 addition & 1 deletion regression/scripts/VTOL/results_multicopter.res

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion regression/scripts/VTOL/results_tiltwing.res

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion regression/scripts/VTOL/test_Stopped_Rotor.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ def mission_setup(analyses,vehicle):
segment.analyses.extend( analyses.base )
segment.altitude_start = 40.0 * Units.ft
segment.altitude_end = 50.0 * Units.ft
segment.air_speed = 0.8 * Vstall
segment.climb_angle = 1 * Units.degrees
segment.acceleration = 0.5 * Units['m/s/s']
segment.pitch_initial = 5. * Units.degrees
Expand Down
10 changes: 5 additions & 5 deletions regression/scripts/Vehicles/Electric_Multicopter.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,13 +182,13 @@ def vehicle_setup():
# Network
#------------------------------------------------------------------
net = SUAVE.Components.Energy.Networks.Battery_Propeller()
net.number_of_lift_rotor_engines = 6
net.number_of_propeller_engines = 6
net.nacelle_diameter = 0.6 * Units.feet # need to check
net.engine_length = 0.5 * Units.feet
net.areas = Data()
net.areas.wetted = np.pi*net.nacelle_diameter*net.engine_length + 0.5*np.pi*net.nacelle_diameter**2
net.voltage = 500.
net.identical_lift_rotors = True
net.identical_propellers = True

#------------------------------------------------------------------
# Design Electronic Speed Controller
Expand Down Expand Up @@ -239,7 +239,7 @@ def vehicle_setup():
lift_rotor.angular_velocity = (design_tip_mach*speed_of_sound)/lift_rotor.tip_radius
lift_rotor.design_Cl = 0.7
lift_rotor.design_altitude = 1000 * Units.feet
lift_rotor.design_thrust = Hover_Load/(net.number_of_lift_rotor_engines-1) # contingency for one-engine-inoperative condition
lift_rotor.design_thrust = Hover_Load/(net.number_of_propeller_engines-1) # contingency for one-engine-inoperative condition

lift_rotor.airfoil_geometry = ['../Vehicles/Airfoils/NACA_4412.txt']
lift_rotor.airfoil_polars = [['../Vehicles/Airfoils/Polars/NACA_4412_polar_Re_50000.txt' ,
Expand All @@ -260,7 +260,7 @@ def vehicle_setup():
lift_rotor = deepcopy(lift_rotor)
lift_rotor.tag = 'lift_rotor'
lift_rotor.origin = [origins[ii]]
net.lift_rotors.append(lift_rotor)
net.propellers.append(lift_rotor)

#------------------------------------------------------------------
# Design Motors
Expand Down Expand Up @@ -294,7 +294,7 @@ def vehicle_setup():
for ii in range(6):
lift_rotor_motor = deepcopy(lift_motor)
lift_rotor_motor.tag = 'motor'
net.lift_rotor_motors.append(lift_rotor_motor)
net.propeller_motors.append(lift_rotor_motor)


vehicle.append_component(net)
Expand Down
532 changes: 532 additions & 0 deletions regression/scripts/Vehicles/Tiltrotor.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion regression/scripts/Vehicles/Tiltwing.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def vehicle_setup():
#------------------------------------------------------------------
net = SUAVE.Components.Energy.Networks.Battery_Propeller()
net.number_of_propeller_engines = 8
net.thrust_angle = 0.0 * Units.degrees # conversion to radians,
net.y_axis_rotation = 0.0 * Units.degrees # conversion to radians,
net.nacelle_diameter = 0.2921 # https://www.magicall.biz/products/integrated-motor-controller-magidrive/
net.engine_length = 0.95
net.areas = Data()
Expand Down
20 changes: 12 additions & 8 deletions regression/scripts/Vehicles/X57_Maxwell_Mod2.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import numpy as np
from copy import deepcopy

import os
# ----------------------------------------------------------------------
# Define the Vehicle
# ----------------------------------------------------------------------
Expand Down Expand Up @@ -83,7 +83,10 @@ def vehicle_setup():
wing.winglet_fraction = 0.0
wing.dynamic_pressure_ratio = 1.0
airfoil = SUAVE.Components.Airfoils.Airfoil()
airfoil.coordinate_file = '../Vehicles/Airfoils/NACA_63_412.txt'


base = os.path.dirname(os.path.abspath(__file__))
airfoil.coordinate_file = base+'/Airfoils/NACA_63_412.txt'

cg_x = wing.origin[0][0] + 0.25*wing.chords.mean_aerodynamic
cg_z = wing.origin[0][2] - 0.2*wing.chords.mean_aerodynamic
Expand Down Expand Up @@ -429,12 +432,13 @@ def vehicle_setup():
prop.rotation = -1
prop.symmetry = True
prop.variable_pitch = True
prop.airfoil_geometry = ['../Vehicles/Airfoils/NACA_4412.txt']
prop.airfoil_polars = [['../Vehicles/Airfoils/Polars/NACA_4412_polar_Re_50000.txt' ,
'../Vehicles/Airfoils/Polars/NACA_4412_polar_Re_100000.txt' ,
'../Vehicles/Airfoils/Polars/NACA_4412_polar_Re_200000.txt' ,
'../Vehicles/Airfoils/Polars/NACA_4412_polar_Re_500000.txt' ,
'../Vehicles/Airfoils/Polars/NACA_4412_polar_Re_1000000.txt' ]]

prop.airfoil_geometry = [base + '/Airfoils/NACA_4412.txt']
prop.airfoil_polars = [[base + '/Airfoils/Polars/NACA_4412_polar_Re_50000.txt' ,
base + '/Airfoils/Polars/NACA_4412_polar_Re_100000.txt' ,
base + '/Airfoils/Polars/NACA_4412_polar_Re_200000.txt' ,
base + '/Airfoils/Polars/NACA_4412_polar_Re_500000.txt' ,
base + '/Airfoils/Polars/NACA_4412_polar_Re_1000000.txt' ]]

prop.airfoil_polar_stations = [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
prop = propeller_design(prop,number_of_airfoil_section_points = 102)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,6 @@ def EVTOL_mission_setup(analyses,vehicle):
segment.analyses.extend( analyses.base )
segment.altitude_start = 40.0 * Units.ft
segment.altitude_end = 50.0 * Units.ft
segment.air_speed = 0.8 * Vstall
segment.climb_angle = 1 * Units.degrees
segment.acceleration = 0.5 * Units['m/s/s']
segment.pitch_initial = 5. * Units.degrees
Expand Down
15 changes: 9 additions & 6 deletions regression/scripts/noise_fidelity_one/propeller_noise.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def main():
positions[i][:] = [S*np.sin(theta[i]*Units.degrees- np.pi/2) ,S*np.cos(theta[i]*Units.degrees - np.pi/2), 0.0]

# Set up for Propeller Model
prop.inputs.omega = np.atleast_2d(test_omega).T

conditions = Aerodynamics()
conditions.freestream.density = np.ones((ctrl_pts,1)) * density
conditions.freestream.dynamic_viscosity = np.ones((ctrl_pts,1)) * dynamic_viscosity
Expand All @@ -68,7 +68,10 @@ def main():
conditions.frames.inertial.velocity_vector = np.array([[77.2, 0. ,0.],[ 77.0,0.,0.], [ 77.2, 0. ,0.]])
conditions.propulsion.throttle = np.ones((ctrl_pts,1))*1.0
conditions.frames.body.transform_to_inertial = np.array([[[1., 0., 0.],[0., 1., 0.],[0., 0., 1.]]])


prop.inputs.omega = np.atleast_2d(test_omega).T
prop.inputs.y_axis_rotation *= np.ones_like(prop.inputs.omega)

# Run Propeller model
F, Q, P, Cp , noise_data , etap = prop.spin(conditions)

Expand All @@ -81,10 +84,10 @@ def main():


# Store Noise Data
noise = SUAVE.Analyses.Noise.Fidelity_One()
settings = noise.settings
num_mic = len(conditions.noise.total_microphone_locations[0] )
conditions.noise.number_of_microphones = num_mic
noise = SUAVE.Analyses.Noise.Fidelity_One()
settings = noise.settings
num_mic = len(conditions.noise.total_microphone_locations[0] )
conditions.noise.number_of_microphones = num_mic

# Run Fidelity One
propeller_noise = propeller_mid_fidelity(net.propellers,noise_data,segment,settings )
Expand Down

0 comments on commit b03ccbf

Please sign in to comment.