fix(reactor schema): timeStep unit was "h" but engine treats input as seconds
reactor.json declared `timeStep.unit = "h"` and `default = 0.001`, but: - reactor.html labels the field [s] and defaults to 1. - baseEngine.js line 40 converts via (1/86400) — seconds-per-day — meaning the engine internally treats the input as seconds. A reader trusting the schema would have entered an hours value; the engine would then have run the integrator at 1/3600× the intended step, silently producing wrong rates. Schema now matches the actual contract: `unit = "s"`, `default = 1`, `min = 0.001` (1 ms minimum). Description block calls out the seconds→days conversion so future readers don't need to dig. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -136,12 +136,12 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"timeStep": {
|
"timeStep": {
|
||||||
"default": 0.001,
|
"default": 1,
|
||||||
"rules": {
|
"rules": {
|
||||||
"type": "number",
|
"type": "number",
|
||||||
"min": 0.0001,
|
"min": 0.001,
|
||||||
"unit": "h",
|
"unit": "s",
|
||||||
"description": "Integration time step for the reactor model."
|
"description": "Integration time step in seconds. The kinetics engine converts to days internally (timeStep / 86400) before each ASM Euler step; the HTML editor labels this field [s] and tests assume seconds. Do not change the unit without updating baseEngine.js line 40 in the reactor submodule."
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user