diff --git a/integration_tests/oad_process/test_oad_process.py b/integration_tests/oad_process/test_oad_process.py index 7a3cd45a..024f9356 100644 --- a/integration_tests/oad_process/test_oad_process.py +++ b/integration_tests/oad_process/test_oad_process.py @@ -117,9 +117,9 @@ def test_oad_process_vlm_be76(cleanup): assert_allclose(problem.get_val("data:mission:sizing:fuel", units="kg"), 258.0, atol=1) assert_allclose(problem["data:handling_qualities:stick_fixed_static_margin"], 0.25, atol=1e-2) # noinspection PyTypeChecker - assert_allclose(problem.get_val("data:weight:aircraft:MTOW", units="kg"), 1747.0, atol=1) + assert_allclose(problem.get_val("data:weight:aircraft:MTOW", units="kg"), 1748.0, atol=1) # noinspection PyTypeChecker - assert_allclose(problem.get_val("data:weight:aircraft:OWE", units="kg"), 1109.0, atol=1) + assert_allclose(problem.get_val("data:weight:aircraft:OWE", units="kg"), 1110.0, atol=1) def test_oad_process_tbm_900(cleanup): @@ -194,10 +194,10 @@ def test_oad_process_vlm_mission_vector(cleanup): _check_weight_performance_loop(problem) # noinspection PyTypeChecker - assert_allclose(problem.get_val("data:mission:sizing:fuel", units="kg"), 252.0, atol=1) + assert_allclose(problem.get_val("data:mission:sizing:fuel", units="kg"), 253.0, atol=1) assert_allclose(problem["data:handling_qualities:stick_fixed_static_margin"], 0.15, atol=1e-2) # noinspection PyTypeChecker - assert_allclose(problem.get_val("data:weight:aircraft:MTOW", units="kg"), 1656.0, atol=1) + assert_allclose(problem.get_val("data:weight:aircraft:MTOW", units="kg"), 1657.0, atol=1) # noinspection PyTypeChecker assert_allclose(problem.get_val("data:weight:aircraft:OWE", units="kg"), 1028.0, atol=1) diff --git a/src/fastga/models/aerodynamics/external/propeller_code/compute_propeller_aero.py b/src/fastga/models/aerodynamics/external/propeller_code/compute_propeller_aero.py index 7eca16d3..ec0621ea 100644 --- a/src/fastga/models/aerodynamics/external/propeller_code/compute_propeller_aero.py +++ b/src/fastga/models/aerodynamics/external/propeller_code/compute_propeller_aero.py @@ -231,7 +231,11 @@ def construct_table(self, inputs, speed_interp, altitude, omega): for v_inf in speed_interp: self.compute_extreme_pitch(inputs, v_inf) - theta_interp = np.linspace(self.theta_min, self.theta_max, 100) + # Compute performances for evenly space theta every degree + theta_interp = np.append( + np.arange(self.theta_min, self.theta_max, 1.0), + np.array([self.theta_max]), + ) local_thrust_vect = [] local_theta_vect = [] local_eta_vect = [] diff --git a/src/fastga/models/aerodynamics/external/propeller_code/propeller_core.py b/src/fastga/models/aerodynamics/external/propeller_code/propeller_core.py index a4a79081..62d88b8e 100644 --- a/src/fastga/models/aerodynamics/external/propeller_code/propeller_core.py +++ b/src/fastga/models/aerodynamics/external/propeller_code/propeller_core.py @@ -42,6 +42,10 @@ def __init__(self, **kwargs): self.theta_min = 0.0 self.theta_max = 0.0 + # Store values for induced velocities + self.vi_vect = None + self.vt_vect = None + def initialize(self): self.options.declare("sections_profile_position_list", types=list) self.options.declare("sections_profile_name_list", types=list) @@ -103,7 +107,16 @@ def compute_extreme_pitch(self, inputs, v_inf): self.theta_max = phi_75 + 25.0 def compute_pitch_performance( - self, inputs, theta_75, v_inf, altitude, omega, radius, alpha_list, cl_list, cd_list + self, + inputs, + theta_75, + v_inf, + altitude, + omega, + radius, + alpha_list, + cl_list, + cd_list, ): """ @@ -142,8 +155,12 @@ def compute_pitch_performance( theta_75_ref = np.interp(0.75, radius_ratio_vect, twist_vect) # Initialise vectors - vi_vect = np.zeros_like(radius) - vt_vect = np.zeros_like(radius) + if self.vi_vect is None: + self.vi_vect = np.zeros_like(radius) + + if self.vt_vect is None: + self.vt_vect = np.zeros_like(radius) + thrust_element_vector = np.zeros_like(radius) torque_element_vector = np.zeros_like(radius) alpha_vect = np.zeros_like(radius) @@ -182,8 +199,8 @@ def compute_pitch_performance( method="hybr", options={"xtol": 1e-3}, ).x - vi_vect[idx] = speed_vect[0] - vt_vect[idx] = speed_vect[1] + self.vi_vect[idx] = speed_vect[0] + self.vt_vect[idx] = speed_vect[1] results = self.bem_theory( speed_vect, radius[idx], diff --git a/src/fastga/models/aerodynamics/unitary_tests/test_beechcraft_76.py b/src/fastga/models/aerodynamics/unitary_tests/test_beechcraft_76.py index 21f6d638..9aa86c3f 100644 --- a/src/fastga/models/aerodynamics/unitary_tests/test_beechcraft_76.py +++ b/src/fastga/models/aerodynamics/unitary_tests/test_beechcraft_76.py @@ -1332,41 +1332,41 @@ def test_load_factor(): def test_propeller(): thrust_SL = np.array( [ - 118.15673631, - 310.5000776, - 502.84341889, - 695.18676018, - 887.53010147, - 1079.87344276, - 1272.21678406, - 1464.56012535, - 1656.90346664, - 1849.24680793, - 2041.59014922, - 2233.93349051, - 2426.2768318, - 2618.62017309, - 2810.96351438, - 3003.30685567, - 3195.65019696, - 3387.99353825, - 3580.33687954, - 3772.68022083, - 3965.02356212, - 4157.36690341, - 4349.7102447, - 4542.05358599, - 4734.39692728, - 4926.74026857, - 5119.08360986, - 5311.42695115, - 5503.77029244, + 281.50813308, + 468.21866758, + 654.92920209, + 841.63973659, + 1028.3502711, + 1215.0608056, + 1401.77134011, + 1588.48187461, + 1775.19240912, + 1961.90294363, + 2148.61347813, + 2335.32401264, + 2522.03454714, + 2708.74508165, + 2895.45561615, + 3082.16615066, + 3268.87668516, + 3455.58721967, + 3642.29775417, + 3829.00828868, + 4015.71882318, + 4202.42935769, + 4389.13989219, + 4575.8504267, + 4762.56096121, + 4949.27149571, + 5135.98203022, + 5322.69256472, + 5509.40309923, 5696.11363373, ] ) thrust_SL_limit = np.array( [ - 3907.31825729, + 3909.96732951, 4177.75124865, 4414.4531561, 4623.80209745, @@ -1381,60 +1381,60 @@ def test_propeller(): efficiency_SL = np.array( [ [ - 0.05351056, - 0.12347525, - 0.1655366, - 0.18736827, - 0.19602648, - 0.19775442, - 0.19508082, - 0.19063943, - 0.18487364, - 0.17870561, - 0.1723861, - 0.16619065, - 0.16002567, - 0.15399872, - 0.14811737, - 0.14224821, - 0.1364682, - 0.13062113, - 0.12400109, - 0.11464944, - 0.09811579, - 0.09811579, - 0.09811579, - 0.09811579, - 0.09811579, - 0.09811579, - 0.09811579, - 0.09811579, - 0.09811579, - 0.09811579, + 0.11481833, + 0.15851086, + 0.18298579, + 0.19407307, + 0.19732919, + 0.19595566, + 0.19206767, + 0.1869762, + 0.18108355, + 0.17501583, + 0.16894467, + 0.16293479, + 0.15703208, + 0.15119315, + 0.14554806, + 0.1399436, + 0.13430438, + 0.12834843, + 0.12147371, + 0.1100042, + 0.09598577, + 0.09598577, + 0.09598577, + 0.09598577, + 0.09598577, + 0.09598577, + 0.09598577, + 0.09598577, + 0.09598577, + 0.09598577, ], [ - 0.15212887, - 0.31088291, - 0.39613769, - 0.43886415, - 0.45704566, - 0.46225846, - 0.45973704, - 0.4529451, - 0.44392854, - 0.43317449, - 0.42234271, - 0.41085589, - 0.3996228, - 0.38825868, - 0.37701942, - 0.36584575, - 0.35464311, - 0.34360865, - 0.33232289, - 0.31989642, - 0.30413892, - 0.2726115, + 0.29228526, + 0.38491963, + 0.43201356, + 0.45386967, + 0.4612585, + 0.46072763, + 0.45519724, + 0.44713986, + 0.43729253, + 0.42685449, + 0.41594434, + 0.40493836, + 0.39394536, + 0.38302247, + 0.37202289, + 0.36133046, + 0.3505104, + 0.33969028, + 0.32849101, + 0.31590828, + 0.29852058, + 0.26511387, 0.26511387, 0.26511387, 0.26511387, @@ -1445,29 +1445,29 @@ def test_propeller(): 0.26511387, ], [ - 0.23023238, - 0.43000268, - 0.5278268, - 0.57425912, - 0.59650032, - 0.60440535, - 0.60412381, - 0.59945007, - 0.59166534, - 0.58203983, - 0.57155435, - 0.56038186, - 0.54903238, - 0.53743479, - 0.52574809, - 0.51393612, - 0.5018895, - 0.49002145, - 0.47807279, - 0.46540016, - 0.45188711, - 0.43499559, - 0.40519931, + 0.39445204, + 0.50817379, + 0.56513528, + 0.5925015, + 0.60272736, + 0.6041827, + 0.60091575, + 0.59442654, + 0.58575312, + 0.57589411, + 0.56537669, + 0.55444607, + 0.54329212, + 0.53195226, + 0.52055016, + 0.5090512, + 0.49734605, + 0.48583131, + 0.47401405, + 0.46158032, + 0.44770676, + 0.42972617, + 0.39260997, 0.38297328, 0.38297328, 0.38297328, @@ -1477,30 +1477,30 @@ def test_propeller(): 0.38297328, ], [ - 0.28761175, - 0.50166067, - 0.59939487, - 0.6476175, - 0.67085559, - 0.68159472, - 0.68356075, - 0.68210814, - 0.67661848, - 0.66935286, - 0.66111029, - 0.65167786, - 0.64210062, - 0.63186332, - 0.62154945, - 0.61080021, - 0.59999679, - 0.58862685, - 0.57759716, - 0.5663487, - 0.55396148, - 0.54074353, - 0.52398734, - 0.49506023, + 0.46022042, + 0.57754496, + 0.63586353, + 0.6657085, + 0.67959102, + 0.68288622, + 0.68218717, + 0.67853964, + 0.67221994, + 0.66473891, + 0.65574861, + 0.64662482, + 0.6369957, + 0.62704078, + 0.61684956, + 0.60636335, + 0.59567063, + 0.58475111, + 0.57406769, + 0.56277604, + 0.55051411, + 0.536896, + 0.51896606, + 0.48536666, 0.46716978, 0.46716978, 0.46716978, @@ -1509,31 +1509,31 @@ def test_propeller(): 0.46716978, ], [ - 0.32069764, - 0.541321, - 0.63822562, - 0.6864212, - 0.71207749, - 0.72433804, - 0.72918718, - 0.7296413, - 0.72687497, - 0.72216855, - 0.71606534, - 0.70902618, - 0.70129704, - 0.69300748, - 0.68433384, - 0.67535611, - 0.66600112, - 0.65628052, - 0.64636828, - 0.63653445, - 0.62606511, - 0.61444673, - 0.60166919, - 0.58468842, - 0.55447484, + 0.51603977, + 0.61654254, + 0.67373395, + 0.70553702, + 0.72217537, + 0.72755174, + 0.72920635, + 0.7278833, + 0.72412463, + 0.71859143, + 0.71211405, + 0.70494927, + 0.69722768, + 0.68894076, + 0.68041033, + 0.67153613, + 0.66231291, + 0.65286483, + 0.64327429, + 0.6334608, + 0.62311275, + 0.61157338, + 0.59848769, + 0.58085838, + 0.54694408, 0.52878067, 0.52878067, 0.52878067, @@ -1541,274 +1541,272 @@ def test_propeller(): 0.52878067, ], [ - 0.32615364, - 0.55784211, - 0.65564798, - 0.70611297, - 0.73365953, - 0.74829785, - 0.75625535, - 0.75864927, - 0.75813581, - 0.75543376, - 0.75120066, - 0.74612532, - 0.74031364, - 0.73375519, - 0.72685545, - 0.71943779, - 0.71169491, - 0.7034785, - 0.69523726, - 0.68644327, - 0.67758409, - 0.66802486, - 0.65729226, - 0.64480346, - 0.62784666, - 0.59657543, + 0.51376066, + 0.64339978, + 0.69213795, + 0.72576516, + 0.74479881, + 0.75350293, + 0.75756459, + 0.75822471, + 0.75651653, + 0.75286044, + 0.74835052, + 0.74313423, + 0.73703541, + 0.73052087, + 0.72358086, + 0.71625161, + 0.70859018, + 0.70057034, + 0.69243174, + 0.68397381, + 0.67507798, + 0.66555512, + 0.65471747, + 0.64238183, + 0.62453374, + 0.59106659, 0.57476014, 0.57476014, 0.57476014, 0.57476014, ], [ - 0.32561457, - 0.56130587, - 0.6617216, - 0.71441466, - 0.74379777, - 0.76126431, - 0.77113823, - 0.77613669, - 0.77751853, - 0.77725604, - 0.77497526, - 0.77139447, - 0.76703237, - 0.76191999, - 0.75645111, - 0.75055875, - 0.7442092, - 0.7374678, - 0.73053459, - 0.72316607, - 0.71548982, - 0.70743423, - 0.69864038, - 0.68831136, - 0.67648118, - 0.65864525, - 0.62772564, + 0.50196347, + 0.64329711, + 0.70140893, + 0.7349125, + 0.75642549, + 0.76770742, + 0.77393902, + 0.77711801, + 0.77738243, + 0.77579919, + 0.77300154, + 0.76905762, + 0.76440795, + 0.75935107, + 0.75389504, + 0.74799043, + 0.74166119, + 0.73504854, + 0.72812576, + 0.72089568, + 0.71337285, + 0.70537766, + 0.69654622, + 0.68623366, + 0.67429586, + 0.65585544, + 0.62134408, 0.60942032, 0.60942032, 0.60942032, ], [ - 0.33074231, - 0.56005884, - 0.66128982, - 0.71591916, - 0.74805988, - 0.76759916, - 0.77934301, - 0.78623483, - 0.78986265, - 0.79099224, - 0.79069427, - 0.78891854, - 0.78603615, - 0.78244391, - 0.77788408, - 0.77320643, - 0.76806351, - 0.76253505, - 0.75677387, - 0.75063256, - 0.74432472, - 0.73730386, - 0.72988231, - 0.72174948, - 0.71179596, - 0.69985144, - 0.68290923, - 0.64882489, + 0.49190493, + 0.63667359, + 0.70619582, + 0.73788804, + 0.76209538, + 0.77540647, + 0.78342062, + 0.78877331, + 0.79039305, + 0.79064225, + 0.78986781, + 0.78733897, + 0.78415126, + 0.78038538, + 0.77587299, + 0.77104945, + 0.76592566, + 0.76048152, + 0.75482113, + 0.74886346, + 0.74240654, + 0.73564663, + 0.72825023, + 0.71996313, + 0.71032554, + 0.69802261, + 0.68043235, + 0.6422306, 0.63602945, 0.63602945, ], [ - 0.31198127, - 0.5491285, - 0.65730568, - 0.7136968, - 0.74802543, - 0.77002801, - 0.7838479, - 0.79209167, - 0.79747594, - 0.80013123, - 0.80117461, - 0.80101464, - 0.79949339, - 0.79708448, - 0.79415851, - 0.79034036, - 0.78613476, - 0.78160823, - 0.77673881, - 0.77173767, - 0.76637982, - 0.76067214, - 0.75425053, - 0.74738372, - 0.73965203, - 0.73029931, - 0.71848966, - 0.70115195, - 0.6622709, + 0.49631709, + 0.62596998, + 0.70307145, + 0.73681636, + 0.76358553, + 0.77918978, + 0.78882839, + 0.79582596, + 0.79876075, + 0.80062211, + 0.80116018, + 0.80007094, + 0.7983172, + 0.79574362, + 0.7923783, + 0.78859366, + 0.78448534, + 0.77984613, + 0.77507494, + 0.77015508, + 0.76492467, + 0.75927385, + 0.75282898, + 0.74601885, + 0.73813678, + 0.72905906, + 0.71675553, + 0.69981493, + 0.65675128, 0.65675128, ], [ - 0.31671695, - 0.53980013, - 0.64787489, - 0.70905619, - 0.74527768, - 0.76944244, - 0.78515551, - 0.79539174, - 0.80223884, - 0.80628252, - 0.80830042, - 0.80931701, - 0.80913849, - 0.80789866, - 0.80594715, - 0.8033943, - 0.8002341, - 0.7964891, - 0.79243861, - 0.78818161, - 0.78375784, - 0.77894492, - 0.77377229, - 0.76776127, - 0.76139284, - 0.75393309, - 0.74484163, - 0.73315728, - 0.71673281, + 0.52067183, + 0.61547868, + 0.69526392, + 0.73309225, + 0.76200406, + 0.77970568, + 0.79133394, + 0.80003056, + 0.80428981, + 0.80751428, + 0.80877268, + 0.80908696, + 0.80855083, + 0.80688716, + 0.80481125, + 0.80206918, + 0.79873532, + 0.79508155, + 0.79113451, + 0.78688405, + 0.78243226, + 0.77772652, + 0.77261264, + 0.76665099, + 0.76031542, + 0.75298855, + 0.74386389, + 0.73205485, + 0.71524196, 0.67288554, ], ] ) thrust_CL = np.array( [ - 90.62542317, - 233.05398451, - 375.48254584, - 517.91110717, - 660.33966851, - 802.76822984, - 945.19679117, - 1087.6253525, - 1230.05391384, - 1372.48247517, - 1514.9110365, - 1657.33959784, - 1799.76815917, - 1942.1967205, - 2084.62528183, - 2227.05384317, - 2369.4824045, - 2511.91096583, - 2654.33952717, - 2796.7680885, - 2939.19664983, - 3081.62521116, - 3224.0537725, - 3366.48233383, - 3508.91089516, - 3651.3394565, - 3793.76801783, - 3936.19657916, - 4078.62514049, + 214.78415226, + 352.9313781, + 491.07860395, + 629.2258298, + 767.37305564, + 905.52028149, + 1043.66750734, + 1181.81473319, + 1319.96195903, + 1458.10918488, + 1596.25641073, + 1734.40363658, + 1872.55086242, + 2010.69808827, + 2148.84531412, + 2286.99253996, + 2425.13976581, + 2563.28699166, + 2701.43421751, + 2839.58144335, + 2977.7286692, + 3115.87589505, + 3254.0231209, + 3392.17034674, + 3530.31757259, + 3668.46479844, + 3806.61202428, + 3944.75925013, + 4082.90647598, 4221.05370183, ] ) thrust_CL_limit = np.array( - ( - [ - 2892.27511752, - 3092.52843453, - 3268.24054129, - 3423.69146545, - 3565.02500064, - 3697.14844501, - 3822.19984334, - 3948.81792225, - 4081.24433611, - 4221.05370183, - ] - ) + [ + 2893.90572693, + 3092.52843453, + 3268.24054129, + 3423.69146545, + 3565.02500064, + 3697.14844501, + 3822.19984334, + 3948.81792225, + 4081.24433611, + 4221.05370183, + ] ) efficiency_CL = np.array( [ [ - 0.05257415, - 0.11979227, - 0.16096558, - 0.18297609, - 0.19214585, - 0.19440941, - 0.192262, - 0.18819478, - 0.18278735, - 0.17687579, - 0.17079108, - 0.16476462, - 0.15874091, - 0.15282559, - 0.14702722, - 0.141222, - 0.13547444, - 0.12963448, - 0.12296689, - 0.11337435, - 0.09681287, - 0.09681287, - 0.09681287, - 0.09681287, - 0.09681287, - 0.09681287, - 0.09681287, - 0.09681287, - 0.09681287, - 0.09681287, + 0.11264201, + 0.15464073, + 0.17883864, + 0.19018175, + 0.1938572, + 0.1929139, + 0.18943307, + 0.18466698, + 0.17906085, + 0.17323259, + 0.16734975, + 0.16150264, + 0.1557252, + 0.14998988, + 0.14442439, + 0.13887608, + 0.13325483, + 0.12729098, + 0.12031881, + 0.10818041, + 0.09463903, + 0.09463903, + 0.09463903, + 0.09463903, + 0.09463903, + 0.09463903, + 0.09463903, + 0.09463903, + 0.09463903, + 0.09463903, ], [ - 0.14926816, - 0.30255758, - 0.3869083, - 0.43039255, - 0.4495968, - 0.455774, - 0.45421453, - 0.44807051, - 0.43969649, - 0.42941572, - 0.41899432, - 0.40781953, - 0.39687339, - 0.3857249, - 0.37467091, - 0.3636227, - 0.35250853, - 0.34153471, - 0.33026362, - 0.31774249, - 0.30173587, - 0.2674251, + 0.28765872, + 0.37654177, + 0.42447955, + 0.44667293, + 0.45466556, + 0.45491239, + 0.44999877, + 0.44254, + 0.4331936, + 0.42319176, + 0.41261619, + 0.40190184, + 0.39115897, + 0.38044669, + 0.36960001, + 0.35903619, + 0.34828187, + 0.33752925, + 0.32630265, + 0.31362749, + 0.29559765, + 0.26221563, 0.26221563, 0.26221563, 0.26221563, @@ -1819,29 +1817,29 @@ def test_propeller(): 0.26221563, ], [ - 0.2272604, - 0.42014606, - 0.51750325, - 0.56501515, - 0.58842143, - 0.59734449, - 0.59801777, - 0.59400213, - 0.58687457, - 0.57772152, - 0.56764364, - 0.5568075, - 0.5457584, - 0.53439755, - 0.5229025, - 0.51124324, - 0.49931821, - 0.48749642, - 0.47559818, - 0.46292757, - 0.44931731, - 0.43214163, - 0.40096745, + 0.38870381, + 0.49928912, + 0.55623818, + 0.58437298, + 0.59560881, + 0.59779913, + 0.59517731, + 0.589261, + 0.58109912, + 0.57165915, + 0.5615182, + 0.55087169, + 0.53998958, + 0.52886476, + 0.51764602, + 0.5062978, + 0.49468411, + 0.48321499, + 0.47144341, + 0.45897933, + 0.44498075, + 0.42661665, + 0.38700306, 0.37920128, 0.37920128, 0.37920128, @@ -1851,30 +1849,30 @@ def test_propeller(): 0.37920128, ], [ - 0.28258325, - 0.49152952, - 0.58941955, - 0.6387258, - 0.66303983, - 0.67480876, - 0.67749572, - 0.67675665, - 0.67183388, - 0.66497311, - 0.65715631, - 0.64799263, - 0.63870722, - 0.62869586, - 0.61856311, - 0.60796659, - 0.59728514, - 0.58596093, - 0.57500529, - 0.56378502, - 0.55135094, - 0.53802846, - 0.52095436, - 0.49114681, + 0.45656603, + 0.56929127, + 0.6274439, + 0.65798458, + 0.67274706, + 0.67663431, + 0.67656013, + 0.67347415, + 0.66759399, + 0.66046872, + 0.6518014, + 0.64296386, + 0.63358328, + 0.62382533, + 0.61380437, + 0.60346078, + 0.59286734, + 0.58201317, + 0.57139602, + 0.56010787, + 0.54779089, + 0.53402689, + 0.51563085, + 0.47988445, 0.46287248, 0.46287248, 0.46287248, @@ -1883,31 +1881,31 @@ def test_propeller(): 0.46287248, ], [ - 0.3169378, - 0.53166132, - 0.62885052, - 0.67806778, - 0.70471403, - 0.71790601, - 0.72341201, - 0.72451657, - 0.72224434, - 0.71790192, - 0.71216668, - 0.70539743, - 0.69790546, - 0.68983891, - 0.68133038, - 0.67249712, - 0.6632631, - 0.65361981, - 0.64377054, - 0.63394701, - 0.62348395, - 0.61179762, - 0.59892232, - 0.58155994, - 0.55010639, + 0.50876069, + 0.60935459, + 0.66598059, + 0.69832916, + 0.71575158, + 0.72167346, + 0.7238545, + 0.72301644, + 0.71964616, + 0.71444896, + 0.70826051, + 0.70133926, + 0.69384331, + 0.68574675, + 0.67737123, + 0.66862466, + 0.65951821, + 0.65012897, + 0.6405707, + 0.63078975, + 0.62043663, + 0.60882453, + 0.59554171, + 0.57750498, + 0.5418194, 0.52411352, 0.52411352, 0.52411352, @@ -1915,163 +1913,163 @@ def test_propeller(): 0.52411352, ], [ - 0.32353556, - 0.54884734, - 0.64681185, - 0.69816534, - 0.72670374, - 0.74206723, - 0.75071338, - 0.75368305, - 0.75361529, - 0.75128918, - 0.74738236, - 0.74253023, - 0.7369738, - 0.73059401, - 0.72386936, - 0.71658765, - 0.70896539, - 0.7008357, - 0.69263774, - 0.68385797, - 0.67504122, - 0.66544948, - 0.65464611, - 0.641931, - 0.62457278, - 0.59191798, + 0.5086281, + 0.63577424, + 0.68500802, + 0.71903777, + 0.73872235, + 0.74790903, + 0.75246848, + 0.75355133, + 0.75215935, + 0.74882911, + 0.74459332, + 0.73961608, + 0.73370068, + 0.72735333, + 0.72056863, + 0.71336973, + 0.70581091, + 0.69784471, + 0.68978114, + 0.68135209, + 0.67245494, + 0.66291037, + 0.65196617, + 0.6394427, + 0.62108936, + 0.58546456, 0.56983154, 0.56983154, 0.56983154, 0.56983154, ], [ - 0.32338264, - 0.55300397, - 0.65338506, - 0.70692798, - 0.73716818, - 0.75526264, - 0.76572501, - 0.77124892, - 0.77302957, - 0.77312801, - 0.77115456, - 0.76784993, - 0.76369383, - 0.75879055, - 0.75345259, - 0.74770606, - 0.7414678, - 0.7348289, - 0.72792545, - 0.72059014, - 0.71296217, - 0.70490419, - 0.69607696, - 0.68567164, - 0.67359105, - 0.65535684, - 0.62288359, + 0.49904387, + 0.63643231, + 0.69465593, + 0.72850979, + 0.75054973, + 0.76225725, + 0.7689854, + 0.7725744, + 0.77309678, + 0.77182345, + 0.76929998, + 0.7655531, + 0.76110058, + 0.75621659, + 0.75091091, + 0.74510802, + 0.73889308, + 0.73234744, + 0.7254713, + 0.71828569, + 0.71078927, + 0.70278288, + 0.6939, + 0.68345516, + 0.67137799, + 0.65236627, + 0.61560986, 0.60425046, 0.60425046, 0.60425046, ], [ - 0.32863484, - 0.55167925, - 0.65307233, - 0.70855423, - 0.74143156, - 0.76170944, - 0.77393145, - 0.78132021, - 0.78538012, - 0.78685849, - 0.78683111, - 0.78533997, - 0.78267127, - 0.77927545, - 0.77487478, - 0.77031219, - 0.76529027, - 0.75987303, - 0.75414226, - 0.74805849, - 0.74181818, - 0.73476803, - 0.72737216, - 0.71915874, - 0.70904889, - 0.6969101, - 0.67936002, - 0.64335958, + 0.49075864, + 0.63035812, + 0.69945409, + 0.73165165, + 0.75634336, + 0.76999841, + 0.77849992, + 0.78425478, + 0.78611765, + 0.78667526, + 0.78617227, + 0.78382325, + 0.78084366, + 0.77725398, + 0.77285514, + 0.7681551, + 0.76314379, + 0.75777834, + 0.75217291, + 0.74624524, + 0.73982982, + 0.73306533, + 0.72565307, + 0.71732414, + 0.70754858, + 0.6950077, + 0.67675746, + 0.63527555, 0.63060161, 0.63060161, ], [ - 0.31057148, - 0.54154904, - 0.6496374, - 0.70616132, - 0.74131582, - 0.76409586, - 0.77833761, - 0.78708837, - 0.79288785, - 0.79594933, - 0.79721747, - 0.79730933, - 0.79603582, - 0.79380921, - 0.79105327, - 0.78741428, - 0.78328362, - 0.77888976, - 0.77404434, - 0.76914398, - 0.7638046, - 0.75812719, - 0.75174459, - 0.7448244, - 0.7370901, - 0.72755628, - 0.71551339, - 0.69761567, - 0.65622207, + 0.495229, + 0.62000354, + 0.69678401, + 0.73055538, + 0.75784792, + 0.77369513, + 0.78387097, + 0.79127123, + 0.79441528, + 0.79660353, + 0.7973098, + 0.79649126, + 0.79494974, + 0.79249243, + 0.78930383, + 0.78565044, + 0.78162948, + 0.77708359, + 0.77237175, + 0.7675294, + 0.7623227, + 0.75668361, + 0.75026337, + 0.74341128, + 0.73547675, + 0.72625209, + 0.71369156, + 0.69627214, + 0.65105509, 0.65105509, ], [ - 0.31571388, - 0.53176652, - 0.639908, - 0.70145019, - 0.73835971, - 0.76331659, - 0.77943871, - 0.79020517, - 0.79750604, - 0.80185271, - 0.80419706, - 0.80545482, - 0.80555951, - 0.80447942, - 0.80270285, - 0.80031786, - 0.79728609, - 0.79368892, - 0.789671, - 0.78551172, - 0.78109309, - 0.77636061, - 0.77120532, - 0.76522801, - 0.75880436, - 0.75126506, - 0.74219109, - 0.73019016, - 0.7129783, + 0.51663834, + 0.60945865, + 0.68897227, + 0.72661533, + 0.7561824, + 0.77400467, + 0.78622124, + 0.79508451, + 0.79980267, + 0.80337701, + 0.80478667, + 0.80537813, + 0.80498079, + 0.80353581, + 0.80164508, + 0.79899565, + 0.79581385, + 0.79226857, + 0.78835197, + 0.7841637, + 0.77976851, + 0.7751211, + 0.77004135, + 0.7640504, + 0.7576655, + 0.7502525, + 0.74112058, + 0.72893318, + 0.71158236, 0.66692487, ], ] diff --git a/src/fastga/models/aerodynamics/unitary_tests/test_daher_tbm900.py b/src/fastga/models/aerodynamics/unitary_tests/test_daher_tbm900.py index c49c71e6..d7b3b8b1 100644 --- a/src/fastga/models/aerodynamics/unitary_tests/test_daher_tbm900.py +++ b/src/fastga/models/aerodynamics/unitary_tests/test_daher_tbm900.py @@ -1271,36 +1271,36 @@ def test_load_factor(): def test_propeller(): thrust_SL = np.array( [ - 514.2204107, - 1535.78395058, - 2557.34749045, - 3578.91103032, - 4600.4745702, - 5622.03811007, - 6643.60164994, - 7665.16518982, - 8686.72872969, - 9708.29226956, - 10729.85580943, - 11751.41934931, - 12772.98288918, - 13794.54642905, - 14816.10996893, - 15837.6735088, - 16859.23704867, - 17880.80058855, - 18902.36412842, - 19923.92766829, - 20945.49120816, - 21967.05474804, - 22988.61828791, - 24010.18182778, - 25031.74536766, - 26053.30890753, - 27074.8724474, - 28096.43598728, - 29117.99952715, - 30139.56306702, + 1619.09853324, + 2602.82704064, + 3586.55554805, + 4570.28405545, + 5554.01256285, + 6537.74107026, + 7521.46957766, + 8505.19808506, + 9488.92659247, + 10472.65509987, + 11456.38360727, + 12440.11211468, + 13423.84062208, + 14407.56912948, + 15391.29763689, + 16375.02614429, + 17358.75465169, + 18342.4831591, + 19326.2116665, + 20309.9401739, + 21293.66868131, + 22277.39718871, + 23261.12569611, + 24244.85420352, + 25228.58271092, + 26212.31121832, + 27196.03972573, + 28179.76823313, + 29163.49674053, + 30147.22524794, ] ) thrust_SL_limit = np.array( @@ -1309,29 +1309,29 @@ def test_propeller(): 14452.03746608, 16361.14103439, 18127.72811316, - 19830.77998727, - 21624.1966522, - 23535.53147827, - 25569.30975885, - 27796.04974286, - 30139.56306702, + 19829.48638845, + 21615.24341967, + 23527.81586163, + 25566.66895535, + 27775.34315136, + 30147.22524794, ] ) efficiency_SL = np.array( [ [ - 0.06268934, - 0.13350106, - 0.15124139, - 0.14880385, - 0.14046632, - 0.13121184, - 0.12219378, - 0.11385834, - 0.10624182, - 0.09918256, - 0.09256645, - 0.0859352, + 0.13570735, + 0.15106952, + 0.1486958, + 0.14073689, + 0.13184291, + 0.123116, + 0.11499258, + 0.10754134, + 0.10066374, + 0.09420358, + 0.08791837, + 0.08032182, 0.07714809, 0.07714809, 0.07714809, @@ -1352,20 +1352,20 @@ def test_propeller(): 0.07714809, ], [ - 0.26960116, - 0.4833758, - 0.53548431, - 0.53645756, - 0.52098868, - 0.50010553, - 0.47764496, - 0.4557525, - 0.43495506, - 0.41513241, - 0.39617339, - 0.37803318, - 0.36019558, - 0.34075111, + 0.49086071, + 0.53574852, + 0.53605402, + 0.52145497, + 0.50157065, + 0.47995812, + 0.45882415, + 0.43863121, + 0.41931143, + 0.40089268, + 0.38317133, + 0.36612626, + 0.34837845, + 0.32371967, 0.32210935, 0.32210935, 0.32210935, @@ -1384,22 +1384,22 @@ def test_propeller(): 0.32210935, ], [ - 0.39692462, - 0.62802538, - 0.68526128, - 0.69387247, - 0.68506288, - 0.67012715, - 0.65137409, - 0.63214575, - 0.61257988, - 0.59336546, - 0.57456598, - 0.55609898, - 0.53780758, - 0.51992797, - 0.5009556, - 0.47715458, + 0.63628586, + 0.68407107, + 0.69383579, + 0.68540138, + 0.671207, + 0.65337285, + 0.63490542, + 0.61599581, + 0.59748463, + 0.57928448, + 0.56140313, + 0.54367468, + 0.52648251, + 0.5086539, + 0.48885733, + 0.453276, 0.453276, 0.453276, 0.453276, @@ -1416,24 +1416,24 @@ def test_propeller(): 0.453276, ], [ - 0.43839235, - 0.67813935, - 0.74059736, - 0.75746823, - 0.75697371, - 0.74898236, - 0.73711288, - 0.72311714, - 0.70828415, - 0.69290688, - 0.67752152, - 0.66192717, - 0.64628267, - 0.63071754, - 0.61503052, - 0.59851886, - 0.57975543, - 0.54839456, + 0.68317267, + 0.73934389, + 0.75653735, + 0.7571197, + 0.74961593, + 0.73826701, + 0.72513254, + 0.71087643, + 0.69624596, + 0.68138942, + 0.66642509, + 0.65143485, + 0.636374, + 0.62134979, + 0.60591193, + 0.58906629, + 0.56758262, + 0.52783961, 0.52783961, 0.52783961, 0.52783961, @@ -1448,231 +1448,231 @@ def test_propeller(): 0.52783961, ], [ - 0.44093012, - 0.68810282, - 0.75793588, - 0.78273516, - 0.78921313, - 0.78777122, - 0.78134433, - 0.77275688, - 0.76228855, - 0.75100335, - 0.73911183, - 0.72690827, - 0.71436443, - 0.70150011, - 0.6885878, - 0.67529536, - 0.66139407, - 0.64590332, - 0.62636703, - 0.57987099, - 0.57987099, - 0.57987099, - 0.57987099, - 0.57987099, - 0.57987099, - 0.57987099, - 0.57987099, - 0.57987099, - 0.57987099, - 0.57987099, + 0.68638823, + 0.75623255, + 0.78148109, + 0.78884328, + 0.78798731, + 0.78218123, + 0.77392035, + 0.76417658, + 0.75345291, + 0.742126, + 0.73046688, + 0.71845837, + 0.70620402, + 0.6937825, + 0.68121266, + 0.6681134, + 0.65418756, + 0.63783862, + 0.61382019, + 0.57936623, + 0.57936623, + 0.57936623, + 0.57936623, + 0.57936623, + 0.57936623, + 0.57936623, + 0.57936623, + 0.57936623, + 0.57936623, + 0.57936623, ], [ - 0.42572439, - 0.6808189, - 0.75936425, - 0.79128769, - 0.80371642, - 0.80731003, - 0.80572445, - 0.80099433, - 0.79449617, - 0.78667394, - 0.77789638, - 0.76852196, - 0.75869622, - 0.74853284, - 0.73791275, - 0.72715887, - 0.71614356, - 0.70434062, - 0.69178903, - 0.67685161, - 0.65523735, - 0.62020807, - 0.62020807, - 0.62020807, - 0.62020807, - 0.62020807, - 0.62020807, - 0.62020807, - 0.62020807, - 0.62020807, + 0.68877265, + 0.76114212, + 0.79139152, + 0.80340228, + 0.80708426, + 0.80591733, + 0.80168953, + 0.79567902, + 0.78838095, + 0.7801391, + 0.77127693, + 0.76191848, + 0.75227699, + 0.74222554, + 0.73188952, + 0.72140288, + 0.71042605, + 0.69876636, + 0.68597997, + 0.66988957, + 0.6433912, + 0.6216385, + 0.6216385, + 0.6216385, + 0.6216385, + 0.6216385, + 0.6216385, + 0.6216385, + 0.6216385, + 0.6216385, ], [ - 0.40280863, - 0.66638953, - 0.75293675, - 0.79096884, - 0.80901759, - 0.81678664, - 0.81895379, - 0.81772708, - 0.81418424, - 0.80913663, - 0.80309676, - 0.79610352, - 0.78855824, - 0.78050145, - 0.77215527, - 0.76329914, - 0.75428123, - 0.744909, - 0.73505882, - 0.72438969, - 0.7127915, - 0.69825585, - 0.67706437, - 0.64359819, - 0.64359819, - 0.64359819, - 0.64359819, - 0.64359819, - 0.64359819, - 0.64359819, + 0.65818804, + 0.74866759, + 0.78883082, + 0.80765768, + 0.81638988, + 0.8187754, + 0.81781098, + 0.81468138, + 0.81016684, + 0.80462498, + 0.79814705, + 0.79102045, + 0.7835012, + 0.77552978, + 0.76725202, + 0.75855161, + 0.74968923, + 0.7405345, + 0.73066572, + 0.72013319, + 0.7081813, + 0.6926135, + 0.66627085, + 0.64455868, + 0.64455868, + 0.64455868, + 0.64455868, + 0.64455868, + 0.64455868, + 0.64455868, ], [ - 0.3792615, - 0.64814155, - 0.74164501, - 0.78578839, - 0.80819361, - 0.81980821, - 0.82518457, - 0.82671003, - 0.82592405, - 0.82322709, - 0.81917973, - 0.81446503, - 0.80880368, - 0.80251485, - 0.79599755, - 0.78887916, - 0.78153444, - 0.77371036, - 0.76576694, - 0.75747299, - 0.74854376, - 0.73878524, - 0.72803671, - 0.71449283, - 0.69400003, - 0.66273073, - 0.66273073, - 0.66273073, - 0.66273073, - 0.66273073, + 0.63895133, + 0.74147953, + 0.78407232, + 0.80558896, + 0.81814227, + 0.82465119, + 0.82639728, + 0.82588777, + 0.82375198, + 0.82014037, + 0.81585385, + 0.81061492, + 0.80482023, + 0.79859641, + 0.79198909, + 0.78508085, + 0.77771636, + 0.77017312, + 0.7623335, + 0.75412308, + 0.74525184, + 0.73571908, + 0.72466562, + 0.710447, + 0.68712086, + 0.65989749, + 0.65989749, + 0.65989749, + 0.65989749, + 0.65989749, ], [ - 0.37144162, - 0.62755811, - 0.72622209, - 0.7753951, - 0.80198993, - 0.81694045, - 0.82577559, - 0.82995477, - 0.83131511, - 0.83090759, - 0.828885, - 0.82553564, - 0.82189984, - 0.81728407, - 0.81205333, - 0.80663593, - 0.80064911, - 0.79438711, - 0.7878645, - 0.78084178, - 0.77375844, - 0.76627133, - 0.75822326, - 0.74926348, - 0.73951055, - 0.7275205, - 0.70969473, - 0.67700305, - 0.67700305, - 0.67700305, + 0.62699198, + 0.72104764, + 0.77024112, + 0.80077678, + 0.81502794, + 0.82392585, + 0.82951724, + 0.83077812, + 0.83074618, + 0.82960826, + 0.82647097, + 0.82294382, + 0.81905397, + 0.81411439, + 0.80897178, + 0.80354558, + 0.79756561, + 0.79144877, + 0.78493336, + 0.77814803, + 0.77120581, + 0.76387318, + 0.75587905, + 0.74706524, + 0.73722947, + 0.72519168, + 0.70627209, + 0.67974103, + 0.67974103, + 0.67974103, ], [ - 0.3118491, - 0.59748583, - 0.70560858, - 0.75873146, - 0.79020556, - 0.80869589, - 0.82016028, - 0.82729559, - 0.83095838, - 0.83238514, - 0.83224541, - 0.83103328, - 0.82843586, - 0.82539958, - 0.8218673, - 0.81768462, - 0.81302208, - 0.80815502, - 0.8028398, - 0.79728014, - 0.79146556, - 0.78516583, - 0.77885831, - 0.77203601, - 0.76490485, - 0.75685161, - 0.74809396, - 0.7376948, - 0.72311432, - 0.69058815, + 0.6144616, + 0.69134058, + 0.75716697, + 0.78525393, + 0.80610881, + 0.81817152, + 0.8254837, + 0.83021363, + 0.83166414, + 0.83234654, + 0.83110742, + 0.82934953, + 0.8265146, + 0.82316047, + 0.81954338, + 0.81515891, + 0.81060329, + 0.80580983, + 0.80053893, + 0.7950676, + 0.78940613, + 0.78327861, + 0.77694646, + 0.77036819, + 0.76334488, + 0.75549931, + 0.74685472, + 0.73653179, + 0.72229007, + 0.68542609, ], ] ) thrust_CL = np.array( [ - 202.47447884, - 626.21849655, - 1049.96251426, - 1473.70653197, - 1897.45054968, - 2321.19456739, - 2744.9385851, - 3168.68260281, - 3592.42662052, - 4016.17063823, - 4439.91465594, - 4863.65867366, - 5287.40269137, - 5711.14670908, - 6134.89072679, - 6558.6347445, - 6982.37876221, - 7406.12277992, - 7829.86679763, - 8253.61081534, - 8677.35483305, - 9101.09885076, - 9524.84286847, - 9948.58688618, - 10372.33090389, - 10796.0749216, - 11219.81893931, - 11643.56295703, - 12067.30697474, - 12491.05099245, + 634.37045222, + 1043.01485082, + 1451.65924941, + 1860.30364801, + 2268.94804661, + 2677.5924452, + 3086.2368438, + 3494.88124239, + 3903.52564099, + 4312.17003959, + 4720.81443818, + 5129.45883678, + 5538.10323538, + 5946.74763397, + 6355.39203257, + 6764.03643116, + 7172.68082976, + 7581.32522836, + 7989.96962695, + 8398.61402555, + 8807.25842415, + 9215.90282274, + 9624.54722134, + 10033.19161993, + 10441.83601853, + 10850.48041713, + 11259.12481572, + 11667.76921432, + 12076.41361292, + 12485.05801151, ] ) thrust_CL_limit = np.array( @@ -1681,29 +1681,29 @@ def test_propeller(): 5859.18963494, 6636.81246242, 7350.87824006, - 8052.09311552, - 8777.76322785, - 9586.37415027, - 10466.34375643, - 11420.73698075, - 12491.05099245, + 8051.12299935, + 8792.6564392, + 9588.99001105, + 10466.51566556, + 11423.44161641, + 12485.05801151, ] ) efficiency_CL = np.array( [ [ - 0.05315209, - 0.12295759, - 0.1433242, - 0.14293574, - 0.1358365, - 0.12740032, - 0.11888282, - 0.1108729, - 0.10344103, - 0.09647314, - 0.0898715, - 0.08282266, + 0.12333056, + 0.14285193, + 0.1430762, + 0.13655046, + 0.12847886, + 0.12021237, + 0.11239194, + 0.10511165, + 0.09829881, + 0.09183378, + 0.08529839, + 0.07593118, 0.07549633, 0.07549633, 0.07549633, @@ -1724,20 +1724,20 @@ def test_propeller(): 0.07549633, ], [ - 0.23452478, - 0.45265347, - 0.51318283, - 0.51954672, - 0.50739007, - 0.48846474, - 0.4672588, - 0.44626738, - 0.42605523, - 0.4065763, - 0.38774885, - 0.36957739, - 0.35116945, - 0.3294163, + 0.45440186, + 0.5118183, + 0.51937963, + 0.50870812, + 0.49088433, + 0.47068788, + 0.45035362, + 0.43066549, + 0.41169668, + 0.39337744, + 0.37565149, + 0.35818762, + 0.33929959, + 0.31655753, 0.31655753, 0.31655753, 0.31655753, @@ -1756,22 +1756,22 @@ def test_propeller(): 0.31655753, ], [ - 0.35036576, - 0.59474664, - 0.66167829, - 0.67560837, - 0.67017371, - 0.65714347, - 0.63965797, - 0.62130002, - 0.60230671, - 0.5834439, - 0.5648472, - 0.54636218, - 0.52794868, - 0.50957248, - 0.48935527, - 0.45696352, + 0.59370273, + 0.65886668, + 0.67518688, + 0.6709731, + 0.65894439, + 0.64251976, + 0.62498621, + 0.60659673, + 0.58847376, + 0.57045626, + 0.55261394, + 0.53472844, + 0.51721436, + 0.49857159, + 0.47614623, + 0.44484842, 0.44484842, 0.44484842, 0.44484842, @@ -1788,23 +1788,23 @@ def test_propeller(): 0.44484842, ], [ - 0.39077689, - 0.64582059, - 0.71756227, - 0.73932579, - 0.74190149, - 0.73591063, - 0.72523708, - 0.71211523, - 0.6978055, - 0.6828478, - 0.66768651, - 0.65220974, - 0.63649297, - 0.62069092, - 0.60460499, - 0.58717167, - 0.56571095, + 0.64705371, + 0.71421953, + 0.73756136, + 0.74197754, + 0.73685059, + 0.72691312, + 0.71472819, + 0.70106575, + 0.68687958, + 0.67226796, + 0.65742714, + 0.64246449, + 0.62719711, + 0.61184951, + 0.59577064, + 0.57742956, + 0.54992961, 0.51657519, 0.51657519, 0.51657519, @@ -1820,196 +1820,196 @@ def test_propeller(): 0.51657519, ], [ - 0.39576493, - 0.65525283, - 0.73398151, - 0.76404041, - 0.77348603, - 0.77413337, - 0.76907808, - 0.76131939, - 0.75154811, - 0.74072651, - 0.72917081, - 0.71717986, - 0.70471838, - 0.69176649, - 0.6787151, - 0.66507989, - 0.65052832, - 0.63329784, - 0.60751244, - 0.56670973, - 0.56670973, - 0.56670973, - 0.56670973, - 0.56670973, - 0.56670973, - 0.56670973, - 0.56670973, - 0.56670973, - 0.56670973, - 0.56670973, + 0.64690793, + 0.72929195, + 0.7613184, + 0.77255007, + 0.77416574, + 0.77019423, + 0.76283932, + 0.75390046, + 0.74362784, + 0.73268477, + 0.72126512, + 0.70936041, + 0.69709996, + 0.68462952, + 0.67169114, + 0.6582501, + 0.64344859, + 0.62502786, + 0.58921368, + 0.56613697, + 0.56613697, + 0.56613697, + 0.56613697, + 0.56613697, + 0.56613697, + 0.56613697, + 0.56613697, + 0.56613697, + 0.56613697, + 0.56613697, ], [ - 0.38024791, - 0.64668063, - 0.73325136, - 0.77042095, - 0.78623276, - 0.79218562, - 0.79218849, - 0.78854902, - 0.78288492, - 0.77563758, - 0.76735239, - 0.75831734, - 0.74870596, - 0.7386761, - 0.72808943, - 0.71723943, - 0.70600331, - 0.69375456, - 0.68039679, - 0.66332362, - 0.63331588, - 0.6155829, - 0.6155829, - 0.6155829, - 0.6155829, - 0.6155829, - 0.6155829, - 0.6155829, - 0.6155829, - 0.6155829, + 0.64547795, + 0.72994359, + 0.76779654, + 0.78469262, + 0.79132737, + 0.79215213, + 0.78925062, + 0.78418575, + 0.77757981, + 0.76987526, + 0.76138931, + 0.7523206, + 0.74283989, + 0.73283977, + 0.72243211, + 0.71184564, + 0.70058683, + 0.68830915, + 0.67444215, + 0.65560716, + 0.60726434, + 0.60726434, + 0.60726434, + 0.60726434, + 0.60726434, + 0.60726434, + 0.60726434, + 0.60726434, + 0.60726434, + 0.60726434, ], [ - 0.3492019, - 0.62786604, - 0.72201039, - 0.76654491, - 0.78822383, - 0.79874484, - 0.80296269, - 0.80308491, - 0.80074214, - 0.79642265, - 0.79109959, - 0.78468931, - 0.77747345, - 0.76982277, - 0.76163301, - 0.75298613, - 0.74385626, - 0.73438969, - 0.72440965, - 0.71328198, - 0.70086608, - 0.68391259, - 0.65172812, - 0.6370844, - 0.6370844, - 0.6370844, - 0.6370844, - 0.6370844, - 0.6370844, - 0.6370844, + 0.60700744, + 0.71456823, + 0.76288838, + 0.78668932, + 0.7974669, + 0.80207181, + 0.80293046, + 0.80115585, + 0.79759664, + 0.79273702, + 0.78692097, + 0.78020373, + 0.77304794, + 0.76528252, + 0.75718476, + 0.74854281, + 0.73972292, + 0.73034347, + 0.72023666, + 0.70918342, + 0.69611618, + 0.6779283, + 0.62754228, + 0.62754228, + 0.62754228, + 0.62754228, + 0.62754228, + 0.62754228, + 0.62754228, + 0.62754228, ], [ - 0.3336473, - 0.60105677, - 0.70327433, - 0.75425167, - 0.78153631, - 0.79653488, - 0.80474546, - 0.80831387, - 0.80885529, - 0.80756685, - 0.80433345, - 0.80039957, - 0.79555513, - 0.78976407, - 0.78370943, - 0.77696718, - 0.7699338, - 0.76236512, - 0.75438071, - 0.74600066, - 0.73708924, - 0.72692068, - 0.71554386, - 0.70025224, - 0.67116142, - 0.6501757, - 0.6501757, - 0.6501757, - 0.6501757, - 0.6501757, + 0.58736137, + 0.70228109, + 0.74763776, + 0.7775739, + 0.79462253, + 0.80330687, + 0.80724905, + 0.80861033, + 0.80800815, + 0.80525141, + 0.80168133, + 0.79733574, + 0.79220498, + 0.78641121, + 0.78021791, + 0.77356593, + 0.76655101, + 0.75906316, + 0.75118169, + 0.74299536, + 0.7340609, + 0.72404511, + 0.71212, + 0.69607049, + 0.65876601, + 0.65006983, + 0.65006983, + 0.65006983, + 0.65006983, + 0.65006983, ], [ - 0.27845075, - 0.56240429, - 0.67402315, - 0.73236067, - 0.76530728, - 0.7846813, - 0.79669147, - 0.80403422, - 0.80765291, - 0.80891893, - 0.80846262, - 0.80661945, - 0.80361676, - 0.80019795, - 0.79587529, - 0.79099252, - 0.78579673, - 0.78002013, - 0.77391773, - 0.76744059, - 0.76030466, - 0.75304301, - 0.74523343, - 0.73622737, - 0.72599615, - 0.71298539, - 0.69187112, - 0.66341644, - 0.66341644, - 0.66341644, + 0.57003245, + 0.65799217, + 0.72566447, + 0.76032698, + 0.78090251, + 0.79483242, + 0.80194359, + 0.80656216, + 0.80867876, + 0.80839903, + 0.80718959, + 0.80469465, + 0.80151874, + 0.79781389, + 0.7933785, + 0.78846081, + 0.78315016, + 0.77748074, + 0.77158866, + 0.76498277, + 0.75818211, + 0.75089231, + 0.74307419, + 0.73416382, + 0.72411293, + 0.71094159, + 0.6886737, + 0.6544762, + 0.6544762, + 0.6544762, ], [ - 0.234251, - 0.50247548, - 0.62379532, - 0.68918689, - 0.72966275, - 0.75517321, - 0.77238402, - 0.78378774, - 0.79105467, - 0.7957369, - 0.79832641, - 0.79913837, - 0.79872723, - 0.79727825, - 0.79503428, - 0.79228652, - 0.7889125, - 0.78521291, - 0.78091034, - 0.77633714, - 0.77133732, - 0.76594595, - 0.76022882, - 0.75380559, - 0.7470767, - 0.73956588, - 0.73109294, - 0.72046528, - 0.70630642, - 0.66200086, + 0.43755858, + 0.61043062, + 0.67747725, + 0.7226726, + 0.74973033, + 0.76823355, + 0.78079882, + 0.78878455, + 0.79430656, + 0.79707219, + 0.79883664, + 0.79865031, + 0.79805297, + 0.79596231, + 0.79361861, + 0.79058591, + 0.78715869, + 0.78346059, + 0.7791489, + 0.77457979, + 0.76969748, + 0.76437368, + 0.75865129, + 0.75249474, + 0.74585436, + 0.73849754, + 0.73011223, + 0.71958991, + 0.70573877, + 0.65930626, ], ] ) diff --git a/src/fastga/models/aerodynamics/unitary_tests/test_functions.py b/src/fastga/models/aerodynamics/unitary_tests/test_functions.py index df9efd5c..ba530573 100644 --- a/src/fastga/models/aerodynamics/unitary_tests/test_functions.py +++ b/src/fastga/models/aerodynamics/unitary_tests/test_functions.py @@ -1745,70 +1745,30 @@ def propeller( polar_result_retrieve(tmp_folder) # Check obtained value(s) is/(are) correct - assert ( - np.sum( - np.abs( - thrust_SL - - problem.get_val("data:aerodynamics:propeller:sea_level:thrust", units="N") - ) - ) - < 1 - ) - assert ( - np.sum( - np.abs( - thrust_SL_limit - - problem.get_val("data:aerodynamics:propeller:sea_level:thrust_limit", units="N") - ) - ) - < 1 - ) - assert ( - np.sum( - np.abs( - speed - problem.get_val("data:aerodynamics:propeller:sea_level:speed", units="m/s") - ) - ) - < 1e-2 - ) - assert ( - np.sum(np.abs(efficiency_SL - problem["data:aerodynamics:propeller:sea_level:efficiency"])) - < 1e-5 - ) - assert ( - np.sum( - np.abs( - thrust_CL - - problem.get_val("data:aerodynamics:propeller:cruise_level:thrust", units="N") - ) - ) - < 1 - ) - assert ( - np.sum( - np.abs( - thrust_CL_limit - - problem.get_val( - "data:aerodynamics:propeller:cruise_level:thrust_limit", units="N" - ) - ) - ) - < 1 - ) - assert ( - np.sum( - np.abs( - speed - - problem.get_val("data:aerodynamics:propeller:cruise_level:speed", units="m/s") - ) - ) - < 1e-2 + assert problem.get_val( + "data:aerodynamics:propeller:sea_level:thrust", units="N" + ) == pytest.approx(thrust_SL, abs=1) + assert problem.get_val( + "data:aerodynamics:propeller:sea_level:thrust_limit", units="N" + ) == pytest.approx(thrust_SL_limit, abs=1) + assert problem.get_val( + "data:aerodynamics:propeller:sea_level:speed", units="m/s" + ) == pytest.approx(speed, abs=1e-2) + assert problem.get_val("data:aerodynamics:propeller:sea_level:efficiency") == pytest.approx( + efficiency_SL, abs=1e-5 ) - assert ( - np.sum( - np.abs(efficiency_CL - problem["data:aerodynamics:propeller:cruise_level:efficiency"]) - ) - < 1e-5 + + assert problem.get_val( + "data:aerodynamics:propeller:cruise_level:thrust", units="N" + ) == pytest.approx(thrust_CL, abs=1) + assert problem.get_val( + "data:aerodynamics:propeller:cruise_level:thrust_limit", units="N" + ) == pytest.approx(thrust_CL_limit, abs=1) + assert problem.get_val( + "data:aerodynamics:propeller:cruise_level:speed", units="m/s" + ) == pytest.approx(speed, abs=1e-2) + assert problem.get_val("data:aerodynamics:propeller:cruise_level:efficiency") == pytest.approx( + efficiency_CL, abs=1e-5 ) diff --git a/src/fastga/models/performances/mission_vector/initialization/initialize_gamma.py b/src/fastga/models/performances/mission_vector/initialization/initialize_gamma.py index 9eede094..27123ff6 100644 --- a/src/fastga/models/performances/mission_vector/initialization/initialize_gamma.py +++ b/src/fastga/models/performances/mission_vector/initialization/initialize_gamma.py @@ -56,7 +56,7 @@ def setup(self): def compute(self, inputs, outputs, discrete_inputs=None, discrete_outputs=None): - cruise_altitude = inputs["data:mission:sizing:main_route:cruise:altitude"] + cruise_altitude = np.array(inputs["data:mission:sizing:main_route:cruise:altitude"]).item() climb_rate_sl = float(inputs["data:mission:sizing:main_route:climb:climb_rate:sea_level"]) climb_rate_cl = float( inputs["data:mission:sizing:main_route:climb:climb_rate:cruise_level"]