Minor fixes

This commit is contained in:
2025-11-07 16:51:48 +01:00
parent a106276ca6
commit 2b37163a8a
2 changed files with 3 additions and 3 deletions

View File

@@ -31,7 +31,7 @@
enableLog: { value: false },
logLevel: { value: "error" },
positionVsParent: { value: "" },
positionVsParent: { value: "" }
},
inputs: 1,
outputs: 3,

View File

@@ -203,7 +203,7 @@ class Reactor {
* Update the reactor state based on the new time.
* @param {number} newTime - New time to update reactor state to, in milliseconds since epoch.
*/
updateState(newTime = Date.now()) { // expect update with timestamp
updateState(newTime) { // expect update with timestamp
if (this.upstreamReactor) {
this.setInfluent = this.upstreamReactor.getEffluent[0]; // grab main effluent upstream reactor
}
@@ -320,7 +320,7 @@ class Reactor_PFR extends Reactor {
const advection = math.multiply(-1 * math.sum(this.Fs) / (this.A*this.d_x), this.D_op, this.extendedState);
const reaction = this.extendedState.map((state_slice) => this.asm.compute_dC(state_slice, this.temperature));
const transfer = Array.from(Array(this.n_x+2*BC_PADDING), () => new Array(ASM_CONSTANTS.NUM_SPECIES).fill(0));
if (isNaN(this.kla)) { // calculate OTR if kla is not NaN, otherwise use externally calculated OTR
for (let i = BC_PADDING+1; i < BC_PADDING+this.n_x - 1; i++) {
transfer[i][ASM_CONSTANTS.S_O_INDEX] = this.OTR * this.n_x/(this.n_x-2);