fast-aircraft-design / FAST-OAD

FAST-OAD: An open source framework for rapid Overall Aircraft Design
GNU General Public License v3.0
47 stars 25 forks source link

Missing mass_breakdown_sun_plot when using low rtol solver values #542

Open enricostragiotti opened 1 week ago

enricostragiotti commented 1 week ago

Describe the bug The plotting function mass_breakdown_sun_plot produces a single plot (only the OWE breakdown) if MTOW != OWE + payload + onboard_fuel_at_takeoff.

See image: image

To Reproduce When solving a simple MDA specifying a low acceptable rtol e.g. nonlinear_solver: om.NonlinearBlockGS(maxiter=100, rtol=1e-2) it can happen that MTOW != OWE + payload + onboard_fuel_at_takeoff. In those cases the following test

https://github.com/fast-aircraft-design/FAST-OAD/blob/50bc36a6338f5e4c730551f873a2c1e94a64b257/src/fastoad/gui/analysis_and_plots.py#L371-L372

is not passed and the image is not generated.

Expected behavior A user feedback explaining what is happening could be beneficial, as "The MTOW breakdown is not plotted as MTOW / (OWE + payload + onboard_fuel_at_takeoff) is higher than ... Try to re-run the MDA with a lower solver rtol value."

Environment