diff --git a/src/main/java/neqsim/thermo/component/ComponentGeDuanSun.java b/src/main/java/neqsim/thermo/component/ComponentGeDuanSun.java index d2dfb40cd9..eff4dd2b7b 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGeDuanSun.java +++ b/src/main/java/neqsim/thermo/component/ComponentGeDuanSun.java @@ -33,6 +33,32 @@ public ComponentGeDuanSun(String name, double moles, double molesInPhase, int co super(name, moles, molesInPhase, compIndex); } + /** + *
+ * getGamma. + *
+ * + * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object + * @param numberOfComponents a int + * @param temperature a double + * @param pressure a double + * @param pt the PhaseType of the phase. + * @param HValpha an array of {@link double} objects + * @param HVgij an array of {@link double} objects + * @return a double + */ + public double getGamma(PhaseInterface phase, int numberOfComponents, double temperature, + double pressure, PhaseType pt, double[][] HValpha, double[][] HVgij) { + if (componentName.equals("CO2")) { + return 0.9; + } else if (componentName.equals("water")) { + return 1.0; + } else { + return 1.0; + } + } + + /** {@inheritDoc} */ @Override public double getGamma(PhaseInterface phase, int numberOfComponents, double temperature, @@ -262,31 +288,6 @@ public double getGammaNRTL(PhaseInterface phase, int numberOfComponents, double return gamma; } - /** - *- * getGamma. - *
- * - * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object - * @param numberOfComponents a int - * @param temperature a double - * @param pressure a double - * @param pt the PhaseType of the phase. - * @param HValpha an array of {@link double} objects - * @param HVgij an array of {@link double} objects - * @return a double - */ - public double getGamma(PhaseInterface phase, int numberOfComponents, double temperature, - double pressure, PhaseType pt, double[][] HValpha, double[][] HVgij) { - if (componentName.equals("CO2")) { - return 0.9; - } else if (componentName.equals("water")) { - return 1.0; - } else { - return 1.0; - } - } - /* * public double getHenryCoef(double temperature) { // System.out.println("henry " + // * Math.exp(henryCoefParameter[0]+henryCoefParameter[1]/temperature+ diff --git a/src/main/java/neqsim/thermo/component/ComponentHydrate.java b/src/main/java/neqsim/thermo/component/ComponentHydrate.java index 10da952f7d..f95b061fb2 100644 --- a/src/main/java/neqsim/thermo/component/ComponentHydrate.java +++ b/src/main/java/neqsim/thermo/component/ComponentHydrate.java @@ -507,25 +507,25 @@ public void setDGfHydrate(double dGfHydrate, int i) { /** *
- * Setter for the field dHfHydrate
.
+ * Getter for the field dHfHydrate
.
*
- * Getter for the field dHfHydrate
.
+ * Setter for the field dHfHydrate
.
*
- * removeComponent. + * Remove component from Phase. *
* * @param name Name of component. * @param moles Total number of moles of component. * @param molesInPhase Number of moles in phase. - * @param compNumber Index number of component in phase object component array. */ - public void removeComponent(String name, double moles, double molesInPhase, int compNumber); + public void removeComponent(String name, double moles, double molesInPhase); /** *diff --git a/src/main/java/neqsim/thermo/system/SystemThermo.java b/src/main/java/neqsim/thermo/system/SystemThermo.java index bfb549636c..1bd0a3fa2f 100644 --- a/src/main/java/neqsim/thermo/system/SystemThermo.java +++ b/src/main/java/neqsim/thermo/system/SystemThermo.java @@ -1360,12 +1360,10 @@ public void removeComponent(String name) { getTotalNumberOfMoles() - phaseArray[0].getComponent(name).getNumberOfmoles()); for (int i = 0; i < getMaxNumberOfPhases(); i++) { getPhase(i).removeComponent(name, getTotalNumberOfMoles(), - phaseArray[phaseIndex[i]].getComponent(name).getNumberOfMolesInPhase(), - phaseArray[phaseIndex[i]].getComponent(name).getComponentNumber()); + getPhase(i).getComponent(name).getNumberOfMolesInPhase()); } componentNames.remove(name); - // System.out.println("removing " + componentNames.toString()); numberOfComponents--; }