Skip to content

fix(fuel): reject a q_fuel outside 35-50 MJ/kg (unit error guard) - #77

Merged
ramondalmau merged 3 commits into
devfrom
fix/q-fuel-plausibility
Oct 22, 2026
Merged

ramondalmau merged 3 commits into
devfrom
fix/q-fuel-plausibility

Conversation

@ramondalmau

Copy link
Copy Markdown
Collaborator

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.

  • A supplied q_fuel must lie within 35-50 MJ/kg (in J/kg). Outside: the flight fails at
    parsing, naming the source (AO value, or airport file + airport).
  • Airport fuel file: checked when the runner is built; a wrong file stops the run, naming the
    airports. A missing file still only warns (unchanged).
  • Maintainer decision: 35-50 MJ/kg (unit errors only), not the DLR range [42.6397, 44.5];
    TC_QFUEL_OUT_OF_RANGE stays a known DLR failure.
  • Docs: input-format.md (fuel_properties units; hydrogen_content is wt.%, not a fraction;
    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.

ramondalmau and others added 3 commits October 22, 2026 06:26
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>
@ramondalmau
ramondalmau merged commit 6f35319 into dev Oct 22, 2026
6 checks passed
@ramondalmau
ramondalmau deleted the fix/q-fuel-plausibility branch October 22, 2026 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant