From 8ceb4a19de4992924509b9c04f198d3e166cfc06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85smund=20V=C3=A5ge=20Fannemel?= <34712686+asmfstatoil@users.noreply.github.com> Date: Thu, 29 Feb 2024 13:09:31 +0100 Subject: [PATCH 1/4] docfix --- .../neqsim/thermo/component/ComponentBWRS.java | 8 ++++---- .../neqsim/thermo/component/ComponentCSPsrk.java | 8 ++++---- .../thermo/component/ComponentDesmukhMather.java | 8 ++++---- .../component/ComponentElectrolyteCPA.java | 8 ++++---- .../component/ComponentElectrolyteCPAOld.java | 12 ++++++------ .../ComponentElectrolyteCPAstatoil.java | 8 ++++---- .../neqsim/thermo/component/ComponentEos.java | 8 ++++---- .../neqsim/thermo/component/ComponentGE.java | 8 ++++---- .../component/ComponentGENRTLmodifiedHV.java | 8 ++++---- .../component/ComponentGENRTLmodifiedWS.java | 8 ++++---- .../thermo/component/ComponentGERG2004.java | 8 ++++---- .../thermo/component/ComponentGEUnifac.java | 8 ++++---- .../thermo/component/ComponentGEUnifacPSRK.java | 8 ++++---- .../component/ComponentGEUnifacUMRPRU.java | 8 ++++---- .../thermo/component/ComponentGEUniquac.java | 8 ++++---- .../component/ComponentGEUniquacmodifiedHV.java | 8 ++++---- .../thermo/component/ComponentGEWilson.java | 8 ++++---- .../thermo/component/ComponentGeDuanSun.java | 8 ++++---- .../neqsim/thermo/component/ComponentGeNRTL.java | 8 ++++---- .../thermo/component/ComponentHydrate.java | 8 ++++---- .../component/ComponentHydrateBallard.java | 8 ++++---- .../thermo/component/ComponentHydrateGF.java | 8 ++++---- .../thermo/component/ComponentHydrateKluda.java | 8 ++++---- .../thermo/component/ComponentHydratePVTsim.java | 8 ++++---- .../component/ComponentHydrateStatoil.java | 8 ++++---- .../thermo/component/ComponentKentEisenberg.java | 8 ++++---- .../ComponentModifiedFurstElectrolyteEos.java | 8 ++++---- ...ponentModifiedFurstElectrolyteEosMod2004.java | 8 ++++---- .../neqsim/thermo/component/ComponentPCSAFT.java | 8 ++++---- .../thermo/component/ComponentPCSAFTa.java | 8 ++++---- .../neqsim/thermo/component/ComponentPR.java | 8 ++++---- .../thermo/component/ComponentPRvolcor.java | 8 ++++---- .../neqsim/thermo/component/ComponentPrCPA.java | 8 ++++---- .../neqsim/thermo/component/ComponentRK.java | 8 ++++---- .../neqsim/thermo/component/ComponentSolid.java | 8 ++++---- .../neqsim/thermo/component/ComponentSrk.java | 8 ++++---- .../neqsim/thermo/component/ComponentSrkCPA.java | 8 ++++---- .../thermo/component/ComponentSrkCPAs.java | 8 ++++---- .../thermo/component/ComponentSrkPeneloux.java | 8 ++++---- .../neqsim/thermo/component/ComponentTST.java | 8 ++++---- .../neqsim/thermo/component/ComponentUMRCPA.java | 8 ++++---- .../neqsim/thermo/component/ComponentWax.java | 8 ++++---- .../thermo/component/ComponentWaxWilson.java | 8 ++++---- .../neqsim/thermo/component/ComponentWonWax.java | 8 ++++---- .../java/neqsim/thermo/phase/PhaseInterface.java | 16 ++++++++-------- .../java/neqsim/thermo/system/SystemThermo.java | 2 +- 46 files changed, 187 insertions(+), 187 deletions(-) diff --git a/src/main/java/neqsim/thermo/component/ComponentBWRS.java b/src/main/java/neqsim/thermo/component/ComponentBWRS.java index 9fdad2e6f0..6ebbef7b0e 100644 --- a/src/main/java/neqsim/thermo/component/ComponentBWRS.java +++ b/src/main/java/neqsim/thermo/component/ComponentBWRS.java @@ -39,10 +39,10 @@ public class ComponentBWRS extends ComponentSrk { * Constructor for ComponentBWRS. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentBWRS(String component_name, double moles, double molesInPhase, int compnumber) { super(component_name, moles, molesInPhase, compnumber); diff --git a/src/main/java/neqsim/thermo/component/ComponentCSPsrk.java b/src/main/java/neqsim/thermo/component/ComponentCSPsrk.java index 5357147a31..43016c338b 100644 --- a/src/main/java/neqsim/thermo/component/ComponentCSPsrk.java +++ b/src/main/java/neqsim/thermo/component/ComponentCSPsrk.java @@ -23,10 +23,10 @@ public class ComponentCSPsrk extends ComponentSrk { * Constructor for ComponentCSPsrk. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentCSPsrk(String component_name, double moles, double molesInPhase, int compnumber) { super(component_name, moles, molesInPhase, compnumber); diff --git a/src/main/java/neqsim/thermo/component/ComponentDesmukhMather.java b/src/main/java/neqsim/thermo/component/ComponentDesmukhMather.java index c815ad8c6f..5fd57b4864 100644 --- a/src/main/java/neqsim/thermo/component/ComponentDesmukhMather.java +++ b/src/main/java/neqsim/thermo/component/ComponentDesmukhMather.java @@ -25,10 +25,10 @@ public class ComponentDesmukhMather extends ComponentGE { * Constructor for ComponentDesmukhMather. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentDesmukhMather(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPA.java b/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPA.java index 854369e730..7064f8bbd2 100644 --- a/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPA.java +++ b/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPA.java @@ -28,10 +28,10 @@ public class ComponentElectrolyteCPA extends ComponentModifiedFurstElectrolyteEo * Constructor for ComponentElectrolyteCPA. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentElectrolyteCPA(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPAOld.java b/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPAOld.java index 5890ab468c..9a17a5245d 100644 --- a/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPAOld.java +++ b/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPAOld.java @@ -31,10 +31,10 @@ public class ComponentElectrolyteCPAOld extends ComponentModifiedFurstElectrolyt * Constructor for ComponentElectrolyteCPAOld. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentElectrolyteCPAOld(String component_name, double moles, double molesInPhase, int compnumber) { @@ -271,8 +271,8 @@ public double calc_lngidV(PhaseInterface phase) { return 2.0 * getBi() * (10.0) / ((8.0 * phase.getTotalVolume() - phase.getB()) * (4.0 * phase.getTotalVolume() - phase.getB())) - - 2.0 * getBi() * (10.0 * phase.getTotalVolume() - phase.getB()) * (32 - * Math.pow(phase.getTotalVolume(), 2.0) + - 2.0 * getBi() * (10.0 * phase.getTotalVolume() - phase.getB()) + * (32 * Math.pow(phase.getTotalVolume(), 2.0) - 12.0 * phase.getTotalVolume() * phase.getB() + Math.pow(phase.getB(), 2.0)) / Math.pow(((8.0 * phase.getTotalVolume() - phase.getB()) * (4.0 * phase.getTotalVolume() - phase.getB())), 2.0); diff --git a/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPAstatoil.java b/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPAstatoil.java index 544c616836..56217c725f 100644 --- a/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPAstatoil.java +++ b/src/main/java/neqsim/thermo/component/ComponentElectrolyteCPAstatoil.java @@ -18,10 +18,10 @@ public class ComponentElectrolyteCPAstatoil extends ComponentElectrolyteCPA { * Constructor for ComponentElectrolyteCPAstatoil. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentElectrolyteCPAstatoil(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentEos.java b/src/main/java/neqsim/thermo/component/ComponentEos.java index f07850d613..f7933d33d2 100644 --- a/src/main/java/neqsim/thermo/component/ComponentEos.java +++ b/src/main/java/neqsim/thermo/component/ComponentEos.java @@ -86,10 +86,10 @@ public abstract class ComponentEos extends Component implements ComponentEosInte * Constructor for ComponentEos. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentEos(String component_name, double moles, double molesInPhase, int compnumber) { super(component_name, moles, molesInPhase, compnumber); diff --git a/src/main/java/neqsim/thermo/component/ComponentGE.java b/src/main/java/neqsim/thermo/component/ComponentGE.java index 1290137ef0..ca716e4f41 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGE.java +++ b/src/main/java/neqsim/thermo/component/ComponentGE.java @@ -32,10 +32,10 @@ public abstract class ComponentGE extends Component implements ComponentGEInterf * Constructor for ComponentGE. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentGE(String component_name, double moles, double molesInPhase, int compnumber) { super(component_name, moles, molesInPhase, compnumber); diff --git a/src/main/java/neqsim/thermo/component/ComponentGENRTLmodifiedHV.java b/src/main/java/neqsim/thermo/component/ComponentGENRTLmodifiedHV.java index 2b23b96ffa..62c4d8df91 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGENRTLmodifiedHV.java +++ b/src/main/java/neqsim/thermo/component/ComponentGENRTLmodifiedHV.java @@ -25,10 +25,10 @@ public class ComponentGENRTLmodifiedHV extends ComponentGeNRTL { * Constructor for ComponentGENRTLmodifiedHV. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentGENRTLmodifiedHV(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentGENRTLmodifiedWS.java b/src/main/java/neqsim/thermo/component/ComponentGENRTLmodifiedWS.java index 05b57b8ea1..1c4fbaee15 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGENRTLmodifiedWS.java +++ b/src/main/java/neqsim/thermo/component/ComponentGENRTLmodifiedWS.java @@ -19,10 +19,10 @@ public class ComponentGENRTLmodifiedWS extends ComponentGeNRTL { * Constructor for ComponentGENRTLmodifiedWS. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentGENRTLmodifiedWS(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentGERG2004.java b/src/main/java/neqsim/thermo/component/ComponentGERG2004.java index 23cb02840d..58059f685f 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGERG2004.java +++ b/src/main/java/neqsim/thermo/component/ComponentGERG2004.java @@ -18,10 +18,10 @@ public class ComponentGERG2004 extends ComponentEos { * Constructor for ComponentGERG2004. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentGERG2004(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentGEUnifac.java b/src/main/java/neqsim/thermo/component/ComponentGEUnifac.java index 370e218fd6..395183088b 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGEUnifac.java +++ b/src/main/java/neqsim/thermo/component/ComponentGEUnifac.java @@ -39,10 +39,10 @@ public class ComponentGEUnifac extends ComponentGEUniquac { * Constructor for ComponentGEUnifac. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentGEUnifac(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentGEUnifacPSRK.java b/src/main/java/neqsim/thermo/component/ComponentGEUnifacPSRK.java index 9feb395127..fa5fa7b12d 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGEUnifacPSRK.java +++ b/src/main/java/neqsim/thermo/component/ComponentGEUnifacPSRK.java @@ -23,10 +23,10 @@ public class ComponentGEUnifacPSRK extends ComponentGEUnifac { * Constructor for ComponentGEUnifacPSRK. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentGEUnifacPSRK(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentGEUnifacUMRPRU.java b/src/main/java/neqsim/thermo/component/ComponentGEUnifacUMRPRU.java index fce52b1440..feedffa3bb 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGEUnifacUMRPRU.java +++ b/src/main/java/neqsim/thermo/component/ComponentGEUnifacUMRPRU.java @@ -39,10 +39,10 @@ public class ComponentGEUnifacUMRPRU extends ComponentGEUnifac { * Constructor for ComponentGEUnifacUMRPRU. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentGEUnifacUMRPRU(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentGEUniquac.java b/src/main/java/neqsim/thermo/component/ComponentGEUniquac.java index fd4d6b764c..f51b91bed3 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGEUniquac.java +++ b/src/main/java/neqsim/thermo/component/ComponentGEUniquac.java @@ -31,10 +31,10 @@ public class ComponentGEUniquac extends ComponentGE { * Constructor for ComponentGEUniquac. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentGEUniquac(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentGEUniquacmodifiedHV.java b/src/main/java/neqsim/thermo/component/ComponentGEUniquacmodifiedHV.java index 3db257d1c9..4a83476fcb 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGEUniquacmodifiedHV.java +++ b/src/main/java/neqsim/thermo/component/ComponentGEUniquacmodifiedHV.java @@ -21,10 +21,10 @@ abstract class ComponentGEUniquacmodifiedHV extends ComponentGEUniquac { * Constructor for ComponentGEUniquacmodifiedHV. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentGEUniquacmodifiedHV(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentGEWilson.java b/src/main/java/neqsim/thermo/component/ComponentGEWilson.java index bfdf9f6249..2a5d0650f6 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGEWilson.java +++ b/src/main/java/neqsim/thermo/component/ComponentGEWilson.java @@ -20,10 +20,10 @@ public class ComponentGEWilson extends ComponentGE { * Constructor for ComponentGEWilson. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentGEWilson(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentGeDuanSun.java b/src/main/java/neqsim/thermo/component/ComponentGeDuanSun.java index b8ca99ad39..43b501af92 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGeDuanSun.java +++ b/src/main/java/neqsim/thermo/component/ComponentGeDuanSun.java @@ -24,10 +24,10 @@ public class ComponentGeDuanSun extends ComponentGE { * Constructor for ComponentGeDuanSun. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentGeDuanSun(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentGeNRTL.java b/src/main/java/neqsim/thermo/component/ComponentGeNRTL.java index e152219511..21b5ed5a49 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGeNRTL.java +++ b/src/main/java/neqsim/thermo/component/ComponentGeNRTL.java @@ -23,10 +23,10 @@ public class ComponentGeNRTL extends ComponentGE { * Constructor for ComponentGeNRTL. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentGeNRTL(String component_name, double moles, double molesInPhase, int compnumber) { super(component_name, moles, molesInPhase, compnumber); diff --git a/src/main/java/neqsim/thermo/component/ComponentHydrate.java b/src/main/java/neqsim/thermo/component/ComponentHydrate.java index 54a81126a8..8c91e09a10 100644 --- a/src/main/java/neqsim/thermo/component/ComponentHydrate.java +++ b/src/main/java/neqsim/thermo/component/ComponentHydrate.java @@ -45,10 +45,10 @@ public class ComponentHydrate extends Component { * Constructor for ComponentHydrate. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentHydrate(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentHydrateBallard.java b/src/main/java/neqsim/thermo/component/ComponentHydrateBallard.java index a8ab115853..a14144bd8e 100644 --- a/src/main/java/neqsim/thermo/component/ComponentHydrateBallard.java +++ b/src/main/java/neqsim/thermo/component/ComponentHydrateBallard.java @@ -22,10 +22,10 @@ public class ComponentHydrateBallard extends ComponentHydrate { * Constructor for ComponentHydrateBallard. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentHydrateBallard(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentHydrateGF.java b/src/main/java/neqsim/thermo/component/ComponentHydrateGF.java index 8d0c559919..1e4083f08f 100644 --- a/src/main/java/neqsim/thermo/component/ComponentHydrateGF.java +++ b/src/main/java/neqsim/thermo/component/ComponentHydrateGF.java @@ -25,10 +25,10 @@ public class ComponentHydrateGF extends ComponentHydrate { * Constructor for ComponentHydrateGF. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentHydrateGF(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentHydrateKluda.java b/src/main/java/neqsim/thermo/component/ComponentHydrateKluda.java index d370eba4e3..36bd03ef19 100644 --- a/src/main/java/neqsim/thermo/component/ComponentHydrateKluda.java +++ b/src/main/java/neqsim/thermo/component/ComponentHydrateKluda.java @@ -33,10 +33,10 @@ public class ComponentHydrateKluda extends Component { * Constructor for ComponentHydrateKluda. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentHydrateKluda(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentHydratePVTsim.java b/src/main/java/neqsim/thermo/component/ComponentHydratePVTsim.java index a400ea64e6..f05de726d5 100644 --- a/src/main/java/neqsim/thermo/component/ComponentHydratePVTsim.java +++ b/src/main/java/neqsim/thermo/component/ComponentHydratePVTsim.java @@ -26,10 +26,10 @@ public class ComponentHydratePVTsim extends ComponentHydrate { * Constructor for ComponentHydratePVTsim. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentHydratePVTsim(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentHydrateStatoil.java b/src/main/java/neqsim/thermo/component/ComponentHydrateStatoil.java index d07fa2f956..f6f0de726c 100644 --- a/src/main/java/neqsim/thermo/component/ComponentHydrateStatoil.java +++ b/src/main/java/neqsim/thermo/component/ComponentHydrateStatoil.java @@ -26,10 +26,10 @@ public class ComponentHydrateStatoil extends ComponentHydrate { * Constructor for ComponentHydrateStatoil. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentHydrateStatoil(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentKentEisenberg.java b/src/main/java/neqsim/thermo/component/ComponentKentEisenberg.java index 1822885f22..627c598109 100644 --- a/src/main/java/neqsim/thermo/component/ComponentKentEisenberg.java +++ b/src/main/java/neqsim/thermo/component/ComponentKentEisenberg.java @@ -18,10 +18,10 @@ public class ComponentKentEisenberg extends ComponentGeNRTL { * Constructor for ComponentKentEisenberg. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentKentEisenberg(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentModifiedFurstElectrolyteEos.java b/src/main/java/neqsim/thermo/component/ComponentModifiedFurstElectrolyteEos.java index 0030192074..50cf5dc268 100644 --- a/src/main/java/neqsim/thermo/component/ComponentModifiedFurstElectrolyteEos.java +++ b/src/main/java/neqsim/thermo/component/ComponentModifiedFurstElectrolyteEos.java @@ -69,10 +69,10 @@ public class ComponentModifiedFurstElectrolyteEos extends ComponentSrk { * Constructor for ComponentModifiedFurstElectrolyteEos. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentModifiedFurstElectrolyteEos(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentModifiedFurstElectrolyteEosMod2004.java b/src/main/java/neqsim/thermo/component/ComponentModifiedFurstElectrolyteEosMod2004.java index b867e4ab02..a81ed05b28 100644 --- a/src/main/java/neqsim/thermo/component/ComponentModifiedFurstElectrolyteEosMod2004.java +++ b/src/main/java/neqsim/thermo/component/ComponentModifiedFurstElectrolyteEosMod2004.java @@ -69,10 +69,10 @@ public class ComponentModifiedFurstElectrolyteEosMod2004 extends ComponentSrk { * Constructor for ComponentModifiedFurstElectrolyteEosMod2004. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentModifiedFurstElectrolyteEosMod2004(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentPCSAFT.java b/src/main/java/neqsim/thermo/component/ComponentPCSAFT.java index f968a6e1ee..1e70de9022 100644 --- a/src/main/java/neqsim/thermo/component/ComponentPCSAFT.java +++ b/src/main/java/neqsim/thermo/component/ComponentPCSAFT.java @@ -38,10 +38,10 @@ public class ComponentPCSAFT extends ComponentSrk { * Constructor for ComponentPCSAFT. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentPCSAFT(String component_name, double moles, double molesInPhase, int compnumber) { super(component_name, moles, molesInPhase, compnumber); diff --git a/src/main/java/neqsim/thermo/component/ComponentPCSAFTa.java b/src/main/java/neqsim/thermo/component/ComponentPCSAFTa.java index 70317e4cc4..d8a3a905e4 100644 --- a/src/main/java/neqsim/thermo/component/ComponentPCSAFTa.java +++ b/src/main/java/neqsim/thermo/component/ComponentPCSAFTa.java @@ -26,10 +26,10 @@ public class ComponentPCSAFTa extends ComponentPCSAFT implements ComponentCPAInt * Constructor for ComponentPCSAFTa. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentPCSAFTa(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentPR.java b/src/main/java/neqsim/thermo/component/ComponentPR.java index e59c2f7f17..68e72490c7 100644 --- a/src/main/java/neqsim/thermo/component/ComponentPR.java +++ b/src/main/java/neqsim/thermo/component/ComponentPR.java @@ -18,10 +18,10 @@ public class ComponentPR extends ComponentEos { * Constructor for ComponentPR. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentPR(String component_name, double moles, double molesInPhase, int compnumber) { super(component_name, moles, molesInPhase, compnumber); diff --git a/src/main/java/neqsim/thermo/component/ComponentPRvolcor.java b/src/main/java/neqsim/thermo/component/ComponentPRvolcor.java index 69fe1afce0..7bd36b3cde 100644 --- a/src/main/java/neqsim/thermo/component/ComponentPRvolcor.java +++ b/src/main/java/neqsim/thermo/component/ComponentPRvolcor.java @@ -84,10 +84,10 @@ public double calccTT() { * Constructor for ComponentPRvolcor. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentPRvolcor(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentPrCPA.java b/src/main/java/neqsim/thermo/component/ComponentPrCPA.java index d4f5851575..7fb12c0674 100644 --- a/src/main/java/neqsim/thermo/component/ComponentPrCPA.java +++ b/src/main/java/neqsim/thermo/component/ComponentPrCPA.java @@ -18,10 +18,10 @@ abstract class ComponentPrCPA extends ComponentPR implements ComponentCPAInterfa * Constructor for ComponentPrCPA. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentPrCPA(String component_name, double moles, double molesInPhase, int compnumber) { super(component_name, moles, molesInPhase, compnumber); diff --git a/src/main/java/neqsim/thermo/component/ComponentRK.java b/src/main/java/neqsim/thermo/component/ComponentRK.java index 3e29d03359..d9f740ebd1 100644 --- a/src/main/java/neqsim/thermo/component/ComponentRK.java +++ b/src/main/java/neqsim/thermo/component/ComponentRK.java @@ -18,10 +18,10 @@ public class ComponentRK extends ComponentEos { * Constructor for ComponentRK. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentRK(String component_name, double moles, double molesInPhase, int compnumber) { super(component_name, moles, molesInPhase, compnumber); diff --git a/src/main/java/neqsim/thermo/component/ComponentSolid.java b/src/main/java/neqsim/thermo/component/ComponentSolid.java index b8d27c4a4e..e32b817ff7 100644 --- a/src/main/java/neqsim/thermo/component/ComponentSolid.java +++ b/src/main/java/neqsim/thermo/component/ComponentSolid.java @@ -36,10 +36,10 @@ public class ComponentSolid extends ComponentSrk { * Constructor for ComponentSolid. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentSolid(String component_name, double moles, double molesInPhase, int compnumber) { super(component_name, moles, molesInPhase, compnumber); diff --git a/src/main/java/neqsim/thermo/component/ComponentSrk.java b/src/main/java/neqsim/thermo/component/ComponentSrk.java index 873e8a2e14..e22bc710a0 100644 --- a/src/main/java/neqsim/thermo/component/ComponentSrk.java +++ b/src/main/java/neqsim/thermo/component/ComponentSrk.java @@ -21,10 +21,10 @@ public class ComponentSrk extends ComponentEos { * Constructor for ComponentSrk. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentSrk(String component_name, double moles, double molesInPhase, int compnumber) { super(component_name, moles, molesInPhase, compnumber); diff --git a/src/main/java/neqsim/thermo/component/ComponentSrkCPA.java b/src/main/java/neqsim/thermo/component/ComponentSrkCPA.java index d0c44522dd..62b9fc642f 100644 --- a/src/main/java/neqsim/thermo/component/ComponentSrkCPA.java +++ b/src/main/java/neqsim/thermo/component/ComponentSrkCPA.java @@ -28,10 +28,10 @@ public class ComponentSrkCPA extends ComponentSrk implements ComponentCPAInterfa * Constructor for ComponentSrkCPA. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentSrkCPA(String component_name, double moles, double molesInPhase, int compnumber) { super(component_name, moles, molesInPhase, compnumber); diff --git a/src/main/java/neqsim/thermo/component/ComponentSrkCPAs.java b/src/main/java/neqsim/thermo/component/ComponentSrkCPAs.java index 88283a02a6..7b42205523 100644 --- a/src/main/java/neqsim/thermo/component/ComponentSrkCPAs.java +++ b/src/main/java/neqsim/thermo/component/ComponentSrkCPAs.java @@ -18,10 +18,10 @@ public class ComponentSrkCPAs extends ComponentSrkCPA { * Constructor for ComponentSrkCPAs. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentSrkCPAs(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentSrkPeneloux.java b/src/main/java/neqsim/thermo/component/ComponentSrkPeneloux.java index c9c98f54f6..53af0d495f 100644 --- a/src/main/java/neqsim/thermo/component/ComponentSrkPeneloux.java +++ b/src/main/java/neqsim/thermo/component/ComponentSrkPeneloux.java @@ -20,10 +20,10 @@ public class ComponentSrkPeneloux extends ComponentSrk { * Constructor for ComponentSrkPeneloux. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentSrkPeneloux(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentTST.java b/src/main/java/neqsim/thermo/component/ComponentTST.java index 77d5466385..e6e91fc5de 100644 --- a/src/main/java/neqsim/thermo/component/ComponentTST.java +++ b/src/main/java/neqsim/thermo/component/ComponentTST.java @@ -18,10 +18,10 @@ public class ComponentTST extends ComponentEos { * Constructor for ComponentTST. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentTST(String component_name, double moles, double molesInPhase, int compnumber) { super(component_name, moles, molesInPhase, compnumber); diff --git a/src/main/java/neqsim/thermo/component/ComponentUMRCPA.java b/src/main/java/neqsim/thermo/component/ComponentUMRCPA.java index 05c9b9e196..f1d656d8a1 100644 --- a/src/main/java/neqsim/thermo/component/ComponentUMRCPA.java +++ b/src/main/java/neqsim/thermo/component/ComponentUMRCPA.java @@ -28,10 +28,10 @@ public class ComponentUMRCPA extends ComponentPR implements ComponentCPAInterfac * Constructor for ComponentSrkCPA. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentUMRCPA(String component_name, double moles, double molesInPhase, int compnumber) { super(component_name, moles, molesInPhase, compnumber); diff --git a/src/main/java/neqsim/thermo/component/ComponentWax.java b/src/main/java/neqsim/thermo/component/ComponentWax.java index a6f7308d5e..856cea95b8 100644 --- a/src/main/java/neqsim/thermo/component/ComponentWax.java +++ b/src/main/java/neqsim/thermo/component/ComponentWax.java @@ -25,10 +25,10 @@ public class ComponentWax extends ComponentSolid { * Constructor for ComponentWax. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentWax(String component_name, double moles, double molesInPhase, int compnumber) { super(component_name, moles, molesInPhase, compnumber); diff --git a/src/main/java/neqsim/thermo/component/ComponentWaxWilson.java b/src/main/java/neqsim/thermo/component/ComponentWaxWilson.java index fc8daf3448..e197c37f4a 100644 --- a/src/main/java/neqsim/thermo/component/ComponentWaxWilson.java +++ b/src/main/java/neqsim/thermo/component/ComponentWaxWilson.java @@ -20,10 +20,10 @@ public class ComponentWaxWilson extends ComponentSolid { * Constructor for ComponentWaxWilson. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentWaxWilson(String component_name, double moles, double molesInPhase, int compnumber) { diff --git a/src/main/java/neqsim/thermo/component/ComponentWonWax.java b/src/main/java/neqsim/thermo/component/ComponentWonWax.java index 7f5a8509da..adcea3df33 100644 --- a/src/main/java/neqsim/thermo/component/ComponentWonWax.java +++ b/src/main/java/neqsim/thermo/component/ComponentWonWax.java @@ -22,10 +22,10 @@ public class ComponentWonWax extends ComponentSolid { * Constructor for ComponentWonWax. *

* - * @param component_name a {@link java.lang.String} object - * @param moles a double - * @param molesInPhase a double - * @param compnumber a int + * @param component_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 ComponentWonWax(String component_name, double moles, double molesInPhase, int compnumber) { super(component_name, moles, molesInPhase, compnumber); diff --git a/src/main/java/neqsim/thermo/phase/PhaseInterface.java b/src/main/java/neqsim/thermo/phase/PhaseInterface.java index ab9f3e1da9..28ba1132b5 100644 --- a/src/main/java/neqsim/thermo/phase/PhaseInterface.java +++ b/src/main/java/neqsim/thermo/phase/PhaseInterface.java @@ -24,10 +24,10 @@ public interface PhaseInterface extends ThermodynamicConstantsInterface, Cloneab * addcomponent. *

* - * @param name Name of component. - * @param moles a double - * @param molesInPhase a double - * @param compNumber a int + * @param component_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 addComponent(String name, double moles, double molesInPhase, int compNumber); @@ -421,10 +421,10 @@ public void init(double totalNumberOfMoles, int numberOfComponents, int initType * removeComponent. *

* - * @param name a {@link String} object - * @param moles a double - * @param molesInPhase a double - * @param compNumber a int + * @param component_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); diff --git a/src/main/java/neqsim/thermo/system/SystemThermo.java b/src/main/java/neqsim/thermo/system/SystemThermo.java index 29abf6060b..bfb549636c 100644 --- a/src/main/java/neqsim/thermo/system/SystemThermo.java +++ b/src/main/java/neqsim/thermo/system/SystemThermo.java @@ -3168,7 +3168,7 @@ public double getCorrectedVolume() { } /** - * getPdVtn. TODO: document + * getPdVtn. * * @return dpdv */ From f9709ef0215fe75cbec18118e891b1726ec0d2ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85smund=20V=C3=A5ge=20Fannemel?= <34712686+asmfstatoil@users.noreply.github.com> Date: Fri, 1 Mar 2024 21:24:12 +0100 Subject: [PATCH 2/4] refact: reorder methods --- .../thermo/component/ComponentGeDuanSun.java | 51 ++++++++++--------- .../thermo/component/ComponentHydrate.java | 18 +++---- 2 files changed, 35 insertions(+), 34 deletions(-) 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. *

* - * @param dHfHydrate a double - * @param i a int + * @return an array of {@link double} objects */ - public void setDHfHydrate(double dHfHydrate, int i) { - this.dHfHydrate[i] = dHfHydrate; + public double[] getDHfHydrate() { + return dHfHydrate; } /** *

- * Getter for the field dHfHydrate. + * Setter for the field dHfHydrate. *

* - * @return an array of {@link double} objects + * @param dHfHydrate a double + * @param i a int */ - public double[] getDHfHydrate() { - return dHfHydrate; + public void setDHfHydrate(double dHfHydrate, int i) { + this.dHfHydrate[i] = dHfHydrate; } /** From 2431beb7e3503d98b9a26eafb3d7103e1dc4cfa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85smund=20V=C3=A5ge=20Fannemel?= <34712686+asmfstatoil@users.noreply.github.com> Date: Fri, 1 Mar 2024 21:37:21 +0100 Subject: [PATCH 3/4] revert --- .../java/neqsim/thermo/component/ComponentUMRCPA.java | 9 +-------- src/main/java/neqsim/thermo/phase/PhaseInterface.java | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/src/main/java/neqsim/thermo/component/ComponentUMRCPA.java b/src/main/java/neqsim/thermo/component/ComponentUMRCPA.java index 4d0cb2d1a3..4b34d043bf 100644 --- a/src/main/java/neqsim/thermo/component/ComponentUMRCPA.java +++ b/src/main/java/neqsim/thermo/component/ComponentUMRCPA.java @@ -28,17 +28,10 @@ public class ComponentUMRCPA extends ComponentPR implements ComponentCPAInterfac * Constructor for ComponentSrkCPA. *

* - * <<<<<<< HEAD - * - * @param component_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 name Name of component. * @param moles Total number of moles of component. * @param molesInPhase Number of moles in phase. - * @param compIndex Index number of component in phase object component array. >>>>>>> - * upstream/master + * @param compIndex Index number of component in phase object component array. */ public ComponentUMRCPA(String name, double moles, double molesInPhase, int compIndex) { super(name, moles, molesInPhase, compIndex); diff --git a/src/main/java/neqsim/thermo/phase/PhaseInterface.java b/src/main/java/neqsim/thermo/phase/PhaseInterface.java index d099f4c85e..42e1505986 100644 --- a/src/main/java/neqsim/thermo/phase/PhaseInterface.java +++ b/src/main/java/neqsim/thermo/phase/PhaseInterface.java @@ -24,17 +24,10 @@ public interface PhaseInterface extends ThermodynamicConstantsInterface, Cloneab * addcomponent. *

* - * <<<<<<< HEAD - * - * @param component_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 name Name of component. * @param moles Total number of moles of component. * @param molesInPhase Number of moles in phase. - * @param compIndex Index number of component in phase object component array. >>>>>>> - * upstream/master + * @param compIndex Index number of component in phase object component array. */ public void addComponent(String name, double moles, double molesInPhase, int compIndex); From 9300ce951272cd06e5e194fc9df2e34137e72819 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85smund=20V=C3=A5ge=20Fannemel?= <34712686+asmfstatoil@users.noreply.github.com> Date: Fri, 1 Mar 2024 21:39:39 +0100 Subject: [PATCH 4/4] feat: simplify removeComponent --- src/main/java/neqsim/thermo/phase/Phase.java | 2 +- src/main/java/neqsim/thermo/phase/PhaseInterface.java | 5 ++--- src/main/java/neqsim/thermo/system/SystemThermo.java | 4 +--- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/main/java/neqsim/thermo/phase/Phase.java b/src/main/java/neqsim/thermo/phase/Phase.java index 72ec94d81f..0e1ff98418 100644 --- a/src/main/java/neqsim/thermo/phase/Phase.java +++ b/src/main/java/neqsim/thermo/phase/Phase.java @@ -130,7 +130,7 @@ public void addComponent(String name, double moles) { /** {@inheritDoc} */ @Override - public void removeComponent(String name, double moles, double molesInPhase, int compNumber) { + public void removeComponent(String name, double moles, double molesInPhase) { name = ComponentInterface.getComponentNameFromAlias(name); ArrayList temp = new ArrayList(); diff --git a/src/main/java/neqsim/thermo/phase/PhaseInterface.java b/src/main/java/neqsim/thermo/phase/PhaseInterface.java index 42e1505986..3e40766c0b 100644 --- a/src/main/java/neqsim/thermo/phase/PhaseInterface.java +++ b/src/main/java/neqsim/thermo/phase/PhaseInterface.java @@ -418,15 +418,14 @@ public void init(double totalNumberOfMoles, int numberOfComponents, int initType /** *

- * 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--; }