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 /** *