diff --git a/src/main/java/neqsim/thermo/component/Component.java b/src/main/java/neqsim/thermo/component/Component.java index 94dcf95ee4..254ee3ea26 100644 --- a/src/main/java/neqsim/thermo/component/Component.java +++ b/src/main/java/neqsim/thermo/component/Component.java @@ -194,41 +194,38 @@ public Component(int number, double TC, double PC, double M, double a, double mo * Constructor for Component. *
* - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public Component(String component_name, double moles, double molesInPhase, int compnumber) { - createComponent(component_name, moles, molesInPhase, compnumber); + public Component(String name, double moles, double molesInPhase, int compIndex) { + createComponent(name, moles, molesInPhase, compIndex); } /** {@inheritDoc} */ @Override - public void createComponent(String component_name, double moles, double molesInPhase, - int compnumber) { - if (component_name == null) { + public void createComponent(String name, double moles, double molesInPhase, int compIndex) { + if (name == null) { throw new RuntimeException(new neqsim.util.exception.InvalidInputException(this, - "createComponent", "component_name", "can not be null")); + "createComponent", "name", "can not be null")); } - if (component_name.trim() == "") { + if (name.trim() == "") { throw new RuntimeException(new neqsim.util.exception.InvalidInputException(this, - "createComponent", "component_name", "can not be empty")); + "createComponent", "name", "can not be empty")); } - component_name = ComponentInterface.getComponentNameFromAlias(component_name); - componentName = component_name; + name = ComponentInterface.getComponentNameFromAlias(name); + componentName = name; numberOfMoles = moles; numberOfMolesInPhase = molesInPhase; java.sql.ResultSet dataSet = null; try (neqsim.util.database.NeqSimDataBase database = new neqsim.util.database.NeqSimDataBase()) { - if (!component_name.equals("default")) { + if (!name.equals("default")) { try { if (NeqSimDataBase.createTemporaryTables()) { - dataSet = database - .getResultSet(("SELECT * FROM comptemp WHERE name='" + component_name + "'")); + dataSet = database.getResultSet(("SELECT * FROM comptemp WHERE name='" + name + "'")); } else { - dataSet = - database.getResultSet(("SELECT * FROM comp WHERE name='" + component_name + "'")); + dataSet = database.getResultSet(("SELECT * FROM comp WHERE name='" + name + "'")); } dataSet.next(); dataSet.getString("ID"); @@ -237,9 +234,8 @@ public void createComponent(String component_name, double moles, double molesInP try { dataSet.close(); // logger.info("no parameters in tempcomp -- trying comp.. " + - // component_name); - dataSet = - database.getResultSet(("SELECT * FROM comp WHERE name='" + component_name + "'")); + // name); + dataSet = database.getResultSet(("SELECT * FROM comp WHERE name='" + name + "'")); dataSet.next(); } catch (Exception e2) { throw new RuntimeException(e2); @@ -445,7 +441,7 @@ public void createComponent(String component_name, double moles, double molesInP waxFormer = Integer.parseInt(dataSet.getString("waxformer")) == 1; // System.out.println(componentName + " pure component parameters: ok..."); } - componentNumber = compnumber; + componentNumber = compIndex; } catch (Exception ex) { logger.error("error in comp", ex); } diff --git a/src/main/java/neqsim/thermo/component/ComponentBWRS.java b/src/main/java/neqsim/thermo/component/ComponentBWRS.java index 6ebbef7b0e..35179cc583 100644 --- a/src/main/java/neqsim/thermo/component/ComponentBWRS.java +++ b/src/main/java/neqsim/thermo/component/ComponentBWRS.java @@ -39,19 +39,18 @@ public class ComponentBWRS extends ComponentSrk { * Constructor for ComponentBWRS. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentBWRS(String component_name, double moles, double molesInPhase, int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentBWRS(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); try (neqsim.util.database.NeqSimDataBase database = new neqsim.util.database.NeqSimDataBase()) { java.sql.ResultSet dataSet = null; try { - dataSet = database - .getResultSet(("SELECT * FROM mbwr32param WHERE name='" + component_name + "'")); + dataSet = database.getResultSet(("SELECT * FROM mbwr32param WHERE name='" + name + "'")); dataSet.next(); dataSet.getClob("name"); } catch (Exception ex) { diff --git a/src/main/java/neqsim/thermo/component/ComponentCSPsrk.java b/src/main/java/neqsim/thermo/component/ComponentCSPsrk.java index 43016c338b..bb537a45e0 100644 --- a/src/main/java/neqsim/thermo/component/ComponentCSPsrk.java +++ b/src/main/java/neqsim/thermo/component/ComponentCSPsrk.java @@ -23,13 +23,13 @@ public class ComponentCSPsrk extends ComponentSrk { * Constructor for ComponentCSPsrk. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentCSPsrk(String component_name, double moles, double molesInPhase, int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentCSPsrk(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); } /** diff --git a/src/main/java/neqsim/thermo/component/ComponentDesmukhMather.java b/src/main/java/neqsim/thermo/component/ComponentDesmukhMather.java index 5fd57b4864..2da73b3e50 100644 --- a/src/main/java/neqsim/thermo/component/ComponentDesmukhMather.java +++ b/src/main/java/neqsim/thermo/component/ComponentDesmukhMather.java @@ -25,28 +25,25 @@ public class ComponentDesmukhMather extends ComponentGE { * Constructor for ComponentDesmukhMather. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentDesmukhMather(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentDesmukhMather(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); java.sql.ResultSet dataSet = null; try (neqsim.util.database.NeqSimDataBase database = new neqsim.util.database.NeqSimDataBase()) { - if (!component_name.equals("default")) { + if (!name.equals("default")) { try { - dataSet = - database.getResultSet(("SELECT * FROM comptemp WHERE name='" + component_name + "'")); + dataSet = database.getResultSet(("SELECT * FROM comptemp WHERE name='" + name + "'")); dataSet.next(); dataSet.getString("FORMULA"); } catch (Exception ex) { dataSet.close(); - logger.info("no parameters in tempcomp -- trying comp.. " + component_name); - dataSet = - database.getResultSet(("SELECT * FROM comp WHERE name='" + component_name + "'")); + logger.info("no parameters in tempcomp -- trying comp.. " + name); + dataSet = database.getResultSet(("SELECT * FROM comp WHERE name='" + name + "'")); dataSet.next(); } deshMathIonicDiameter = Double.parseDouble(dataSet.getString("DeshMatIonicDiameter")); diff --git a/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPA.java b/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPA.java index 7064f8bbd2..16b4e62e50 100644 --- a/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPA.java +++ b/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPA.java @@ -28,14 +28,13 @@ public class ComponentElectrolyteCPA extends ComponentModifiedFurstElectrolyteEo * Constructor for ComponentElectrolyteCPA. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentElectrolyteCPA(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentElectrolyteCPA(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); xsite = new double[numberOfAssociationSites]; xsitedni = new double[numberOfAssociationSites][100]; xsitedV = new double[numberOfAssociationSites]; @@ -601,7 +600,7 @@ public double[][] getXsitedni() { * * * @param xNumb a int - * @param compNumbi a int + * @param compIndexi a int * @return a double */ public double getXsitedni(int xNumb, int compNumbi) { diff --git a/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPAOld.java b/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPAOld.java index 9a17a5245d..a21bd4b344 100644 --- a/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPAOld.java +++ b/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPAOld.java @@ -31,14 +31,13 @@ public class ComponentElectrolyteCPAOld extends ComponentModifiedFurstElectrolyt * Constructor for ComponentElectrolyteCPAOld. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentElectrolyteCPAOld(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentElectrolyteCPAOld(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); xsite = new double[numberOfAssociationSites]; xsitedV = new double[numberOfAssociationSites]; xsiteOld = new double[numberOfAssociationSites]; diff --git a/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPAstatoil.java b/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPAstatoil.java index 56217c725f..6d37cc2deb 100644 --- a/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPAstatoil.java +++ b/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPAstatoil.java @@ -18,14 +18,14 @@ public class ComponentElectrolyteCPAstatoil extends ComponentElectrolyteCPA { * Constructor for ComponentElectrolyteCPAstatoil. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentElectrolyteCPAstatoil(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentElectrolyteCPAstatoil(String name, double moles, double molesInPhase, + int compIndex) { + super(name, moles, molesInPhase, compIndex); } /** diff --git a/src/main/java/neqsim/thermo/component/ComponentEos.java b/src/main/java/neqsim/thermo/component/ComponentEos.java index f7933d33d2..68a3bbc6bb 100644 --- a/src/main/java/neqsim/thermo/component/ComponentEos.java +++ b/src/main/java/neqsim/thermo/component/ComponentEos.java @@ -86,13 +86,13 @@ public abstract class ComponentEos extends Component implements ComponentEosInte * Constructor for ComponentEos. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentEos(String component_name, double moles, double molesInPhase, int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentEos(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); } /** @@ -732,8 +732,8 @@ public double getdUdVdnS(PhaseInterface phase) { * * * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object - * @param compNumb1 a int - * @param compNumb2 a int + * @param compIndex1 a int + * @param compIndex2 a int * @return a double */ public double getdUdndnSV(PhaseInterface phase, int compNumb1, int compNumb2) { diff --git a/src/main/java/neqsim/thermo/component/ComponentGE.java b/src/main/java/neqsim/thermo/component/ComponentGE.java index ca716e4f41..de8ced038f 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGE.java +++ b/src/main/java/neqsim/thermo/component/ComponentGE.java @@ -32,13 +32,13 @@ public abstract class ComponentGE extends Component implements ComponentGEInterf * Constructor for ComponentGE. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentGE(String component_name, double moles, double molesInPhase, int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentGE(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); } /** {@inheritDoc} */ diff --git a/src/main/java/neqsim/thermo/component/ComponentGENRTLmodifiedHV.java b/src/main/java/neqsim/thermo/component/ComponentGENRTLmodifiedHV.java index 62c4d8df91..452a498f44 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGENRTLmodifiedHV.java +++ b/src/main/java/neqsim/thermo/component/ComponentGENRTLmodifiedHV.java @@ -25,14 +25,13 @@ public class ComponentGENRTLmodifiedHV extends ComponentGeNRTL { * Constructor for ComponentGENRTLmodifiedHV. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentGENRTLmodifiedHV(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentGENRTLmodifiedHV(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); } /** {@inheritDoc} */ diff --git a/src/main/java/neqsim/thermo/component/ComponentGENRTLmodifiedWS.java b/src/main/java/neqsim/thermo/component/ComponentGENRTLmodifiedWS.java index 1c4fbaee15..145fa1fc26 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGENRTLmodifiedWS.java +++ b/src/main/java/neqsim/thermo/component/ComponentGENRTLmodifiedWS.java @@ -19,14 +19,13 @@ public class ComponentGENRTLmodifiedWS extends ComponentGeNRTL { * Constructor for ComponentGENRTLmodifiedWS. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentGENRTLmodifiedWS(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentGENRTLmodifiedWS(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); } /** {@inheritDoc} */ diff --git a/src/main/java/neqsim/thermo/component/ComponentGERG2004.java b/src/main/java/neqsim/thermo/component/ComponentGERG2004.java index 58059f685f..18ae7d720a 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGERG2004.java +++ b/src/main/java/neqsim/thermo/component/ComponentGERG2004.java @@ -18,14 +18,13 @@ public class ComponentGERG2004 extends ComponentEos { * Constructor for ComponentGERG2004. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentGERG2004(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentGERG2004(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); } /** diff --git a/src/main/java/neqsim/thermo/component/ComponentGEUnifac.java b/src/main/java/neqsim/thermo/component/ComponentGEUnifac.java index 395183088b..96d42b9c34 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGEUnifac.java +++ b/src/main/java/neqsim/thermo/component/ComponentGEUnifac.java @@ -39,18 +39,17 @@ public class ComponentGEUnifac extends ComponentGEUniquac { * Constructor for ComponentGEUnifac. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentGEUnifac(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentGEUnifac(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); if (!this.getClass().equals(ComponentGEUnifac.class)) { return; } - if (component_name.contains("_PC")) { + if (name.contains("_PC")) { double number = getMolarMass() / 0.014; int intNumb = (int) Math.round(number) - 2; unifacGroups.add(new UNIFACgroup(1, 2)); @@ -62,14 +61,12 @@ public ComponentGEUnifac(String component_name, double moles, double molesInPhas try (neqsim.util.database.NeqSimDataBase database = new neqsim.util.database.NeqSimDataBase()) { java.sql.ResultSet dataSet = null; try { - dataSet = - database.getResultSet(("SELECT * FROM unifaccomp WHERE Name='" + component_name + "'")); + dataSet = database.getResultSet(("SELECT * FROM unifaccomp WHERE Name='" + name + "'")); dataSet.next(); dataSet.getClob("name"); } catch (Exception ex) { dataSet.close(); - dataSet = - database.getResultSet(("SELECT * FROM unifaccomp WHERE Name='" + component_name + "'")); + dataSet = database.getResultSet(("SELECT * FROM unifaccomp WHERE Name='" + name + "'")); dataSet.next(); } @@ -77,7 +74,7 @@ public ComponentGEUnifac(String component_name, double moles, double molesInPhas int temp = Integer.parseInt(dataSet.getString("sub" + Integer.toString(p))); if (temp > 0) { unifacGroups.add(new UNIFACgroup(p, temp)); - // System.out.println("comp " + component_name + " adding UNIFAC group " + p); + // System.out.println("comp " + name + " adding UNIFAC group " + p); } } diff --git a/src/main/java/neqsim/thermo/component/ComponentGEUnifacPSRK.java b/src/main/java/neqsim/thermo/component/ComponentGEUnifacPSRK.java index fa5fa7b12d..c5c421dadb 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGEUnifacPSRK.java +++ b/src/main/java/neqsim/thermo/component/ComponentGEUnifacPSRK.java @@ -23,14 +23,13 @@ public class ComponentGEUnifacPSRK extends ComponentGEUnifac { * Constructor for ComponentGEUnifacPSRK. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentGEUnifacPSRK(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentGEUnifacPSRK(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); } /** diff --git a/src/main/java/neqsim/thermo/component/ComponentGEUnifacUMRPRU.java b/src/main/java/neqsim/thermo/component/ComponentGEUnifacUMRPRU.java index feedffa3bb..80bd562ca2 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGEUnifacUMRPRU.java +++ b/src/main/java/neqsim/thermo/component/ComponentGEUnifacUMRPRU.java @@ -39,16 +39,15 @@ public class ComponentGEUnifacUMRPRU extends ComponentGEUnifac { * Constructor for ComponentGEUnifacUMRPRU. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentGEUnifacUMRPRU(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentGEUnifacUMRPRU(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); // System.out.println("finished reading UNIFAC "); - if (component_name.contains("_PC")) { + if (name.contains("_PC")) { double number = getMolarMass() / 0.014; int intNumb = (int) Math.round(number) - 2; unifacGroups.clear(); @@ -67,14 +66,14 @@ public ComponentGEUnifacUMRPRU(String component_name, double moles, double moles try (neqsim.util.database.NeqSimDataBase database = new neqsim.util.database.NeqSimDataBase()) { java.sql.ResultSet dataSet = null; try { - dataSet = database - .getResultSet(("SELECT * FROM unifaccompumrpru WHERE Name='" + component_name + "'")); + dataSet = + database.getResultSet(("SELECT * FROM unifaccompumrpru WHERE Name='" + name + "'")); dataSet.next(); // dataSet.getClob("name"); } catch (Exception ex) { dataSet.close(); - dataSet = database - .getResultSet(("SELECT * FROM unifaccompumrpru WHERE Name='" + component_name + "'")); + dataSet = + database.getResultSet(("SELECT * FROM unifaccompumrpru WHERE Name='" + name + "'")); dataSet.next(); logger.error("Something went wrong. Closing database.", ex); } @@ -83,7 +82,7 @@ public ComponentGEUnifacUMRPRU(String component_name, double moles, double moles int temp = Integer.parseInt(dataSet.getString("sub" + Integer.toString(p))); if (temp > 0) { unifacGroups.add(new UNIFACgroup(p, temp)); - // System.out.println("compUMR " + component_name + " adding UNIFAC group " + + // System.out.println("compUMR " + name + " adding UNIFAC group " + // p); } } diff --git a/src/main/java/neqsim/thermo/component/ComponentGEUniquac.java b/src/main/java/neqsim/thermo/component/ComponentGEUniquac.java index f51b91bed3..c564397515 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGEUniquac.java +++ b/src/main/java/neqsim/thermo/component/ComponentGEUniquac.java @@ -31,18 +31,17 @@ public class ComponentGEUniquac extends ComponentGE { * Constructor for ComponentGEUniquac. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentGEUniquac(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentGEUniquac(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); if (!this.getClass().equals(ComponentGEUniquac.class)) { return; } - if (component_name.contains("_PC")) { + if (name.contains("_PC")) { // double number = getMolarMass() / 0.014; // int intNumb = (int) Math.round(number) - 2; r = 1.0; @@ -52,14 +51,12 @@ public ComponentGEUniquac(String component_name, double moles, double molesInPha try (neqsim.util.database.NeqSimDataBase database = new neqsim.util.database.NeqSimDataBase()) { java.sql.ResultSet dataSet = null; try { - dataSet = - database.getResultSet(("SELECT * FROM unifaccomp WHERE Name='" + component_name + "'")); + dataSet = database.getResultSet(("SELECT * FROM unifaccomp WHERE Name='" + name + "'")); dataSet.next(); dataSet.getClob("name"); } catch (Exception ex) { dataSet.close(); - dataSet = - database.getResultSet(("SELECT * FROM unifaccomp WHERE Name='" + component_name + "'")); + dataSet = database.getResultSet(("SELECT * FROM unifaccomp WHERE Name='" + name + "'")); dataSet.next(); } r = Double.parseDouble(dataSet.getString("rUNIQUAQ")); diff --git a/src/main/java/neqsim/thermo/component/ComponentGEUniquacmodifiedHV.java b/src/main/java/neqsim/thermo/component/ComponentGEUniquacmodifiedHV.java index 4a83476fcb..6ade2c3b15 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGEUniquacmodifiedHV.java +++ b/src/main/java/neqsim/thermo/component/ComponentGEUniquacmodifiedHV.java @@ -21,14 +21,14 @@ abstract class ComponentGEUniquacmodifiedHV extends ComponentGEUniquac { * Constructor for ComponentGEUniquacmodifiedHV. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentGEUniquacmodifiedHV(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentGEUniquacmodifiedHV(String name, double moles, double molesInPhase, + int compIndex) { + super(name, moles, molesInPhase, compIndex); } /** {@inheritDoc} */ diff --git a/src/main/java/neqsim/thermo/component/ComponentGEWilson.java b/src/main/java/neqsim/thermo/component/ComponentGEWilson.java index 2a5d0650f6..bc10dbc7f5 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGEWilson.java +++ b/src/main/java/neqsim/thermo/component/ComponentGEWilson.java @@ -20,14 +20,13 @@ public class ComponentGEWilson extends ComponentGE { * Constructor for ComponentGEWilson. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentGEWilson(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentGEWilson(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); } /** diff --git a/src/main/java/neqsim/thermo/component/ComponentGeDuanSun.java b/src/main/java/neqsim/thermo/component/ComponentGeDuanSun.java index 43b501af92..d2dfb40cd9 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGeDuanSun.java +++ b/src/main/java/neqsim/thermo/component/ComponentGeDuanSun.java @@ -24,14 +24,13 @@ public class ComponentGeDuanSun extends ComponentGE { * Constructor for ComponentGeDuanSun. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentGeDuanSun(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentGeDuanSun(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); } /** {@inheritDoc} */ diff --git a/src/main/java/neqsim/thermo/component/ComponentGeNRTL.java b/src/main/java/neqsim/thermo/component/ComponentGeNRTL.java index 21b5ed5a49..0d060cce33 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGeNRTL.java +++ b/src/main/java/neqsim/thermo/component/ComponentGeNRTL.java @@ -23,13 +23,13 @@ public class ComponentGeNRTL extends ComponentGE { * Constructor for ComponentGeNRTL. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentGeNRTL(String component_name, double moles, double molesInPhase, int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentGeNRTL(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); } /** {@inheritDoc} */ diff --git a/src/main/java/neqsim/thermo/component/ComponentHydrate.java b/src/main/java/neqsim/thermo/component/ComponentHydrate.java index 8c91e09a10..d17f05473d 100644 --- a/src/main/java/neqsim/thermo/component/ComponentHydrate.java +++ b/src/main/java/neqsim/thermo/component/ComponentHydrate.java @@ -45,14 +45,13 @@ public class ComponentHydrate extends Component { * Constructor for ComponentHydrate. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentHydrate(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentHydrate(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); coordNumb[0][0] = 20.0; coordNumb[0][1] = 24.0; cavRadius[0][0] = 3.95; @@ -76,22 +75,19 @@ public ComponentHydrate(String component_name, double moles, double molesInPhase java.sql.ResultSet dataSet = null; try (neqsim.util.database.NeqSimDataBase database = new neqsim.util.database.NeqSimDataBase()) { - if (!component_name.equals("default")) { + if (!name.equals("default")) { try { if (NeqSimDataBase.createTemporaryTables()) { - dataSet = database - .getResultSet(("SELECT * FROM comptemp WHERE name='" + component_name + "'")); + dataSet = database.getResultSet(("SELECT * FROM comptemp WHERE name='" + name + "'")); } else { - dataSet = - database.getResultSet(("SELECT * FROM comp WHERE name='" + component_name + "'")); + dataSet = database.getResultSet(("SELECT * FROM comp WHERE name='" + name + "'")); } dataSet.next(); dataSet.getString("FORMULA"); } catch (Exception ex) { dataSet.close(); - logger.info("no parameters in tempcomp -- trying comp.. " + component_name); - dataSet = - database.getResultSet(("SELECT * FROM comp WHERE name='" + component_name + "'")); + logger.info("no parameters in tempcomp -- trying comp.. " + name); + dataSet = database.getResultSet(("SELECT * FROM comp WHERE name='" + name + "'")); dataSet.next(); } lennardJonesMolecularDiameterHydrate = @@ -379,7 +375,7 @@ public double calcCKI(int stucture, int cavityType, PhaseInterface phase) { * setRefFug. * * - * @param compNumbm a int + * @param compIndexm a int * @param val a double */ public void setRefFug(int compNumbm, double val) { diff --git a/src/main/java/neqsim/thermo/component/ComponentHydrateBallard.java b/src/main/java/neqsim/thermo/component/ComponentHydrateBallard.java index a14144bd8e..90dc51e012 100644 --- a/src/main/java/neqsim/thermo/component/ComponentHydrateBallard.java +++ b/src/main/java/neqsim/thermo/component/ComponentHydrateBallard.java @@ -22,14 +22,13 @@ public class ComponentHydrateBallard extends ComponentHydrate { * Constructor for ComponentHydrateBallard. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentHydrateBallard(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentHydrateBallard(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); coordNumb[0][0] = 20.0; coordNumb[0][1] = 24.0; cavRadius[0][0] = 3.908; diff --git a/src/main/java/neqsim/thermo/component/ComponentHydrateGF.java b/src/main/java/neqsim/thermo/component/ComponentHydrateGF.java index 1e4083f08f..f253b885ab 100644 --- a/src/main/java/neqsim/thermo/component/ComponentHydrateGF.java +++ b/src/main/java/neqsim/thermo/component/ComponentHydrateGF.java @@ -25,30 +25,27 @@ public class ComponentHydrateGF extends ComponentHydrate { * Constructor for ComponentHydrateGF. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentHydrateGF(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentHydrateGF(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); java.sql.ResultSet dataSet = null; - if (!component_name.equals("default")) { + if (!name.equals("default")) { try (neqsim.util.database.NeqSimDataBase database = new neqsim.util.database.NeqSimDataBase()) { // System.out.println("reading GF hydrate parameters .............."); try { - dataSet = - database.getResultSet(("SELECT * FROM comp WHERE name='" + component_name + "'")); + dataSet = database.getResultSet(("SELECT * FROM comp WHERE name='" + name + "'")); dataSet.next(); dataSet.getString("ID"); } catch (Exception ex) { - logger.info("no parameters in tempcomp -- trying comp.. " + component_name); + logger.info("no parameters in tempcomp -- trying comp.. " + name); dataSet.close(); - dataSet = - database.getResultSet(("SELECT * FROM comp WHERE name='" + component_name + "'")); + dataSet = database.getResultSet(("SELECT * FROM comp WHERE name='" + name + "'")); dataSet.next(); } Ak[0][0] = Double.parseDouble(dataSet.getString("A1_SmallGF")); diff --git a/src/main/java/neqsim/thermo/component/ComponentHydrateKluda.java b/src/main/java/neqsim/thermo/component/ComponentHydrateKluda.java index 36bd03ef19..cb8a4b152f 100644 --- a/src/main/java/neqsim/thermo/component/ComponentHydrateKluda.java +++ b/src/main/java/neqsim/thermo/component/ComponentHydrateKluda.java @@ -33,14 +33,13 @@ public class ComponentHydrateKluda extends Component { * Constructor for ComponentHydrateKluda. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentHydrateKluda(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentHydrateKluda(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); coordNumb[0][0][0] = 20.0; coordNumb[0][0][1] = 24.0; cavRadius[0][0][0] = 3.906; @@ -258,7 +257,7 @@ public double calcCKI(int stucture, int cavityType, PhaseInterface phase) { * setRefFug. * * - * @param compNumbm a int + * @param compIndexm a int * @param val a double */ public void setRefFug(int compNumbm, double val) { diff --git a/src/main/java/neqsim/thermo/component/ComponentHydratePVTsim.java b/src/main/java/neqsim/thermo/component/ComponentHydratePVTsim.java index f05de726d5..dbe41f5723 100644 --- a/src/main/java/neqsim/thermo/component/ComponentHydratePVTsim.java +++ b/src/main/java/neqsim/thermo/component/ComponentHydratePVTsim.java @@ -26,35 +26,31 @@ public class ComponentHydratePVTsim extends ComponentHydrate { * Constructor for ComponentHydratePVTsim. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentHydratePVTsim(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentHydratePVTsim(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); java.sql.ResultSet dataSet = null; - if (!component_name.equals("default")) { + if (!name.equals("default")) { try (neqsim.util.database.NeqSimDataBase database = new neqsim.util.database.NeqSimDataBase()) { logger.info("reading hydrate parameters .............."); try { if (NeqSimDataBase.createTemporaryTables()) { - dataSet = database - .getResultSet(("SELECT * FROM comptemp WHERE name='" + component_name + "'")); + dataSet = database.getResultSet(("SELECT * FROM comptemp WHERE name='" + name + "'")); } else { - dataSet = - database.getResultSet(("SELECT * FROM comp WHERE name='" + component_name + "'")); + dataSet = database.getResultSet(("SELECT * FROM comp WHERE name='" + name + "'")); } dataSet.next(); } catch (Exception ex) { dataSet.close(); - logger.info("no parameters in tempcomp -- trying comp.. " + component_name); - dataSet = - database.getResultSet(("SELECT * FROM comp WHERE name='" + component_name + "'")); + logger.info("no parameters in tempcomp -- trying comp.. " + name); + dataSet = database.getResultSet(("SELECT * FROM comp WHERE name='" + name + "'")); dataSet.next(); } Ak[0][0] = Double.parseDouble(dataSet.getString("HydrateA1Small")); @@ -72,7 +68,7 @@ public ComponentHydratePVTsim(String component_name, double moles, double molesI try { dataSet.close(); } catch (Exception ex2) { - logger.error("error closing comp hydrate database....." + component_name); + logger.error("error closing comp hydrate database....." + name); } } } diff --git a/src/main/java/neqsim/thermo/component/ComponentHydrateStatoil.java b/src/main/java/neqsim/thermo/component/ComponentHydrateStatoil.java index f6f0de726c..a3b77c4384 100644 --- a/src/main/java/neqsim/thermo/component/ComponentHydrateStatoil.java +++ b/src/main/java/neqsim/thermo/component/ComponentHydrateStatoil.java @@ -26,14 +26,13 @@ public class ComponentHydrateStatoil extends ComponentHydrate { * Constructor for ComponentHydrateStatoil. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentHydrateStatoil(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentHydrateStatoil(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); coordNumb[0][0] = 20.0; coordNumb[0][1] = 24.0; cavRadius[0][0] = 3.95; diff --git a/src/main/java/neqsim/thermo/component/ComponentInterface.java b/src/main/java/neqsim/thermo/component/ComponentInterface.java index ddb3777b08..44429d1e59 100644 --- a/src/main/java/neqsim/thermo/component/ComponentInterface.java +++ b/src/main/java/neqsim/thermo/component/ComponentInterface.java @@ -26,13 +26,12 @@ public interface ComponentInterface extends ThermodynamicConstantsInterface, Clo * Helper function to create component. Typically called from constructors. * * - * @param component_name Name of component. + * @param name Name of component. * @param moles Total number of moles of component in system. * @param molesInPhase Number of moles in phase. - * @param compnumber Index number of component in phase object component array. + * @param compIndex Index number of component in phase object component array. */ - public void createComponent(String component_name, double moles, double molesInPhase, - int compnumber); + public void createComponent(String name, double moles, double molesInPhase, int compIndex); /** *diff --git a/src/main/java/neqsim/thermo/component/ComponentKentEisenberg.java b/src/main/java/neqsim/thermo/component/ComponentKentEisenberg.java index 627c598109..a80f5c84a0 100644 --- a/src/main/java/neqsim/thermo/component/ComponentKentEisenberg.java +++ b/src/main/java/neqsim/thermo/component/ComponentKentEisenberg.java @@ -18,14 +18,13 @@ public class ComponentKentEisenberg extends ComponentGeNRTL { * Constructor for ComponentKentEisenberg. *
* - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentKentEisenberg(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentKentEisenberg(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); } /** {@inheritDoc} */ diff --git a/src/main/java/neqsim/thermo/component/ComponentModifiedFurstElectrolyteEos.java b/src/main/java/neqsim/thermo/component/ComponentModifiedFurstElectrolyteEos.java index 50cf5dc268..c78ab76363 100644 --- a/src/main/java/neqsim/thermo/component/ComponentModifiedFurstElectrolyteEos.java +++ b/src/main/java/neqsim/thermo/component/ComponentModifiedFurstElectrolyteEos.java @@ -69,14 +69,14 @@ public class ComponentModifiedFurstElectrolyteEos extends ComponentSrk { * Constructor for ComponentModifiedFurstElectrolyteEos. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentModifiedFurstElectrolyteEos(String component_name, double moles, - double molesInPhase, int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentModifiedFurstElectrolyteEos(String name, double moles, double molesInPhase, + int compIndex) { + super(name, moles, molesInPhase, compIndex); ionicCoVolume = this.getIonicDiameter(); if (ionicCharge != 0) { setIsIon(true); diff --git a/src/main/java/neqsim/thermo/component/ComponentModifiedFurstElectrolyteEosMod2004.java b/src/main/java/neqsim/thermo/component/ComponentModifiedFurstElectrolyteEosMod2004.java index a81ed05b28..077727cad0 100644 --- a/src/main/java/neqsim/thermo/component/ComponentModifiedFurstElectrolyteEosMod2004.java +++ b/src/main/java/neqsim/thermo/component/ComponentModifiedFurstElectrolyteEosMod2004.java @@ -69,14 +69,14 @@ public class ComponentModifiedFurstElectrolyteEosMod2004 extends ComponentSrk { * Constructor for ComponentModifiedFurstElectrolyteEosMod2004. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentModifiedFurstElectrolyteEosMod2004(String component_name, double moles, - double molesInPhase, int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentModifiedFurstElectrolyteEosMod2004(String name, double moles, double molesInPhase, + int compIndex) { + super(name, moles, molesInPhase, compIndex); ionicCoVolume = this.getIonicDiameter(); if (ionicCharge != 0) { setIsIon(true); diff --git a/src/main/java/neqsim/thermo/component/ComponentPCSAFT.java b/src/main/java/neqsim/thermo/component/ComponentPCSAFT.java index 1e70de9022..17fb6c4dc1 100644 --- a/src/main/java/neqsim/thermo/component/ComponentPCSAFT.java +++ b/src/main/java/neqsim/thermo/component/ComponentPCSAFT.java @@ -38,13 +38,13 @@ public class ComponentPCSAFT extends ComponentSrk { * Constructor for ComponentPCSAFT. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentPCSAFT(String component_name, double moles, double molesInPhase, int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentPCSAFT(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); } /** diff --git a/src/main/java/neqsim/thermo/component/ComponentPCSAFTa.java b/src/main/java/neqsim/thermo/component/ComponentPCSAFTa.java index d8a3a905e4..0b1d6a5164 100644 --- a/src/main/java/neqsim/thermo/component/ComponentPCSAFTa.java +++ b/src/main/java/neqsim/thermo/component/ComponentPCSAFTa.java @@ -26,14 +26,13 @@ public class ComponentPCSAFTa extends ComponentPCSAFT implements ComponentCPAInt * Constructor for ComponentPCSAFTa. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentPCSAFTa(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentPCSAFTa(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); xsite = new double[numberOfAssociationSites]; xsitedV = new double[numberOfAssociationSites]; xsiteOld = new double[numberOfAssociationSites]; diff --git a/src/main/java/neqsim/thermo/component/ComponentPR.java b/src/main/java/neqsim/thermo/component/ComponentPR.java index 68e72490c7..239f4d2b2a 100644 --- a/src/main/java/neqsim/thermo/component/ComponentPR.java +++ b/src/main/java/neqsim/thermo/component/ComponentPR.java @@ -18,13 +18,13 @@ public class ComponentPR extends ComponentEos { * Constructor for ComponentPR. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentPR(String component_name, double moles, double molesInPhase, int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentPR(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); a = .45724333333 * R * R * criticalTemperature * criticalTemperature / criticalPressure; b = .077803333 * R * criticalTemperature / criticalPressure; diff --git a/src/main/java/neqsim/thermo/component/ComponentPRvolcor.java b/src/main/java/neqsim/thermo/component/ComponentPRvolcor.java index 7bd36b3cde..204f91649d 100644 --- a/src/main/java/neqsim/thermo/component/ComponentPRvolcor.java +++ b/src/main/java/neqsim/thermo/component/ComponentPRvolcor.java @@ -84,14 +84,13 @@ public double calccTT() { * Constructor for ComponentPRvolcor. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentPRvolcor(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentPRvolcor(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); c = (0.1154 - 0.4406 * (0.29056 - 0.08775 * getAcentricFactor())) * R * criticalTemperature / criticalPressure; } diff --git a/src/main/java/neqsim/thermo/component/ComponentPrCPA.java b/src/main/java/neqsim/thermo/component/ComponentPrCPA.java index 7fb12c0674..02a8471204 100644 --- a/src/main/java/neqsim/thermo/component/ComponentPrCPA.java +++ b/src/main/java/neqsim/thermo/component/ComponentPrCPA.java @@ -18,13 +18,13 @@ abstract class ComponentPrCPA extends ComponentPR implements ComponentCPAInterfa * Constructor for ComponentPrCPA. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentPrCPA(String component_name, double moles, double molesInPhase, int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentPrCPA(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); xsite = new double[numberOfAssociationSites]; if ((numberOfAssociationSites != 0 || Math.abs(aCPA) > 1e-6) && cpaon == 1) { // System.out.println("ass sites: " + numberOfAssociationSites); diff --git a/src/main/java/neqsim/thermo/component/ComponentRK.java b/src/main/java/neqsim/thermo/component/ComponentRK.java index d9f740ebd1..c6a1f46ac0 100644 --- a/src/main/java/neqsim/thermo/component/ComponentRK.java +++ b/src/main/java/neqsim/thermo/component/ComponentRK.java @@ -18,13 +18,13 @@ public class ComponentRK extends ComponentEos { * Constructor for ComponentRK. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentRK(String component_name, double moles, double molesInPhase, int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentRK(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); a = 1.0 / (9.0 * (Math.pow(2.0, 1.0 / 3.0) - 1.0)) * R * R * criticalTemperature * criticalTemperature / criticalPressure; diff --git a/src/main/java/neqsim/thermo/component/ComponentSolid.java b/src/main/java/neqsim/thermo/component/ComponentSolid.java index e32b817ff7..f1ae85adc5 100644 --- a/src/main/java/neqsim/thermo/component/ComponentSolid.java +++ b/src/main/java/neqsim/thermo/component/ComponentSolid.java @@ -36,13 +36,13 @@ public class ComponentSolid extends ComponentSrk { * Constructor for ComponentSolid. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentSolid(String component_name, double moles, double molesInPhase, int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentSolid(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); } /** diff --git a/src/main/java/neqsim/thermo/component/ComponentSrk.java b/src/main/java/neqsim/thermo/component/ComponentSrk.java index e22bc710a0..691123b0a6 100644 --- a/src/main/java/neqsim/thermo/component/ComponentSrk.java +++ b/src/main/java/neqsim/thermo/component/ComponentSrk.java @@ -21,13 +21,13 @@ public class ComponentSrk extends ComponentEos { * Constructor for ComponentSrk. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentSrk(String component_name, double moles, double molesInPhase, int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentSrk(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); a = 1.0 / (9.0 * (Math.pow(2.0, 1.0 / 3.0) - 1.0)) * R * R * criticalTemperature * criticalTemperature / criticalPressure; diff --git a/src/main/java/neqsim/thermo/component/ComponentSrkCPA.java b/src/main/java/neqsim/thermo/component/ComponentSrkCPA.java index 62b9fc642f..ded33bdb03 100644 --- a/src/main/java/neqsim/thermo/component/ComponentSrkCPA.java +++ b/src/main/java/neqsim/thermo/component/ComponentSrkCPA.java @@ -28,13 +28,13 @@ public class ComponentSrkCPA extends ComponentSrk implements ComponentCPAInterfa * Constructor for ComponentSrkCPA. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentSrkCPA(String component_name, double moles, double molesInPhase, int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentSrkCPA(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); xsite = new double[numberOfAssociationSites]; xsitedni = new double[numberOfAssociationSites][100]; xsitedV = new double[numberOfAssociationSites]; @@ -602,7 +602,7 @@ public double[][] getXsitedni() { * * * @param xNumb a int - * @param compNumbi a int + * @param compIndexi a int * @return a double */ public double getXsitedni(int xNumb, int compNumbi) { diff --git a/src/main/java/neqsim/thermo/component/ComponentSrkCPAs.java b/src/main/java/neqsim/thermo/component/ComponentSrkCPAs.java index 7b42205523..7c4f380d00 100644 --- a/src/main/java/neqsim/thermo/component/ComponentSrkCPAs.java +++ b/src/main/java/neqsim/thermo/component/ComponentSrkCPAs.java @@ -18,14 +18,13 @@ public class ComponentSrkCPAs extends ComponentSrkCPA { * Constructor for ComponentSrkCPAs. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentSrkCPAs(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentSrkCPAs(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); } /** diff --git a/src/main/java/neqsim/thermo/component/ComponentSrkPeneloux.java b/src/main/java/neqsim/thermo/component/ComponentSrkPeneloux.java index 53af0d495f..7fb974526f 100644 --- a/src/main/java/neqsim/thermo/component/ComponentSrkPeneloux.java +++ b/src/main/java/neqsim/thermo/component/ComponentSrkPeneloux.java @@ -20,14 +20,13 @@ public class ComponentSrkPeneloux extends ComponentSrk { * Constructor for ComponentSrkPeneloux. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentSrkPeneloux(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentSrkPeneloux(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); a = 1.0 / (9.0 * (Math.pow(2.0, 1.0 / 3.0) - 1.0)) * R * R * criticalTemperature * criticalTemperature / criticalPressure; diff --git a/src/main/java/neqsim/thermo/component/ComponentTST.java b/src/main/java/neqsim/thermo/component/ComponentTST.java index e6e91fc5de..769b5abc34 100644 --- a/src/main/java/neqsim/thermo/component/ComponentTST.java +++ b/src/main/java/neqsim/thermo/component/ComponentTST.java @@ -18,13 +18,13 @@ public class ComponentTST extends ComponentEos { * Constructor for ComponentTST. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentTST(String component_name, double moles, double molesInPhase, int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentTST(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); a = 0.427481 * R * R * criticalTemperature * criticalTemperature / criticalPressure; b = .086641 * R * criticalTemperature / criticalPressure; diff --git a/src/main/java/neqsim/thermo/component/ComponentUMRCPA.java b/src/main/java/neqsim/thermo/component/ComponentUMRCPA.java index f1d656d8a1..dac26096ea 100644 --- a/src/main/java/neqsim/thermo/component/ComponentUMRCPA.java +++ b/src/main/java/neqsim/thermo/component/ComponentUMRCPA.java @@ -28,13 +28,13 @@ public class ComponentUMRCPA extends ComponentPR implements ComponentCPAInterfac * Constructor for ComponentSrkCPA. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentUMRCPA(String component_name, double moles, double molesInPhase, int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentUMRCPA(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); xsite = new double[numberOfAssociationSites]; xsitedni = new double[numberOfAssociationSites][100]; xsitedV = new double[numberOfAssociationSites]; @@ -102,9 +102,8 @@ public ComponentUMRCPA(int number, double TC, double PC, double M, double a, dou /** {@inheritDoc} */ @Override - public void createComponent(String component_name, double moles, double molesInPhase, - int compnumber) { - super.createComponent(component_name, moles, molesInPhase, compnumber); + public void createComponent(String name, double moles, double molesInPhase, int compIndex) { + super.createComponent(name, moles, molesInPhase, compIndex); // criticalTemperature = 305.4; // criticalPressure = 135.62; // acentricFactor = 0.1609; @@ -605,7 +604,7 @@ public double[][] getXsitedni() { * * * @param xNumb a int - * @param compNumbi a int + * @param compIndexi a int * @return a double */ public double getXsitedni(int xNumb, int compNumbi) { diff --git a/src/main/java/neqsim/thermo/component/ComponentWax.java b/src/main/java/neqsim/thermo/component/ComponentWax.java index 856cea95b8..406ce68bdb 100644 --- a/src/main/java/neqsim/thermo/component/ComponentWax.java +++ b/src/main/java/neqsim/thermo/component/ComponentWax.java @@ -25,13 +25,13 @@ public class ComponentWax extends ComponentSolid { * Constructor for ComponentWax. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentWax(String component_name, double moles, double molesInPhase, int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentWax(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); } /** {@inheritDoc} */ diff --git a/src/main/java/neqsim/thermo/component/ComponentWaxWilson.java b/src/main/java/neqsim/thermo/component/ComponentWaxWilson.java index e197c37f4a..1d93c5d906 100644 --- a/src/main/java/neqsim/thermo/component/ComponentWaxWilson.java +++ b/src/main/java/neqsim/thermo/component/ComponentWaxWilson.java @@ -20,14 +20,13 @@ public class ComponentWaxWilson extends ComponentSolid { * Constructor for ComponentWaxWilson. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentWaxWilson(String component_name, double moles, double molesInPhase, - int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentWaxWilson(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); } /** * {@inheritDoc} */ diff --git a/src/main/java/neqsim/thermo/component/ComponentWonWax.java b/src/main/java/neqsim/thermo/component/ComponentWonWax.java index adcea3df33..f2dc2ce665 100644 --- a/src/main/java/neqsim/thermo/component/ComponentWonWax.java +++ b/src/main/java/neqsim/thermo/component/ComponentWonWax.java @@ -22,13 +22,13 @@ public class ComponentWonWax extends ComponentSolid { * Constructor for ComponentWonWax. * * - * @param component_name Name of component. + * @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. + * @param compIndex Index number of component in phase object component array. */ - public ComponentWonWax(String component_name, double moles, double molesInPhase, int compnumber) { - super(component_name, moles, molesInPhase, compnumber); + public ComponentWonWax(String name, double moles, double molesInPhase, int compIndex) { + super(name, moles, molesInPhase, compIndex); } /** {@inheritDoc} */ diff --git a/src/test/java/neqsim/thermo/component/NewComponentTest.java b/src/test/java/neqsim/thermo/component/NewComponentTest.java index 6da9c2e5bc..9341977b5b 100644 --- a/src/test/java/neqsim/thermo/component/NewComponentTest.java +++ b/src/test/java/neqsim/thermo/component/NewComponentTest.java @@ -25,7 +25,7 @@ public void createComponentTest() { p.addComponent("", 0, 0, 0); }); Assertions.assertEquals( - "neqsim.util.exception.InvalidInputException: ComponentSrk:createComponent - Input component_name can not be empty", + "neqsim.util.exception.InvalidInputException: ComponentSrk:createComponent - Input name can not be empty", thrown.getMessage()); RuntimeException thrown_2 = Assertions.assertThrows(RuntimeException.class, () -> {