Skip to content

Commit

Permalink
updated regressions
Browse files Browse the repository at this point in the history
  • Loading branch information
planes committed Dec 6, 2021
1 parent e375df0 commit 359f771
Show file tree
Hide file tree
Showing 21 changed files with 69 additions and 69 deletions.
2 changes: 1 addition & 1 deletion regression/scripts/B737/results_mission_B737.res

Large diffs are not rendered by default.

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions regression/scripts/Regional_Jet_Optimization/Optimize2.py
Expand Up @@ -39,10 +39,10 @@ def main():
print(con3)

actual = Data()
actual.obj = 0.71662806
actual.con = 2.7042645
actual.obj2 = 0.74496337
actual.con3 = 2.89084155
actual.obj = 0.66680042
actual.con = 2.89275501
actual.obj2 = 0.69643961
actual.con3 = 3.08464784

error = Data()
error.obj = (actual.obj - obj)/actual.obj
Expand Down
2 changes: 1 addition & 1 deletion regression/scripts/aerodynamics/aerodynamics_results.res
@@ -1 +1 @@
{"lift": [[-0.6676799398165457], [-0.47360978902212775], [-0.4374522348793005], [-0.3394312379760762], [-0.1280989390689194], [0.15715867185232865], [0.3734296217408975], [0.5982309667220009], [0.912206600976118], [1.2912787774915242], [1.2585864655445045]], "cd_c": [[0.0001250532577665363], [2.6149702137712086e-08], [1.4807907196416992e-22], [2.69490773115899e-09], [0.00035736561182571244], [3.598682934295868e-05], [1.3140802877284776e-09], [2.2333890201903723e-11], [4.3733942170930564e-05], [0.003695772837233212], [6.463274946817681e-14]], "cd_i": [[0.018930330400656264], [0.012459499334583271], [0.011416194293422909], [0.006886903598822411], [0.0020001310444671696], [0.0029336190683068174], [0.010035134263492057], [0.023464815520592947], [0.04791845807398705], [0.0865945406089347], [0.10055611851318039]], "cd_m": [[0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587]], "cd_p_fuse": [[0.004946796492229381], [0.005779147627615916], [0.008926136636732203], [0.005664504686306866], [0.005781749578763487], [0.004836139656952647], [0.005932995796868884], [0.007354422551288761], [0.005775532561515405], [0.005181868350841586], [0.006015432386719305]], "cd_p_wing": [[0.005798868938543027], [0.005927946059650478], [0.009429864691794812], [0.005732597261818282], [0.0065300434752118205], [0.00501664506296736], [0.005990576383227908], [0.007597374507523542], [0.006009631658542192], [0.005562832184720839], [0.006025780055498028]], "cd_tot": [[0.03629434125474647], [0.030361624510149583], [0.0388900824443074], [0.024226544751036375], [0.021120849857649865], [0.018041987026487304], [0.028189172070676997], [0.046248224760211405], [0.06669629100745755], [0.10863425465847669], [0.12068333058248848]]}
{"lift": [[-0.525963045789459], [-0.3760451650222099], [-0.3475304054345656], [-0.24452695535936073], [-0.003967877629824922], [0.2634757262356058], [0.46598722859408004], [0.6889146970724804], [1.0119888133017367], [1.4020969645042154], [1.3459572852905424]], "cd_c": [[0.0003379551708665689], [5.0073345168008133e-08], [2.6744464269166006e-22], [4.970036438484425e-09], [0.0007620972281411408], [6.376180673506359e-05], [2.0367436448779877e-09], [3.1962196512253825e-11], [5.6721773263501124e-05], [0.003985582038933703], [7.10982816058364e-14]], "cd_i": [[0.017624780317194107], [0.011806445368600222], [0.010801414532712461], [0.006711524569752863], [0.0027290579525595985], [0.004614567783740758], [0.01240198438493869], [0.026706062642340465], [0.05242961554611334], [0.09272297996570897], [0.1063725868507342]], "cd_m": [[0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587], [0.0011255918999274587]], "cd_p_fuse": [[0.004946796492229381], [0.005779147627615916], [0.008926136636732203], [0.005664504686306866], [0.005781749578763487], [0.004836139656952647], [0.005932995796868884], [0.007354422551288761], [0.005775532561515405], [0.005181868350841586], [0.006015432386719305]], "cd_p_wing": [[0.005798868938543027], [0.005927946059650478], [0.009429864691794812], [0.005732597261818282], [0.0065300434752118205], [0.00501664506296736], [0.005990576383227908], [0.007597374507523542], [0.006009631658542192], [0.005562832184720839], [0.006025780055498028]], "cd_tot": [[0.035153455140126834], [0.029695530979916836], [0.03826300708838274], [0.02404766023935915], [0.0222573638373091], [0.019783662699469493], [0.030603359897612443], [0.0495542968337499], [0.07131016688682686], [0.11511382443721864], [0.12661612828679875]]}
@@ -1 +1 @@
{"CL": [[0.0016110502949876382, 0.06830887493546378, 0.07098004678299855, 0.0035380224288600126, 0.06989355766421661], [-0.0936721545003888, -0.01895225716002275, -0.02186534907394673, -0.09550630251268169, -0.027902064568212884], [-0.07945454229275518, -0.04213609256239445, -0.030163037831170896, -0.0760360031109221, 0.038692415204172416]], "CDi": [[0.007676214061782111, 0.013099364833716048, 0.015416479895323586, 0.010383652777518418, 0.02496208063699634], [0.014649780061976337, 0.00987638133888068, 0.0023288342401856085, 0.010878153482375745, 0.021386093500537738], [0.3165880683235278, 0.3446165228127924, 0.2796003563375833, 0.2779315133299915, 0.6263198762433088]], "CM": [[-0.0023387259434625245, -0.033788992167705006, -0.037033983333430824, -0.0038573444713950323, -0.035045860268834626], [0.03283709749664016, -0.00602327795969939, -0.007787097289596379, 0.032039476166070766, 0.0046389682438292106], [0.3037951038847131, 0.2757053106895797, 0.25153945225589075, 0.28869495688813646, 0.24599091915210358]], "CYTOT": [[0.019652057569914127, 0.05265694540955053, -0.03479616457533825, -0.03398082210513545, 0.08929386668347966], [0.09344843590696214, 0.11934700668203897, 0.03692932871006507, 0.042892374996241406, 0.14724216851180566], [0.5826439842328202, 0.6128676913890918, 0.5357839036390918, 0.532474990804133, 0.6925607245869613]], "CRMTOT": [[-0.02671466575152415, -0.010296699976491654, -0.06100727614467229, -0.06284371445619638, -0.004539496826986493], [0.058726581469089746, 0.06357270933133535, 0.018461197176465494, 0.026967994303854957, 0.07775944071559682], [0.23205106676844345, 0.1778103048197978, 0.15182841114687223, 0.20978155130069576, 0.19583943484850602]], "CYMTOT": [[-0.02882139243032653, -0.06647570314514932, 0.06118991171283321, 0.04698978466110292, -0.12135455558463605], [-0.13094492416888423, -0.17309889543650062, -0.053637244150374366, -0.0596474554990172, -0.22521402664747728], [-0.5652619077449212, -0.6380825690482143, -0.5063243142775491, -0.4841096822806845, -0.7674319835052358]]}
{"CL": [[0.01303632226540534, 0.0780410573626043, 0.08248905189288461, 0.016307173337787927, 0.08046816835593676], [-0.12280800280115954, -0.04592298669153777, -0.04999506114878096, -0.1254051028118363, -0.05296625741450474], [0.04912493098494451, 0.09255608130455972, 0.1075096211822139, 0.054700993425594424, 0.14971352666893303]], "CDi": [[0.008104096290559342, 0.012727149234910983, 0.018952736758588794, 0.013183548116121385, 0.024520520747779936], [0.016592575893388188, 0.011505826257666116, 0.001980642088664995, 0.011622871434127819, 0.027175443805913618], [0.2246331961917148, 0.257472538914569, 0.20412475889176715, 0.193026307151546, 0.44408914603025695]], "CM": [[-0.018284513330272686, -0.04892740844355349, -0.05126973099370848, -0.019186687657053444, -0.05220550764642682], [0.06908307951073825, 0.02886236691848543, 0.0275834218401407, 0.06840124021230827, 0.04099747204243819], [0.1352027204556942, 0.10590173710795973, 0.08494657352158966, 0.12269027258944007, 0.07026519052968601]], "CYTOT": [[-0.10666129480336636, -0.06581979003155732, -0.1538020180892996, -0.16027917366616853, -0.052827042719840026], [0.1421546115040826, 0.1640003018520645, 0.08396991112488335, 0.0928576181736417, 0.1989422840320141], [0.34126906962326886, 0.3800530856031388, 0.2944196209550028, 0.2868711625016951, 0.46776750985850135]], "CRMTOT": [[-0.10663540428777263, -0.06671845794404414, -0.11965174645462061, -0.14412823378221268, -0.07148650084805372], [0.08803642391303193, 0.08193130033743604, 0.04230135725592372, 0.05979067924616201, 0.0998581901805158], [0.10263725669678857, 0.08585885446890208, 0.03879789799840028, 0.06822070897573455, 0.11053338185507396]], "CYMTOT": [[0.14898683356557005, 0.10590331132528157, 0.23531716985111253, 0.22519642518166946, 0.09478237901844565], [-0.20054745738611696, -0.23951751283204367, -0.12230503780054292, -0.13009657001517466, -0.3040266675936079], [-0.3181815909609861, -0.3847577906481167, -0.2549482213520731, -0.24028332684289339, -0.5118806961630608]]}
@@ -1 +1 @@
{"CL": [-0.3374689291179382, 0.28275004036716966, 0.8897558117939401, -0.3567651464817395, 0.2543987802814458, 0.8466767865402769, -0.23658808121393424, 0.35149803840860006, 0.9121675205588604], "CDi": [0.02063116231460906, 0.012186757752457703, 0.060223422605569336, 0.04335387254245823, 0.02798172393534478, 0.06896315921092089, 0.11008818379155366, 0.09730361306537492, 0.13939837670875777], "CM": [0.21944184217935075, -0.6818510647240975, -1.566405824608074, 1.2740924736026185, 0.39309723522468853, -0.4866237701853024, 1.6781307820517215, 0.8240594491751533, -0.03036867435199054]}
{"CL": [-0.29720214515255783, 0.33834961020743837, 0.959577754725444, -0.31673130936978194, 0.30943801525012765, 0.9157392375366714, -0.1914641887554682, 0.4093983101812105, 0.9819962352185081], "CDi": [0.021208486388073558, 0.01359857721422765, 0.06583304167842234, 0.043119188327409984, 0.028549994144971134, 0.07370822296645088, 0.1091403117864355, 0.0974104437961243, 0.1436692600937419], "CM": [0.2167254851920102, -0.675415778020983, -1.5508435399644072, 1.2872673982179517, 0.4113549956476091, -0.4636564517879466, 1.6846490352304706, 0.8372716111778308, -0.01085892111248408]}
2 changes: 1 addition & 1 deletion regression/scripts/aerodynamics/sears_haack_results.res
@@ -1 +1 @@
{"lift": [[-0.032560008912337284], [0.05742508252308535], [0.1359122661118175]], "drag": [[0.01617611131075828], [0.013720469452218569], [0.01799303831718344]]}
{"lift": [[-0.030186483068449045], [0.057893028065368536], [0.13622655030542055]], "drag": [[0.016154515839217284], [0.01373241337516734], [0.018022660863239576]]}
@@ -1 +1 @@
{"CL": [[-0.5451427619087094], [0.25319618194530236], [0.7926585615291679], [0.22866565926100244], [0.26915626025810946], [0.6837698264851176]], "CDi": [[0.025068174764255234], [0.003931746962619338], [0.03827989928641953], [0.00573872561148119], [0.0029005530687309876], [0.09477689242287211]], "CM": [[1.028844727791421], [-0.22437690488727624], [-1.0296613413046163], [-0.14962311513753057], [-0.2753965324982208], [-0.9874572069732521]], "CYTOT": [[-0.06000197483620844], [0.03640110565988232], [0.06297440124401722], [0.06793988380870684], [-0.0075800702351967375], [0.06961700989829407]], "CRTOT": [[0.22939483737839042], [-0.5321615988335873], [-1.3446430030677183], [-0.7172241941612697], [-0.13344403253329842], [-1.1890742610924567]], "CRMTOT": [[-0.006683998758111609], [0.015505874091887742], [0.03917957468146033], [0.020898140855514852], [0.003888229386168369], [0.03464668592926739]], "CNTOT": [[-1.0748082875828073], [0.6616410057183905], [1.095308145255538], [1.2705165692110576], [-0.17302060513474718], [1.5055474261479092]], "CYMTOT": [[0.031317257796701845], [-0.019278584082703686], [-0.031914572996956235], [-0.037019713555100746], [0.00504139292350662], [-0.0438679319973167]]}
{"CL": [[-0.48628223328737097], [0.3130498924566126], [0.8525790400148388], [0.28906464635155305], [0.3288378077176768], [0.7015168883616248]], "CDi": [[0.013594744281976648], [0.002062284827339616], [0.03279432378682707], [-0.00376231705334241], [0.004791335634134629], [0.08690305924872999]], "CM": [[1.0085568916157734], [-0.2357995534653443], [-1.0488265228329599], [-0.17187458920323384], [-0.28181744087949434], [-0.9836505052663236]], "CYTOT": [[0.05693056256018248], [-0.03677214962638863], [-0.053304275188393105], [-0.06963518974758764], [0.008806457381872853], [-0.07218794666968248]], "CRTOT": [[-0.5297915783459537], [-0.22566809714650735], [-1.0578458308280867], [-0.14369479577974584], [-0.20030769787778588], [-0.7641876284536535]], "CRMTOT": [[0.015436817550872776], [0.006575410756017114], [0.030823013718767094], [0.004186911298943643], [0.00583647138338537], [0.02226653929060762]], "CNTOT": [[1.1009462438306568], [-0.7603218177624318], [-1.219930109917736], [-1.4077084095400634], [0.14554559979421894], [-1.3843961998168215]], "CYMTOT": [[-0.03207885325846902], [0.022153899118951974], [0.035545749123477154], [0.041017144800118394], [-0.004240839154843209], [0.040337884610047246]]}
4 changes: 2 additions & 2 deletions regression/scripts/battery/aircraft_discharge_comparisons.py
Expand Up @@ -39,8 +39,8 @@ def main():
# ----------------------------------------------------------------------

