RCAIDE-GUI 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- common_widgets/__init__.py +6 -0
- common_widgets/animated_toggle.py +141 -0
- common_widgets/color.py +17 -0
- common_widgets/data_entry_widget.py +337 -0
- common_widgets/image_widget.py +21 -0
- common_widgets/unit_picker_widget.py +48 -0
- main.py +168 -0
- rcaide_gui-1.0.0.dist-info/METADATA +96 -0
- rcaide_gui-1.0.0.dist-info/RECORD +170 -0
- rcaide_gui-1.0.0.dist-info/WHEEL +5 -0
- rcaide_gui-1.0.0.dist-info/entry_points.txt +2 -0
- rcaide_gui-1.0.0.dist-info/top_level.txt +5 -0
- rcaide_io.py +818 -0
- tabs/__init__.py +10 -0
- tabs/aircraft_configs/__init__.py +3 -0
- tabs/aircraft_configs/aircraft_configs.py +301 -0
- tabs/analysis/__init__.py +4 -0
- tabs/analysis/analysis.py +92 -0
- tabs/analysis/widgets/__init__.py +13 -0
- tabs/analysis/widgets/aeroacoustics_widget.py +158 -0
- tabs/analysis/widgets/aerodynamics_widget.py +108 -0
- tabs/analysis/widgets/analysis_data_widget.py +29 -0
- tabs/analysis/widgets/atmosphere_widget.py +49 -0
- tabs/analysis/widgets/costs_widget.py +35 -0
- tabs/analysis/widgets/energy_widget.py +32 -0
- tabs/analysis/widgets/geometry_widget.py +55 -0
- tabs/analysis/widgets/planets_widget.py +34 -0
- tabs/analysis/widgets/propulsion_widget.py +53 -0
- tabs/analysis/widgets/stability_widget.py +34 -0
- tabs/analysis/widgets/weights_widget.py +94 -0
- tabs/geometry/__init__.py +6 -0
- tabs/geometry/aircraft_configs.py +232 -0
- tabs/geometry/frames/__init__.py +15 -0
- tabs/geometry/frames/booms/__init__.py +5 -0
- tabs/geometry/frames/booms/boom_frame.py +238 -0
- tabs/geometry/frames/cargo_bays/__init__.py +5 -0
- tabs/geometry/frames/cargo_bays/cargo_bay_frame.py +159 -0
- tabs/geometry/frames/default_frame.py +23 -0
- tabs/geometry/frames/energy_network/__init__.py +2 -0
- tabs/geometry/frames/energy_network/turbofan_network/__init__.py +3 -0
- tabs/geometry/frames/energy_network/turbofan_network/frames/__init__.py +1 -0
- tabs/geometry/frames/energy_network/turbofan_network/widgets/__init__.py +1 -0
- tabs/geometry/frames/fuselages/__init__.py +5 -0
- tabs/geometry/frames/fuselages/fuselage_frame.py +294 -0
- tabs/geometry/frames/geometry_frame.py +91 -0
- tabs/geometry/frames/landing_gears/__init__.py +5 -0
- tabs/geometry/frames/landing_gears/landing_gear_frame.py +189 -0
- tabs/geometry/frames/nacelles/__init__.py +1 -0
- tabs/geometry/frames/powertrain/__init__.py +6 -0
- tabs/geometry/frames/powertrain/converters/__init__.py +5 -0
- tabs/geometry/frames/powertrain/converters/converter_frame.py +137 -0
- tabs/geometry/frames/powertrain/distributors/__init__.py +5 -0
- tabs/geometry/frames/powertrain/distributors/distributor_frame.py +143 -0
- tabs/geometry/frames/powertrain/nacelles/__init__.py +5 -0
- tabs/geometry/frames/powertrain/nacelles/nacelle_frame.py +283 -0
- tabs/geometry/frames/powertrain/powertrain_frame.py +259 -0
- tabs/geometry/frames/powertrain/propulsors/__init__.py +5 -0
- tabs/geometry/frames/powertrain/propulsors/propulsor_frame.py +146 -0
- tabs/geometry/frames/powertrain/sources/__init__.py +6 -0
- tabs/geometry/frames/powertrain/sources/energy_source_frame.py +147 -0
- tabs/geometry/frames/vehicle_frame.py +171 -0
- tabs/geometry/frames/wings/__init__.py +5 -0
- tabs/geometry/frames/wings/wings_frame.py +457 -0
- tabs/geometry/geometry.py +513 -0
- tabs/geometry/widgets/__init__.py +12 -0
- tabs/geometry/widgets/booms/__init__.py +6 -0
- tabs/geometry/widgets/booms/boom_section_widget.py +109 -0
- tabs/geometry/widgets/cargo_bays/__init__.py +1 -0
- tabs/geometry/widgets/fuselages/__init__.py +8 -0
- tabs/geometry/widgets/fuselages/cabin_class_widget.py +188 -0
- tabs/geometry/widgets/fuselages/cabin_widget.py +217 -0
- tabs/geometry/widgets/fuselages/fuselage_section_widget.py +190 -0
- tabs/geometry/widgets/geometry_data_widget.py +25 -0
- tabs/geometry/widgets/landing_gears/__init__.py +6 -0
- tabs/geometry/widgets/nacelles/__init__.py +1 -0
- tabs/geometry/widgets/powertrain/__init__.py +9 -0
- tabs/geometry/widgets/powertrain/converters/__init__.py +5 -0
- tabs/geometry/widgets/powertrain/converters/turboelectric_generator_widget.py +74 -0
- tabs/geometry/widgets/powertrain/distributors/__init__.py +5 -0
- tabs/geometry/widgets/powertrain/distributors/fuel_line_widget.py +81 -0
- tabs/geometry/widgets/powertrain/modulators/__init__.py +5 -0
- tabs/geometry/widgets/powertrain/modulators/esc_widget.py +58 -0
- tabs/geometry/widgets/powertrain/nacelles/__init__.py +5 -0
- tabs/geometry/widgets/powertrain/nacelles/nacelle_section_widget.py +115 -0
- tabs/geometry/widgets/powertrain/powertrain_connector_widget.py +136 -0
- tabs/geometry/widgets/powertrain/powertrain_widget.py +206 -0
- tabs/geometry/widgets/powertrain/propulsors/__init__.py +5 -0
- tabs/geometry/widgets/powertrain/propulsors/turbofan_widget.py +462 -0
- tabs/geometry/widgets/powertrain/sources/__init__.py +6 -0
- tabs/geometry/widgets/powertrain/sources/fuel_tank_widget.py +103 -0
- tabs/geometry/widgets/powertrain/sources/source_selector_widget.py +35 -0
- tabs/geometry/widgets/wings/__init__.py +7 -0
- tabs/geometry/widgets/wings/wing_cs_widget.py +198 -0
- tabs/geometry/widgets/wings/wing_section_widget.py +298 -0
- tabs/home/__init__.py +3 -0
- tabs/home/home.py +585 -0
- tabs/mission/__init__.py +4 -0
- tabs/mission/mission.py +1124 -0
- tabs/mission/widgets/__init__.py +3 -0
- tabs/mission/widgets/flight_controls_widget.py +186 -0
- tabs/mission/widgets/mission_analysis_widget.py +166 -0
- tabs/mission/widgets/mission_segment_helper.py +358 -0
- tabs/mission/widgets/mission_segment_widget.py +358 -0
- tabs/solve/__init__.py +4 -0
- tabs/solve/plots/__init__.py +12 -0
- tabs/solve/plots/aeroacoustics/__init__.py +6 -0
- tabs/solve/plots/aeroacoustics/plot_2D_noise_contour.py +184 -0
- tabs/solve/plots/aeroacoustics/plot_3D_noise_contour.py +219 -0
- tabs/solve/plots/aeroacoustics/plot_noise_certification_contour.py +115 -0
- tabs/solve/plots/aeroacoustics/plot_noise_level.py +118 -0
- tabs/solve/plots/aerodynamics/__init__.py +10 -0
- tabs/solve/plots/aerodynamics/plot_aerodynamic_coefficients.py +156 -0
- tabs/solve/plots/aerodynamics/plot_aerodynamic_forces.py +155 -0
- tabs/solve/plots/aerodynamics/plot_aircraft_aerodynamics.py +136 -0
- tabs/solve/plots/aerodynamics/plot_drag_components.py +157 -0
- tabs/solve/plots/aerodynamics/plot_lift_distribution.py +107 -0
- tabs/solve/plots/aerodynamics/plot_rotor_conditions.py +255 -0
- tabs/solve/plots/aerodynamics/plot_rotor_disc_performance.py +144 -0
- tabs/solve/plots/aerodynamics/plot_rotor_performance.py +124 -0
- tabs/solve/plots/common/__init__.py +4 -0
- tabs/solve/plots/common/plot_style.py +71 -0
- tabs/solve/plots/common/set_axes.py +55 -0
- tabs/solve/plots/create_plot_widgets.py +34 -0
- tabs/solve/plots/emissions/__init__.py +3 -0
- tabs/solve/plots/emissions/plot_emissions.py +167 -0
- tabs/solve/plots/energy/__init__.py +12 -0
- tabs/solve/plots/energy/plot_altitude_sfc_weight.py +134 -0
- tabs/solve/plots/energy/plot_battery_cell_conditions.py +154 -0
- tabs/solve/plots/energy/plot_battery_degradation.py +157 -0
- tabs/solve/plots/energy/plot_battery_module_C_rates.py +139 -0
- tabs/solve/plots/energy/plot_battery_module_conditions.py +157 -0
- tabs/solve/plots/energy/plot_battery_pack_conditions.py +164 -0
- tabs/solve/plots/energy/plot_battery_ragone_diagram.py +97 -0
- tabs/solve/plots/energy/plot_battery_temperature.py +136 -0
- tabs/solve/plots/energy/plot_electric_propulsor_efficiencies.py +136 -0
- tabs/solve/plots/energy/plot_propulsor_throttles.py +119 -0
- tabs/solve/plots/mission/__init__.py +5 -0
- tabs/solve/plots/mission/plot_aircraft_velocities.py +145 -0
- tabs/solve/plots/mission/plot_flight_conditions.py +236 -0
- tabs/solve/plots/mission/plot_flight_trajectory.py +172 -0
- tabs/solve/plots/stability/__init__.py +5 -0
- tabs/solve/plots/stability/plot_flight_forces_and_moments.py +163 -0
- tabs/solve/plots/stability/plot_lateral_stability.py +151 -0
- tabs/solve/plots/stability/plot_longitudinal_stability.py +173 -0
- tabs/solve/plots/thermal_management/__init__.py +7 -0
- tabs/solve/plots/thermal_management/plot_air_cooled_conditions.py +152 -0
- tabs/solve/plots/thermal_management/plot_cross_flow_heat_exchanger_conditions.py +185 -0
- tabs/solve/plots/thermal_management/plot_reservoir_conditions.py +141 -0
- tabs/solve/plots/thermal_management/plot_thermal_management_performance.py +105 -0
- tabs/solve/plots/thermal_management/plot_wavy_channel_conditions.py +161 -0
- tabs/solve/plots/weights/__init__.py +4 -0
- tabs/solve/plots/weights/plot_load_diagram.py +163 -0
- tabs/solve/plots/weights/plot_weight_breakdown.py +164 -0
- tabs/solve/solve.py +1498 -0
- tabs/style_sheet.py +114 -0
- tabs/tab_widget.py +14 -0
- tabs/visualize_geometry/__init__.py +4 -0
- tabs/visualize_geometry/core_3d_viewer.py +253 -0
- tabs/visualize_geometry/features/__init__.py +10 -0
- tabs/visualize_geometry/features/axes_gizmo.py +173 -0
- tabs/visualize_geometry/features/background.py +161 -0
- tabs/visualize_geometry/features/blueprint.py +685 -0
- tabs/visualize_geometry/features/camera.py +364 -0
- tabs/visualize_geometry/features/drag_aircraft.py +219 -0
- tabs/visualize_geometry/features/grid.py +194 -0
- tabs/visualize_geometry/features/measurement.py +367 -0
- tabs/visualize_geometry/features/screenshot.py +91 -0
- tabs/visualize_geometry/geometry_helper_functions.py +3 -0
- tabs/visualize_geometry/visualize_geometry.py +731 -0
- utilities.py +257 -0
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
# RCAIDE_GUI/tabs/analysis/widgets/aerodynamics_widget.py
|
|
2
|
+
|
|
3
|
+
# Created: May 2023, M. Clarke
|
|
4
|
+
# ------------------------------------------------------------------------------
|
|
5
|
+
# Imports
|
|
6
|
+
# ------------------------------------------------------------------------------
|
|
7
|
+
# RCAIDE imports
|
|
8
|
+
import RCAIDE
|
|
9
|
+
|
|
10
|
+
# RCAIDE-GUI imports
|
|
11
|
+
from tabs.analysis.widgets import AnalysisDataWidget
|
|
12
|
+
from utilities import create_line_bar, create_scroll_area, Units, set_data
|
|
13
|
+
from common_widgets.data_entry_widget import DataEntryWidget
|
|
14
|
+
|
|
15
|
+
# PyQt imports
|
|
16
|
+
from PyQt6.QtWidgets import QWidget, QLabel, QVBoxLayout, QScrollArea, QComboBox
|
|
17
|
+
|
|
18
|
+
# Python imports
|
|
19
|
+
import json
|
|
20
|
+
import os
|
|
21
|
+
import sys
|
|
22
|
+
# ------------------------------------------------------------------------------
|
|
23
|
+
# Aerodynamics Widget
|
|
24
|
+
# ------------------------------------------------------------------------------
|
|
25
|
+
class AerodynamicsWidget(AnalysisDataWidget):
|
|
26
|
+
def __init__(self):
|
|
27
|
+
super(AerodynamicsWidget, self).__init__()
|
|
28
|
+
self.main_layout = QVBoxLayout()
|
|
29
|
+
self.main_layout.addWidget(QLabel("<b>Aerodynamics</b>"))
|
|
30
|
+
self.main_layout.addWidget(create_line_bar())
|
|
31
|
+
|
|
32
|
+
self.analysis_selector = QComboBox()
|
|
33
|
+
self.analysis_selector.addItems(self.analyses)
|
|
34
|
+
self.analysis_selector.currentIndexChanged.connect(
|
|
35
|
+
self.on_analysis_change)
|
|
36
|
+
self.main_layout.addWidget(self.analysis_selector)
|
|
37
|
+
|
|
38
|
+
self.data_entry_widget = DataEntryWidget(self.data_units_labels[0], num_cols=1)
|
|
39
|
+
|
|
40
|
+
# Load defaults
|
|
41
|
+
_root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
|
|
42
|
+
_defaults_path = os.path.join(_root, "app_data", "defaults", "aerodynamic_analysis.json")
|
|
43
|
+
with open(_defaults_path, "r") as defaults:
|
|
44
|
+
self.defaults = json.load(defaults)
|
|
45
|
+
|
|
46
|
+
self.data_entry_widget.load_data(self.defaults)
|
|
47
|
+
self.main_layout.addWidget(self.data_entry_widget)
|
|
48
|
+
self.main_layout.addWidget(create_line_bar())
|
|
49
|
+
|
|
50
|
+
self.setLayout(self.main_layout)
|
|
51
|
+
|
|
52
|
+
def on_analysis_change(self, index):
|
|
53
|
+
assert self.main_layout is not None
|
|
54
|
+
|
|
55
|
+
self.main_layout.removeWidget(self.data_entry_widget)
|
|
56
|
+
self.data_entry_widget = DataEntryWidget(self.data_units_labels[index], num_cols=1)
|
|
57
|
+
self.data_entry_widget.load_data(self.defaults[1])
|
|
58
|
+
# self.main_layout.addWidget(self.data_entry_widget)
|
|
59
|
+
self.main_layout.insertWidget(
|
|
60
|
+
self.main_layout.count() - 1, self.data_entry_widget)
|
|
61
|
+
|
|
62
|
+
def create_scroll_area(self):
|
|
63
|
+
scroll_area = QScrollArea()
|
|
64
|
+
scroll_area.setWidgetResizable(True)
|
|
65
|
+
scroll_content = QWidget()
|
|
66
|
+
scroll_area.setWidget(scroll_content)
|
|
67
|
+
self.main_layout = QVBoxLayout(scroll_content)
|
|
68
|
+
layout_scroll = QVBoxLayout(self)
|
|
69
|
+
layout_scroll.addWidget(scroll_area)
|
|
70
|
+
layout_scroll.setContentsMargins(0, 0, 0, 0)
|
|
71
|
+
self.setLayout(layout_scroll)
|
|
72
|
+
|
|
73
|
+
def create_analysis(self, vehicle: RCAIDE.Vehicle):
|
|
74
|
+
analysis_num = self.analysis_selector.currentIndex()
|
|
75
|
+
values_si = self.data_entry_widget.get_values_si()
|
|
76
|
+
|
|
77
|
+
if analysis_num == 0:
|
|
78
|
+
aerodynamics = RCAIDE.Framework.Analyses.Aerodynamics.Vortex_Lattice_Method()
|
|
79
|
+
|
|
80
|
+
for data_unit_label in self.data_units_labels[analysis_num]:
|
|
81
|
+
rcaide_label = data_unit_label[-1]
|
|
82
|
+
user_label = data_unit_label[0]
|
|
83
|
+
set_data(aerodynamics.settings, rcaide_label, values_si[user_label][0])
|
|
84
|
+
|
|
85
|
+
return aerodynamics
|
|
86
|
+
|
|
87
|
+
def get_values(self):
|
|
88
|
+
return self.data_entry_widget.get_values()
|
|
89
|
+
|
|
90
|
+
def load_values(self, values):
|
|
91
|
+
super().load_values(values)
|
|
92
|
+
self.data_entry_widget.load_data(values)
|
|
93
|
+
|
|
94
|
+
analyses = ["Vortex Lattice Method"]
|
|
95
|
+
data_units_labels = [
|
|
96
|
+
[
|
|
97
|
+
("Propeller Wake Model", Units.Boolean, "propeller_wake_model"),
|
|
98
|
+
("Model Fuselage", Units.Boolean, "model_fuselage"),
|
|
99
|
+
("Number of Spanwise Vortices", Units.Count, "number_of_spanwise_vortices"),
|
|
100
|
+
("Number of Chordwise Vortices", Units.Count, "number_of_chordwise_vortices"),
|
|
101
|
+
("Wing Spanwise Vortices", Units.Unitless, "wing_spanwise_vortices"),
|
|
102
|
+
("Wing Chordwise Vortices", Units.Count, "wing_chordwise_vortices"),
|
|
103
|
+
("Fuselage Spanwise Vortices", Units.Count, "fuselage_spanwise_vortices"),
|
|
104
|
+
("Fuselage Chordwise Vortices", Units.Count, "fuselage_chordwise_vortices"),
|
|
105
|
+
("Spanwise Cosine Spacing", Units.Boolean, "spanwise_cosine_spacing"),
|
|
106
|
+
|
|
107
|
+
]
|
|
108
|
+
]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# RCAIDE_GUI/tabs/analysis/widgets/analysis_data_widget.py
|
|
2
|
+
|
|
3
|
+
# Created: May 2023, M. Clarke
|
|
4
|
+
# ------------------------------------------------------------------------------
|
|
5
|
+
# Imports
|
|
6
|
+
# ------------------------------------------------------------------------------
|
|
7
|
+
# RCAIDE imports
|
|
8
|
+
import RCAIDE
|
|
9
|
+
|
|
10
|
+
# PyQt imports
|
|
11
|
+
from PyQt6.QtCore import Qt
|
|
12
|
+
from PyQt6.QtWidgets import QWidget
|
|
13
|
+
|
|
14
|
+
# ------------------------------------------------------------------------------
|
|
15
|
+
# Analysis Data Widget
|
|
16
|
+
# ------------------------------------------------------------------------------
|
|
17
|
+
class AnalysisDataWidget(QWidget):
|
|
18
|
+
def __init__(self):
|
|
19
|
+
super(AnalysisDataWidget, self).__init__()
|
|
20
|
+
self.setVisible(True)
|
|
21
|
+
|
|
22
|
+
def create_analysis(self, vehicle: RCAIDE.Vehicle):
|
|
23
|
+
return RCAIDE.Framework.Analyses.Analysis()
|
|
24
|
+
|
|
25
|
+
def get_values(self):
|
|
26
|
+
return {}
|
|
27
|
+
|
|
28
|
+
def load_values(self, values):
|
|
29
|
+
self.setVisible(values["enabled"])
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# RCAIDE_GUI/tabs/analysis/widgets/atmosphere_widget.py
|
|
2
|
+
|
|
3
|
+
# Created: May 2023, M. Clarke
|
|
4
|
+
# ------------------------------------------------------------------------------
|
|
5
|
+
# Imports
|
|
6
|
+
# ------------------------------------------------------------------------------
|
|
7
|
+
# RCAIDE imports
|
|
8
|
+
import RCAIDE
|
|
9
|
+
|
|
10
|
+
# RCAIDE-GUI imports
|
|
11
|
+
from utilities import create_line_bar
|
|
12
|
+
from tabs.analysis.widgets import AnalysisDataWidget
|
|
13
|
+
|
|
14
|
+
# PyQt imports
|
|
15
|
+
from PyQt6.QtWidgets import QWidget, QLabel, QVBoxLayout, QHBoxLayout, QComboBox
|
|
16
|
+
|
|
17
|
+
# ------------------------------------------------------------------------------
|
|
18
|
+
# Atmosphere Widget
|
|
19
|
+
# ------------------------------------------------------------------------------
|
|
20
|
+
class AtmosphereWidget(AnalysisDataWidget):
|
|
21
|
+
def __init__(self):
|
|
22
|
+
super(AtmosphereWidget, self).__init__()
|
|
23
|
+
self.main_layout = QVBoxLayout()
|
|
24
|
+
|
|
25
|
+
self.main_layout.addWidget(QLabel("<b>Atmosphere</b>"))
|
|
26
|
+
self.main_layout.addWidget(create_line_bar())
|
|
27
|
+
|
|
28
|
+
options = ["1976 US Standard Atmosphere", "Constant Temperature"]
|
|
29
|
+
self.analysis_selector = QComboBox()
|
|
30
|
+
self.analysis_selector.addItems(options)
|
|
31
|
+
|
|
32
|
+
self.main_layout.addWidget(self.analysis_selector)
|
|
33
|
+
self.main_layout.addWidget(create_line_bar())
|
|
34
|
+
self.setLayout(self.main_layout)
|
|
35
|
+
|
|
36
|
+
def create_analysis(self, _vehicle):
|
|
37
|
+
analysis_num = self.analysis_selector.currentIndex()
|
|
38
|
+
if analysis_num == 0:
|
|
39
|
+
atmosphere = RCAIDE.Framework.Analyses.Atmospheric.US_Standard_1976()
|
|
40
|
+
else:
|
|
41
|
+
atmosphere = RCAIDE.Framework.Analyses.Atmospheric.Constant_Temperature()
|
|
42
|
+
return atmosphere
|
|
43
|
+
|
|
44
|
+
def get_values(self):
|
|
45
|
+
return {"analysis_num": self.analysis_selector.currentIndex()}
|
|
46
|
+
|
|
47
|
+
def load_values(self, values):
|
|
48
|
+
super().load_values(values)
|
|
49
|
+
self.analysis_selector.setCurrentIndex(values["analysis_num"])
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# RCAIDE_GUI/tabs/analysis/widgets/costs_widget.py
|
|
2
|
+
|
|
3
|
+
# Created: May 2023, M. Clarke
|
|
4
|
+
# ------------------------------------------------------------------------------
|
|
5
|
+
# Imports
|
|
6
|
+
# ------------------------------------------------------------------------------
|
|
7
|
+
# RCAIDE imports
|
|
8
|
+
import RCAIDE
|
|
9
|
+
|
|
10
|
+
# RCAIDE-GUI imports
|
|
11
|
+
from utilities import create_line_bar
|
|
12
|
+
from tabs.analysis.widgets import AnalysisDataWidget
|
|
13
|
+
|
|
14
|
+
# PyQt imports
|
|
15
|
+
from PyQt6.QtWidgets import QWidget, QLabel, QVBoxLayout, QHBoxLayout, QScrollArea, \
|
|
16
|
+
QFrame, QSpacerItem, QSizePolicy
|
|
17
|
+
|
|
18
|
+
# ------------------------------------------------------------------------------
|
|
19
|
+
# Costs Widget
|
|
20
|
+
# ------------------------------------------------------------------------------
|
|
21
|
+
class CostsWidget(AnalysisDataWidget):
|
|
22
|
+
def __init__(self):
|
|
23
|
+
super(CostsWidget, self).__init__()
|
|
24
|
+
self.main_layout = QVBoxLayout()
|
|
25
|
+
|
|
26
|
+
self.main_layout.addWidget(QLabel("<b>Costs</b>"))
|
|
27
|
+
self.main_layout.addWidget(create_line_bar())
|
|
28
|
+
self.main_layout.addWidget(
|
|
29
|
+
QLabel("Computes industrial and operating costs"))
|
|
30
|
+
self.main_layout.addWidget(create_line_bar())
|
|
31
|
+
self.setLayout(self.main_layout)
|
|
32
|
+
|
|
33
|
+
def create_analysis(self, vehicle):
|
|
34
|
+
costs = RCAIDE.Framework.Analyses.Costs.Costs()
|
|
35
|
+
return costs
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# RCAIDE_GUI/tabs/analysis/widgets/energy_widget.py
|
|
2
|
+
|
|
3
|
+
# Created: May 2023, M. Clarke
|
|
4
|
+
# ------------------------------------------------------------------------------
|
|
5
|
+
# Imports
|
|
6
|
+
# ------------------------------------------------------------------------------
|
|
7
|
+
# RCAIDE imports
|
|
8
|
+
import RCAIDE
|
|
9
|
+
|
|
10
|
+
# RCAIDE-GUI imports
|
|
11
|
+
from utilities import create_line_bar
|
|
12
|
+
from tabs.analysis.widgets import AnalysisDataWidget
|
|
13
|
+
|
|
14
|
+
# PyQt imports
|
|
15
|
+
from PyQt6.QtWidgets import QWidget, QLabel, QVBoxLayout
|
|
16
|
+
|
|
17
|
+
# ------------------------------------------------------------------------------
|
|
18
|
+
# Energy Widget
|
|
19
|
+
# ------------------------------------------------------------------------------
|
|
20
|
+
class EnergyWidget(AnalysisDataWidget):
|
|
21
|
+
def __init__(self):
|
|
22
|
+
super(EnergyWidget, self).__init__()
|
|
23
|
+
self.main_layout = QVBoxLayout()
|
|
24
|
+
|
|
25
|
+
self.main_layout.addWidget(QLabel("<b>Energy</b>"))
|
|
26
|
+
self.main_layout.addWidget(create_line_bar())
|
|
27
|
+
self.main_layout.addWidget(create_line_bar())
|
|
28
|
+
self.setLayout(self.main_layout)
|
|
29
|
+
|
|
30
|
+
def create_analysis(self, vehicle: RCAIDE.Vehicle):
|
|
31
|
+
energy = RCAIDE.Framework.Analyses.Energy.Energy()
|
|
32
|
+
return energy
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# RCAIDE_GUI/tabs/analysis/widgets/geometry_widget.py
|
|
2
|
+
|
|
3
|
+
# Created: May 2023, M. Clarke
|
|
4
|
+
# ------------------------------------------------------------------------------
|
|
5
|
+
# Imports
|
|
6
|
+
# ------------------------------------------------------------------------------
|
|
7
|
+
# RCAIDE imports
|
|
8
|
+
import RCAIDE
|
|
9
|
+
|
|
10
|
+
# RCAIDE-GUI imports
|
|
11
|
+
from utilities import create_line_bar
|
|
12
|
+
from tabs.analysis.widgets import AnalysisDataWidget
|
|
13
|
+
from utilities import Units
|
|
14
|
+
from common_widgets import DataEntryWidget
|
|
15
|
+
|
|
16
|
+
# PyQt imports
|
|
17
|
+
from PyQt6.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QLabel, QLineEdit, QPushButton, QFrame, QComboBox
|
|
18
|
+
|
|
19
|
+
# Python imports
|
|
20
|
+
import os
|
|
21
|
+
import sys
|
|
22
|
+
|
|
23
|
+
# ------------------------------------------------------------------------------
|
|
24
|
+
# Geometry Widget
|
|
25
|
+
# ------------------------------------------------------------------------------
|
|
26
|
+
class GeometryWidget(AnalysisDataWidget):
|
|
27
|
+
def __init__(self):
|
|
28
|
+
super(GeometryWidget, self).__init__()
|
|
29
|
+
self.main_layout = QVBoxLayout()
|
|
30
|
+
|
|
31
|
+
self.main_layout.addWidget(QLabel("<b>Geometry</b>"))
|
|
32
|
+
self.main_layout.addWidget(create_line_bar())
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
self.geometry_options = [
|
|
36
|
+
("Overwrite Reference", Units.Boolean),
|
|
37
|
+
("Update Fuel Volume", Units.Boolean)
|
|
38
|
+
]
|
|
39
|
+
|
|
40
|
+
self.data_entry_widget = DataEntryWidget(self.geometry_options)
|
|
41
|
+
self.main_layout.addWidget(self.data_entry_widget)
|
|
42
|
+
self.main_layout.addStretch()
|
|
43
|
+
self.setLayout(self.main_layout)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def create_analysis(self, vehicle: RCAIDE.Vehicle):
|
|
47
|
+
geometry = RCAIDE.Framework.Analyses.Geometry.Geometry()
|
|
48
|
+
data = self.data_entry_widget.get_values()
|
|
49
|
+
if ("Overwrite Reference" in data and
|
|
50
|
+
data["Overwrite Reference"] is not None):
|
|
51
|
+
geometry.settings.overwrite_reference = data["Overwrite Reference"][0]
|
|
52
|
+
if ("Update Fuel Volume" in data and
|
|
53
|
+
data["Update Fuel Volume"] is not None):
|
|
54
|
+
geometry.settings.update_fuel_volume = data["Update Fuel Volume"][0]
|
|
55
|
+
return geometry
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# RCAIDE_GUI/tabs/analysis/widgets/planets_widget.py
|
|
2
|
+
|
|
3
|
+
# Created: May 2023, M. Clarke
|
|
4
|
+
# ------------------------------------------------------------------------------
|
|
5
|
+
# Imports
|
|
6
|
+
# ------------------------------------------------------------------------------
|
|
7
|
+
# RCAIDE imports
|
|
8
|
+
import RCAIDE
|
|
9
|
+
|
|
10
|
+
# RCAIDE-GUI imports
|
|
11
|
+
from utilities import create_line_bar
|
|
12
|
+
from tabs.analysis.widgets import AnalysisDataWidget
|
|
13
|
+
|
|
14
|
+
# PyQt imports
|
|
15
|
+
from PyQt6.QtWidgets import QWidget, QLabel, QVBoxLayout, QHBoxLayout, QScrollArea, \
|
|
16
|
+
QFrame, QSpacerItem, QSizePolicy
|
|
17
|
+
|
|
18
|
+
# ------------------------------------------------------------------------------
|
|
19
|
+
# Planets Widget
|
|
20
|
+
# ------------------------------------------------------------------------------
|
|
21
|
+
class PlanetsWidget(AnalysisDataWidget):
|
|
22
|
+
def __init__(self):
|
|
23
|
+
super(PlanetsWidget, self).__init__()
|
|
24
|
+
self.main_layout = QVBoxLayout()
|
|
25
|
+
|
|
26
|
+
self.main_layout.addWidget(QLabel("<b>Planets</b>"))
|
|
27
|
+
self.main_layout.addWidget(create_line_bar())
|
|
28
|
+
self.main_layout.addWidget(QLabel("Earth"))
|
|
29
|
+
self.main_layout.addWidget(create_line_bar())
|
|
30
|
+
self.setLayout(self.main_layout)
|
|
31
|
+
|
|
32
|
+
def create_analysis(self, _vehicle):
|
|
33
|
+
planet = RCAIDE.Framework.Analyses.Planets.Earth()
|
|
34
|
+
return planet
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# RCAIDE_GUI/tabs/analysis/widgets/propulsion_widget.py
|
|
2
|
+
|
|
3
|
+
# Created: May 2023, M. Clarke
|
|
4
|
+
# ------------------------------------------------------------------------------
|
|
5
|
+
# Imports
|
|
6
|
+
# ------------------------------------------------------------------------------
|
|
7
|
+
# RCAIDE imports
|
|
8
|
+
import RCAIDE
|
|
9
|
+
|
|
10
|
+
# RCAIDE-GUI imports
|
|
11
|
+
from utilities import create_line_bar
|
|
12
|
+
from tabs.analysis.widgets import AnalysisDataWidget
|
|
13
|
+
|
|
14
|
+
# PyQt imports
|
|
15
|
+
from PyQt6.QtWidgets import QWidget, QLabel, QVBoxLayout, QComboBox
|
|
16
|
+
|
|
17
|
+
# ------------------------------------------------------------------------------
|
|
18
|
+
# Propulsion Widget
|
|
19
|
+
# ------------------------------------------------------------------------------
|
|
20
|
+
class PropulsionWidget(AnalysisDataWidget):
|
|
21
|
+
def __init__(self):
|
|
22
|
+
super(PropulsionWidget, self).__init__()
|
|
23
|
+
self.main_layout = QVBoxLayout()
|
|
24
|
+
|
|
25
|
+
self.main_layout.addWidget(QLabel("<b>Propulsion</b>"))
|
|
26
|
+
self.main_layout.addWidget(create_line_bar())
|
|
27
|
+
|
|
28
|
+
options = ["Rotor Wake Fidelity 0",
|
|
29
|
+
"Rotor Wake Fidelity 1", "Rotor Wake Fidelity 2"]
|
|
30
|
+
self.analysis_selector = QComboBox()
|
|
31
|
+
self.analysis_selector.addItems(options)
|
|
32
|
+
|
|
33
|
+
self.main_layout.addWidget(self.analysis_selector)
|
|
34
|
+
self.main_layout.addWidget(create_line_bar())
|
|
35
|
+
self.setLayout(self.main_layout)
|
|
36
|
+
|
|
37
|
+
def create_analysis(self, _vehicle):
|
|
38
|
+
analysis_num = self.analysis_selector.currentIndex()
|
|
39
|
+
if analysis_num == 0:
|
|
40
|
+
propulsion = RCAIDE.Framework.Analyses.Propulsion.Rotor_Wake_Fidelity_Zero()
|
|
41
|
+
elif analysis_num == 1:
|
|
42
|
+
propulsion = RCAIDE.Framework.Analyses.Propulsion.Rotor_Wake_Fidelity_One()
|
|
43
|
+
else:
|
|
44
|
+
propulsion = RCAIDE.Framework.Analyses.Propulsion.Rotor_Wake_Fidelity_Two()
|
|
45
|
+
|
|
46
|
+
return propulsion
|
|
47
|
+
|
|
48
|
+
def get_values(self):
|
|
49
|
+
return {"analysis_num": self.analysis_selector.currentIndex()}
|
|
50
|
+
|
|
51
|
+
def load_values(self, values):
|
|
52
|
+
super().load_values(values)
|
|
53
|
+
self.analysis_selector.setCurrentIndex(values["analysis_num"])
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# RCAIDE_GUI/tabs/analysis/widgets/stability_widget.py
|
|
2
|
+
|
|
3
|
+
# Created: May 2023, M. Clarke
|
|
4
|
+
# ------------------------------------------------------------------------------
|
|
5
|
+
# Imports
|
|
6
|
+
# ------------------------------------------------------------------------------
|
|
7
|
+
# RCAIDE imports
|
|
8
|
+
import RCAIDE
|
|
9
|
+
|
|
10
|
+
# RCAIDE-GUI imports
|
|
11
|
+
from utilities import create_line_bar
|
|
12
|
+
from tabs.analysis.widgets import AnalysisDataWidget
|
|
13
|
+
|
|
14
|
+
# PyQt imports
|
|
15
|
+
from PyQt6.QtWidgets import QWidget, QLabel, QVBoxLayout, QHBoxLayout, QScrollArea, \
|
|
16
|
+
QFrame, QSpacerItem, QSizePolicy
|
|
17
|
+
|
|
18
|
+
# ------------------------------------------------------------------------------
|
|
19
|
+
# Stability Widget
|
|
20
|
+
# ------------------------------------------------------------------------------
|
|
21
|
+
class StabilityWidget(AnalysisDataWidget):
|
|
22
|
+
def __init__(self):
|
|
23
|
+
super(StabilityWidget, self).__init__()
|
|
24
|
+
self.main_layout = QVBoxLayout()
|
|
25
|
+
|
|
26
|
+
self.main_layout.addWidget(QLabel("<b>Stability</b>"))
|
|
27
|
+
self.main_layout.addWidget(create_line_bar())
|
|
28
|
+
self.main_layout.addWidget(QLabel("VLM Perturbation Method"))
|
|
29
|
+
self.main_layout.addWidget(create_line_bar())
|
|
30
|
+
self.setLayout(self.main_layout)
|
|
31
|
+
|
|
32
|
+
def create_analysis(self, vehicle):
|
|
33
|
+
stability = RCAIDE.Framework.Analyses.Stability.Vortex_Lattice_Method()
|
|
34
|
+
return stability
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# RCAIDE_GUI/tabs/analysis/widgets/weights_widget.py
|
|
2
|
+
|
|
3
|
+
# Created: May 2023, M. Clarke
|
|
4
|
+
# ------------------------------------------------------------------------------
|
|
5
|
+
# Imports
|
|
6
|
+
# ------------------------------------------------------------------------------
|
|
7
|
+
# RCAIDE imports
|
|
8
|
+
import RCAIDE
|
|
9
|
+
|
|
10
|
+
# RCAIDE-GUI imports
|
|
11
|
+
from utilities import create_line_bar, Units
|
|
12
|
+
from tabs.analysis.widgets import AnalysisDataWidget
|
|
13
|
+
from common_widgets import DataEntryWidget
|
|
14
|
+
|
|
15
|
+
# PyQt imports
|
|
16
|
+
from PyQt6.QtWidgets import QWidget, QVBoxLayout, QHBoxLayout, QLabel, QLineEdit, QPushButton, QFrame, QComboBox
|
|
17
|
+
|
|
18
|
+
# Python imports
|
|
19
|
+
import os
|
|
20
|
+
import sys
|
|
21
|
+
|
|
22
|
+
# ------------------------------------------------------------------------------
|
|
23
|
+
# Weights Widget
|
|
24
|
+
# ------------------------------------------------------------------------------
|
|
25
|
+
class WeightsWidget(AnalysisDataWidget):
|
|
26
|
+
def __init__(self):
|
|
27
|
+
super(WeightsWidget, self).__init__()
|
|
28
|
+
self.main_layout = QVBoxLayout()
|
|
29
|
+
|
|
30
|
+
self.main_layout.addWidget(QLabel("<b>Weights</b>"))
|
|
31
|
+
self.main_layout.addWidget(create_line_bar())
|
|
32
|
+
self.weight_options = [
|
|
33
|
+
# "No selection",
|
|
34
|
+
"Conventional",
|
|
35
|
+
"Conventional BWB",
|
|
36
|
+
"Conventional General Aviation",
|
|
37
|
+
"Conventional_Transport",
|
|
38
|
+
"Electric",
|
|
39
|
+
"Electric_General_Aviation",
|
|
40
|
+
"Electric_VTOL",
|
|
41
|
+
"Hybrid",
|
|
42
|
+
"Hydrogen",
|
|
43
|
+
"Hydrogen_Transport"
|
|
44
|
+
]
|
|
45
|
+
weight_selector_layout = QHBoxLayout()
|
|
46
|
+
weight_selector_layout.addWidget(QLabel("Weight Selection Option:"))
|
|
47
|
+
self.weight_selection = QComboBox()
|
|
48
|
+
self.weight_selection.addItems(self.weight_options)
|
|
49
|
+
self.weight_selection.currentIndexChanged.connect(self.on_weights_changed)
|
|
50
|
+
weight_selector_layout.addWidget(self.weight_selection)
|
|
51
|
+
weight_selector_layout.addStretch()
|
|
52
|
+
self.main_layout.addLayout(weight_selector_layout)
|
|
53
|
+
|
|
54
|
+
self.dynamic_weight_container = QWidget()
|
|
55
|
+
self.dynamic_weight_layout = QVBoxLayout(self.dynamic_weight_container)
|
|
56
|
+
self.dynamic_weight_layout.setContentsMargins(0, 0, 0, 0)
|
|
57
|
+
self.main_layout.addWidget(self.dynamic_weight_container)
|
|
58
|
+
|
|
59
|
+
self.main_layout.addStretch()
|
|
60
|
+
self.main_layout.addWidget(create_line_bar())
|
|
61
|
+
self.setLayout(self.main_layout)
|
|
62
|
+
|
|
63
|
+
def on_weights_changed(self, index):
|
|
64
|
+
self.clear_dynamic_weights_layout()
|
|
65
|
+
selected_option = self.weight_selection.currentText()
|
|
66
|
+
if selected_option == "Conventional":
|
|
67
|
+
self.add_conventional_fields()
|
|
68
|
+
|
|
69
|
+
def add_conventional_fields(self):
|
|
70
|
+
conventional_data_units_labels = [
|
|
71
|
+
("Update Center of Gravity", Units.Boolean),
|
|
72
|
+
("Update Moment of Inertia", Units.Boolean),
|
|
73
|
+
("Weight Correction: Structural Paint", Units.Count),
|
|
74
|
+
("Weight Correction: Operational Items ETOPS", Units.Count),
|
|
75
|
+
("Update Mass Properties", Units.Boolean),
|
|
76
|
+
("FLOPS Fidelity", Units.Unitless)
|
|
77
|
+
]
|
|
78
|
+
conventional_widget = DataEntryWidget(conventional_data_units_labels)
|
|
79
|
+
self.dynamic_weight_layout.addWidget(conventional_widget)
|
|
80
|
+
|
|
81
|
+
def clear_dynamic_weights_layout(self):
|
|
82
|
+
if self.dynamic_weight_layout is not None:
|
|
83
|
+
while self.dynamic_weight_layout.count():
|
|
84
|
+
item = self.dynamic_weight_layout.takeAt(0)
|
|
85
|
+
widget = item.widget()
|
|
86
|
+
if widget is not None:
|
|
87
|
+
widget.deleteLater()
|
|
88
|
+
|
|
89
|
+
def create_analysis(self, vehicle: RCAIDE.Vehicle):
|
|
90
|
+
selected_option = self.weight_selection.currentText()
|
|
91
|
+
# if selected_option == "No selection":
|
|
92
|
+
# return None
|
|
93
|
+
weights = RCAIDE.Framework.Analyses.Weights.Conventional_Transport()
|
|
94
|
+
return weights
|