Skip to content
Snippets Groups Projects

landing_gear_design: - fix minimum percentage of nose gear load error for...

Merged Andi requested to merge fix/landing_gear_design into main
7 files
+ 354
261
Compare changes
  • Side-by-side
  • Inline
Files
7
@@ -46,31 +46,41 @@ def nacelle_ground_clearance(dict_ac_exchange, dict_mod_config, landing_gear_des
nacelle_section_heights = {key: value for key, value in dict_ac_exchange['nacelle_section_height'].items() if value is not None}
nacelle_section_heights = list(nacelle_section_heights.values())
# Check if the current propulsor is mounted to the wing
# -> if true: -> prepare wing nacelle paramter for ground clearance check
for _, value in dict_ac_exchange['propulsor_mounting_position'].items():
if value == 'wing':
idx_start = int(engine_counter * (len(nacelle_section_widths)/len(nacelle_y_position)))
idx_end = int(engine_counter * (len(nacelle_section_widths)/len(nacelle_y_position))
+ (len(nacelle_section_widths)/len(nacelle_y_position)))
wing_nacelle_bottom_position.append(nacelle_z_position[engine_counter]
- max(nacelle_section_heights[idx_start:idx_end])/2)
wing_nacelle_inboard_position.append(abs(nacelle_y_position[engine_counter])
- max(nacelle_section_widths[idx_start:idx_end])/2)
engine_counter += 1
# Check if at least one engine and nacelle are mounted to the aircraft
# -> if true: -> estimaet nacelle ground clearance
if len(nacelle_y_position) > 0:
# Check if the current propulsor is mounted to the wing
# -> if true: -> prepare wing nacelle paramter for ground clearance check
for _, value in dict_ac_exchange['propulsor_mounting_position'].items():
if value == 'wing':
idx_start = int(engine_counter * (len(nacelle_section_widths)/len(nacelle_y_position)))
idx_end = int(engine_counter * (len(nacelle_section_widths)/len(nacelle_y_position))
+ (len(nacelle_section_widths)/len(nacelle_y_position)))
wing_nacelle_bottom_position.append(nacelle_z_position[engine_counter]
- max(nacelle_section_heights[idx_start:idx_end])/2)
wing_nacelle_inboard_position.append(abs(nacelle_y_position[engine_counter])
- max(nacelle_section_widths[idx_start:idx_end])/2)
engine_counter += 1
# Multiply every second nacelle inboard postion by -1
wing_nacelle_inboard_position = [value if index % 2 == 0 else -value
for index, value in enumerate(wing_nacelle_inboard_position)]
# Check if the posiotn of current nacelle under investigation is below the minimum required nacelle ground clearance.
for i in range(0, len(wing_nacelle_bottom_position)):
clearance_required = abs(wing_nacelle_bottom_position[i]) + dict_mod_config['nacelle_clearance']
clearance_available = landing_gear_description['lever_arms']['vertical_distance_between_ground_and_fuselage_center_line']
# Check if the required nachell clearance is greater than the current available clearance.
if (clearance_required > clearance_available):
nacelle_ground_clearance_flag = True
required_main_gear_strut_delta_length.append(clearance_required - clearance_available)
# Multiply every second nacelle inboard postion by -1
wing_nacelle_inboard_position = [value if index % 2 == 0 else -value
for index, value in enumerate(wing_nacelle_inboard_position)]
# Check if the posiotn of current nacelle under investigation is below the minimum required nacelle ground clearance.
for i in range(0, len(wing_nacelle_bottom_position)):
clearance_required = abs(wing_nacelle_bottom_position[i]) + dict_mod_config['nacelle_clearance']
clearance_available = landing_gear_description['lever_arms']['vertical_distance_between_ground_and_fuselage_center_line']
# Check if the required nachell clearance is greater than the current available clearance.
if (clearance_required > clearance_available):
nacelle_ground_clearance_flag = True
required_main_gear_strut_delta_length.append(clearance_required - clearance_available)
# Else condition: No engine is mounted to the aircraft -> print warning and skip nacelle ground clearance check
else:
nacelle_ground_clearance_flag = False
required_main_gear_strut_delta_length = 0
runtime_output.warning('Attention! There are currently no engines mounted on the aircraft. '
'Ground clearance check of the nacelle skipped!')
# debug print
runtime_output.debug('The function "nacelle_ground_clearance.py" successfully executed!')
Loading