Implemented basic process output

This commit is contained in:
2025-07-24 15:38:27 +02:00
parent edd37a707b
commit 24a7b96883
2 changed files with 12 additions and 3 deletions

View File

@@ -14,17 +14,26 @@ class liquidFlowHandler {
updateState(timeStamp) {
effluent = this.reactors[1].getEffluent();
effluent.F = this.debit;
effluent.payload.F = this.debit;
this.reactors[0].setInfluent = effluent;
}
handleChildChange() {
return;
}
handlePressureChange(machine) {
this.debit = machine.measurements.type("flow").variant("predicted").position("downstream").getCurrentValue();
}
getOutput() {
mainEffluent = this.reactors[1].getEffluent();
sideStream = structuredClone(mainEffluent);
mainEffluent.payload.F -= this.debit;
sideStream.payload.F = this.debit;
sideStream.payload.inlet = 1;
return {payload: [mainEffluent.payload, sideStream.payload]};
}
}
module.exports = { liquidFlowHandler };