Compare commits
4 Commits
8c03fe774c
...
developmen
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b0080cc60 | ||
|
|
f5fd8039f5 | ||
|
|
bf645cfe68 | ||
|
|
37ecfe5726 |
@@ -5,7 +5,7 @@
|
|||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType('diffuser', {
|
RED.nodes.registerType('diffuser', {
|
||||||
category: 'EVOLV',
|
category: 'EVOLV',
|
||||||
color: '#86bbdd',
|
color: '#6EB5E5',
|
||||||
defaults: {
|
defaults: {
|
||||||
name: { value: '', required: true },
|
name: { value: '', required: true },
|
||||||
number: { value: 1, required: true },
|
number: { value: 1, required: true },
|
||||||
@@ -113,6 +113,7 @@ RED.nodes.registerType('diffuser', {
|
|||||||
<label for="node-input-dbaseOutputFormat"><i class="fa fa-database"></i> Database Output</label>
|
<label for="node-input-dbaseOutputFormat"><i class="fa fa-database"></i> Database Output</label>
|
||||||
<select id="node-input-dbaseOutputFormat" style="width:60%;">
|
<select id="node-input-dbaseOutputFormat" style="width:60%;">
|
||||||
<option value="influxdb">influxdb</option>
|
<option value="influxdb">influxdb</option>
|
||||||
|
<option value="frost">frost</option>
|
||||||
<option value="json">json</option>
|
<option value="json">json</option>
|
||||||
<option value="csv">csv</option>
|
<option value="csv">csv</option>
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ module.exports = [
|
|||||||
topic: 'data.flow',
|
topic: 'data.flow',
|
||||||
aliases: ['air_flow'],
|
aliases: ['air_flow'],
|
||||||
payloadSchema: { type: 'number' },
|
payloadSchema: { type: 'number' },
|
||||||
units: { measure: 'volumeFlowRate', default: 'm3/h' },
|
unit: 'm3/h',
|
||||||
description: 'Push the measured air flow into the diffuser model.',
|
description: 'Push the measured air flow into the diffuser model.',
|
||||||
handler: handlers.setFlow,
|
handler: handlers.setFlow,
|
||||||
},
|
},
|
||||||
@@ -27,6 +27,7 @@ module.exports = [
|
|||||||
topic: 'set.water-height',
|
topic: 'set.water-height',
|
||||||
aliases: ['height_water'],
|
aliases: ['height_water'],
|
||||||
payloadSchema: { type: 'number' },
|
payloadSchema: { type: 'number' },
|
||||||
|
unit: 'm',
|
||||||
description: 'Update the water column height above the diffusers (m).',
|
description: 'Update the water column height above the diffusers (m).',
|
||||||
handler: handlers.setWaterHeight,
|
handler: handlers.setWaterHeight,
|
||||||
},
|
},
|
||||||
@@ -34,6 +35,7 @@ module.exports = [
|
|||||||
topic: 'set.header-pressure',
|
topic: 'set.header-pressure',
|
||||||
aliases: ['header_pressure'],
|
aliases: ['header_pressure'],
|
||||||
payloadSchema: { type: 'number' },
|
payloadSchema: { type: 'number' },
|
||||||
|
unit: 'mbar',
|
||||||
description: 'Update the header (supply) pressure feeding the diffusers (mbar).',
|
description: 'Update the header (supply) pressure feeding the diffusers (mbar).',
|
||||||
handler: handlers.setHeaderPressure,
|
handler: handlers.setHeaderPressure,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,3 +1,11 @@
|
|||||||
# diffuser Test Suite Layout
|
# diffuser Test Suite Layout
|
||||||
|
|
||||||
Placeholder structure (diffuser currently has no runtime module files).
|
`test/{basic,integration,edge}/` — standard EVOLV three-tier test
|
||||||
|
structure. The diffuser runtime modules live at `src/nodeClass.js`,
|
||||||
|
`src/specificClass.js`, and `src/commands/`; they implement the OTR /
|
||||||
|
ΔP aeration model and the `data.airFlow` / `set.kla` topic handlers
|
||||||
|
documented in `CONTRACT.md`.
|
||||||
|
|
||||||
|
Helpers shared across tiers belong in `test/helpers/`.
|
||||||
|
|
||||||
|
Run: `node --test test/basic test/integration test/edge`.
|
||||||
|
|||||||
@@ -13,16 +13,16 @@
|
|||||||
|
|
||||||
The registry lives in `src/commands/index.js`. Each descriptor maps a canonical `msg.topic` to its handler in `src/commands/handlers.js`; aliases emit a one-time deprecation warning the first time they fire.
|
The registry lives in `src/commands/index.js`. Each descriptor maps a canonical `msg.topic` to its handler in `src/commands/handlers.js`; aliases emit a one-time deprecation warning the first time they fire.
|
||||||
|
|
||||||
<!-- BEGIN AUTOGEN: topic-contract — populate via wiki-gen tool (TODO) -->
|
<!-- BEGIN AUTOGEN: topic-contract -->
|
||||||
|
|
||||||
| Canonical topic | Aliases | Payload | Unit | Effect |
|
| Canonical topic | Aliases | Payload | Unit | Effect |
|
||||||
|:---|:---|:---|:---|:---|
|
|---|---|---|---|---|
|
||||||
| `data.flow` | `air_flow` | `number` | `volumeFlowRate` (default `m3/h`) | Push the measured air flow into the diffuser model. Clamps to ≥ 0 and recomputes OTR. |
|
| `data.flow` | `air_flow` | `number` | `volumeFlowRate` (default `m3/h`) | Push the measured air flow into the diffuser model. |
|
||||||
| `set.density` | `density` | `number` | bottom-coverage % | Update the diffuser bottom-coverage % used as the OTR curve family key. |
|
| `set.density` | `density` | `number` | — | Update the air density used in OTR / SOTR calculations. |
|
||||||
| `set.water-height` | `height_water` | `number` | m | Update the water column height above the diffusers. Clamps to ≥ 0 and recomputes static head + total pressure. |
|
| `set.water-height` | `height_water` | `number` | `length` (default `m`) | Update the water column height above the diffusers (m). |
|
||||||
| `set.header-pressure` | `header_pressure` | `number` | mbar (gauge) | Update the header (supply) pressure above atmospheric. Feeds air-density correction. |
|
| `set.header-pressure` | `header_pressure` | `number` | `pressure` (default `mbar`) | Update the header (supply) pressure feeding the diffusers (mbar). |
|
||||||
| `set.elements` | `elements` | `number` | integer > 0 | Update the count of active diffuser elements. Drives per-element flow and total membrane area. |
|
| `set.elements` | `elements` | `number` | — | Update the count of active diffuser elements. |
|
||||||
| `set.alfa-factor` | `alfaFactor` | `number` | dimensionless (typically 0–1) | Update the alpha correction used in the kg O₂/h calculation. |
|
| `set.alfa-factor` | `alfaFactor` | `number` | — | Update the alfa factor used in oxygen-transfer correction. |
|
||||||
|
|
||||||
<!-- END AUTOGEN: topic-contract -->
|
<!-- END AUTOGEN: topic-contract -->
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user