# General Aviation Aircraft
GA_RPM_true = [974.8969699856285,974.8969700586878]
GA_lift_coefficient_true = [0.5473581960618454,0.5473581960618426]
GA_RPM_true = [973.9534348587468,973.953434872128]
GA_lift_coefficient_true = [0.5474716962005756,0.5474716962005768]


# EVTOL Aircraft
Expand Down
10 changes: 5 additions & 5 deletions regression/scripts/concorde/concorde.py
Expand Up @@ -140,11 +140,11 @@ def equivalent_area(vehicle,analyses,conditions):
56.78777765, 57.28419734, 57.49949357, 57.99040541, 58.61763071,
58.94738099, 77.075 ])

regression_AE_x = np.array([ 0. , 8.40597294, 12.77352949, 18.14374279, 20.15621717,
24.55487098, 25.04813538, 27.59675976, 34.74257342, 36.5188849 ,
37.03600866, 37.03600865, 37.03600865, 37.03600865, 37.03600865,
37.03600865, 37.03600865, 37.03600865, 37.03600865, 37.03600865,
37.03600865, 37.03600865])
regression_AE_x = np.array([ 0. , 8.34073439, 12.67439447, 17.75011296, 19.63716684, 23.98623564,
24.44697823, 26.99738523, 34.58669829, 36.50497936, 37.05493888,
37.05493534, 37.05493466, 37.05493367, 37.05493384, 37.05493333,
37.05493335, 37.05493325, 37.05493328, 37.05493329, 37.05493329,
37.05493329])


