diff --git a/src/main/java/neqsim/thermo/system/SystemSrkCPAs.java b/src/main/java/neqsim/thermo/system/SystemSrkCPAs.java index f13d7816df..6f86bc584d 100644 --- a/src/main/java/neqsim/thermo/system/SystemSrkCPAs.java +++ b/src/main/java/neqsim/thermo/system/SystemSrkCPAs.java @@ -44,10 +44,10 @@ public SystemSrkCPAs(double T, double P) { * @param checkForSolids Set true to do solid phase check and calculations */ public SystemSrkCPAs(double T, double P, boolean checkForSolids) { - super(T, P); - this.solidPhaseCheck = checkForSolids;; + super(T, P, checkForSolids); modelName = "CPAs-SRK-EOS"; + // Recreates phases created in super constructor SystemSrkCPA for (int i = 0; i < numberOfPhases; i++) { phaseArray[i] = new PhaseSrkCPAsOld(); phaseArray[i].setTemperature(T); @@ -80,10 +80,6 @@ public SystemSrkCPAs clone() { logger.error("Cloning failed.", ex); } - // for(int i = 0; i < numberOfPhases; i++) { - // clonedSystem.phaseArray[i] = (PhaseInterface) phaseArray[i].clone(); - // } - return clonedSystem; } } diff --git a/src/main/java/neqsim/thermo/system/SystemSrkCPAstatoil.java b/src/main/java/neqsim/thermo/system/SystemSrkCPAstatoil.java index 310fb1f4e2..61b653fcb8 100644 --- a/src/main/java/neqsim/thermo/system/SystemSrkCPAstatoil.java +++ b/src/main/java/neqsim/thermo/system/SystemSrkCPAstatoil.java @@ -38,10 +38,11 @@ public SystemSrkCPAstatoil(double T, double P) { * @param checkForSolids Set true to do solid phase check and calculations */ public SystemSrkCPAstatoil(double T, double P, boolean checkForSolids) { - super(T, P); - this.solidPhaseCheck = checkForSolids;; + super(T, P, checkForSolids); modelName = "CPAs-SRK-EOS-statoil"; attractiveTermNumber = 15; + + // Recreates phases created in super constructor SystemSrkCPAs for (int i = 0; i < numberOfPhases; i++) { phaseArray[i] = new PhaseSrkCPAs(); phaseArray[i].setTemperature(T); @@ -74,10 +75,6 @@ public SystemSrkCPAstatoil clone() { logger.error("Cloning failed.", ex); } - // for(int i = 0; i < numberOfPhases; i++) { - // clonedSystem.phaseArray[i] = (PhaseInterface) phaseArray[i].clone(); - // } - return clonedSystem; } }