Repository navigation
Verification suite, bead reading, pressure-step reader and head-height tenability tools (items 1, 2, 3 and 7; plans 16.54 and 16.55) - #30
Merged
Conversation
…ation Guide (plan 16.61) Tests only: nothing in the solver changes. tools/verification/lib/cases.mjs holds the ten analytical cases with the plan's pass marks, fixed before any run, and tools/verification/verification-suite.mjs prints them as a table and writes the results. On this branch it gives what the first run gave on every case: 2 of the 9 judged cases pass (the block carried across a box and the insulated steel plate), case 3 is a measurement, and the sealed box reads 20.8 kPa against 24 kPa and the injected 1 kg of CO2 is found as 0.59 kg. A case that fails its mark is a known failure: its test asserts the verdict "fail" and the recorded behaviour within a band, so the suite stays green while the failure stays in the table. The checks of the expected answers and cases 4, 5, 6 and 10 (about a second each) run with npm test in src/core/flamescapes.verification.test.mjs; the slower cases 1, 2, 3, 7, 8 and 9 (several minutes) are in tools/verification/verification-suite.test.mjs and run by hand.
…reading (plan 16.61) Post-processing only: no solver change. tools/calibration/lib/bead.mjs is the steady bead of the rule (1 mm, emissivity 0.85, Ranz and Marshall with the model's own speed at the cell); surroundings at the gas's own temperature give the gas's temperature itself, so the present reading is unchanged. The validation suite's --store-bead keeps, each second, the gas temperature, the gas speed and the nearest wall surface's temperature at every temperature device's cell; it only reads the state, and without it the output has no trace of it. tools/calibration/bead-reading.mjs reads a storing run, checks that the no-correction reading gives the suite's pairs back exactly, and reports the bead's reading quantity by quantity. The words of record stay the present reading's. Unit test: src/core/calibration.bead.test.mjs (the bead against closed forms, FDS's 380.3 C bead case, and the off and on readings).
…6.61) No solver change. The validation suite's --pressure-stats records, per run, the pressure step's two settings, the sweeps it used (mean, largest, and the steps that used all it may), and the largest divergence error it left, max |div u - D| over the open cells in 1/s, read from the solver's state after each step (tools/calibration/lib/pressure.mjs). It reads and changes nothing; without the flag nothing is computed and the output is as before. The settings of the two arms go through --solver. tools/calibration/pstep-read.mjs applies item 1's rule to two arms' results and the rows tenability-times.mjs writes for them: the misses, the far trees' median of model over measured time to 60 C, and the layer depth's word. The choices where the plan is silent were written before any result (benchmark/results/2026-11-25-pstep-choices.md). The recorder was moved out of runCase into lib/pressure.mjs so that it can be unit tested; on a 30 s run of atf/050 at 0.34 m it gives the same record as the inline code it replaces. Unit test: src/core/calibration.pressureStep.test.mjs (off: reading leaves the solver's state bit for bit; on: sweeps and divergence recorded, and the tight setting leaves less divergence than the default; the reader's rule on made-up arms).
…dose of 0.3 (plan 16.54) Post-processing of stored runs only: no solver change and no switch. tools/calibration/lib/crossing.mjs reduces the head-height series the suite already stores (run.series.head) to the time at which the gas first reaches 60 C and the time at which the app's heat dose (tenability.js heatRate) reaches 0.3, with the devices, cells, times and plume rule of the head-height temperature, the four outcomes (pair, unresolved, miss, neither) and 16.54's word under three weightings. tools/calibration/tenability-times.mjs runs it on results files and checks each file against its stored head-height pairs first. The choices where the plan is silent were written before any result: benchmark/results/2026-11-24-tenability-choices.md. Unit test: src/core/calibration.tenabilityTimes.test.mjs (made-up series with known crossings and doses, the outcomes and exclusions, and the reducer's own series giving the head-height reducer's pairs).
…me to 10 m visibility from stored runs (plans 16.54, 16.55) No solver change. The validation suite's --store-species keeps each second, at each tree's head-height cells, the cell the app reads at 1.8 m, and the gas analysers' and smoke meters' cells, the model's temperature, soot density, CO, CO2, O2 and water vapour (tools/calibration/lib/species.mjs). It stores and judges nothing; without it the output is as before. The NIST/NRC and FSE data files carry their measured CO under `species`, for storing only (validation-data.mjs; no pair is made of it). tools/calibration/lib/tenability-species.mjs reduces a storing run to 16.55's quantities (CO's peak, O2 split by the analyser's height, the asphyxiant dose with the app's asphyxiantRate, the time to a visibility of 10 m, and the model alone at 1.8 m through the app's forecastFromFrames), after checking the run's pairs against the saved file of its arm; tools/calibration/tenability-species.mjs runs it. The choices where the plan is silent were written before any stored series was read: benchmark/results/2026-11-24-species-choices.md. Unit tests: src/core/calibration.species.test.mjs (the sites and the recorder on made-up states; on the solver, reading changes nothing and stores the solver's own values) and src/core/calibration.tenabilitySpecies.test.mjs (the reducers on made-up series with known answers).
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 pull request brings the verification and reading tools of plans 16.54, 16.55 and 16.61 to main: the verification suite (items 2 and 7), the thermocouple bead reading (item 3), the pressure step's log and its reader (item 1), and the head-height tenability and species tools. Nothing in the solver changes, no GPU code is touched, and the default output is the same as before. Gas radiation (item 8), on which the source branches were built, is not included and nothing here needs it; it comes with the next pull request.
The verification suite runs ten analytical cases from the FDS Verification Guide's descriptions with the plan's pass marks, fixed before any run. On this branch it gives the first run's result case for case: 2 of the 9 judged cases pass (a block carried across a box, and the insulated steel plate), case 3 is a measurement, and the seven failures stay in the table as known failures. Among them the sealed box reads 20.8 kPa against 24 kPa and the injected 1 kg of CO2 is found as 0.59 kg; in both the same source spread over every cell is exact, so the fault lies with a local source. A known failure's test asserts the verdict "fail" and the recorded behaviour, so the tests stay green while the failure is visible, and a later solver change that fixes one will turn its test red until it is rewritten to the pass.
The three storing options of the validation suite (store bead, pressure stats, store species) only read the solver's state. Without them the suite's output has no trace of them; with them every pair, ledger and statistic is unchanged and only the stored series are added. The bead reading, the pressure step's reader, the tenability times and the species reducers are post-processing tools. Rerun with this branch's code on the saved inputs, each reproduces its recorded output exactly.
Each item has a unit test in src/core that runs with npm test: for the verification suite the expected answers and cases 4, 5, 6 and 10 (under 2 s each alone; case 5 takes about 4 s in the full parallel run); for the others the off case (no change to the solver or to the present reading) and the on case (the item's effect). The slow verification cases (1, 2, 3, 7, 8 and 9, several minutes) are in tools/verification and run by hand. The rule documents the tools cite, written before any result, are included under benchmark/results; the result files and the plan's text are not.
Checks against main 31a2ad7: npm test 656/656 (main 599/600, the known wall-clock test); lint and build pass; with the storing options off, the identity and validation digests (fsri 100kWSB_Open_Back_1 and atf 050 at 0.34 m) and the fingerprints are the same as main's.