assert (np.abs((X_locs[1:] - regression_X_locs[1:] )/regression_X_locs[1:] ) < 1e-6).all()
Expand Down
2 changes: 1 addition & 1 deletion regression/scripts/concorde/results_mission_concorde.res

Large diffs are not rendered by default.

Expand Up @@ -35,7 +35,7 @@ def main():

payload_range = electric_payload_range(vehicle, mission, 'cruise', display_plot=True)

payload_range_r = [ 0. , 104049.96644079, 110756.36739684]
payload_range_r = [ 0. , 104044.1709376 , 110751.10559699]

assert (np.abs(payload_range.range[1] - payload_range_r[1]) / payload_range_r[1] < 1e-6), "Payload Range Regression Failed at Max Payload Test"
assert (np.abs(payload_range.range[2] - payload_range_r[2]) / payload_range_r[2] < 1e-6), "Payload Range Regression Failed at Ferry Range Test"
Expand Down
Expand Up @@ -46,8 +46,8 @@ def main():
# evaluate
results = mission.evaluate()

P_truth = 54551.86727252557
mdot_truth = 0.004793051947149889
P_truth = 53963.82750731971
mdot_truth = 0.0047413854271471725

P = results.segments.cruise.state.conditions.propulsion.power[-1,0]
mdot = results.segments.cruise.state.conditions.weights.vehicle_mass_rate[-1,0]
Expand Down
4 changes: 2 additions & 2 deletions regression/scripts/internal_combustion_propeller/ICE_Test.py
Expand Up @@ -43,8 +43,8 @@ def main():

