Skip to content

Commit

Permalink
regression updates
Browse files Browse the repository at this point in the history
  • Loading branch information
planes committed Nov 9, 2021
1 parent eb84fa5 commit 336b1f3
Show file tree
Hide file tree
Showing 11 changed files with 29 additions and 25 deletions.
1 change: 1 addition & 0 deletions regression/scripts/AVL/avl_files/commands_01.deck
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ mset
0
PLOP
G

CASE batch_01.run
OPER
1
Expand Down
1 change: 1 addition & 0 deletions regression/scripts/AVL/avl_files/commands_02.deck
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ mset
0
PLOP
G

CASE batch_02.run
OPER
1
Expand Down
1 change: 1 addition & 0 deletions regression/scripts/AVL/avl_files/commands_03.deck
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ mset
0
PLOP
G

CASE batch_03.run
OPER
1
Expand Down
1 change: 1 addition & 0 deletions regression/scripts/AVL/avl_files/commands_04.deck
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ mset
0
PLOP
G

CASE batch_04.run
OPER
1
Expand Down
1 change: 1 addition & 0 deletions regression/scripts/AVL/avl_files/commands_05.deck
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ mset
0
PLOP
G

CASE batch_05.run
OPER
1
Expand Down
1 change: 1 addition & 0 deletions regression/scripts/AVL/avl_files/commands_06.deck
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ mset
0
PLOP
G

CASE batch_06.run
OPER
1
Expand Down
1 change: 1 addition & 0 deletions regression/scripts/Vehicles/Boeing_737.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,7 @@ def vehicle_setup():
# setup
turbofan.number_of_engines = 2.0
turbofan.bypass_ratio = 5.4
turbofan.engine_length = 2.71

# This origin is overwritten by compute_component_centers_of_gravity(base,compute_propulsor_origin=True)
turbofan.origin = [[13.72, 4.86,-1.9],[13.72, -4.86,-1.9]]
Expand Down
2 changes: 1 addition & 1 deletion regression/scripts/solar_network/solar_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def main():
truth_F = 105.36115293829462
truth_rpm = 218.18739964349612
truth_i = 130.17994767726535
truth_bat = 136537368.1714456
truth_bat = 136584698.345862

print('battery energy')
print(energy)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,10 @@ def __defaults__(self):
self.propulsion = Conditions()
self.propulsion.throttle = ones_1col * 0
self.propulsion.battery_energy = ones_1col * 0
self.propulsion.battery_voltage = ones_1col * 0
self.propulsion.battery_voltage_under_load = ones_1col * 0
self.propulsion.battery_voltage_open_circuit = ones_1col * 0
self.propulsion.battery_state_of_charge = ones_1col * 0
self.propulsion.thrust_breakdown = Conditions()
self.propulsion.voltage_under_load = ones_1col * 0
self.propulsion.voltage_open_circuit = ones_1col * 0
self.propulsion.battery_pack_temperature = ones_1col * 0
self.propulsion.battery_cell_temperature = ones_1col * 0
self.propulsion.battery_cell_charge_throughput = ones_1col * 0
Expand Down
38 changes: 19 additions & 19 deletions trunk/SUAVE/Plots/Geometry/plot_vehicle.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,25 +346,25 @@ def generate_nacelle_points(nac,tessellation = 24):

if num_nac_segs == 0:
num_nac_segs = int(n_points/2)
nac_pts = np.zeros((num_nac_segs,tessellation,3))
if nac.Airfoil:
for naf in nac.Airfoil:
if naf.naca_4_series_airfoil != None:
# use mean camber surface of airfoil
camber = float(naf.naca_4_series_airfoil[0])/100
camber_loc = float(naf.naca_4_series_airfoil[1])/10
thickness = float(naf.naca_4_series_airfoil[2:])/100
airfoil_data = compute_naca_4series(camber, camber_loc, thickness,(n_points - 2))
xpts = np.repeat(np.atleast_2d(airfoil_data.x_lower_surface).T,tessellation,axis = 1)*nac.length
zpts = np.repeat(np.atleast_2d(airfoil_data.camber_coordinates[0]).T,tessellation,axis = 1)*nac.length
elif naf.coordinate_file != None:
a_sec = naf.coordinate_file
a_secl = [0]
airfoil_data = import_airfoil_geometry(a_sec,npoints=num_nac_segs)
xpts = np.repeat(np.atleast_2d(np.take(airfoil_data.x_coordinates,a_secl,axis=0)).T,tessellation,axis = 1)*nac.length
zpts = np.repeat(np.atleast_2d(np.take(airfoil_data.y_coordinates,a_secl,axis=0)).T,tessellation,axis = 1)*nac.length
nac_pts = np.zeros((num_nac_segs,tessellation,3))
naf = nac.Airfoil

if naf.naca_4_series_airfoil != None:
# use mean camber surface of airfoil
camber = float(naf.naca_4_series_airfoil[0])/100
camber_loc = float(naf.naca_4_series_airfoil[1])/10
thickness = float(naf.naca_4_series_airfoil[2:])/100
airfoil_data = compute_naca_4series(camber, camber_loc, thickness,(n_points - 2))
xpts = np.repeat(np.atleast_2d(airfoil_data.x_lower_surface).T,tessellation,axis = 1)*nac.length
zpts = np.repeat(np.atleast_2d(airfoil_data.camber_coordinates[0]).T,tessellation,axis = 1)*nac.length

elif naf.coordinate_file != None:
a_sec = naf.coordinate_file
a_secl = [0]
airfoil_data = import_airfoil_geometry(a_sec,npoints=num_nac_segs)
xpts = np.repeat(np.atleast_2d(np.take(airfoil_data.x_coordinates,a_secl,axis=0)).T,tessellation,axis = 1)*nac.length
zpts = np.repeat(np.atleast_2d(np.take(airfoil_data.y_coordinates,a_secl,axis=0)).T,tessellation,axis = 1)*nac.length

else:
# if no airfoil defined, use super ellipse as default
a = nac.length/2
Expand Down
4 changes: 2 additions & 2 deletions trunk/SUAVE/Plots/Performance/Mission_Plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ def plot_battery_pack_conditions(results, line_color = 'bo-', line_color2 = 'rs-
results.segments.conditions.propulsion
battery_power_draw
battery_energy
voltage_under_load
voltage_open_circuit
battery_voltage_under_load
battery_voltage_open_circuit
current
Outputs:
Expand Down

0 comments on commit 336b1f3

Please sign in to comment.