From 3aed9ddff7e81ed546cd9623f087c1abd3cec8a4 Mon Sep 17 00:00:00 2001 From: Even Solbraa <41290109+EvenSol@users.noreply.github.com> Date: Tue, 3 Dec 2024 20:33:11 +0000 Subject: [PATCH] update --- src/main/java/neqsim/process/equipment/splitter/Splitter.java | 3 +-- .../java/neqsim/thermodynamicoperations/flashops/Flash.java | 2 -- .../neqsim/thermodynamicoperations/flashops/RachfordRice.java | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/main/java/neqsim/process/equipment/splitter/Splitter.java b/src/main/java/neqsim/process/equipment/splitter/Splitter.java index 2179a2b0f9..1cb8dfe5ee 100644 --- a/src/main/java/neqsim/process/equipment/splitter/Splitter.java +++ b/src/main/java/neqsim/process/equipment/splitter/Splitter.java @@ -229,8 +229,7 @@ public void run(UUID id) { for (int j = 0; j < inletStream.getThermoSystem().getPhase(0).getNumberOfComponents(); j++) { int index = inletStream.getThermoSystem().getPhase(0).getComponent(j).getComponentNumber(); double moles = inletStream.getThermoSystem().getPhase(0).getComponent(j).getNumberOfmoles(); - double change = - (moles * splitFactor[i] - moles > 0) ? moles : moles * splitFactor[i] - moles; + double change = (moles * splitFactor[i] - moles > 0) ? 0.0 : moles * splitFactor[i] - moles; splitStream[i].getThermoSystem().addComponent(index, change); } ThermodynamicOperations thermoOps = diff --git a/src/main/java/neqsim/thermodynamicoperations/flashops/Flash.java b/src/main/java/neqsim/thermodynamicoperations/flashops/Flash.java index bfeb73c2c6..820e0793f4 100644 --- a/src/main/java/neqsim/thermodynamicoperations/flashops/Flash.java +++ b/src/main/java/neqsim/thermodynamicoperations/flashops/Flash.java @@ -115,8 +115,6 @@ public void stabilityAnalysis() throws neqsim.util.exception.IsNaNException, } SystemInterface clonedSystem = minimumGibbsEnergySystem; - clonedSystem.setTotalNumberOfMoles(1.0); - clonedSystem.init(1); double[] sumw = new double[2]; sumw[1] = 0.0; sumw[0] = 0.0; diff --git a/src/main/java/neqsim/thermodynamicoperations/flashops/RachfordRice.java b/src/main/java/neqsim/thermodynamicoperations/flashops/RachfordRice.java index a8cd9d263b..bdda3b43dd 100644 --- a/src/main/java/neqsim/thermodynamicoperations/flashops/RachfordRice.java +++ b/src/main/java/neqsim/thermodynamicoperations/flashops/RachfordRice.java @@ -21,7 +21,7 @@ public class RachfordRice implements Serializable { static Logger logger = LogManager.getLogger(PHsolidFlash.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 /** *