Add time step configuration and input handling in advanced reactor
This commit is contained in:
@@ -104,7 +104,8 @@ class nodeClass {
|
||||
parseFloat(uiConfig.X_STO_init),
|
||||
parseFloat(uiConfig.X_A_init),
|
||||
parseFloat(uiConfig.X_TS_init)
|
||||
]
|
||||
],
|
||||
timeStep: parseFloat(uiConfig.timeStep)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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.`);
|
||||
|
||||
Reference in New Issue
Block a user