Add dispersion setting in advanced-reactor and initialize axial dispersion to zero in Reactor_PFR

This commit is contained in:
2025-06-24 13:28:45 +02:00
parent 6b57a46aab
commit f2d94b26c5
2 changed files with 4 additions and 1 deletions

View File

@@ -78,6 +78,9 @@ module.exports = function(RED) {
case "OTR":
reactor.setOTR = msg;
break;
case "Dispersion":
reactor.setDispersion = msg;
break;
default:
console.log("Unknown topic: " + msg.topic);
}

View File

@@ -94,7 +94,7 @@ class Reactor_PFR {
this.Fs = Array(n_inlets).fill(0.0); // fluid debits per inlet [m3 d-1]
this.Cs_in = Array.from(Array(n_inlets), () => new Array(13).fill(0.0)); // composition influents
this.OTR = 0.0; // oxygen transfer rate [g O2 d-1]
this.D = 0.1; // axial dispersion [m2 d-1]
this.D = 0.0; // axial dispersion [m2 d-1]
this.kla = kla; // if NaN, use external OTR [d-1]