Compare commits
5 Commits
109fd182df
...
dev-Rene
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7c8722b324 | ||
| 442ddc60ed | |||
| 04306d0996 | |||
| 2bc244cae7 | |||
| 254f9eec5a |
16
reactor.html
16
reactor.html
@@ -1,9 +1,19 @@
|
|||||||
|
<!--
|
||||||
|
| S88-niveau | Primair (blokkleur) | Tekstkleur |
|
||||||
|
| ---------------------- | ------------------- | ---------- |
|
||||||
|
| **Area** | `#0f52a5` | wit |
|
||||||
|
| **Process Cell** | `#0c99d9` | wit |
|
||||||
|
| **Unit** | `#50a8d9` | zwart |
|
||||||
|
| **Equipment (Module)** | `#86bbdd` | zwart |
|
||||||
|
| **Control Module** | `#a9daee` | zwart |
|
||||||
|
|
||||||
|
-->
|
||||||
<script src="/reactor/menu.js"></script>
|
<script src="/reactor/menu.js"></script>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
RED.nodes.registerType("reactor", {
|
RED.nodes.registerType("reactor", {
|
||||||
category: "WWTP",
|
category: "EVOLV",
|
||||||
color: "#c4cce0",
|
color: "#50a8d9",
|
||||||
defaults: {
|
defaults: {
|
||||||
name: { value: "" },
|
name: { value: "" },
|
||||||
reactor_type: { value: "CSTR", required: true },
|
reactor_type: { value: "CSTR", required: true },
|
||||||
@@ -39,7 +49,7 @@
|
|||||||
outputs: 3,
|
outputs: 3,
|
||||||
inputLabels: ["input"],
|
inputLabels: ["input"],
|
||||||
outputLabels: ["process", "dbase", "parent"],
|
outputLabels: ["process", "dbase", "parent"],
|
||||||
icon: "font-awesome/fa-recycle",
|
icon: "font-awesome/fa-flask",
|
||||||
label: function() {
|
label: function() {
|
||||||
return this.name || "Reactor";
|
return this.name || "Reactor";
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -130,7 +130,7 @@ class Reactor {
|
|||||||
const eventName = `${measurementType}.measured.${position}`;
|
const eventName = `${measurementType}.measured.${position}`;
|
||||||
|
|
||||||
// Register event listener for measurement updates
|
// Register event listener for measurement updates
|
||||||
this.measurements.emitter.on(eventName, (eventData) => {
|
measurement.measurements.emitter.on(eventName, (eventData) => {
|
||||||
this.logger.debug(`${position} ${measurementType} from ${eventData.childName}: ${eventData.value} ${eventData.unit}`);
|
this.logger.debug(`${position} ${measurementType} from ${eventData.childName}: ${eventData.value} ${eventData.unit}`);
|
||||||
|
|
||||||
// Store directly in parent's measurement container
|
// Store directly in parent's measurement container
|
||||||
@@ -322,13 +322,14 @@ class Reactor_PFR extends Reactor {
|
|||||||
|
|
||||||
_updateMeasurement(measurementType, value, position, context) {
|
_updateMeasurement(measurementType, value, position, context) {
|
||||||
switch(measurementType) {
|
switch(measurementType) {
|
||||||
case "Quantity (oxygen)":
|
case "quantity (oxygen)":
|
||||||
grid_pos = Math.round(position / this.config.length * this.n_x);
|
let grid_pos = Math.round(position / this.config.length * this.n_x);
|
||||||
this.state[grid_pos][S_O_INDEX] = value; // naive approach for reconciling measurements and simulation
|
this.state[grid_pos][S_O_INDEX] = value; // naive approach for reconciling measurements and simulation
|
||||||
break;
|
break;
|
||||||
}
|
default:
|
||||||
super._updateMeasurement(measurementType, value, position, context);
|
super._updateMeasurement(measurementType, value, position, context);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Apply boundary conditions to the reactor state.
|
* Apply boundary conditions to the reactor state.
|
||||||
|
|||||||
Reference in New Issue
Block a user