OpenMDAO / Aviary

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

A cleaner solution that targets errors surrounding modeling aircraft with only fuselage engines #346

Closed goldenpitbul1 closed 5 days ago

goldenpitbul1 commented 1 week ago

Summary

This address the errors that surround modeling aircraft that do not utilize wing engines. Previously the optimizer would not run if aircraft:engine:wing_locations = [0.0] (default) or aircraft:engine:num_wing_engines = 0.0 (default). These changes allow the optimizer to run and successfully optimize without the presence of wing engines or specified engine wing locations. This final version correct some small errors in both landing_gear.py and detailed_wing.py (located in aviary>subsystems>mass>flops_based) that allow the optimizer to complete successfully.

The corrections made fixed the error cause by <val=np.zeros((count, int(num_wing_engines[0]/2))))> that would report and empty array when "0" was the number of wing engines which is also the default_value for num_wing_engines.

Related Issues

The new solution solved the following errors when running an aircraft with default values for aircraft:engine:num_wing_engines and aircraft:engine:wing_locations.

Screenshot 2024-06-25 114424

Backwards incompatibilities

None

New Dependencies

None