Alignment with legacy MATLAB code (AEIC v2.1)#106
Merged
Conversation
Member
Author
|
@aditeyashukla has fixed most of this:
We're going to merge the PR as it is, and then reassess. An updated validation report is attached. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR is a collection of changes needed to bring the legacy trajectory builder and the emissions code into line with the MATLAB AEIC v2.1 as part of the verification process described in #78.
(Tests are failing because I changed the way that trajectories are simulated, so all the golden test data will need to be regenerated, and I changed the
EI_HCCOfunction to match the MATLAB code, which broke another test. We'll deal with those things later once we've got this working better.)As of the point when I'm opening this PR, I think the trajectory simulation is OK. The remaining issues are all to do with emissions. I've attached a copy of the validation report (link at the bottom). Some comments follow.
Trajectory simulations
There are still a few small discrepancies in the trajectory fields. These arise from one of three sources:
Emissions simulations
EI_HCCOsince this does not seem to exist in the MATLAB code. That improves matters a little, and the temporal profiles of the HC and CO emissions are now more or less the same shape in the MATLAB and the Python results. However, there are differences between the outputs that I think are down to the MATLAB code not using the same engine data as the Python code.Engine parameter comparison
The Python code uses the emission indices given in the performance model file. The MATLAB code uses who knows what, but the table below shows emissions indices for CO, HC and NOₓ for the Python performance model and engine type CFM56-7B27 from the
ENG_EI_UIDs_modeSN.txtfile, which is the engine we have in the engine database spreadsheet we're using (and from which the Python performance model data was generated). I know nothing about this, to be honest, but the relative scaling of the emissions indices looks like it might explain the differences in the simulations.Here, the modes are the slightly strange ordering used in this MATLAB engine data file, "M" is MATLAB, "P" is Python.
If you squint at this table while viewing one of the emissions plots for HC, CO or NOₓ, you might be able to convince yourself that the differences are down to the differences in these indices. In particular, the idle index for NOₓ is similar between the two cases, and the NOₓ plots are close to identical for the descent phase, while the MATLAB code has emissions 20-30% greater during the other flight phases. That's pretty suggestive to me.
My question now would be: why are the performance numbers in our performance model completely different from what the MATLAB code would appear to be using? Is the data in the engine database extract that we have correct? These are quite significant differences.
Next steps
@aditeyashukla This is all down to you. Can you do the following:
Once you've done those things I'll come back to this.
validation-report-2026-03-03.pdf