Repository navigation
fix(fuel): reject a q_fuel outside 35-50 MJ/kg (unit error guard) - #77
Merged
Merged
Conversation
q_fuel must be in J/kg. A value in MJ/kg (e.g. 43.05) made the BADA fuel flow 1e6 times too large: every flight using it failed with "BADA fuel flow is unrealistic", which does not point to the fuel value. When fuel flow, efficiency and mass are all provided, the value reached SAC/CoCiP silently. - check_q_fuel (neats_fuel.py): a supplied q_fuel must lie within Q_FUEL_MIN-Q_FUEL_MAX (35e6-50e6 J/kg); NEATSFuel refuses others. - Parser: an out-of-range q_fuel fails the flight at parsing, naming its source (AO calorific_value, or the airport fuel file and airport). - Airport fuel file: checked at load, outside the block that turns a missing or unreadable file into a warning, and when FleetRunnerParams is validated (fleet steps are built lazily in the workers). A wrong file stops the run, naming the airports. A missing file still warns. Valid inputs are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…range - input-format.md: fuel_properties units (hydrogen_content is wt.%, not a mass fraction; calorific_value J/kg, 35e6-50e6), which fields are used, and a section on the airport fuel file (format, units, precedence, checks). - input-prioritization.md and mrv-specification.md: the airport file in the fuel-property fallback, and the q_fuel range. - Units audit: A10 fixed, with the follow-up (production file read, all runner paths checked on dev); status row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- FleetRunnerParams.validate also checks an airport fuel file passed as params["trajectory_parser"]["airport_fuel_path"]. - A NaN q_fuel is reported as empty, not as a value in MJ/kg. - Tests for both; the missing-file test now checks the warning. - input-format.md: hydrogen content also sets the SAF nvPM reduction. - Audit A10: maintainer decision to keep 35-50 MJ/kg; the DLR range [42.6397, 44.5] MJ/kg (TC_QFUEL_OUT_OF_RANGE) stays a known failure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
q_fuel must be in J/kg. A value in MJ/kg (e.g. 43.05) made the BADA fuel flow 1e6 times too
large: every flight using it failed with "BADA fuel flow is unrealistic", which does not point
to the fuel value (reproduced with the airport fuel file in MJ/kg). With fuel flow, efficiency
and mass all provided, the value reached SAC/CoCiP silently.
parsing, naming the source (AO value, or airport file + airport).
airports. A missing file still only warns (unchanged).
TC_QFUEL_OUT_OF_RANGE stays a known DLR failure.
new airport-file section), input-prioritization.md, mrv-specification.md; audit A10 closed.
Checked: the airport file is applied correctly on dev by all 6 runner paths. Fleet
before/after on 4,959 sample flights: bit-identical. Full suite: 321 passed. 23 new tests.
Independent review done.