From f9f6e874d1b9ecf99cbc3c076ac6c58c1e9d1815 Mon Sep 17 00:00:00 2001 From: znetsixe <73483679+znetsixe@users.noreply.github.com> Date: Tue, 14 Oct 2025 16:45:09 +0200 Subject: [PATCH] saving work end of day --- src/specificClass.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/specificClass.js b/src/specificClass.js index 52c02ea..e93e0c5 100644 --- a/src/specificClass.js +++ b/src/specificClass.js @@ -120,9 +120,13 @@ class pumpingStation { this.logger.debug(`Using temperature: ${kelvinTemp} K for calculations`); const density = coolprop.PropsSI('D','T',kelvinTemp,'P',101325,'Water'); //density in kg/m3 at temp and surface pressure const g = 9.80665; + const pressure_Pa = this.measurements.type("pressure").variant("measured").position(position).getCurrentValue('Pa'); + const level = pressure_Pa / density * g; + + this.measurements.type("level").variant("predicted").position(position).value(level); //calculate how muc flow went in or out based on pressure difference - this.logger.debug(`Using pressure: ${pressure} for calculations`); + this.logger.debug(`Using pressure: ${value} for calculations`); } initBasinProperties() {