Add time step configuration and input handling in advanced reactor

This commit is contained in:
2025-09-22 15:17:25 +02:00
parent 7a70f60655
commit 8f64fbe4e5
3 changed files with 17 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ class Reactor {
this.kla = config.kla; // if NaN, use externaly provided OTR [d-1]
this.currentTime = Date.now(); // milliseconds since epoch [ms]
this.timeStep = 1 / (24*60*15); // time step [d]
this.timeStep = 1 / (24*60*60) * this.config.timeStep; // time step [d]
this.speedUpFactor = 60; // speed up factor for simulation, 60 means 1 minute per simulated second
}
@@ -159,7 +159,9 @@ class Reactor {
this.logger.debug(`---------------------- updating ${measurementType} ------------------ `);
switch (measurementType) {
case "temperature":
this.temperature = value;
if (position == "atEquipment") {
this.temperature = value;
}
break;
default:
this.logger.error(`Type '${measurementType}' not recognized for measured update.`);