Compare commits

2 Commits

Author SHA1 Message Date
znetsixe
46fc8dddf7 style: palette swatch → (domain-hue redesign 2026-05-21)
Sidebar swatch now follows function family rather than S88 level, so the
palette is visually identifiable instead of monochromatically blue. Editor-group
rectangles in flow.json still follow S88 — only the registerType color changed.
Full table + rationale: superproject .claude/rules/node-red-flow-layout.md §10.0
and .claude/refactor/OPEN_QUESTIONS.md (2026-05-21 entry).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-21 15:05:58 +02:00
znetsixe
75d0413994 docs(CONTRACT): approve reactor's ASM-textbook unit divergence
reactor uses mg/L for concentrations, m³/d internally, °C, and 1/h
for KLa — diverging from EVOLV's canonical Pa/m³/s/W/K. This was a
real drift surfaced by the wiki audit; consensus is to keep it
because the ASM kinetics literature universally uses these units and
fighting that convention would obscure the math without improving
correctness. Now documented as an explicit, approved exception with
the conversion boundary spelled out.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-19 16:35:36 +02:00
2 changed files with 25 additions and 2 deletions

View File

@@ -3,6 +3,28 @@
Hand-maintained for Phase 6; the `## Inputs` table is generated from
`src/commands/index.js` (see Phase 9 generator). Keep ≤ 80 lines.
## Unit convention — approved exception to the canonical-unit rule
EVOLV's canonical units (`CLAUDE.md`, `generalFunctions/CONTRACT.md`)
are Pa / m³/s / W / K. **reactor diverges deliberately** — it follows
the ASM (Activated Sludge Model) kinetics literature convention:
- Concentrations: `mg/L` (= g/m³), `mmol/L` for alkalinity.
- Flow internally: `m³/d` (engine integrator runs in days; see
`baseEngine.js` line 40 — `timeStep` config field is seconds, but the
internal time base is days).
- Temperature: `°C`.
- KLa: `1/h` per the schema; multiplied by the seconds-input `timeStep`
inside `_calcOTR` — readers verifying the math should account for the
day-internal time base.
Unit conversion at the parent/child boundary happens via
`MeasurementContainer.UnitPolicy` and the `convert` utility. Other
nodes (rotatingMachine, pumpingStation, …) honour canonical units;
reactor is the only ASM-modelled node and pays the small cost of
domain-textbook units to stay aligned with every published reactor
reference.
## Inputs (msg.topic on Port 0)
| Canonical | Aliases (deprecated) | Payload | Effect |

View File

@@ -13,7 +13,7 @@
<script type="text/javascript">
RED.nodes.registerType("reactor", {
category: "EVOLV",
color: "#50a8d9",
color: "#6FAE5F",
defaults: {
name: { value: "" },
reactor_type: { value: "CSTR", required: true },
@@ -267,6 +267,7 @@
<label for="node-input-dbaseOutputFormat"><i class="fa fa-database"></i> Database Output</label>
<select id="node-input-dbaseOutputFormat" style="width:60%;">
<option value="influxdb">influxdb</option>
<option value="frost">frost</option>
<option value="json">json</option>
<option value="csv">csv</option>
</select>