h = 0.008757244664175039

P_truth = 54141.22575147851
mdot_truth = 0.004756972043006517
P_truth = 53544.66503976736
mdot_truth = 0.00470455685313632

P = results.segments.cruise.state.conditions.propulsion.power[-1,0]
mdot = results.segments.cruise.state.conditions.weights.vehicle_mass_rate[-1,0]
Expand Down
4 changes: 2 additions & 2 deletions regression/scripts/noise_fidelity_one/aircraft_noise.py
Expand Up @@ -53,7 +53,7 @@ def main():
# SPL of rotor check during hover
print('\n\n SUAVE Frequency Domain Propeller Aircraft Noise Model')
X57_SPL = X57_results.segments.ica.conditions.noise.total_SPL_dBA[3][0]
X57_SPL_true = 62.88950180134726
X57_SPL_true = 62.87188281671746

print(X57_SPL)
X57_diff_SPL = np.abs(X57_SPL - X57_SPL_true)
Expand Down Expand Up @@ -81,7 +81,7 @@ def main():
# SPL of rotor check during hover
print('\n\n SAE Turbofan Aircraft Noise Model')
B737_SPL = B737_results.segments.climb_1.conditions.noise.total_SPL_dBA[3][0]
B737_SPL_true = 27.769008268610953
B737_SPL_true = 27.760566836483797
print(B737_SPL)
B737_diff_SPL = np.abs(B737_SPL - B737_SPL_true)
print('SPL difference')
Expand Down
2 changes: 1 addition & 1 deletion regression/scripts/noise_optimization/Noise_Test.py
Expand Up @@ -40,7 +40,7 @@ def main():
# Compare with truth values
noise_cumulative_margin = objectives[0]
actual = Data()
actual.noise_cumulative_margin = 20.790291430964245
actual.noise_cumulative_margin = 21.071910892291967


