diff --git a/landing_gear_design/landing_gear_design_conf.xml b/landing_gear_design/landing_gear_design_conf.xml index 656a5388fcbae51e44404ed17623b9219580a1b7..8add8c37484f96792c0b93fd61520cbb484612a6 100644 --- a/landing_gear_design/landing_gear_design_conf.xml +++ b/landing_gear_design/landing_gear_design_conf.xml @@ -99,25 +99,25 @@ </wing_strike_limit> </ground_strike_limitations> <nacelle_clearance description="Nacelle clearance according to CS25.149."> - <value>7</value> - <unit>degree</unit> - <lower_boundary>5</lower_boundary> - <upper_boundary>10</upper_boundary> - <default>7</default> + <value>0.45</value> + <unit>m</unit> + <lower_boundary>0.45</lower_boundary> + <upper_boundary>0.90</upper_boundary> + <default>0.45</default> </nacelle_clearance> <strut_suspension description="Switch to use landing gear strut suspension systems. ('true': use, 'false': don't use"> <value>true</value> <default>true</default> <strut_suspension_travel> - <value>0.4699</value> + <value>0.60</value> <unit>m</unit> <lower_boundary>0.35</lower_boundary> <upper_boundary>0.95</upper_boundary> - <default>0.6</default> + <default>0.60</default> </strut_suspension_travel> </strut_suspension> <landing_gear_bay_keel_beam_width description="Width of the landing gear bay keel beam."> - <value>0.8</value> + <value>0.50</value> <unit>m</unit> <lower_boundary>0.5</lower_boundary> <upper_boundary>1.5</upper_boundary> diff --git a/landing_gear_design/main.py b/landing_gear_design/main.py index e3eacb6553828f0a93a6ec5446bcaa0097d4b734..2deba33d8815dc37a07ba5123eead33a088a11fd 100644 --- a/landing_gear_design/main.py +++ b/landing_gear_design/main.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + """Calculation module main file.""" # Import standard modules. import logging diff --git a/landing_gear_design/src/datapostprocessing.py b/landing_gear_design/src/datapostprocessing.py index 618a030cef77154bdcaa9dfe2eedcd650945ed67..45613b7e804027fc328b87e3775f8335e2743de4 100644 --- a/landing_gear_design/src/datapostprocessing.py +++ b/landing_gear_design/src/datapostprocessing.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + """Module providing functions for data postprocessing.""" # Import standard modules. diff --git a/landing_gear_design/src/datapreprocessing.py b/landing_gear_design/src/datapreprocessing.py index c2f9833ac9df2b2bad423cb78ceb6c1c1c7ab043..de8078f0dd13c6c8b3d36b71c956a9a7403e8365 100644 --- a/landing_gear_design/src/datapreprocessing.py +++ b/landing_gear_design/src/datapreprocessing.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + """Module providing functions for data preprocessing.""" # Import standard modules. import importlib diff --git a/landing_gear_design/src/readlayertext.py b/landing_gear_design/src/readlayertext.py index 86d7c8563fed87bc81dd4a09ad82d8ab89748812..a334aa21805022d29f623e39911deef7b5e886ce 100644 --- a/landing_gear_design/src/readlayertext.py +++ b/landing_gear_design/src/readlayertext.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + """File providing functions to read layer text from aircraft XML file.""" # Import standard libraries. import sys diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/estimateaircraftclassificationnumber.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/estimateaircraftclassificationnumber.py index 62c3229bd0d4d1a24f4eb999d6ccfee33c6a76c6..27ba034d8f93d9b6659f5ec56b4dc8cb3493f69d 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/estimateaircraftclassificationnumber.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/estimateaircraftclassificationnumber.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + # Import standard modules. import os import sys diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/acnflexcomp.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/acnflexcomp.py index 8f8d79d2baa005ee3fd125ea7a9182ced244d3b7..5af142badd097cd6abc7e7377c75f662f6903492 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/acnflexcomp.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/acnflexcomp.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + # Import standard modules. import math diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/alpha_factor_from_curve.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/alpha_factor_from_curve.py index 67d1c92e1d7c5c4aeaf8c8607ea2ecaa736b22f0..852d9d03672a032cbbe70c3ac9aa82ec0723bc1d 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/alpha_factor_from_curve.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/alpha_factor_from_curve.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + # imports for python import math diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/cvrg.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/cvrg.py index 8b9176a50949e82e9fe298d62d5932842c246c92..f2efa92aebcd8d1d9fe31cf2e75adb2c226ba873 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/cvrg.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/cvrg.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + import math diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/initializeacnflexparameter.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/initializeacnflexparameter.py index 8162d6aa0d677ed11430cb9c5b80d140da6c31d2..f6a89f42973726285b78082dc4a6c90bf34f25e9 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/initializeacnflexparameter.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/initializeacnflexparameter.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + # Import own modules. from src.wing_mounted.empirical.landing_gear_design_tu_berlin.general.aicraft_classification_number.flexible_pavement.storeflexcurvefits import store_flex_curve_fits # noPep8 e501 diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/setacnflexinputparameter.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/setacnflexinputparameter.py index 20afc0607947cf4df13255c10c0782aef7a82f5f..e27d489034b24fdfac292af870157eaac6b4c0f9 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/setacnflexinputparameter.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/setacnflexinputparameter.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + def set_acn_flex_input_parameter(paths_and_names, landing_gear_description, dict_ac_exchange, dict_mod_config, runtime_output, dict_acn_flex_parameter, dict_constants): """ This function prepares all input parameter to estimate the aircraft classification number in accordance to diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/storeflexcurvefits.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/storeflexcurvefits.py index 9fb0a7d08a872b6dc1295c88693f061df6cb589b..1b6d3e62e6ba542b29447174cbf1a17e17416515 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/storeflexcurvefits.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/aicraft_classification_number/flexible_pavement/storeflexcurvefits.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + def store_flex_curve_fits(): """ This function initialized the acn parameter in accordance to ICAO COMFAA tool. diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_00_estimatepositions.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_00_estimatepositions.py index 18fc1f9c256f02c4ace43fea304bd8875dd96e67..f39d7af51ed81d5f8bb3a144be3dbf41656f98e0 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_00_estimatepositions.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_00_estimatepositions.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + def estimate_positions(dict_ac_exchange, dict_mod_config, landing_gear_description, runtime_output): """ This function estimates start values of the x-positions for nose and main landing gear in meter. diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_01_estimatedistances.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_01_estimatedistances.py index 301bfb8681891585bb035993c7f9f81e6a24d331..33f5f5d1ccadb26ab39ac36dc548727aac149f06 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_01_estimatedistances.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_01_estimatedistances.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + # Import standard modules. import math import sys @@ -192,15 +212,15 @@ def estimate_distances(dict_ac_exchange, dict_mod_config, landing_gear_descripti fuselage_reference_point_z_key, fuselage_reference_point_z_value = \ next(iter(dict_ac_exchange['fuselage_reference_point_in_z_direction'].items()), (None, None)) if fuselage_reference_point_z_value is not None \ - and dict_ac_exchange['most_aft_center_of_gravity_in_z_direction'] is not None: - if fuselage_reference_point_z_value <= dict_ac_exchange['most_aft_center_of_gravity_in_z_direction']: + and dict_ac_exchange['center_of_gravity_in_z'] is not None: + if fuselage_reference_point_z_value <= dict_ac_exchange['center_of_gravity_in_z']: delta_height_fuselage_center_line_to_center_of_gravity = \ - abs(dict_ac_exchange['most_aft_center_of_gravity_in_z_direction'] + abs(dict_ac_exchange['center_of_gravity_in_z'] - fuselage_reference_point_z_value) else: delta_height_fuselage_center_line_to_center_of_gravity = \ abs(fuselage_reference_point_z_value - - dict_ac_exchange['most_aft_center_of_gravity_in_z_direction']) + - dict_ac_exchange['center_of_gravity_in_z']) elif dict_ac_exchange['fuselage_type'] == 'single_aisle': delta_height_fuselage_center_line_to_center_of_gravity = 0.5 elif dict_ac_exchange['fuselage_type'] == 'wide_body': diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_02_estimateloads.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_02_estimateloads.py index 62ad54960368c2f0a10b8007edeec58afb98c624..7752d6de97ef21913a9bab51d6c46779320ce461 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_02_estimateloads.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_02_estimateloads.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + # Import standard modules. import sys diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_03_estimatetires.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_03_estimatetires.py index aa59d620d7b2bb2702372ee6c71b30f5db722c90..2826fa3cadfcf457ffa9e5f0049fe8a8289a385f 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_03_estimatetires.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_03_estimatetires.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + # Import standard modules. import os import sys diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_04_estimatelimitations.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_04_estimatelimitations.py index 4323022b245ded19fdd4a5a08a9ed48d3f8f26ba..9fb94f4e524fb1095e7aa237ecc9ab190381e617 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_04_estimatelimitations.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_04_estimatelimitations.py @@ -1,7 +1,31 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + # Import standard modules. import sys import math +# import own modules. +from src.wing_mounted.empirical.landing_gear_design_tu_berlin.general.call_functions.sub_function.wingtipclearance import wing_tip_clearance # noPep8 e501 +from src.wing_mounted.empirical.landing_gear_design_tu_berlin.general.call_functions.sub_function.nacellegroundclearance import nacelle_ground_clearance # noPep8 e501 + def estimate_limitations(dict_ac_exchange, dict_mod_config, landing_gear_description, runtime_output): """ Hier beschreibung hin: Estimation of ground strike limitations in accordance to Sforza and CS-25 @@ -19,10 +43,10 @@ def estimate_limitations(dict_ac_exchange, dict_mod_config, landing_gear_descrip convert_inch_to_meter = 0.0254 current_turn_over_angle = None main_gear_positioning_flag = True + nacelle_ground_clearance_flag = True max_outside_diameter_in_inch = float() minimum_required_wheel_base = 0.0 main_gear_tires = landing_gear_description['main_gear_description']['main_gear_tires'] - nose_gear_tires = landing_gear_description['nose_gear_description']['nose_gear_tires'] main_gear_arrangement = landing_gear_description['main_gear_description']['main_gear_arrangement'] nose_gear_arrangement = landing_gear_description['nose_gear_description']['nose_gear_arrangement'] tail_tipping_point = landing_gear_description['tail_tipping_point'] @@ -46,7 +70,9 @@ def estimate_limitations(dict_ac_exchange, dict_mod_config, landing_gear_descrip ''' Tail strike take-off and landing limitation ''' i = 0 # while loop to iterate the landing gear strut length to avoid turn over - while i < 1000 and not limitation_flag: + while i < 1000 and not limitation_flag or nacelle_ground_clearance_flag: + # Reset nacelle ground clearance flag for next iteration + nacelle_ground_clearance_flag = False # Estimate minimum forward main landing gear position for tail strike take-off and landing limitation # check if strut suspension system should be used for limit estimation # -> if true: -> add maximum strut suspension travel to vertical distance between center of gravity and ground @@ -185,11 +211,37 @@ def estimate_limitations(dict_ac_exchange, dict_mod_config, landing_gear_descrip if dict_ac_exchange['fuselage_type'] == 'wide_body': main_gear_arrangement['main_landing_gear_wing_mounting_position_in_z_direction'] = -1.3 - main_gear_arrangement['main_gear_outer_strut_length'] = \ - round((landing_gear_description['lever_arms'][ - 'vertical_distance_between_ground_and_aft_center_of_gravity'] - + main_gear_arrangement['main_landing_gear_wing_mounting_position_in_z_direction']) - - (min_tire_diameter/2 * convert_inch_to_meter), 4) + if 'main_gear_outer_strut_length' not in main_gear_arrangement: + main_gear_arrangement['main_gear_outer_strut_length'] = \ + round((landing_gear_description['lever_arms'][ + 'vertical_distance_between_ground_and_aft_center_of_gravity'] + + main_gear_arrangement['main_landing_gear_wing_mounting_position_in_z_direction']) + - (min_tire_diameter/2 * convert_inch_to_meter), 4) + + # Check nacelle ground clearance if at least one engine is exisiting. + if dict_ac_exchange['engine_z_position'] is not None: + # Call function to check nacelle ground clearance. + required_main_gear_strut_delta_length, nacelle_ground_clearance_flag = \ + nacelle_ground_clearance(dict_ac_exchange, dict_mod_config, landing_gear_description, + main_gear_arrangement, runtime_output) + + # Check if nacelle ground clearance check is failed + # -> if true: -> start repositioning and resizing of main landing gear struts. + if nacelle_ground_clearance_flag: + if i == 1: + runtime_output.warning('Attention: At least one nacelle mounted to the wing ' + 'falls below the minimum required nacelle ground clearance.') + runtime_output.print('Repositioning and resizing of landing gear struts started!') + + # Add required delta length to the length of main landing gear struts. + main_gear_arrangement['main_gear_outer_strut_length'] += max(required_main_gear_strut_delta_length) + # Recalculate distance between ground and fusealge center line. + landing_gear_description['lever_arms']['vertical_distance_between_ground_and_fuselage_center_line'] = \ + (main_gear_arrangement['main_gear_outer_strut_length'] + + abs(landing_gear_description['main_gear_description']['main_gear_arrangement'][ + 'main_landing_gear_wing_mounting_position_in_z_direction']) + + (max_outside_diameter_in_inch/2 * convert_inch_to_meter)) + landing_gear_description['landing_gear_positions']['main_gear_z_position_outer_strut'] = \ round(main_gear_arrangement['main_landing_gear_wing_mounting_position_in_z_direction'], 4) @@ -208,7 +260,7 @@ def estimate_limitations(dict_ac_exchange, dict_mod_config, landing_gear_descrip round(main_gear_arrangement['main_gear_outer_strut_length'] + abs(main_gear_arrangement['main_landing_gear_wing_mounting_position_in_z_direction']) - landing_gear_description['fuselage_parameter']['fuselage_height'] / 2 - + 0.6, 4) + + (landing_gear_description['fuselage_parameter']['fuselage_height'] / 2 / 5), 4) ''' estimate y-position of nose and main gear struts ''' # Check if the fuselage_width is not given in the aircraft exchange file @@ -286,6 +338,8 @@ def estimate_limitations(dict_ac_exchange, dict_mod_config, landing_gear_descrip + 0.05) i += 1 + runtime_output.print('Repositioning and resizing of landing gear struts successfully finished!') + try: # check if the turnover iteration failed -> if true: -> raise an error and abort program if not main_gear_positioning_flag: @@ -365,7 +419,11 @@ def estimate_limitations(dict_ac_exchange, dict_mod_config, landing_gear_descrip landing_gear_description['main_gear_description']['main_gear_arrangement'] = main_gear_arrangement landing_gear_description['nose_gear_description']['nose_gear_arrangement'] = nose_gear_arrangement landing_gear_description['tail_tipping_point']['maximum_rotation_angle_landing'] = maximum_rotation_angle_landing - - runtime_output.debug('estimate_limitations successfully executed!') + + # Call function to check the wing tip clearance. + landing_gear_description = wing_tip_clearance(dict_ac_exchange, dict_mod_config, landing_gear_description, runtime_output) + + # debug print + runtime_output.debug('The function "estimate_limitations.py" successfully executed!') return landing_gear_description diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_05_estimateclearances.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_05_estimateclearances.py deleted file mode 100644 index 2397d6614b53f84ff0d4e31a2c069d21b7912872..0000000000000000000000000000000000000000 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_05_estimateclearances.py +++ /dev/null @@ -1,131 +0,0 @@ -# Import standard modules. -import math - - -def estimate_clearances(dict_ac_exchange, dict_mod_config, landing_gear_description, runtime_output): - """ Hier beschreibung hin: Estimation of ground clearances in accordance to Torenbeek and CS-25 - [ref. E. Torenbeek; 1982] - [ref. CS-25 Amendment 27; 2022] - - :param dict dict_ac_exchange: Dict containing parameter and according values from aircraft exchange file - :param dict dict_mod_config: Dict containing parameter and according values from module configuration file - :param dict landing_gear_description: Dict containing parameter and values of current landing gear estimation - :param logging.Logger runtime_output: Logging object used for capturing log messages in the module - :return dict landing_gear_description: Dict containing parameter and values of current landing gear estimation - """ - ''' initialize local parameter ''' - specific_flag = False - required_flag = False - nacelle_clearance_angle = [] - wing_tip_clearance_angle = 0 - minimum_required_clearance_angle = 5 # according to CS25.149 -> minimum 5 degree bank angle - propulsor_mounting_position = list(dict_ac_exchange['propulsor_mounting_position'].values()) - nacelle_y_position = {key: value for key, value in dict_ac_exchange['engine_y_position'].items() if - value is not None} - nacelle_y_position = list(nacelle_y_position.values()) - nacelle_z_position = {key: value for key, value in dict_ac_exchange['engine_z_position'].items() if - value is not None} - nacelle_z_position = list(nacelle_z_position.values()) - nacelle_section_height = {key: value for key, value in dict_ac_exchange['nacelle_section_height'].items() if - value is not None} - nacelle_section_height = list(nacelle_section_height.values()) - main_gear_outer_strut_y_position = landing_gear_description['landing_gear_positions'][ - 'main_gear_outer_strut_y_position'] - - ''' check nacelle clearance ''' - try: - # check if at least one engine exist in the aircraft exchange file - if len(nacelle_y_position) > 0: - index = 0 - # loop across all existing engines - for position in nacelle_y_position: - # check if the current engine is mounted to the wing -> if true: -> estimate clearance angle - if propulsor_mounting_position[index] == 'wing': - # check if the y-position of current engine is not within the outer landing gear leg position - # -> if true: -> estimate clearance angle - if abs(position) > main_gear_outer_strut_y_position: - # estimate clearance angle between outer main landing gear strut and lowest point of nacelle - distances = abs(position) - main_gear_outer_strut_y_position - nacelle_ground_clearance = round(landing_gear_description['lever_arms'][ - 'vertical_distance_between_ground_and_fuselage_center_line'] - - abs(nacelle_z_position[index]) - - abs(nacelle_section_height[index]/2), 4) - nacelle_clearance_angle.append( - round(math.degrees(math.atan(nacelle_ground_clearance/distances)), 4)) - # Else condition: current engine is within the outer landing gear leg position - # -> raise an error and skip nacelle ground clearance estimation - else: - raise ValueError('At least one wing mounted engine is within the outer landing gear leg ' - 'position. No valid configuration!') - index += 1 - - # loop across all existing nacelle clearance angles to check angle requirements - for angle in nacelle_clearance_angle: - if angle < dict_mod_config['nacelle_clearance'] and not angle < minimum_required_clearance_angle: - specific_flag = True - elif angle < minimum_required_clearance_angle: - required_flag = True - - if specific_flag and not required_flag: - raise ValueError('At least one wing mounted engine falls below the specified clearance angle of: ' - + str(dict_mod_config['nacelle_clearance']) + ' degrees!') - elif required_flag: - raise ValueError('At least one wing mounted engine falls below the required clearance angle of the ' - 'CS25.149 of: ' - + str(minimum_required_clearance_angle) + ' degrees!') - else: - runtime_output.print('All engines mounted to the wing conforms the specified clearance angle of: ' - + str(dict_mod_config['nacelle_clearance']) + ' degrees!') - - # Else condition: no engine exists in the aircraft exchange file -> print a warning - else: - runtime_output.warning('Attention: No engines available in the aircraft exchange file, ' - 'nacelle ground clearance could not be checked!') - - # exception handling for nacelle ground clearance check - except ValueError as e: - runtime_output.error('Error: ' + str(e)) - - ''' check wing tip clearance ''' - try: - _, wing_reference_point_on_tip_in_y_value = \ - next(reversed(list(dict_ac_exchange['wing_section_position_in_y'].items())), (None, None)) - _, wing_reference_point_on_tip_in_z_value = \ - next(reversed(list(dict_ac_exchange['wing_section_position_in_z'].items())), (None, None)) - - if wing_reference_point_on_tip_in_y_value is not None and wing_reference_point_on_tip_in_z_value is not None: - distance_between_wing_tip_and_outer_strut = \ - round(wing_reference_point_on_tip_in_y_value - - landing_gear_description['landing_gear_positions']['main_gear_outer_strut_y_position'], 4) - wing_tip_ground_clearance = \ - (landing_gear_description['lever_arms']['vertical_distance_between_ground_and_fuselage_center_line'] - - wing_reference_point_on_tip_in_z_value) - wing_tip_clearance_angle = \ - round(math.degrees(math.atan(wing_tip_ground_clearance/distance_between_wing_tip_and_outer_strut)), 4) - - if wing_tip_clearance_angle < dict_mod_config['wing_strike_limit'] \ - and not wing_tip_clearance_angle < minimum_required_clearance_angle: - raise ValueError('The resulting wing tip angle is below the specified clearance angle of: ' - + str(dict_mod_config['wing_strike_limit']) + ' degrees!') - elif wing_tip_clearance_angle < minimum_required_clearance_angle: - raise ValueError('The resulting wing tip angle is below the required clearance angle of the ' - 'CS25.149 of: ' + str(minimum_required_clearance_angle) + ' degrees!') - else: - runtime_output.print('The resulting wing tip angle conforms the specified clearance angle of: ' - + str(dict_mod_config['wing_strike_limit']) + ' degrees!') - - else: - raise ValueError('At least one wing parameter is missing in the aircraft exchange file, ' - 'wing tip clearance could not be checked!') - - # exception handling for wing tip clearance check - except ValueError as e: - runtime_output.error('Error: ' + str(e)) - - landing_gear_description['landing_gear_limitations']['nacelle_ground_clearance_angles'] = nacelle_clearance_angle - landing_gear_description['landing_gear_limitations']['wing_tip_clearance_angles'] = wing_tip_clearance_angle - - # debug print - runtime_output.debug('estimate_clearances successfully executed!') - - return landing_gear_description diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_06_estimatemasses.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_05_estimatemasses.py similarity index 90% rename from landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_06_estimatemasses.py rename to landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_05_estimatemasses.py index 0ff412ff04e55bdc74af30307c5f45a31796737b..a76079b3a4f0e8839105f6b513f744fb3afc3662 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_06_estimatemasses.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_05_estimatemasses.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + def estimate_masses(dict_ac_exchange, dict_mod_config, landing_gear_description, runtime_output): """ Hier beschreibung hin: Estimation of undercarriage masses in accordance to Torenbeek. [ref. E. Torenbeek; 1982] diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_07_estimatecog.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_06_estimatecog.py similarity index 95% rename from landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_07_estimatecog.py rename to landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_06_estimatecog.py index 955ca1981b65b3243b27e2c1bf506c4f162b388c..3753f21e341d3d5b7ab7dc4e3c06ee3a80e4ec2b 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_07_estimatecog.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_06_estimatecog.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + def estimate_cog(dict_ac_exchange, dict_mod_config, landing_gear_description, runtime_output): """ Hier beschreibung hin: Estimation of undercarriage center of gravity. @@ -34,18 +54,18 @@ def estimate_cog(dict_ac_exchange, dict_mod_config, landing_gear_description, ru nose_gear_cog['nose_gear_cog_global']['y'] = 0.0 # global cog in z-direction - fuselage_reference_point_in_z_direction_key, fuselage_reference_point_in_z_direction_value = \ + _, fuselage_reference_point_in_z_direction_value = \ next(iter(dict_ac_exchange['fuselage_reference_point_in_z_direction'].items()), (None, None)) if fuselage_reference_point_in_z_direction_value is not None: nose_gear_cog['nose_gear_cog_global']['z'] = \ round(fuselage_reference_point_in_z_direction_value - landing_gear_description['fuselage_parameter']['fuselage_height'] / 2 - + 0.6, 4) + + (landing_gear_description['fuselage_parameter']['fuselage_height'] / 2 / 5), 4) else: nose_gear_cog['nose_gear_cog_global']['z'] = \ round(0.0 - landing_gear_description['fuselage_parameter']['fuselage_height'] / 2 - + 0.6, 4) + + (landing_gear_description['fuselage_parameter']['fuselage_height'] / 2 / 5), 4) ''' estimate main gear center of gravity ''' # estimate global cog for main gear assembly diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_08_setexistinggeometry.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_07_setexistinggeometry.py similarity index 96% rename from landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_08_setexistinggeometry.py rename to landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_07_setexistinggeometry.py index a892e3e5793d566215e3779c87704dcd0901f379..120dad4e8025e477822c5cccf25fe8fe9fa48732 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_08_setexistinggeometry.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/_07_setexistinggeometry.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + # Import standard modules. import os import sys diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/convergencecheck.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/sub_function/convergencecheck.py similarity index 92% rename from landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/convergencecheck.py rename to landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/sub_function/convergencecheck.py index 81e28215b6468542fe5e62d0615f385b45747a29..81410f466a6638b740f0b9772331a8e62e09a5aa 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/convergencecheck.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/sub_function/convergencecheck.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + def convergence_check(landing_gear_description, convergence_parameter, runtime_output, convergence_flag, i): """ Module checks the convergence of landing gear design an prepared the log-file and console prints. diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/sub_function/nacellegroundclearance.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/sub_function/nacellegroundclearance.py new file mode 100644 index 0000000000000000000000000000000000000000..54617ff04258838768b88e600404c263ecaf2dd7 --- /dev/null +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/sub_function/nacellegroundclearance.py @@ -0,0 +1,77 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + +def nacelle_ground_clearance(dict_ac_exchange, dict_mod_config, landing_gear_description, main_gear_arrangement, runtime_output): + """ Estimation of ancelle ground clearance in accordance to Torenbeek and CS-25. + [ref. E. Torenbeek; 1982] + [ref. CS-25 Amendment 27; 2022] + + :param dict dict_ac_exchange: Dict containing parameter and according values from aircraft exchange file + :param dict dict_mod_config: Dict containing parameter and according values from module configuration file + :param dict landing_gear_description: Dict containing parameter and values of current landing gear estimation + :param dict main_gear_arrangement: Dict containing parameter and values of current main landing gear arrengment + :param logging.Logger runtime_output: Logging object used for capturing log messages in the module + :return list required_main_gear_strut_delta_length: List containing requiered delta lengths for each wing mounted nacelle + bool nacelle_ground_clearance_flag: Status flag if the ground clearance check is failed and a deltea length is required + """ + ''' initialize local parameter ''' + engine_counter = 0 + nacelle_ground_clearance_flag = False + required_main_gear_strut_delta_length = [] + wing_nacelle_bottom_position = [] + wing_nacelle_inboard_position = [] + nacelle_y_position = {key: value for key, value in dict_ac_exchange['engine_y_position'].items() if value is not None} + nacelle_y_position = list(nacelle_y_position.values()) + nacelle_z_position = {key: value for key, value in dict_ac_exchange['engine_z_position'].items() if value is not None} + nacelle_z_position = list(nacelle_z_position.values()) + nacelle_section_widths = {key: value for key, value in dict_ac_exchange['nacelle_section_width'].items() if value is not None} + nacelle_section_widths = list(nacelle_section_widths.values()) + 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 + + # 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) + + # debug print + runtime_output.debug('The function "nacelle_ground_clearance.py" successfully executed!') + + return required_main_gear_strut_delta_length, nacelle_ground_clearance_flag diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/prepareexternaldata.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/sub_function/prepareexternaldata.py similarity index 91% rename from landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/prepareexternaldata.py rename to landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/sub_function/prepareexternaldata.py index 1815313efde5ef3115d708ba3ca5b8e360b967e8..1ed7ed68bcb3d29aae6d6d6ed9414ede6620892f 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/prepareexternaldata.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/sub_function/prepareexternaldata.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + # Import own modules. import math import pyaixml as aixml @@ -17,7 +37,7 @@ def prepare_external_data(paths_and_names, routing_dict, dict_ac_exchange, dict_ """ ''' set most forward and most aftward center of gravity position for maximum take-off mass condition ''' - # TODO: this have to remove if the correct cog positions for mtom are writen!!! + # TODO: this have to remove if the correct cog positions for mtom are writen!!! (line 20 to 45) dict_ac_exchange['dihedral_angle_wing'] = 4.5 # angle in degree if dict_ac_exchange['center_of_gravity_in_x'] is not None \ and dict_ac_exchange['wing_reference_point_global_in_x'] is not None: @@ -37,6 +57,12 @@ def prepare_external_data(paths_and_names, routing_dict, dict_ac_exchange, dict_ elif dict_ac_exchange['center_of_gravity_in_x'] is not None: dict_ac_exchange['most_aft_center_of_gravity_in_x_direction'] = (dict_ac_exchange['center_of_gravity_in_x'] + 0.5) dict_ac_exchange['most_forward_center_of_gravity_in_x_direction'] = (dict_ac_exchange['center_of_gravity_in_x'] - 0.5) + + if dict_ac_exchange['most_aft_center_of_gravity_in_z_direction'] is not None: + dict_ac_exchange['most_aft_center_of_gravity_in_z_direction'] = dict_ac_exchange['center_of_gravity_in_z'] - 0.1 + + if dict_ac_exchange['most_forward_center_of_gravity_in_z_direction'] is not None: + dict_ac_exchange['most_forward_center_of_gravity_in_z_direction'] = dict_ac_exchange['center_of_gravity_in_z'] - 0.05 ''' transform local position of input parameter into global positions ''' # transform wing reference points diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/sub_function/wingtipclearance.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/sub_function/wingtipclearance.py new file mode 100644 index 0000000000000000000000000000000000000000..626285831300b496bb65d0664a62fdbc30efea9b --- /dev/null +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/call_functions/sub_function/wingtipclearance.py @@ -0,0 +1,81 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + +# Import standard modules. +import math + + +def wing_tip_clearance(dict_ac_exchange, dict_mod_config, landing_gear_description, runtime_output): + """ Estimation of wing tip clearance in accordance to Torenbeek and CS-25 + [ref. E. Torenbeek; 1982] + [ref. CS-25 Amendment 27; 2022] + + :param dict dict_ac_exchange: Dict containing parameter and according values from aircraft exchange file + :param dict dict_mod_config: Dict containing parameter and according values from module configuration file + :param dict landing_gear_description: Dict containing parameter and values of current landing gear estimation + :param logging.Logger runtime_output: Logging object used for capturing log messages in the module + :return dict landing_gear_description: Dict containing parameter and values of current landing gear estimation + """ + ''' initialize local parameter ''' + wing_tip_clearance_angle = 0 + minimum_required_clearance_angle = 5 # according to CS25.149 -> minimum 5 degree bank angle + + ''' check wing tip clearance ''' + try: + _, wing_reference_point_on_tip_in_y_value = \ + next(reversed(list(dict_ac_exchange['wing_section_position_in_y'].items())), (None, None)) + _, wing_reference_point_on_tip_in_z_value = \ + next(reversed(list(dict_ac_exchange['wing_section_position_in_z'].items())), (None, None)) + + if wing_reference_point_on_tip_in_y_value is not None and wing_reference_point_on_tip_in_z_value is not None: + distance_between_wing_tip_and_outer_strut = \ + round(wing_reference_point_on_tip_in_y_value + - landing_gear_description['landing_gear_positions']['main_gear_outer_strut_y_position'], 4) + wing_tip_ground_clearance = \ + (landing_gear_description['lever_arms']['vertical_distance_between_ground_and_fuselage_center_line'] + - wing_reference_point_on_tip_in_z_value) + wing_tip_clearance_angle = \ + round(math.degrees(math.atan(wing_tip_ground_clearance/distance_between_wing_tip_and_outer_strut)), 4) + + if wing_tip_clearance_angle < dict_mod_config['wing_strike_limit'] \ + and not wing_tip_clearance_angle < minimum_required_clearance_angle: + raise ValueError('The resulting wing tip angle is below the specified clearance angle of: ' + + str(dict_mod_config['wing_strike_limit']) + ' degrees!') + elif wing_tip_clearance_angle < minimum_required_clearance_angle: + raise ValueError('The resulting wing tip angle is below the required clearance angle of the ' + 'CS25.149 of: ' + str(minimum_required_clearance_angle) + ' degrees!') + else: + runtime_output.print('The resulting wing tip angle conforms the specified clearance angle of: ' + + str(dict_mod_config['wing_strike_limit']) + ' degrees!') + + else: + raise ValueError('At least one wing parameter is missing in the aircraft exchange file, ' + 'wing tip clearance could not be checked!') + + # exception handling for wing tip clearance check + except ValueError as e: + runtime_output.error('Error: ' + str(e)) + + landing_gear_description['landing_gear_limitations']['wing_tip_clearance_angles'] = wing_tip_clearance_angle + + # debug print + runtime_output.debug('The function "wing_tip_clearance.py" successfully executed!') + + return landing_gear_description diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/landinggeardesign.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/landinggeardesign.py index a742d7bb06d789ea72d4d24b897604fae6a7bfac..5edb3eb9ef841bbff8c393d0dded691fa6cb610a 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/landinggeardesign.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/landinggeardesign.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + # Import standard modules. import os import sys @@ -5,10 +25,10 @@ import math import importlib # Import own modules. -from src.wing_mounted.empirical.landing_gear_design_tu_berlin.general.call_functions.convergencecheck import convergence_check # noPep8 e501 from src.wing_mounted.empirical.landing_gear_design_tu_berlin.general.plot_functions.generateacnplots import generate_acn_plots # noPep8 e501 -from src.wing_mounted.empirical.landing_gear_design_tu_berlin.general.call_functions.prepareexternaldata import prepare_external_data # noPep8 e501 from src.wing_mounted.empirical.landing_gear_design_tu_berlin.general.plot_functions.generatelandinggearplots import generate_landing_gear_plots # noPep8 e501 +from src.wing_mounted.empirical.landing_gear_design_tu_berlin.general.call_functions.sub_function.convergencecheck import convergence_check # noPep8 e501 +from src.wing_mounted.empirical.landing_gear_design_tu_berlin.general.call_functions.sub_function.prepareexternaldata import prepare_external_data # noPep8 e501 from src.wing_mounted.empirical.landing_gear_design_tu_berlin.general.aicraft_classification_number.estimateaircraftclassificationnumber import estimate_aircraft_classification_number # noPep8 e501 @@ -31,7 +51,6 @@ def landing_gear_design(paths_and_names, routing_dict, dict_ac_exchange, dict_mo ''' Initialize local parameter ''' word_to_insert_after = 'estimate' - files_to_remove = ['prepareexternaldata.py', 'convergencecheck.py'] landing_gear_description = {'working_directory': paths_and_names['working_directory']} ''' Run landing gear design ''' @@ -55,11 +74,6 @@ def landing_gear_design(paths_and_names, routing_dict, dict_ac_exchange, dict_mo routing_dict['module_import_name'].replace('.', '/') + '/general/call_functions' + '/' + entry)] - # Remove unnecessary files from call function list. - for file in files_to_remove: - if file in call_function_list: - call_function_list.remove(file) - call_function_list = sorted(call_function_list, key=lambda x: (int(x.split('_')[1]), x)) # initialize convergence criteria @@ -137,6 +151,6 @@ def landing_gear_design(paths_and_names, routing_dict, dict_ac_exchange, dict_mo landing_gear_description['current_tool_level'] = int(routing_dict['tool_level']) # Debug print for function landing_gear_design. - runtime_output.debug('landing_gear_design successfully executed!') + runtime_output.debug('The functioin "landing_gear_design.py" successfully executed!') return landing_gear_description diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/methodhtmlreport.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/methodhtmlreport.py index e8689c0732addb564b39c927e378f016f2092447..06752f72b38a57061b99c3c916acdf216d4a4401 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/methodhtmlreport.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/methodhtmlreport.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + """Module providing report functionalities for current calculation method.""" diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/methodplot.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/methodplot.py index 3bcd611a4d9fc8941e37c20ec4e127fdffcc1f6d..9cf6f9d3824fd52793447a433defe6b1d6013c9c 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/methodplot.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/methodplot.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + """Module providing plotting functionalities for current calculation method.""" # Import standard libraries. import os @@ -175,34 +195,6 @@ def create_landing_gear_plots(paths_and_names, data_dict, plot_directory, runtim for point in data_dict['dict_landing_gear_output']['strut_positions']: ax.scatter(point[0], point[1], color='gray') - # Plot engines if available. - if 'nacelle_plot_list' in data_dict['dict_landing_gear_output']: - theta = np.linspace(0, 2*np.pi, 100) - i = 0 - while i < len(data_dict['dict_landing_gear_output']['nacelle_plot_list']): - y1 = (data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][0] - + data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][2] * np.cos(theta)) - z1 = (data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][1] - + data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][2] * np.sin(theta)) - y2 = (data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][0] - + (data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][2] - * (1 - data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][3]/100)) * np.cos(theta)) - z2 = (data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][1] - + (data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][2] - * (1 - data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][3]/100)) * np.sin(theta)) - ax.plot(y1, z1, color='black') - ax.plot(y2, z2, color='black') - vertices = np.vstack((np.column_stack((y1, z1)), - np.column_stack((y2[::-1], z2[::-1])))) - polygon = Polygon(vertices, closed=True, color='gray', alpha=0.15) - vertices_inner = np.column_stack((y2[::-1], z2[::-1])) - fig.gca().add_patch(polygon) - polygon_inner = Polygon(vertices_inner, closed=True, color='gray', alpha=0.05) - fig.gca().add_patch(polygon_inner) - ax.scatter(data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][0], - data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][1], color='gray') - i += 1 - # Plot wing if available. if 'wing_plot_list' in data_dict['dict_landing_gear_output']: i = 0 @@ -250,6 +242,34 @@ def create_landing_gear_plots(paths_and_names, data_dict, plot_directory, runtim else: runtime_output.warning('Attention! The Use existing geometry mode is selected. ' 'Clearance and limitation angle are not plotted.') + + # Plot nacelle if available. + if 'nacelle_plot_list' in data_dict['dict_landing_gear_output']: + theta = np.linspace(0, 2*np.pi, 100) + i = 0 + while i < len(data_dict['dict_landing_gear_output']['nacelle_plot_list']): + y1 = (data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][0] + + data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][2] * np.cos(theta)) + z1 = (data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][1] + + data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][2] * np.sin(theta)) + y2 = (data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][0] + + (data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][2] + * (1 - data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][3]/100)) * np.cos(theta)) + z2 = (data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][1] + + (data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][2] + * (1 - data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][3]/100)) * np.sin(theta)) + ax.plot(y1, z1, color='black') + ax.plot(y2, z2, color='black') + vertices = np.vstack((np.column_stack((y1, z1)), + np.column_stack((y2[::-1], z2[::-1])))) + polygon = Polygon(vertices, closed=True, color='gray', alpha=0.8) + vertices_inner = np.column_stack((y2[::-1], z2[::-1])) + fig.gca().add_patch(polygon) + polygon_inner = Polygon(vertices_inner, closed=True, color='gray', alpha=0.15) + fig.gca().add_patch(polygon_inner) + ax.scatter(data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][0], + data_dict['dict_landing_gear_output']['nacelle_plot_list'][i][1], color='gray') + i += 1 # Remove frame fig.gca().spines['top'].set_visible(False) diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/methodtexoutput.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/methodtexoutput.py index 40c7f635cf43254f6e79c767a0f9692fd8e989ce..05e9a70892fca8bf459b1b1bbacf81692e4830a6 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/methodtexoutput.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/methodtexoutput.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + """Module providing report functionalities for current calculation method.""" diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/methodxmlexport.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/methodxmlexport.py index aa317cb3f005a43e61f87be2d177b951be648b64..adf8c4ae8f6a7ca45131f0361b2697f384b802fb 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/methodxmlexport.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/methodxmlexport.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + """Module providing export functionalities for current calculation method.""" # Import standard libraries. import xml.etree.ElementTree as ET diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/plot_functions/generateacnplots.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/plot_functions/generateacnplots.py index ed6e4ddd5583a04acf210812ccb7dfecb5d4dce6..d5c0fb759d466f4d6fa5cbc94c8e21b649635628 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/plot_functions/generateacnplots.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/plot_functions/generateacnplots.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + # Import standard modules. import math diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/plot_functions/generatelandinggearplots.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/plot_functions/generatelandinggearplots.py index 160009db576b53a6c9eda1a16649a1c0c20cecc4..6bd72cfef4a914d60dcceff29936e9cfac7e93db 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/plot_functions/generatelandinggearplots.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/plot_functions/generatelandinggearplots.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + # Import standard modules. import numpy as np from matplotlib import pyplot as plt @@ -183,24 +203,6 @@ def generate_landing_gear_plots(dict_ac_exchange, landing_gear_description, runt round(abs(2 * landing_gear_description['landing_gear_positions']['main_gear_outer_strut_y_position']), 2) ] - # Check if engine data are available -> if true: -> prepare plotting. - _, nacelle_y_position_value = \ - next(iter(dict_ac_exchange['engine_y_position'].items()), (None, None)) - - if nacelle_y_position_value is not None: - nacelle_plot_list = [] - cleaned_nacelle_dict = {key: value for key, value in dict_ac_exchange['nacelle_section_height'].items() - if value is not None} - i = 0 - y_pos_list = list(dict_ac_exchange['engine_y_position'].values()) - z_pos_list = list(dict_ac_exchange['engine_z_position'].values()) - radius_list = max(list(cleaned_nacelle_dict.values())) - for i in range(0, len(y_pos_list)): - # List contains the following entries: [y_pos, z_pos, radius, wall_thickness_in_percent] - nacelle_plot_list.append([y_pos_list[i], z_pos_list[i], radius_list/2, 18]) - - dict_landing_gear_output['nacelle_plot_list'] = nacelle_plot_list - # Check if wing data are available -> if true: -> prepare plotting. _, wing_section_y_position_value = \ next(iter(dict_ac_exchange['wing_chord_length_on_section'].items()), (None, None)) @@ -244,6 +246,26 @@ def generate_landing_gear_plots(dict_ac_exchange, landing_gear_description, runt dict_landing_gear_output['wing_clearance_list'] = wing_clearance_list else: dict_landing_gear_output['wing_clearance_list'] = None + + # Check if engine data are available -> if true: -> prepare plotting. + _, nacelle_y_position_value = \ + next(iter(dict_ac_exchange['engine_y_position'].items()), (None, None)) + + if nacelle_y_position_value is not None: + nacelle_plot_list = [] + cleaned_nacelle_dict = {key: value for key, value in dict_ac_exchange['nacelle_section_height'].items() + if value is not None} + i = 0 + y_pos_list = list(dict_ac_exchange['engine_y_position'].values()) + z_pos_list = list(dict_ac_exchange['engine_z_position'].values()) + nacelle_diameter_list = max(list(cleaned_nacelle_dict.values())) + engine_diameter = nacelle_diameter_list - nacelle_diameter_list / 100 * 9 # 9 percent wall thickness of total nacelle diameter assumed + nacelle_width = round(nacelle_diameter_list - engine_diameter, 2) * 100 # nacelle wall width in cm for plotting + for i in range(0, len(y_pos_list)): + # List contains the following entries: [y_pos, z_pos, radius, wall_thickness_in_percent] + nacelle_plot_list.append([y_pos_list[i], z_pos_list[i], nacelle_diameter_list/2, nacelle_width]) + + dict_landing_gear_output['nacelle_plot_list'] = nacelle_plot_list ''' generate output data for side view of landing gear design ''' diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/useexistinggeometry.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/useexistinggeometry.py index b8a5014c4f0c875d9e9687c4d5fd7551a702f0fb..603881c6e490415566ac305652d602eeae3a784a 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/useexistinggeometry.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/general/useexistinggeometry.py @@ -1,13 +1,33 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + # Import standard modules. import sys import xml.etree.ElementTree as ET # Import own modules. from src.wing_mounted.empirical.landing_gear_design_tu_berlin.general.landinggeardesign import landing_gear_design # noPep8 e501 -from src.wing_mounted.empirical.landing_gear_design_tu_berlin.general.call_functions._07_estimatecog import estimate_cog +from src.wing_mounted.empirical.landing_gear_design_tu_berlin.general.call_functions._06_estimatecog import estimate_cog from src.wing_mounted.empirical.landing_gear_design_tu_berlin.general.plot_functions.generateacnplots import generate_acn_plots # noPep8 e501 -from src.wing_mounted.empirical.landing_gear_design_tu_berlin.general.call_functions._06_estimatemasses import estimate_masses # noPep8 e501 -from src.wing_mounted.empirical.landing_gear_design_tu_berlin.general.call_functions._08_setexistinggeometry import set_existing_geometry # noPep8 e501 +from src.wing_mounted.empirical.landing_gear_design_tu_berlin.general.call_functions._05_estimatemasses import estimate_masses # noPep8 e501 +from src.wing_mounted.empirical.landing_gear_design_tu_berlin.general.call_functions._07_setexistinggeometry import set_existing_geometry # noPep8 e501 from src.wing_mounted.empirical.landing_gear_design_tu_berlin.general.plot_functions.generatelandinggearplots import generate_landing_gear_plots # noPep8 e501 from src.wing_mounted.empirical.landing_gear_design_tu_berlin.general.aicraft_classification_number.estimateaircraftclassificationnumber import estimate_aircraft_classification_number # noPep8 e501 diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/kerosene/methodkerosene.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/kerosene/methodkerosene.py index 3ac4ac5dc3a945a57b8ef71eaca69f26ce641a9e..98cdf4525808a2d195f352aa26204387b4501cf6 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/kerosene/methodkerosene.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/kerosene/methodkerosene.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + """Module providing calculation functions provided by the user.""" # Import standard modules. import os diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/liquid_hydrogen/methodliquidhydrogen.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/liquid_hydrogen/methodliquidhydrogen.py index 013d5da7800235e0d09d7e17c5d571c246b18371..a61682554dca8d5074134e8f29c7ed3501ccbc0d 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/liquid_hydrogen/methodliquidhydrogen.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/liquid_hydrogen/methodliquidhydrogen.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + """Module providing calculation functions provided by the user.""" # Import standard modules. import os diff --git a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/usermethoddatapreparation.py b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/usermethoddatapreparation.py index 7ecdb4e22e7761ea2913b8695bfc7faa8ca4bebc..774f93581036d3ad969a7a470b632d354e9a01b5 100644 --- a/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/usermethoddatapreparation.py +++ b/landing_gear_design/src/wing_mounted/empirical/landing_gear_design_tu_berlin/usermethoddatapreparation.py @@ -1,3 +1,23 @@ +# UNICADO - UNIversity Conceptual Aircraft Design and Optimization +# +# Copyright (C) 2024 UNICADO consortium +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <https://www.gnu.org/licenses/>. +# +# Description: +# This file is part of UNICADO. + """Module providing functions for the preparation of user data.""" import pycoordinatesystemconversion as py11csc @@ -76,6 +96,8 @@ def user_method_data_input_preparation(routing_dict): ['./analysis/masses_cg_inertia/most_forward_mass/mass_properties/center_of_gravity/y', float], 'most_forward_center_of_gravity_in_z_direction': ['./analysis/masses_cg_inertia/most_forward_mass/mass_properties/center_of_gravity/z', float], + 'nacelle_section_width': + ['./component_design/propulsion/specific/propulsion[@ID="0"]/nacelle[@ID="0"]/sections/section/[@ID="0"]/width', float], # noPep8 e501 'nacelle_section_height': ['./component_design/propulsion/specific/propulsion[@ID="0"]/nacelle[@ID="0"]/sections/section/[@ID="0"]/height', float], # noPep8 e501 'engine_x_position':