From e486b83b0959ab1232d09f416c4734197e1f9e0a Mon Sep 17 00:00:00 2001 From: Even Solbraa <41290109+EvenSol@users.noreply.github.com> Date: Thu, 25 Aug 2022 21:20:50 +0000 Subject: [PATCH 1/4] removed static variables from gerg --- .vscode/settings.json | 2 +- .../java/neqsim/thermo/util/GERG/DETAIL.java | 98 ++++++------- .../neqsim/thermo/util/GERG/GERG2008.java | 138 +++++++++--------- .../thermo/util/GERG/NeqSimAGA8Detail.java | 7 +- .../thermo/util/GERG/NeqSimGERG2008.java | 5 +- 5 files changed, 126 insertions(+), 124 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 1fe8bd7a5b..3f35181966 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,7 +1,7 @@ { "java.configuration.updateBuildConfiguration": "interactive", "[java]": { - "editor.defaultFormatter": "redhat.java", + "editor.defaultFormatter": "serikb.google-java-format", "editor.formatOnSave": true, }, "java.format.settings.url": "https://raw.githubusercontent.com/google/styleguide/gh-pages/eclipse-java-google-style.xml", diff --git a/src/main/java/neqsim/thermo/util/GERG/DETAIL.java b/src/main/java/neqsim/thermo/util/GERG/DETAIL.java index e792dfb9ac..c94871325a 100644 --- a/src/main/java/neqsim/thermo/util/GERG/DETAIL.java +++ b/src/main/java/neqsim/thermo/util/GERG/DETAIL.java @@ -43,41 +43,41 @@ public class DETAIL { // x(1)=0.94, x(3)=0.05, x(20)=0.01 // Variables containing the common parameters in the DETAIL equations - static double RDetail; - static int NcDetail = 21, MaxFlds = 21, NTerms = 58; - static double epsilon = 1e-15; - static int[] fn = new int[NTerms + 1]; - static int[] gn = new int[NTerms + 1]; - static int[] qn = new int[NTerms + 1]; - static double[] an = new double[NTerms + 1]; - static double[] un = new double[NTerms + 1]; - static int[] bn = new int[NTerms + 1]; - static int[] kn = new int[NTerms + 1]; - - static double[][][] Bsnij2 = new double[MaxFlds + 1][MaxFlds + 1][18 + 1]; - static double[] Bs = new double[18 + 1]; - static double[] Csn = new double[NTerms + 1]; - - static double[] Fi = new double[MaxFlds + 1]; - static double[] Gi = new double[MaxFlds + 1]; - static double[] Qi = new double[MaxFlds + 1]; - - static double[] Ki25 = new double[MaxFlds + 1]; - static double[] Ei25 = new double[MaxFlds + 1]; - - static double[][] Kij5 = new double[MaxFlds + 1][MaxFlds + 1]; - static double[][] Uij5 = new double[MaxFlds + 1][MaxFlds + 1]; - static double[][] Gij5 = new double[MaxFlds + 1][MaxFlds + 1]; - - static double[] Tun = new double[NTerms + 1]; - static double Told; - static double[][] n0i = new double[MaxFlds + 1][7 + 1]; - static double[][] th0i = new double[MaxFlds + 1][7 + 1]; - - static double[] MMiDetail = new double[MaxFlds + 1]; - static double[] xold = new double[MaxFlds + 1]; - static double K3; - static double dPdDsave; + double RDetail; + int NcDetail = 21, MaxFlds = 21, NTerms = 58; + double epsilon = 1e-15; + int[] fn = new int[NTerms + 1]; + int[] gn = new int[NTerms + 1]; + int[] qn = new int[NTerms + 1]; + double[] an = new double[NTerms + 1]; + double[] un = new double[NTerms + 1]; + int[] bn = new int[NTerms + 1]; + int[] kn = new int[NTerms + 1]; + + double[][][] Bsnij2 = new double[MaxFlds + 1][MaxFlds + 1][18 + 1]; + double[] Bs = new double[18 + 1]; + double[] Csn = new double[NTerms + 1]; + + double[] Fi = new double[MaxFlds + 1]; + double[] Gi = new double[MaxFlds + 1]; + double[] Qi = new double[MaxFlds + 1]; + + double[] Ki25 = new double[MaxFlds + 1]; + double[] Ei25 = new double[MaxFlds + 1]; + + double[][] Kij5 = new double[MaxFlds + 1][MaxFlds + 1]; + double[][] Uij5 = new double[MaxFlds + 1][MaxFlds + 1]; + double[][] Gij5 = new double[MaxFlds + 1][MaxFlds + 1]; + + double[] Tun = new double[NTerms + 1]; + double Told; + double[][] n0i = new double[MaxFlds + 1][7 + 1]; + double[][] th0i = new double[MaxFlds + 1][7 + 1]; + + double[] MMiDetail = new double[MaxFlds + 1]; + double[] xold = new double[MaxFlds + 1]; + double K3; + double dPdDsave; /** *
@@ -87,7 +87,7 @@ public class DETAIL { * @param x a double * @return a double */ - static public double sq(double x) { + public double sq(double x) { return x * x; } @@ -99,7 +99,7 @@ static public double sq(double x) { * @param x an array of {@link double} objects * @param Mm a {@link org.netlib.util.doubleW} object */ - public static void MolarMassDetail(double[] x, doubleW Mm) { + public void MolarMassDetail(double[] x, doubleW Mm) { // Calculate molar mass of the mixture with the compositions contained in the // x() input array @@ -130,7 +130,7 @@ public static void MolarMassDetail(double[] x, doubleW Mm) { * @param P a {@link org.netlib.util.doubleW} object * @param Z a {@link org.netlib.util.doubleW} object */ - public static void PressureDetail(double T, double D, double[] x, doubleW P, doubleW Z) { + public void PressureDetail(double T, double D, double[] x, doubleW P, doubleW Z) { // Sub Pressure(T, D, x, P, Z) // Calculate pressure as a function of temperature and density. The derivative @@ -180,7 +180,7 @@ public static void PressureDetail(double T, double D, double[] x, doubleW P, dou * @param ierr a {@link org.netlib.util.intW} object * @param herr a {@link org.netlib.util.StringW} object */ - public static void DensityDetail(double T, double P, double[] x, doubleW D, intW ierr, + public void DensityDetail(double T, double P, double[] x, doubleW D, intW ierr, StringW herr) { // Sub DensityDetail(T, P, x, D, ierr, herr) @@ -280,7 +280,7 @@ public static void DensityDetail(double T, double P, double[] x, doubleW D, intW * @param JT a {@link org.netlib.util.doubleW} object * @param Kappa a {@link org.netlib.util.doubleW} object */ - public static void PropertiesDetail(double T, double D, double[] x, doubleW P, doubleW Z, + public void PropertiesDetail(double T, double D, double[] x, doubleW P, doubleW Z, doubleW dPdD, doubleW d2PdD2, doubleW d2PdTD, doubleW dPdT, doubleW U, doubleW H, doubleW S, doubleW Cv, doubleW Cp, doubleW W, doubleW G, doubleW JT, doubleW Kappa) { // Sub Properties(T, D, x, P, Z, dPdD, d2PdD2, d2PdTD, dPdT, U, H, S, Cv, Cp, W, @@ -379,7 +379,7 @@ public static void PropertiesDetail(double T, double D, double[] x, doubleW P, d * @param x Composition (mole fraction) */ // The following routines are low-level routines that should not be called outside of this code. - static void xTermsDetail(double[] x) { + void xTermsDetail(double[] x) { double G, Q, F, U, Q2, xij, xi2; int icheck; @@ -465,7 +465,7 @@ static void xTermsDetail(double[] x) { * @param x ... * @param a0 ... */ - static void Alpha0Detail(double T, double D, double[] x, doubleW[] a0) { + void Alpha0Detail(double T, double D, double[] x, doubleW[] a0) { // Private Sub Alpha0Detail(T, D, x, a0) // Calculate the ideal gas Helmholtz energy and its derivatives with respect to @@ -540,7 +540,7 @@ static void Alpha0Detail(double T, double D, double[] x, doubleW[] a0) { * @param D ... * @param ar ... */ - static void AlpharDetail(int itau, int idel, double T, double D, doubleW[][] ar) { + void AlpharDetail(int itau, int idel, double T, double D, doubleW[][] ar) { // Private Sub AlpharDetail(itau, idel, T, D, ar) // Calculate the derivatives of the residual Helmholtz energy (ar) with respect @@ -667,7 +667,7 @@ static void AlpharDetail(int itau, int idel, double T, double D, doubleW[][] ar) * SetupDetail. *
*/ - public static void SetupDetail() { + public void SetupDetail() { // Initialize all the constants and parameters in the DETAIL model. // Some values are modified for calculations that do not depend on T, D, and x // in order to speed up the program. @@ -1516,7 +1516,7 @@ public static void SetupDetail() { @SuppressWarnings("unused") public static void main(String[] args) { DETAIL test = new DETAIL(); - DETAIL.SetupDetail(); + test.SetupDetail(); double T = 400; doubleW D = new doubleW(0.0); @@ -1531,13 +1531,13 @@ public static void main(String[] args) { 0.00088, 0.00024, 0.00015, 0.00009, 0.004, 0.005, 0.002, 0.0001, 0.0025, 0.007, 0.001}; - DETAIL.MolarMassDetail(x, Mm); + test.MolarMassDetail(x, Mm); System.out.println("mol mass " + Mm.val); - DETAIL.DensityDetail(T, P.val, x, D, ierr, herr); + test.DensityDetail(T, P.val, x, D, ierr, herr); System.out.println("density " + D.val); - DETAIL.PressureDetail(T, D.val, x, P, Z); + test.PressureDetail(T, D.val, x, P, Z); System.out.println("pressure " + P.val); System.out.println("Z " + Z.val); @@ -1548,7 +1548,7 @@ public static void main(String[] args) { G = new doubleW(0.0d), JT = new doubleW(0.0d), Kappa = new doubleW(0.0d), PP = new doubleW(0.0d); - DETAIL.PropertiesDetail(T, D.val, x, P, Z, dPdD, d2PdD2, d2PdTD, dPdT, U, H, S, Cv, Cp, W, + test.PropertiesDetail(T, D.val, x, P, Z, dPdD, d2PdD2, d2PdTD, dPdT, U, H, S, Cv, Cp, W, G, JT, Kappa); System.out.println("JT " + JT.val); diff --git a/src/main/java/neqsim/thermo/util/GERG/GERG2008.java b/src/main/java/neqsim/thermo/util/GERG/GERG2008.java index b271ad44ed..2993b21565 100644 --- a/src/main/java/neqsim/thermo/util/GERG/GERG2008.java +++ b/src/main/java/neqsim/thermo/util/GERG/GERG2008.java @@ -14,57 +14,57 @@ */ public class GERG2008 { // Variables containing the common parameters in the GERG-2008 equations - static double RGERG; - static int NcGERG = 21; - static int MaxFlds = 21; - static int MaxMdl = 10; - static int MaxTrmM = 12; - static int MaxTrmP = 24; - static double epsilon = 1e-15; - static int[][] intcoik = new int[MaxFlds + 1][MaxTrmP + 1]; - static int[][] coik = new int[MaxFlds + 1][MaxTrmP + 1]; - static int[][] doik = new int[MaxFlds + 1][MaxTrmP + 1]; - static int[][] dijk = new int[MaxMdl + 1][MaxTrmM + 1]; - - static double Drold; - static double Trold; - static double Told; - static double Trold2; - static double[] xold = new double[MaxFlds + 1]; - static int[][] mNumb = new int[MaxFlds + 1][MaxFlds + 1]; - static int[] kpol = new int[MaxFlds + 1]; - static int[] kexp = new int[MaxFlds + 1]; - static int[] kpolij = new int[MaxMdl + 1]; - static int[] kexpij = new int[MaxMdl + 1]; - - static double[] Dc = new double[MaxFlds + 1]; - static double[] Tc = new double[MaxFlds + 1]; - static double[] MMiGERG = new double[MaxFlds + 1]; - static double[] Vc3 = new double[MaxFlds + 1]; - static double[] Tc2 = new double[MaxFlds + 1]; - - static double[][] noik = new double[MaxFlds + 1][MaxTrmP + 1]; - static double[][] toik = new double[MaxFlds + 1][MaxTrmP + 1]; - - static double[][] cijk = new double[MaxMdl + 1][MaxTrmM + 1]; - - static double[][] eijk = new double[MaxMdl + 1][MaxTrmM + 1]; - static double[][] gijk = new double[MaxMdl + 1][MaxTrmM + 1]; - static double[][] nijk = new double[MaxMdl + 1][MaxTrmM + 1]; - static double[][] tijk = new double[MaxMdl + 1][MaxTrmM + 1]; - - static double[][] btij = new double[MaxFlds + 1][MaxFlds + 1]; - static double[][] bvij = new double[MaxFlds + 1][MaxFlds + 1]; - static double[][] gtij = new double[MaxFlds + 1][MaxFlds + 1]; - static double[][] gvij = new double[MaxFlds + 1][MaxFlds + 1]; - - static double[][] fij = new double[MaxFlds + 1][MaxFlds + 1]; - static double[][] th0i = new double[MaxFlds + 1][7 + 1]; - static double[][] n0i = new double[MaxFlds + 1][7 + 1]; - - static double[][] taup = new double[MaxFlds + 1][MaxTrmP + 1]; - static double[][] taupijk = new double[MaxFlds + 1][MaxTrmM + 1]; - static double dPdDsave; + double RGERG; + int NcGERG = 21; + int MaxFlds = 21; + int MaxMdl = 10; + int MaxTrmM = 12; + int MaxTrmP = 24; + double epsilon = 1e-15; + int[][] intcoik = new int[MaxFlds + 1][MaxTrmP + 1]; + int[][] coik = new int[MaxFlds + 1][MaxTrmP + 1]; + int[][] doik = new int[MaxFlds + 1][MaxTrmP + 1]; + int[][] dijk = new int[MaxMdl + 1][MaxTrmM + 1]; + + double Drold; + double Trold; + double Told; + double Trold2; + double[] xold = new double[MaxFlds + 1]; + int[][] mNumb = new int[MaxFlds + 1][MaxFlds + 1]; + int[] kpol = new int[MaxFlds + 1]; + int[] kexp = new int[MaxFlds + 1]; + int[] kpolij = new int[MaxMdl + 1]; + int[] kexpij = new int[MaxMdl + 1]; + + double[] Dc = new double[MaxFlds + 1]; + double[] Tc = new double[MaxFlds + 1]; + double[] MMiGERG = new double[MaxFlds + 1]; + double[] Vc3 = new double[MaxFlds + 1]; + double[] Tc2 = new double[MaxFlds + 1]; + + double[][] noik = new double[MaxFlds + 1][MaxTrmP + 1]; + double[][] toik = new double[MaxFlds + 1][MaxTrmP + 1]; + + double[][] cijk = new double[MaxMdl + 1][MaxTrmM + 1]; + + double[][] eijk = new double[MaxMdl + 1][MaxTrmM + 1]; + double[][] gijk = new double[MaxMdl + 1][MaxTrmM + 1]; + double[][] nijk = new double[MaxMdl + 1][MaxTrmM + 1]; + double[][] tijk = new double[MaxMdl + 1][MaxTrmM + 1]; + + double[][] btij = new double[MaxFlds + 1][MaxFlds + 1]; + double[][] bvij = new double[MaxFlds + 1][MaxFlds + 1]; + double[][] gtij = new double[MaxFlds + 1][MaxFlds + 1]; + double[][] gvij = new double[MaxFlds + 1][MaxFlds + 1]; + + double[][] fij = new double[MaxFlds + 1][MaxFlds + 1]; + double[][] th0i = new double[MaxFlds + 1][7 + 1]; + double[][] n0i = new double[MaxFlds + 1][7 + 1]; + + double[][] taup = new double[MaxFlds + 1][MaxTrmP + 1]; + double[][] taupijk = new double[MaxFlds + 1][MaxTrmM + 1]; + double dPdDsave; /** *@@ -74,7 +74,7 @@ public class GERG2008 { * @param x an array of {@link double} objects * @param Mm a {@link org.netlib.util.doubleW} object */ - public static void MolarMassGERG(double[] x, doubleW Mm) { + public void MolarMassGERG(double[] x, doubleW Mm) { // Sub MolarMassGERG(x, Mm) // Calculate molar mass of the mixture with the compositions contained in the @@ -107,7 +107,7 @@ public static void MolarMassGERG(double[] x, doubleW Mm) { * @param P a {@link org.netlib.util.doubleW} object * @param Z a {@link org.netlib.util.doubleW} object */ - public static void PressureGERG(double T, double D, double[] x, doubleW P, doubleW Z) { + public void PressureGERG(double T, double D, double[] x, doubleW P, doubleW Z) { // Sub PressureGERG(T, D, x, P, Z) // Calculate pressure as a function of temperature and density. The derivative @@ -156,7 +156,7 @@ public static void PressureGERG(double T, double D, double[] x, doubleW P, doubl * @param ierr a {@link org.netlib.util.intW} object * @param herr a {@link org.netlib.util.StringW} object */ - public static void DensityGERG(int iFlag, double T, double P, double[] x, doubleW D, intW ierr, + public void DensityGERG(int iFlag, double T, double P, double[] x, doubleW D, intW ierr, StringW herr) { // Sub DensityGERG(iFlag, T, P, x, D, ierr, herr) @@ -352,7 +352,7 @@ public static void DensityGERG(int iFlag, double T, double P, double[] x, double * @param Kappa a {@link org.netlib.util.doubleW} object * @param A a {@link org.netlib.util.doubleW} object */ - public static void PropertiesGERG(double T, double D, double[] x, doubleW P, doubleW Z, + public void PropertiesGERG(double T, double D, double[] x, doubleW P, doubleW Z, doubleW dPdD, doubleW d2PdD2, doubleW d2PdTD, doubleW dPdT, doubleW U, doubleW H, doubleW S, doubleW Cv, doubleW Cp, doubleW W, doubleW G, doubleW JT, doubleW Kappa, doubleW A) { // Sub PropertiesGERG(T, D, x, P, Z, dPdD, d2PdD2, d2PdTD, dPdT, U, H, S, Cv, @@ -456,7 +456,7 @@ public static void PropertiesGERG(double T, double D, double[] x, doubleW P, dou * @param Dr ... */ // The following routines are low-level routines that should not be called outside of this code. - static void ReducingParametersGERG(double[] x, doubleW Tr, doubleW Dr) { + void ReducingParametersGERG(double[] x, doubleW Tr, doubleW Dr) { // Private Sub ReducingParametersGERG(x, Tr, Dr) // Calculate reducing variables. Only need to call this if the composition has @@ -521,7 +521,7 @@ static void ReducingParametersGERG(double[] x, doubleW Tr, doubleW Dr) { * @param x ... * @param a0 ... */ - static void Alpha0GERG(double T, double D, double[] x, doubleW[] a0) { + void Alpha0GERG(double T, double D, double[] x, doubleW[] a0) { // Private Sub Alpha0GERG(T, D, x, a0) // Calculate the ideal gas Helmholtz energy and its derivatives with respect to @@ -601,7 +601,7 @@ static void Alpha0GERG(double T, double D, double[] x, doubleW[] a0) { * @param x .... * @param ar ... */ - static void AlpharGERG(int itau, int idelta, double T, double D, double[] x, doubleW[][] ar) { + void AlpharGERG(int itau, int idelta, double T, double D, double[] x, doubleW[][] ar) { // Private Sub AlpharGERG(itau, idelta, T, D, x, ar) // Calculate dimensionless residual Helmholtz energy and its derivatives with @@ -760,7 +760,7 @@ static void AlpharGERG(int itau, int idelta, double T, double D, double[] x, dou * @param lntau ... * @param x .... */ - static void tTermsGERG(double lntau, double[] x) { + void tTermsGERG(double lntau, double[] x) { // Private Sub tTermsGERG(lntau, x) // Calculate temperature dependent parts of the GERG-2008 equation of state @@ -808,7 +808,7 @@ static void tTermsGERG(double lntau, double[] x) { * @param Tcx temperature in Kelvin * @param Dcx density */ - static void PseudoCriticalPointGERG(double[] x, doubleW Tcx, doubleW Dcx) { + void PseudoCriticalPointGERG(double[] x, doubleW Tcx, doubleW Dcx) { // PseudoCriticalPointGERG(x, Tcx, Dcx) // Calculate a pseudo critical point as the mole fraction average of the @@ -833,7 +833,7 @@ static void PseudoCriticalPointGERG(double[] x, doubleW Tcx, doubleW Dcx) { * SetupGERG. *
*/ - public static void SetupGERG() { + public void SetupGERG() { // Initialize all the constants and parameters in the GERG-2008 model. // Some values are modified for calculations that do not depend on T, D, and x in order to // speed up the program. @@ -3233,7 +3233,7 @@ public static void SetupGERG() { @SuppressWarnings("unused") public static void main(String[] args) { GERG2008 test = new GERG2008(); - GERG2008.SetupGERG(); + test.SetupGERG(); double T = 400; doubleW D = new doubleW(12.79828626082062); @@ -3247,16 +3247,16 @@ public static void main(String[] args) { double[] x = {0.0, 0.77824, 0.02, 0.06, 0.08, 0.03, 0.0015, 0.003, 0.0005, 0.00165, 0.00215, 0.00088, 0.00024, 0.00015, 0.00009, 0.004, 0.005, 0.002, 0.0001, 0.0025, 0.007, 0.001}; - GERG2008.MolarMassGERG(x, Mm); + test.MolarMassGERG(x, Mm); - System.out.println("mol mass " + Mm.val); + // System.out.println("mol mass " + Mm.val); - GERG2008.PressureGERG(T, D.val, x, P, Z); + test.PressureGERG(T, D.val, x, P, Z); - System.out.println("pressure " + P.val); - System.out.println("Z " + Z.val); + System.out.println("pressure " + P.val); + System.out.println("Z " + Z.val); - GERG2008.DensityGERG(iFlag, T, P.val, x, D, ierr, herr); + test.DensityGERG(iFlag, T, P.val, x, D, ierr, herr); System.out.println("density " + D.val); doubleW dPdD = new doubleW(0.0d); @@ -3276,7 +3276,7 @@ public static void main(String[] args) { doubleW JT = new doubleW(0.0d); doubleW Kappa = new doubleW(0.0d); doubleW PP = new doubleW(0.0d); - GERG2008.PropertiesGERG(T, D.val, x, P, Z, dPdD, d2PdD2, d2PdTD, dPdT, U, H, S, Cv, Cp, W, G, + test.PropertiesGERG(T, D.val, x, P, Z, dPdD, d2PdD2, d2PdTD, dPdT, U, H, S, Cv, Cp, W, G, JT, Kappa, A); /* diff --git a/src/main/java/neqsim/thermo/util/GERG/NeqSimAGA8Detail.java b/src/main/java/neqsim/thermo/util/GERG/NeqSimAGA8Detail.java index 440e364c5c..fb8f4d2223 100644 --- a/src/main/java/neqsim/thermo/util/GERG/NeqSimAGA8Detail.java +++ b/src/main/java/neqsim/thermo/util/GERG/NeqSimAGA8Detail.java @@ -20,6 +20,7 @@ public class NeqSimAGA8Detail { double[] normalizedGERGComposition = new double[21 + 1]; double[] notNormalizedGERGComposition = new double[21 + 1]; PhaseInterface phase = null; + DETAIL DETAIL = new DETAIL(); /** *@@ -105,7 +106,7 @@ public double getPressure() { */ public double getMolarMass() { doubleW mm = new doubleW(0.0); - neqsim.thermo.util.GERG.DETAIL.MolarMassDetail(normalizedGERGComposition, mm); + DETAIL.MolarMassDetail(normalizedGERGComposition, mm); return mm.val / 1.0e3; } @@ -121,8 +122,8 @@ public double getMolarDensity() { StringW herr = new StringW(""); doubleW D = new doubleW(0.0); double pressure = phase.getPressure() * 100.0; - neqsim.thermo.util.GERG.DETAIL.DensityDetail(phase.getTemperature(), pressure, - normalizedGERGComposition, D, ierr, herr); + DETAIL.DensityDetail(phase.getTemperature(), pressure, + normalizedGERGComposition, D, ierr, herr); return D.val; } diff --git a/src/main/java/neqsim/thermo/util/GERG/NeqSimGERG2008.java b/src/main/java/neqsim/thermo/util/GERG/NeqSimGERG2008.java index 3596b90214..715e294611 100644 --- a/src/main/java/neqsim/thermo/util/GERG/NeqSimGERG2008.java +++ b/src/main/java/neqsim/thermo/util/GERG/NeqSimGERG2008.java @@ -20,6 +20,7 @@ public class NeqSimGERG2008 { double[] normalizedGERGComposition = new double[21 + 1]; double[] notNormalizedGERGComposition = new double[21 + 1]; PhaseInterface phase = null; + GERG2008 GERG2008 = new GERG2008(); /** *
@@ -105,7 +106,7 @@ public double getPressure() {
*/
public double getMolarMass() {
doubleW mm = new doubleW(0.0);
- neqsim.thermo.util.GERG.GERG2008.MolarMassGERG(normalizedGERGComposition, mm);
+ GERG2008.MolarMassGERG(normalizedGERGComposition, mm);
return mm.val / 1.0e3;
}
@@ -122,7 +123,7 @@ public double getMolarDensity() {
StringW herr = new StringW("");
doubleW D = new doubleW(0.0);
double pressure = phase.getPressure() * 100.0;
- neqsim.thermo.util.GERG.GERG2008.DensityGERG(flag, phase.getTemperature(), pressure,
+ GERG2008.DensityGERG(flag, phase.getTemperature(), pressure,
normalizedGERGComposition, D, ierr, herr);
return D.val;
}
From ebdda2f34697830e8ad0cbd42a390b9593c165cf Mon Sep 17 00:00:00 2001
From: Even Solbraa <41290109+EvenSol@users.noreply.github.com>
Date: Fri, 26 Aug 2022 19:53:49 +0000
Subject: [PATCH 2/4] removed more static variables in fluid creator
---
.../powerGeneration/GasTurbine.java | 2 +-
src/main/java/neqsim/thermo/Fluid.java | 96 ++++++++++++-------
.../util/example/OffshoreProcess3.java | 2 +-
.../util/example/oxygenRemovalWater.java | 8 +-
.../util/example/simpleTopSideProcess2.java | 5 +-
5 files changed, 72 insertions(+), 41 deletions(-)
diff --git a/src/main/java/neqsim/processSimulation/processEquipment/powerGeneration/GasTurbine.java b/src/main/java/neqsim/processSimulation/processEquipment/powerGeneration/GasTurbine.java
index a11a2a2a22..2dd882a586 100644
--- a/src/main/java/neqsim/processSimulation/processEquipment/powerGeneration/GasTurbine.java
+++ b/src/main/java/neqsim/processSimulation/processEquipment/powerGeneration/GasTurbine.java
@@ -48,7 +48,7 @@ public GasTurbine() {
public GasTurbine(String name) {
super(name);
// needs to be changed to gas tubing mechanical design
- SystemInterface airThermoSystem = neqsim.thermo.Fluid.create("combustion air");
+ SystemInterface airThermoSystem = new neqsim.thermo.Fluid().create("combustion air");
airThermoSystem.createDatabase(true);
// airThermoSystem.display();
airStream = new Stream("airStream", airThermoSystem);
diff --git a/src/main/java/neqsim/thermo/Fluid.java b/src/main/java/neqsim/thermo/Fluid.java
index 9e5b189258..5449b1871d 100644
--- a/src/main/java/neqsim/thermo/Fluid.java
+++ b/src/main/java/neqsim/thermo/Fluid.java
@@ -13,13 +13,40 @@
*/
public class Fluid {
static Logger logger = LogManager.getLogger(Fluid.class);
- static neqsim.thermo.system.SystemInterface fluid = null;
- private static boolean hasWater = false;
- private static boolean autoSelectModel = false;
- private static String thermoModel = "srk";
- private static String thermoMixingRule = "classic";
+ neqsim.thermo.system.SystemInterface fluid = null;
+ private boolean hasWater = false;
+ private boolean autoSelectModel = false;
+ private String thermoModel = "srk";
+ private String thermoMixingRule = "classic";
- private static void setThermoModel() {
+ public Fluid() {
+ }
+
+ public Fluid(String[] componentNames) {
+ create2(componentNames);
+ }
+
+ /**
+ * @param componentNames
+ * @param flowrate
+ * @param unit
+ */
+ public Fluid(String[] componentNames, double[] flowrate, String unit) {
+ create2(componentNames, flowrate, unit);
+ }
+
+ public Fluid(String fluidType) {
+ create(fluidType);
+ }
+
+ public neqsim.thermo.system.SystemInterface getFluid() {
+ return fluid;
+ }
+
+ /**
+ *
+ */
+ private void setThermoModel() {
if (thermoModel.equals("srk")) {
fluid = new neqsim.thermo.system.SystemSrkEos();
} else if (thermoModel.equals("pr")) {
@@ -31,7 +58,7 @@ private static void setThermoModel() {
}
}
- private static void setMixingRule() {
+ private void setMixingRule() {
fluid.setMixingRule(getThermoMixingRule());
}
@@ -43,7 +70,7 @@ private static void setMixingRule() {
* @param componentNames an array of {@link java.lang.String} objects
* @return a {@link neqsim.thermo.system.SystemInterface} object
*/
- public static neqsim.thermo.system.SystemInterface create2(String[] componentNames) {
+ public neqsim.thermo.system.SystemInterface create2(String[] componentNames) {
double[] comp = new double[componentNames.length];
for (int i = 0; i < componentNames.length; i++) {
comp[i] = 1.0;
@@ -61,12 +88,13 @@ public static neqsim.thermo.system.SystemInterface create2(String[] componentNam
* @param unit a {@link java.lang.String} object
* @return a {@link neqsim.thermo.system.SystemInterface} object
*/
- public static neqsim.thermo.system.SystemInterface create2(String[] componentNames,
+ public neqsim.thermo.system.SystemInterface create2(String[] componentNames,
double[] flowrate, String unit) {
setThermoModel();
createFluid(componentNames, flowrate, unit);
- if (isHasWater() == true)
+ if (isHasWater() == true) {
fluid.addComponent("water", 0.1);
+ }
fluid.createDatabase(true);
setMixingRule();
if (isHasWater()) {
@@ -87,10 +115,10 @@ public static neqsim.thermo.system.SystemInterface create2(String[] componentNam
* @param fluidType a {@link java.lang.String} object
* @return a {@link neqsim.thermo.system.SystemInterface} object
*/
- public static neqsim.thermo.system.SystemInterface create(String fluidType) {
+ public neqsim.thermo.system.SystemInterface create(String fluidType) {
String[] compNames = null;
double[] flowrate = null;
- setThermoModel();
+ this.setThermoModel();
if (fluidType.equals("water")) {
compNames = new String[] {"water"};
flowrate = new double[] {1.0};
@@ -189,8 +217,9 @@ public static neqsim.thermo.system.SystemInterface create(String fluidType) {
return null;
}
- if (isHasWater() == true)
+ if (isHasWater() == true) {
fluid.addComponent("water", 0.1);
+ }
fluid.createDatabase(true);
setMixingRule();
if (isHasWater()) {
@@ -213,7 +242,7 @@ public static neqsim.thermo.system.SystemInterface create(String fluidType) {
* @param molarMass an array of {@link double} objects
* @param relativedensity an array of {@link double} objects
*/
- public static void addCharacterized(String[] charNames, double[] charFlowrate, double[] molarMass,
+ public void addCharacterized(String[] charNames, double[] charFlowrate, double[] molarMass,
double[] relativedensity) {
if (charNames.length != charFlowrate.length) {
logger.error("component names and mole fractions need to be same length...");
@@ -235,7 +264,7 @@ public static void addCharacterized(String[] charNames, double[] charFlowrate, d
* @param lastIsPlusFraction a boolean
* @return a {@link neqsim.thermo.system.SystemInterface} object
*/
- public static neqsim.thermo.system.SystemInterface addOilFractions(String[] charNames,
+ public neqsim.thermo.system.SystemInterface addOilFractions(String[] charNames,
double[] charFlowrate, double[] molarMass, double[] relativedensity,
boolean lastIsPlusFraction) {
if (charNames.length != charFlowrate.length) {
@@ -273,7 +302,7 @@ public static neqsim.thermo.system.SystemInterface addOilFractions(String[] char
* @param unit a {@link java.lang.String} object
* @return a {@link neqsim.thermo.system.SystemInterface} object
*/
- public static neqsim.thermo.system.SystemInterface createFluid(String[] componentNames,
+ public neqsim.thermo.system.SystemInterface createFluid(String[] componentNames,
double[] flowrate, String unit) {
if (componentNames.length != flowrate.length) {
logger.error("component names and mole fractions need to be same length...");
@@ -293,7 +322,7 @@ public static neqsim.thermo.system.SystemInterface createFluid(String[] componen
*
* @param name a {@link java.lang.String} object
*/
- public static void addComponment(String name) {
+ public void addComponment(String name) {
fluid.addComponent(name, 1.0);
fluid.createDatabase(true);
fluid.setMixingRule(2);
@@ -311,16 +340,17 @@ public static void addComponment(String name) {
* @param args an array of {@link java.lang.String} objects
*/
public static void main(String[] args) {
- neqsim.thermo.Fluid.setHasWater(true);
- neqsim.thermo.system.SystemInterface fluid = neqsim.thermo.Fluid.create("petrol");
+ neqsim.thermo.Fluid fluidCreator = new neqsim.thermo.Fluid();
+
+ neqsim.thermo.system.SystemInterface fluid = fluidCreator.create("petrol");
fluid.display();
- neqsim.thermo.system.SystemInterface fluid2 = neqsim.thermo.Fluid.create("dry gas");
+ neqsim.thermo.system.SystemInterface fluid2 = fluidCreator.create("dry gas");
fluid2.display();
fluid2.getNumberOfComponents();
neqsim.thermo.system.SystemInterface fluid3 =
- neqsim.thermo.Fluid.create("black oil with water");
+ fluidCreator.create("black oil with water");
fluid3.display();
fluid3.getNumberOfComponents();
}
@@ -332,7 +362,7 @@ public static void main(String[] args) {
*
* @return a boolean
*/
- public static boolean isHasWater() {
+ public boolean isHasWater() {
return hasWater;
}
@@ -343,8 +373,8 @@ public static boolean isHasWater() {
*
* @param hasWater a boolean
*/
- public static void setHasWater(boolean hasWater) {
- Fluid.hasWater = hasWater;
+ public void setHasWater(boolean hasWater) {
+ hasWater = hasWater;
}
/**
@@ -354,7 +384,7 @@ public static void setHasWater(boolean hasWater) {
*
* @return a boolean
*/
- public static boolean isAutoSelectModel() {
+ public boolean isAutoSelectModel() {
return autoSelectModel;
}
@@ -365,8 +395,8 @@ public static boolean isAutoSelectModel() {
*
* @param autoSelectModel a boolean
*/
- public static void setAutoSelectModel(boolean autoSelectModel) {
- Fluid.autoSelectModel = autoSelectModel;
+ public void setAutoSelectModel(boolean autoSelectModel) {
+ autoSelectModel = autoSelectModel;
}
/**
@@ -376,7 +406,7 @@ public static void setAutoSelectModel(boolean autoSelectModel) {
*
* @return a {@link java.lang.String} object
*/
- public static String getThermoModel() {
+ public String getThermoModel() {
return thermoModel;
}
@@ -387,8 +417,8 @@ public static String getThermoModel() {
*
* @param thermoModel a {@link java.lang.String} object
*/
- public static void setThermoModel(String thermoModel) {
- Fluid.thermoModel = thermoModel;
+ public void setThermoModel(String thermoModel) {
+ this.thermoModel = thermoModel;
}
/**
@@ -398,7 +428,7 @@ public static void setThermoModel(String thermoModel) {
*
* @return a {@link java.lang.String} object
*/
- public static String getThermoMixingRule() {
+ public String getThermoMixingRule() {
return thermoMixingRule;
}
@@ -409,7 +439,7 @@ public static String getThermoMixingRule() {
*
* @param thermoMixingRule a {@link java.lang.String} object
*/
- public static void setThermoMixingRule(String thermoMixingRule) {
- Fluid.thermoMixingRule = thermoMixingRule;
+ public void setThermoMixingRule(String thermoMixingRule) {
+ this.thermoMixingRule = thermoMixingRule;
}
}
diff --git a/src/test/java/neqsim/processSimulation/util/example/OffshoreProcess3.java b/src/test/java/neqsim/processSimulation/util/example/OffshoreProcess3.java
index 8eb232ef03..9b7ec7fdc4 100644
--- a/src/test/java/neqsim/processSimulation/util/example/OffshoreProcess3.java
+++ b/src/test/java/neqsim/processSimulation/util/example/OffshoreProcess3.java
@@ -50,7 +50,7 @@ public static void main(String[] args) {
testSystem.setMixingRule(2);
testSystem.setMultiPhaseCheck(true);
neqsim.thermo.system.SystemInterface fluid3 =
- neqsim.thermo.Fluid.create("black oil with water");
+ new neqsim.thermo.Fluid().create("black oil with water");
Stream wellStream = new Stream("well stream", fluid3);
// wellStream.setFluid(testSystem);
diff --git a/src/test/java/neqsim/processSimulation/util/example/oxygenRemovalWater.java b/src/test/java/neqsim/processSimulation/util/example/oxygenRemovalWater.java
index 6b75c72090..9dd350c644 100644
--- a/src/test/java/neqsim/processSimulation/util/example/oxygenRemovalWater.java
+++ b/src/test/java/neqsim/processSimulation/util/example/oxygenRemovalWater.java
@@ -20,11 +20,11 @@ public class oxygenRemovalWater {
* @param args an array of {@link java.lang.String} objects
*/
public static void main(String[] args) {
- neqsim.thermo.Fluid.setHasWater(true);
- neqsim.thermo.system.SystemInterface fluid1 =
- neqsim.thermo.Fluid.create("air").autoSelectModel();
+ neqsim.thermo.Fluid fluidCreator = new neqsim.thermo.Fluid();
+ fluidCreator.setHasWater(true);
+ neqsim.thermo.system.SystemInterface fluid1 = fluidCreator.create("air").autoSelectModel();
fluid1.setMultiPhaseCheck(true);
- neqsim.thermo.system.SystemInterface fluid2 = neqsim.thermo.Fluid.create("water");
+ neqsim.thermo.system.SystemInterface fluid2 = fluidCreator.create("water");
fluid1.setPressure(1.01325);
fluid1.setTemperature(273.15 + 10);
fluid1.setTotalFlowRate(1.0, "kg/hr");
diff --git a/src/test/java/neqsim/processSimulation/util/example/simpleTopSideProcess2.java b/src/test/java/neqsim/processSimulation/util/example/simpleTopSideProcess2.java
index a25343fe69..311e0e692b 100644
--- a/src/test/java/neqsim/processSimulation/util/example/simpleTopSideProcess2.java
+++ b/src/test/java/neqsim/processSimulation/util/example/simpleTopSideProcess2.java
@@ -21,8 +21,9 @@ public class simpleTopSideProcess2 {
* @param args an array of {@link java.lang.String} objects
*/
public static void main(String args[]) {
- neqsim.thermo.Fluid.setHasWater(true);
- neqsim.thermo.system.SystemInterface fluid = neqsim.thermo.Fluid.create("gas condensate");
+ neqsim.thermo.Fluid fluidCreator = new neqsim.thermo.Fluid();
+ fluidCreator.setHasWater(true);
+ neqsim.thermo.system.SystemInterface fluid = fluidCreator.create("gas condensate");
fluid.setTemperature(45.0, "C");
fluid.setPressure(5.0, "bara");
Stream stream_inlet = new Stream("Stream1", fluid);
From e617ad0618b7289c0c14e9172697b18c9323c4c6 Mon Sep 17 00:00:00 2001
From: Even Solbraa <41290109+EvenSol@users.noreply.github.com>
Date: Sat, 27 Aug 2022 14:39:35 +0000
Subject: [PATCH 3/4] removed static variable from cricondebar calc
---
.../measurementDevice/CricondenbarAnalyser.java | 7 -------
1 file changed, 7 deletions(-)
diff --git a/src/main/java/neqsim/processSimulation/measurementDevice/CricondenbarAnalyser.java b/src/main/java/neqsim/processSimulation/measurementDevice/CricondenbarAnalyser.java
index 57f026d2de..f4f5159d14 100644
--- a/src/main/java/neqsim/processSimulation/measurementDevice/CricondenbarAnalyser.java
+++ b/src/main/java/neqsim/processSimulation/measurementDevice/CricondenbarAnalyser.java
@@ -17,11 +17,6 @@
public class CricondenbarAnalyser extends MeasurementDeviceBaseClass {
private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(CricondenbarAnalyser.class);
-
- protected int streamNumber = 0;
-
- /** Constant numberOfStreams=0
. */
- protected static int numberOfStreams = 0;
protected StreamInterface stream = null;
/**
@@ -40,8 +35,6 @@ public CricondenbarAnalyser() {}
*/
public CricondenbarAnalyser(StreamInterface stream) {
this.stream = stream;
- numberOfStreams++;
- streamNumber = numberOfStreams;
unit = "K";
setConditionAnalysisMaxDeviation(1.0);
}
From cc43bbcb20ad111d6d597962abd85747bfbfc9fd Mon Sep 17 00:00:00 2001
From: Even Solbraa <41290109+EvenSol@users.noreply.github.com>
Date: Sat, 27 Aug 2022 14:45:25 +0000
Subject: [PATCH 4/4] removed static variables
---
.../HydrateEquilibriumTemperatureAnalyser.java | 6 ------
.../measurementDevice/MolarMassAnalyser.java | 6 ------
.../measurementDevice/PressureTransmitter.java | 6 ------
.../measurementDevice/TemperatureTransmitter.java | 6 ------
.../measurementDevice/VolumeFlowTransmitter.java | 6 ------
.../measurementDevice/WaterContentAnalyser.java | 6 ------
.../measurementDevice/WaterDewPointAnalyser.java | 6 ------
7 files changed, 42 deletions(-)
diff --git a/src/main/java/neqsim/processSimulation/measurementDevice/HydrateEquilibriumTemperatureAnalyser.java b/src/main/java/neqsim/processSimulation/measurementDevice/HydrateEquilibriumTemperatureAnalyser.java
index 371b568c21..7043ed582c 100644
--- a/src/main/java/neqsim/processSimulation/measurementDevice/HydrateEquilibriumTemperatureAnalyser.java
+++ b/src/main/java/neqsim/processSimulation/measurementDevice/HydrateEquilibriumTemperatureAnalyser.java
@@ -17,10 +17,6 @@
public class HydrateEquilibriumTemperatureAnalyser extends MeasurementDeviceBaseClass {
private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(HydrateEquilibriumTemperatureAnalyser.class);
-
- protected int streamNumber = 0;
- /** Constant numberOfStreams=0
*/
- protected static int numberOfStreams = 0;
protected StreamInterface stream = null;
private double referencePressure = 0;
@@ -40,8 +36,6 @@ public HydrateEquilibriumTemperatureAnalyser() {}
*/
public HydrateEquilibriumTemperatureAnalyser(StreamInterface stream) {
this.stream = stream;
- numberOfStreams++;
- streamNumber = numberOfStreams;
unit = "K";
setConditionAnalysisMaxDeviation(1.0);
}
diff --git a/src/main/java/neqsim/processSimulation/measurementDevice/MolarMassAnalyser.java b/src/main/java/neqsim/processSimulation/measurementDevice/MolarMassAnalyser.java
index 8e8cbd997d..ba76598c06 100644
--- a/src/main/java/neqsim/processSimulation/measurementDevice/MolarMassAnalyser.java
+++ b/src/main/java/neqsim/processSimulation/measurementDevice/MolarMassAnalyser.java
@@ -12,10 +12,6 @@
*/
public class MolarMassAnalyser extends MeasurementDeviceBaseClass {
private static final long serialVersionUID = 1000;
-
- protected int streamNumber = 0;
- /** Constant numberOfStreams=0
*/
- protected static int numberOfStreams = 0;
protected StreamInterface stream = null;
/**
@@ -39,8 +35,6 @@ public MolarMassAnalyser() {
public MolarMassAnalyser(StreamInterface stream) {
this();
this.stream = stream;
- numberOfStreams++;
- streamNumber = numberOfStreams;
}
/** {@inheritDoc} */
diff --git a/src/main/java/neqsim/processSimulation/measurementDevice/PressureTransmitter.java b/src/main/java/neqsim/processSimulation/measurementDevice/PressureTransmitter.java
index 449bf8da17..ad814bec3a 100644
--- a/src/main/java/neqsim/processSimulation/measurementDevice/PressureTransmitter.java
+++ b/src/main/java/neqsim/processSimulation/measurementDevice/PressureTransmitter.java
@@ -12,10 +12,6 @@
*/
public class PressureTransmitter extends MeasurementDeviceBaseClass {
private static final long serialVersionUID = 1000;
-
- protected int streamNumber = 0;
- /** Constant numberOfStreams=0
*/
- protected static int numberOfStreams = 0;
protected StreamInterface stream = null;
/**
@@ -39,8 +35,6 @@ public PressureTransmitter() {
public PressureTransmitter(StreamInterface stream) {
this();
this.stream = stream;
- numberOfStreams++;
- streamNumber = numberOfStreams;
}
/** {@inheritDoc} */
diff --git a/src/main/java/neqsim/processSimulation/measurementDevice/TemperatureTransmitter.java b/src/main/java/neqsim/processSimulation/measurementDevice/TemperatureTransmitter.java
index b415c212b2..0c7f5328a6 100644
--- a/src/main/java/neqsim/processSimulation/measurementDevice/TemperatureTransmitter.java
+++ b/src/main/java/neqsim/processSimulation/measurementDevice/TemperatureTransmitter.java
@@ -18,10 +18,6 @@
*/
public class TemperatureTransmitter extends MeasurementDeviceBaseClass {
private static final long serialVersionUID = 1000;
-
- protected int streamNumber = 0;
- /** Constant numberOfStreams=0
*/
- protected static int numberOfStreams = 0;
protected StreamInterface stream = null;
public TemperatureTransmitter() {
@@ -40,8 +36,6 @@ public TemperatureTransmitter() {
public TemperatureTransmitter(StreamInterface stream) {
this();
this.stream = stream;
- numberOfStreams++;
- streamNumber = numberOfStreams;
}
/** {@inheritDoc} */
diff --git a/src/main/java/neqsim/processSimulation/measurementDevice/VolumeFlowTransmitter.java b/src/main/java/neqsim/processSimulation/measurementDevice/VolumeFlowTransmitter.java
index 415c15b3a2..44bead2d09 100644
--- a/src/main/java/neqsim/processSimulation/measurementDevice/VolumeFlowTransmitter.java
+++ b/src/main/java/neqsim/processSimulation/measurementDevice/VolumeFlowTransmitter.java
@@ -12,10 +12,6 @@
*/
public class VolumeFlowTransmitter extends MeasurementDeviceBaseClass {
private static final long serialVersionUID = 1000;
-
- protected int streamNumber = 0;
- /** Constant numberOfStreams=0
*/
- protected static int numberOfStreams = 0;
protected StreamInterface stream = null;
private int measuredPhaseNumber = 0;
@@ -36,8 +32,6 @@ public VolumeFlowTransmitter() {}
*/
public VolumeFlowTransmitter(StreamInterface stream) {
this.stream = stream;
- numberOfStreams++;
- streamNumber = numberOfStreams;
name = "volume flow rate";
unit = "m^3/hr";
}
diff --git a/src/main/java/neqsim/processSimulation/measurementDevice/WaterContentAnalyser.java b/src/main/java/neqsim/processSimulation/measurementDevice/WaterContentAnalyser.java
index ed40227fac..f65e481b1d 100644
--- a/src/main/java/neqsim/processSimulation/measurementDevice/WaterContentAnalyser.java
+++ b/src/main/java/neqsim/processSimulation/measurementDevice/WaterContentAnalyser.java
@@ -12,10 +12,6 @@
*/
public class WaterContentAnalyser extends MeasurementDeviceBaseClass {
private static final long serialVersionUID = 1000;
-
- protected int streamNumber = 0;
- /** Constant numberOfStreams=0
*/
- protected static int numberOfStreams = 0;
protected StreamInterface stream = null;
/**
@@ -35,8 +31,6 @@ public WaterContentAnalyser() {}
*/
public WaterContentAnalyser(StreamInterface stream) {
this.stream = stream;
- numberOfStreams++;
- streamNumber = numberOfStreams;
name = "water analyser";
unit = "kg/day";
}
diff --git a/src/main/java/neqsim/processSimulation/measurementDevice/WaterDewPointAnalyser.java b/src/main/java/neqsim/processSimulation/measurementDevice/WaterDewPointAnalyser.java
index ace93fd5ab..f3e34733f9 100644
--- a/src/main/java/neqsim/processSimulation/measurementDevice/WaterDewPointAnalyser.java
+++ b/src/main/java/neqsim/processSimulation/measurementDevice/WaterDewPointAnalyser.java
@@ -18,10 +18,6 @@
public class WaterDewPointAnalyser extends MeasurementDeviceBaseClass {
private static final long serialVersionUID = 1000;
static Logger logger = LogManager.getLogger(WaterDewPointAnalyser.class);
-
- protected int streamNumber = 0;
- /** Constant numberOfStreams=0
*/
- protected static int numberOfStreams = 0;
protected StreamInterface stream = null;
private double referencePressure = 70.0;
private String method = "Bukacek";
@@ -42,8 +38,6 @@ public WaterDewPointAnalyser() {}
*/
public WaterDewPointAnalyser(StreamInterface stream) {
this.stream = stream;
- numberOfStreams++;
- streamNumber = numberOfStreams;
unit = "K";
setConditionAnalysisMaxDeviation(1.0);
}