From 7e34b9aa71e695bfe4db05adcd78d2e886b14df7 Mon Sep 17 00:00:00 2001
From: "p.vanderwilt"
Date: Thu, 13 Nov 2025 13:59:56 +0100
Subject: [PATCH] Add real-time calculation for dx based on length and
resolution inputs
---
reactor.html | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/reactor.html b/reactor.html
index e8c57c5..1b122db 100644
--- a/reactor.html
+++ b/reactor.html
@@ -102,6 +102,19 @@
} else {
$(".PFR").show();
}
+
+ const updateDx = () => {
+ const length = parseFloat($("#node-input-length").val()) || 0;
+ const resolution = parseFloat($("#node-input-resolution_L").val()) || 1;
+ const dx = resolution > 0 ? (length / resolution).toFixed(6) : "N/A";
+ $("#dx-output").text(dx + " m");
+ };
+
+ // Set up event listeners for real-time updates
+ $("#node-input-length, #node-input-resolution_L").on("change keyup", updateDx);
+
+ // Initial calculation
+ updateDx();
},
oneditsave: function() {
// save logger fields
@@ -144,6 +157,10 @@
+
+
+ --
+
Internal mass transfer calculation (optional)