OpenMDAO / Aviary

NASA's aircraft analysis, design, and optimization tool
https://openmdao.github.io/Aviary/
Other
106 stars 51 forks source link

Cannot model aircraft with only fuselage engines. #342

Open goldenpitbul1 opened 1 week ago

goldenpitbul1 commented 1 week ago

Description

Currently, Aviary does not support aircraft with only fuselage engines. The default_value for aircraft:engine:num_wing_engines is 0 and the default _value for aircraft:engine:wing_locations is [0.0], however trying to model an aircraft with only fuselage engines and default values for wing engines/location yields the error below.

Screenshot 2024-06-24 145607

I have currently found a quick and dirty fix by editing few lines in landing_group.py and wing_group.py and have attached the fixes that I made to allow the aircraft to optimize successfully. Screenshot 2024-06-24 150329 Screenshot 2024-06-24 150340

Additionally, I have attached a link to my branch were only these few changes were made. https://github.com/goldenpitbul1/Aviary/blob/only_fuse_eng/aviary/subsystems/mass/flops_based/landing_group.py https://github.com/goldenpitbul1/Aviary/blob/only_fuse_eng/aviary/subsystems/mass/flops_based/wing_group.py

Example

if: (.csv) aircraft:engine:num_wing_engines,0,unitless aircraft:engine:wing_locations,[0.0],unitless

then:

: The source and target shapes do not match or are ambiguous for the connection '_auto_ivc.v86' to 'pre_mission.core_subsystems.core_mass.landing_group.main_landing_gear_length.aircraft:engine:wing_locations'. The source shape is (1,) but the target shape is (1, 0). : The source and target shapes do not match or are ambiguous for the connection '_auto_ivc.v86' to 'pre_mission.core_subsystems.core_mass.wing_group.wing_bending_factor.aircraft:engine:wing_locations'. The source shape is (1,) but the target shape is (0,). ### Aviary Version 0.9.4-dev ### Relevant environment information _No response_
goldenpitbul1 commented 1 week ago

https://github.com/OpenMDAO/Aviary/pull/346