error = Data()
Expand Down
4 changes: 2 additions & 2 deletions regression/scripts/propeller_speeds/range_endurance_speeds.py
Expand Up @@ -37,8 +37,8 @@ def main():
print(results.L_D_max.air_speed)
print(results.CL32.air_speed)

saved_results_L_D = 43.44740905
saved_results_CL32 = 35.8851001
saved_results_L_D = 43.44985979
saved_results_CL32 = 35.888005

error_L_D = float(abs(results.L_D_max.air_speed - saved_results_L_D)/saved_results_L_D)
error_32 = float(abs(results.CL32.air_speed - saved_results_CL32)/saved_results_CL32)
Expand Down
38 changes: 19 additions & 19 deletions regression/scripts/segments/segment_test.py
Expand Up @@ -64,7 +64,7 @@ def main():
descent_throttle_3 = results.segments.descent_3.conditions.propulsion.throttle[3][0]

#print values for resetting regression
show_vals = False
show_vals = True
if show_vals:
data = [climb_throttle_1, climb_throttle_2, climb_throttle_3, climb_throttle_4, climb_throttle_5,
climb_throttle_6, climb_throttle_7, climb_throttle_8, climb_throttle_9, climb_throttle_10,
Expand All @@ -74,25 +74,25 @@ def main():
print(val)

# Truth values
climb_throttle_1_truth = 1.111012807934289
climb_throttle_2_truth = 1.1207637518961986
climb_throttle_3_truth = 0.7124502821259496
climb_throttle_4_truth = 1.1776673866289558
climb_throttle_5_truth = 1.2323074407821035
climb_throttle_6_truth = 0.8303981186747585
climb_throttle_7_truth = 1.0153431874455925
climb_throttle_8_truth = 1.2461578071529655
climb_throttle_9_truth = 1.3635985943319953
climb_throttle_1_truth = 1.076870435474248
climb_throttle_2_truth = 1.0811705275252188
climb_throttle_3_truth = 0.6708679936668738
climb_throttle_4_truth = 1.1265503689284677
climb_throttle_5_truth = 1.1770721802348285
climb_throttle_6_truth = 0.7772366352514147
climb_throttle_7_truth = 0.9754619978463199
climb_throttle_8_truth = 1.2263494140483848
climb_throttle_9_truth = 1.339647400470607
climb_throttle_10_truth = 1.0
cruise_CL_1_truth = 0.6941419366944759
cruise_CL_2_truth = 0.6945494111991012
cruise_CL_3_truth = 0.7183763857331757
descent_throttle_1_truth = 0.13448609489142072
descent_throttle_2_truth = 0.27125093485874624
single_pt_CL_1_truth = 0.24966048575909444
single_pt_CL_2_truth = 0.249638314040703
loiter_CL_truth = 0.5084530054785352
descent_throttle_3_truth = 0.20901954384809257
cruise_CL_1_truth = 0.6972564737884285
cruise_CL_2_truth = 0.6975787113223217
cruise_CL_3_truth = 0.7852502026240504
descent_throttle_1_truth = 0.09102457856960339
descent_throttle_2_truth = 0.24465051386674283
single_pt_CL_1_truth = 0.251138262389197
single_pt_CL_2_truth = 0.25113968108269286
loiter_CL_truth = 0.5114262749651366
descent_throttle_3_truth = 0.18428433607314795

# Store errors
error = Data()
Expand Down

0 comments on commit 359f771

Please sign in to comment.