Skip to content

Improve error handling and bug fix thrust calculation in ecological assessment

Kristina Mazur requested to merge fix/eco_assessment_with_new_engine_lib into main

Description

When testing the new engine lib (libraries!48 (merged)), an ERROR: Unknown error has occured. Exit occured. The reason is that in the function get_engine_thermodynamics_LTO() (mission.cpp, l.245), the follwing function is used

missionIOData->myEngine.calculate_N1_with_thrustlimit(0., 0., myAtmosphere, 1., "takeoff", 0., 0., thrust_takeoff);

which throws engine status, but ecological_assessment does not catch it

Solution: Add try catch when ever using calculate_N1_with_thrustlimit()

Additional bug fixes in same function:

//for all engines together; max. takeoff Thrust SL and ISA (not ISA+15!)(see Ruijgrok, p. 298 and ICAO 2008 p. III-2-2
double maximum_takeoff_thrust_sealevel = missionIOData->myEngine.get_thrust_aircraft();
//Taxi
thrust_taxi = 0.07 * maximum_takeoff_thrust_sealevel;//for all engines together!
[...]
try {
    missionIOData->myEngine.calculate_N1_with_thrustlimit(0., 0., myAtmosphere, 1., "takeoff", 0., 0., thrust_taxi); // SI unit
[...]

thrust_taxi is set for total thrust, but function calculate_N1_with_thrustlimit() uses thrust per ONE engine.

Solution: Make everything in functon get_engine_thermodynamics_LTO() per one engine

Related Issue(s)

NA

Other Changes

NA

Screenshots/Logs

ecological_assessment_report.html ecological_assessment.log

Testing Instructions

To recap this error, use the main branch instead:

  1. Checkout this branch in aircraft design & new engine lib from libraries!48 (merged)
  2. Compile and run ecological assessment with the clean sheet UNICADO-SMR-180-FT aircraft in aircraft-references
  3. You should get a warning for "thrust_taxi" that is reached the lower limit of the engine deck. I assume that to be ok because the engine can not handle 7% of the SLST right now. This is out of scope for this MR as this is a fix for the error handling in eco.
  4. Also Check the report and compare it with the old one. Should be still the same

Developer Checklist

  • Code has been tested locally and/or in pipeline.
  • (if applicable) documentation updated.
  • (if applicable) impact of new dependencies reviewed and included in project.
  • Merge conflicts resolved with the target branch.

Additional Notes

This can be merged also before the engine MR because it is independent.

Edited by Kristina Mazur

Merge request reports

Loading