Skip to content
Snippets Groups Projects
Commit a4751da1 authored by timeeapacala's avatar timeeapacala
Browse files

- Maximum fuel mass refers now to the fuel mass in all tanks filled up to the maximum capacity

- Ferry range mass = OME + maximum fuel mass
- renamed the module configuration file
- other renamings in the report and change of legend position
parent d062ab57
No related branches found
No related tags found
5 merge requests!263Apply 1 suggestion(s) to 1 file(s),!261Reintruduced automatic flight condition selection,!245Apply 1 suggestion(s) to 1 file(s),!233Initial open source version,!14Maximum fuel mass / ferry range mass
......@@ -42,6 +42,8 @@ def data_postprocessing(paths_and_names, routing_dict, data_dict, runtime_output
MassPropertiesIO().key_parameters_paths("maximum_landing_mass"))
paths_to_key_parameters_list.extend(
MassPropertiesIO().key_parameters_paths("maximum_fuel_mass"))
paths_to_key_parameters_list.extend(
MassPropertiesIO().key_parameters_paths("ferry_range_mass"))
paths_to_key_parameters_list.extend(
MassPropertiesIO().key_parameters_paths("most_forward_mass"))
paths_to_key_parameters_list.extend(
......@@ -66,6 +68,8 @@ def data_postprocessing(paths_and_names, routing_dict, data_dict, runtime_output
MassPropertiesIO().key_parameters_dicts("maximum_landing_mass", "MLM"))
child_key_parameters_dict.update(
MassPropertiesIO().key_parameters_dicts("maximum_fuel_mass", ""))
child_key_parameters_dict.update(
MassPropertiesIO().key_parameters_dicts("ferry_range_mass", ""))
child_key_parameters_dict.update(
MassPropertiesIO().key_parameters_dicts("most_forward_mass", ""))
child_key_parameters_dict.update(
......
......@@ -129,9 +129,10 @@ def method_basic(paths_and_names, routing_dict, dict_ac_exchange, dict_mod_confi
main_components_mass_properties, inertia_method, x_leading_edge_mac, mac).print("Operating mass empty")
# Maximum fuel mass + maximum fuel mass per tank
maximum_fuel_mass, maximum_fuel_mass_per_tank = calculate_maximum_fuel_mass(
maximum_fuel_mass, maximum_fuel_mass_per_tank, ferry_range_mass = calculate_maximum_fuel_mass(
tanks, operating_mass_empty, x_leading_edge_mac, mac)
maximum_fuel_mass.print("Maximum fuel mass")
ferry_range_mass.print("Ferry range mass")
# Design payload mass
design_payload_mass = calculate_design_payload_mass(
......@@ -449,6 +450,7 @@ def method_basic(paths_and_names, routing_dict, dict_ac_exchange, dict_mod_confi
"maximum_takeoff_mass": maximum_takeoff_mass,
"maximum_payload_mass": maximum_payload_mass,
"maximum_fuel_mass": maximum_fuel_mass,
"ferry_range_mass": ferry_range_mass,
"maximum_zero_fuel_mass": maximum_zero_fuel_mass,
"maximum_landing_mass": maximum_landing_mass,
"mtow_with_max_payload": mtow_max_payload_mass,
......@@ -862,18 +864,26 @@ def calculate_maximum_fuel_mass(tanks, ome, LE, mac):
max_fuel_mass_per_tank.append(filled_tank_wo_structure)
mass_prop.append(filled_tank_wo_structure)
mass_prop.append(ome)
max_fuel_mass.mass = sum(
[filled_tank.mass for filled_tank in max_fuel_mass_per_tank]) + ome.mass
[filled_tank.mass for filled_tank in max_fuel_mass_per_tank])
if max_fuel_mass.mass < 0.01:
max_fuel_mass.mass = 0.1
max_fuel_mass.center_of_gravity = calculate_center_of_gravity(mass_prop)
max_fuel_mass.initialize_zero_inertia()
max_fuel_mass.cg_mac = (
ferry_range_mass = MassPropertiesIO(
"./analysis/masses_cg_inertia/ferry_range_mass")
mass_prop.append(ome)
ferry_range_mass.mass = max_fuel_mass.mass + ome.mass
if ferry_range_mass.mass < 0.01:
ferry_range_mass.mass = 0.1
ferry_range_mass.center_of_gravity = calculate_center_of_gravity(mass_prop)
ferry_range_mass.initialize_zero_inertia()
ferry_range_mass.cg_mac = (
max_fuel_mass.center_of_gravity['x'] - LE) / mac * 100
return max_fuel_mass, max_fuel_mass_per_tank
return max_fuel_mass, max_fuel_mass_per_tank, ferry_range_mass
def calculate_cg_position_over_mac_refueling(initial_cg, initial_weight, fuel_mass_per_tank, mac, LE):
......
......@@ -38,8 +38,9 @@ def method_html_report(paths_and_names, routing_dict, data_dict, method_specific
data_dict["maximum_zero_fuel_mass"].mass),
("Maximum Payload Mass", "-", data_dict["maximum_payload_mass"].mass),
("Maximum Fuel mass", "-", data_dict["maximum_fuel_mass"].mass),
("Most forward mass", "-", data_dict["most_forward_mass"].mass),
("Most afterward mass", "-", data_dict["most_afterward_mass"].mass)
("Mass at most forward CG", "-", data_dict["most_forward_mass"].mass),
("Mass at most afterward CG", "-",
data_dict["most_afterward_mass"].mass)
]
aircraft_design_masses = [
......
......@@ -177,8 +177,8 @@ def method_plot(paths_and_names, routing_dict, data_dict, method_specific_output
plt.plot(data_dict["mtow_with_max_fuel"].cg_mac,
data_dict["mtow_with_max_fuel"].mass, 'D')
plt.plot(data_dict["maximum_fuel_mass"].cg_mac,
data_dict["maximum_fuel_mass"].mass, 'o')
plt.plot(data_dict["ferry_range_mass"].cg_mac,
data_dict["ferry_range_mass"].mass, 'o')
plt.plot(data_dict["design_mass"].cg_mac,
data_dict["design_mass"].mass, 's')
......@@ -186,7 +186,7 @@ def method_plot(paths_and_names, routing_dict, data_dict, method_specific_output
# Define legend labels and colors
legend_labels2 = ['OME', 'MZFM (max Payload)', 'max Payload + Fuel', 'max Fuel + Payload', 'max Fuel',
'Design Fuel + Design Payload']
legend = plt.legend(legend_labels2, loc='upper left', fontsize='small')
legend = plt.legend(legend_labels2, loc='lower right', fontsize='small')
for text in legend.get_texts():
text.set_color('black')
......
......@@ -141,6 +141,8 @@ def user_method_data_output_preparation(data_dict):
data_dict["maximum_landing_mass"].user_method_data_generation())
key_output_dict.update(
data_dict["maximum_fuel_mass"].user_method_data_generation())
key_output_dict.update(
data_dict["ferry_range_mass"].user_method_data_generation())
key_output_dict.update(
data_dict["most_forward_mass"].user_method_data_generation())
key_output_dict.update(
......
<?xml version="1.0" encoding="utf-8" ?>
<module_configuration_file Name="Weight and Balance Configuration">
<module_configuration_file Name="weight_and_balance_analysis_conf.xml">
<control_settings description="General control settings for this tool">
<aircraft_exchange_file_name description="Specify the name of the exchange file">
<value>csmr-2020.xml</value>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment