From 62aa470100b9d3c6c5cbae79a842649fe04cb2bb Mon Sep 17 00:00:00 2001 From: Even Solbraa <41290109+EvenSol@users.noreply.github.com> Date: Thu, 2 May 2024 22:49:24 +0200 Subject: [PATCH] add GCV and WI for streams (#997) --- .../processEquipment/stream/Stream.java | 20 ++++++++++++++++ .../stream/StreamInterface.java | 24 +++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/src/main/java/neqsim/processSimulation/processEquipment/stream/Stream.java b/src/main/java/neqsim/processSimulation/processEquipment/stream/Stream.java index dcb3e4b8af..69527196bb 100644 --- a/src/main/java/neqsim/processSimulation/processEquipment/stream/Stream.java +++ b/src/main/java/neqsim/processSimulation/processEquipment/stream/Stream.java @@ -606,6 +606,26 @@ public double GCV() { return standard.getValue("GCV") * 1.0e3; } + /** {@inheritDoc} */ + @Override + public double getGCV(String unit, double refTVolume, double refTCombustion) { + Standard_ISO6976 standard = + new Standard_ISO6976(getFluid().clone(), refTVolume, refTCombustion, unit); + standard.setReferenceState("real"); + standard.calculate(); + return standard.getValue("GCV") * 1.0e3; + } + + /** {@inheritDoc} */ + @Override + public double getWI(String unit, double refTVolume, double refTCombustion) { + Standard_ISO6976 standard = + new Standard_ISO6976(getFluid().clone(), refTVolume, refTCombustion, unit); + standard.setReferenceState("real"); + standard.calculate(); + return standard.getValue("WI") * 1.0e3; + } + /** {@inheritDoc} */ @Override public double LCV() { diff --git a/src/main/java/neqsim/processSimulation/processEquipment/stream/StreamInterface.java b/src/main/java/neqsim/processSimulation/processEquipment/stream/StreamInterface.java index 620c06af5c..1da0e7fc3a 100644 --- a/src/main/java/neqsim/processSimulation/processEquipment/stream/StreamInterface.java +++ b/src/main/java/neqsim/processSimulation/processEquipment/stream/StreamInterface.java @@ -244,6 +244,30 @@ public default double getFlowRate(String unit) { */ public double GCV(); + /** + *
+ * getGCV. + *
+ * + * @param unit a String + * @param refTVolume a double in Celcius + * @param refTCombustion a double in Celcius + * @return a double + */ + public double getGCV(String unit, double refTVolume, double refTCombustion); + + /** + *+ * getWI. + *
+ * + * @param unit a String + * @param refTVolume a double in Celcius + * @param refTCombustion a double in Celcius + * @return a double + */ + public double getWI(String unit, double refTVolume, double refTCombustion); + /** ** LCV.