Fix ESLint errors and bugs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -9,7 +9,7 @@ module.exports = function(RED) {
|
||||
|
||||
node.on('input', function(msg, send, done) {
|
||||
switch (msg.topic) {
|
||||
case "Fluent":
|
||||
case "Fluent": {
|
||||
// conserve volume flow debit
|
||||
let F_in = msg.payload.F;
|
||||
let F1 = Math.max(F_in - F2, 0);
|
||||
@@ -24,6 +24,7 @@ module.exports = function(RED) {
|
||||
|
||||
send([msg_F1, msg_F2]);
|
||||
break;
|
||||
}
|
||||
case "clock":
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -9,7 +9,7 @@ module.exports = function(RED) {
|
||||
|
||||
node.on('input', function(msg, send, done) {
|
||||
switch (msg.topic) {
|
||||
case "Fluent":
|
||||
case "Fluent": {
|
||||
// conserve volume flow debit
|
||||
let F_in = msg.payload.F;
|
||||
let C_in = msg.payload.C;
|
||||
@@ -41,6 +41,7 @@ module.exports = function(RED) {
|
||||
|
||||
send([msg_F1, msg_F2]);
|
||||
break;
|
||||
}
|
||||
case "clock":
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -48,12 +48,13 @@ class nodeClass {
|
||||
case "Dispersion":
|
||||
this.source.setDispersion = msg;
|
||||
break;
|
||||
case 'registerChild':
|
||||
case 'registerChild': {
|
||||
// Register this node as a parent of the child node
|
||||
const childId = msg.payload;
|
||||
const childObj = this.RED.nodes.getNode(childId);
|
||||
this.source.childRegistrationUtils.registerChild(childObj.source, msg.positionVsParent);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
console.log("Unknown topic: " + msg.topic);
|
||||
}
|
||||
@@ -137,7 +138,7 @@ class nodeClass {
|
||||
new_reactor = new Reactor_PFR(this.config);
|
||||
break;
|
||||
default:
|
||||
console.warn("Unknown reactor type: " + uiConfig.reactor_type);
|
||||
console.warn("Unknown reactor type: " + this.config.reactor_type);
|
||||
}
|
||||
|
||||
this.source = new_reactor; // protect from reassignment
|
||||
|
||||
@@ -19,7 +19,7 @@ class ASM3 {
|
||||
nu_NO: 0.5, // anoxic reduction factor [-]
|
||||
K_O: 0.2, // saturation constant S_0 [g O2 m-3]
|
||||
K_NO: 0.5, // saturation constant S_NO [g NO3-N m-3]
|
||||
K_S: 10., // saturation constant S_s [g COD m-3]
|
||||
K_S: 10.0, // saturation constant S_s [g COD m-3]
|
||||
K_STO: 0.1, // saturation constant X_STO [g X_STO g-1 X_H]
|
||||
mu_H_max: 3., // maximum specific growth rate [d-1]
|
||||
K_NH: 0.01, // saturation constant S_NH3 [g NH3-N m-3]
|
||||
|
||||
@@ -322,10 +322,11 @@ class Reactor_PFR extends Reactor {
|
||||
|
||||
_updateMeasurement(measurementType, value, position, context) {
|
||||
switch(measurementType) {
|
||||
case "quantity (oxygen)":
|
||||
case "quantity (oxygen)": {
|
||||
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
|
||||
break;
|
||||
}
|
||||
default:
|
||||
super._updateMeasurement(measurementType, value, position, context);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user