From 78c1560090f1478e5586a523fe962bbd5f9af63b Mon Sep 17 00:00:00 2001 From: Even Solbraa <41290109+EvenSol@users.noreply.github.com> Date: Tue, 31 Dec 2024 09:27:03 +0100 Subject: [PATCH] update (#1222) --- .../thermodynamicoperations/flashops/RachfordRice.java | 5 ++--- .../thermodynamicoperations/flashops/TPmultiflash.java | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/neqsim/thermodynamicoperations/flashops/RachfordRice.java b/src/main/java/neqsim/thermodynamicoperations/flashops/RachfordRice.java index 9fd8ce936..35ea555fc 100644 --- a/src/main/java/neqsim/thermodynamicoperations/flashops/RachfordRice.java +++ b/src/main/java/neqsim/thermodynamicoperations/flashops/RachfordRice.java @@ -22,7 +22,7 @@ public class RachfordRice implements Serializable { static Logger logger = LogManager.getLogger(RachfordRice.class); private static final long serialVersionUID = 1000; private double[] beta = new double[2]; - private static String method = "Nielsen2023"; // alternative use Nielsen2023 or Michelsen2001 + private static String method = "Michelsen2001"; // alternative use Nielsen2023 or Michelsen2001 /** *
@@ -188,8 +188,7 @@ public double calcBetaMichelsen2001(double[] K, double[] z) nybeta = 1.0 - betal; } step = gbeta / deriv; - } while (Math.abs(step) >= 1.0e-11 && (Math.abs(step) >= 1e-9 && iterations < 50) - && iterations < maxIterations); + } while (Math.abs(step) >= 1.0e-11 && iterations < maxIterations); if (nybeta <= tolerance) { nybeta = tolerance; } else if (nybeta >= 1.0 - tolerance) { diff --git a/src/main/java/neqsim/thermodynamicoperations/flashops/TPmultiflash.java b/src/main/java/neqsim/thermodynamicoperations/flashops/TPmultiflash.java index 3947ec2ac..299c39990 100644 --- a/src/main/java/neqsim/thermodynamicoperations/flashops/TPmultiflash.java +++ b/src/main/java/neqsim/thermodynamicoperations/flashops/TPmultiflash.java @@ -373,7 +373,7 @@ public void stabilityAnalysis() { int iter = 0; double errOld = 1.0e100; boolean useaccsubst = true; - int maxsucssubiter = 200; + int maxsucssubiter = 150; int maxiter = 200; do { errOld = err;