diff --git a/src/main/java/neqsim/thermo/characterization/LumpingModel.java b/src/main/java/neqsim/thermo/characterization/LumpingModel.java index 73f6e0d21..6d2cb4644 100644 --- a/src/main/java/neqsim/thermo/characterization/LumpingModel.java +++ b/src/main/java/neqsim/thermo/characterization/LumpingModel.java @@ -50,41 +50,49 @@ public class StandardLumpingModel public StandardLumpingModel() {} + /** {@inheritDoc} */ @Override public void setNumberOfLumpedComponents(int lumpedNumb) { numberOfLumpedComponents = lumpedNumb; } + /** {@inheritDoc} */ @Override public int getNumberOfLumpedComponents() { return numberOfLumpedComponents; } + /** {@inheritDoc} */ @Override public void setNumberOfPseudoComponents(int lumpedNumb) { numberOfPseudocomponents = lumpedNumb; } + /** {@inheritDoc} */ @Override public int getNumberOfPseudoComponents() { return numberOfPseudocomponents; } + /** {@inheritDoc} */ @Override public String getName() { return name; } + /** {@inheritDoc} */ @Override public String getLumpedComponentName(int i) { return lumpedComponentNames[i]; } + /** {@inheritDoc} */ @Override public String[] getLumpedComponentNames() { return lumpedComponentNames; } + /** {@inheritDoc} */ @Override public void generateLumpedComposition(Characterise charac) { numberOfLumpedComponents = numberOfPseudocomponents; @@ -196,6 +204,7 @@ public void generateLumpedComposition(Characterise charac) { } } + /** {@inheritDoc} */ @Override public double getFractionOfHeavyEnd(int i) { if (fractionOfHeavyEnd == null) { @@ -220,6 +229,7 @@ public class PVTLumpingModel extends StandardLumpingModel { public PVTLumpingModel() {} + /** {@inheritDoc} */ @Override public void generateLumpedComposition(Characterise charac) { double weightFrac = 0.0; @@ -311,6 +321,7 @@ public void generateLumpedComposition(Characterise charac) { system.init(0); } + /** {@inheritDoc} */ @Override public double getFractionOfHeavyEnd(int i) { if (fractionOfHeavyEnd == null) { @@ -334,6 +345,7 @@ public class NoLumpingModel extends StandardLumpingModel { public NoLumpingModel() {} + /** {@inheritDoc} */ @Override public void generateLumpedComposition(Characterise charac) { numberOfPseudocomponents = charac.getPlusFractionModel().getLastPlusFractionNumber(); @@ -414,6 +426,7 @@ public void generateLumpedComposition(Characterise charac) { system.init(0); } + /** {@inheritDoc} */ @Override public double getFractionOfHeavyEnd(int i) { if (fractionOfHeavyEnd == null) { diff --git a/src/main/java/neqsim/thermo/characterization/PlusFractionModel.java b/src/main/java/neqsim/thermo/characterization/PlusFractionModel.java index cc4fc0980..4446f7e12 100644 --- a/src/main/java/neqsim/thermo/characterization/PlusFractionModel.java +++ b/src/main/java/neqsim/thermo/characterization/PlusFractionModel.java @@ -101,11 +101,13 @@ public String getName() { return name; } + /** {@inheritDoc} */ @Override public double getMPlus() { return MPlus; } + /** {@inheritDoc} */ @Override public double getZPlus() { return zPlus; @@ -119,36 +121,43 @@ public double getMaxPlusMolarMass() { return maxPlusMolarMass; } + /** {@inheritDoc} */ @Override public double getNumberOfPlusPseudocomponents() { return numberOfPlusPseudocomponents; } + /** {@inheritDoc} */ @Override public double[] getZ() { return z; } + /** {@inheritDoc} */ @Override public double[] getM() { return M; } + /** {@inheritDoc} */ @Override public double[] getDens() { return dens; } + /** {@inheritDoc} */ @Override public double getDensPlus() { return densPlus; } + /** {@inheritDoc} */ @Override public int getFirstPlusFractionNumber() { return firstPlusFractionNumber; } + /** {@inheritDoc} */ @Override public int getFirstTBPFractionNumber() { int firstTBPNumber = 0; @@ -174,16 +183,19 @@ public int getFirstTBPFractionNumber() { return firstTBPNumber; } + /** {@inheritDoc} */ @Override public int getPlusComponentNumber() { return plusComponentNumber; } + /** {@inheritDoc} */ @Override public int getLastPlusFractionNumber() { return lastPlusFractionNumber; } + /** {@inheritDoc} */ @Override public boolean hasPlusFraction() { for (int i = 0; i < system.getPhase(0).getNumberOfComponents(); i++) { @@ -198,6 +210,7 @@ public boolean hasPlusFraction() { return false; } + /** {@inheritDoc} */ @Override public boolean characterizePlusFraction(TBPModelInterface TBPModel) { system.init(0); @@ -242,11 +255,13 @@ public boolean characterizePlusFraction(TBPModelInterface TBPModel) { return true; } + /** {@inheritDoc} */ @Override public double[] getCoefs() { return this.coefs; } + /** {@inheritDoc} */ @Override public double getCoef(int i) { return this.coefs[i]; @@ -298,6 +313,7 @@ public void setCoefs(double coef, int i) { this.coefs[i] = coef; } + /** {@inheritDoc} */ @Override public void setLastPlusFractionNumber(int fract) { lastPlusFractionNumber = fract + 1; @@ -392,6 +408,7 @@ public void densityUOP() { } } + /** {@inheritDoc} */ @Override public boolean characterizePlusFraction(TBPModelInterface TBPModel) { system.init(0); @@ -451,11 +468,13 @@ public double[] getGammaParameters() { return new double[] {this.alfa, this.eta}; } + /** {@inheritDoc} */ @Override public double[] getCoefs() { return new double[] {alfa, eta}; } + /** {@inheritDoc} */ @Override public double getCoef(int i) { if (i == 0) @@ -465,16 +484,19 @@ public double getCoef(int i) { return 0; } + /** {@inheritDoc} */ @Override public double[] getZ() { return zValues; } + /** {@inheritDoc} */ @Override public double[] getM() { return molarMasses; } + /** {@inheritDoc} */ @Override public double[] getDens() { return densities; diff --git a/src/main/java/neqsim/thermo/characterization/TBPfractionModel.java b/src/main/java/neqsim/thermo/characterization/TBPfractionModel.java index 3d533969b..d1a93df2c 100644 --- a/src/main/java/neqsim/thermo/characterization/TBPfractionModel.java +++ b/src/main/java/neqsim/thermo/characterization/TBPfractionModel.java @@ -37,22 +37,26 @@ public abstract class TBPBaseModel implements TBPModelInterface, Cloneable, java protected boolean calcm = true; + /** {@inheritDoc} */ @Override public String getName() { return name; } + /** {@inheritDoc} */ @Override public double calcTB(double molarMass, double density) { return Math.pow((molarMass / 5.805e-5 * Math.pow(density, 0.9371)), 1.0 / 2.3776); } + /** {@inheritDoc} */ @Override public double calcWatsonCharacterizationFactor(double molarMass, double density) { // System.out.println("boiling point " + calcTB(molarMass, density)); return Math.pow(1.8 * calcTB(molarMass, density), 1.0 / 3.0) / density; } + /** {@inheritDoc} */ @Override public double calcAcentricFactorKeslerLee(double molarMass, double density) { double TC = calcTC(molarMass, density); @@ -71,6 +75,7 @@ public double calcAcentricFactorKeslerLee(double molarMass, double density) { } } + /** {@inheritDoc} */ @Override public double calcAcentricFactor(double molarMass, double density) { double TC = calcTC(molarMass, density); @@ -80,6 +85,7 @@ public double calcAcentricFactor(double molarMass, double density) { / (TC / TB - 1.0) - 1.0; } + /** {@inheritDoc} */ @Override public double calcCriticalVolume(double molarMass, double density) { double TC = calcTC(molarMass, density); @@ -94,11 +100,13 @@ public double calcCriticalVolume(double molarMass, double density) { return criticaVol; } + /** {@inheritDoc} */ @Override public double calcParachorParameter(double molarMass, double density) { return 59.3 + 2.34 * molarMass * 1000.0; } + /** {@inheritDoc} */ @Override public double calcCriticalViscosity(double molarMass, double density) { double TC = calcTC(molarMass, density); @@ -107,17 +115,20 @@ public double calcCriticalViscosity(double molarMass, double density) { * 1e-7; } + /** {@inheritDoc} */ @Override public double calcRacketZ(SystemInterface thermoSystem, double molarMass, double density) { throw new RuntimeException( new neqsim.util.exception.NotImplementedException(this, "calcRacketZ")); } + /** {@inheritDoc} */ @Override public double calcm(double molarMass, double density) { throw new RuntimeException(new neqsim.util.exception.NotImplementedException(this, "calcm")); } + /** {@inheritDoc} */ @Override public boolean isCalcm() { return calcm; @@ -139,6 +150,7 @@ public class PedersenTBPModelSRK extends TBPBaseModel { double[] TPBracketcoefs = {0.29441, 0.40768}; double[][] TBPfractionCoefs = null; + /** {@inheritDoc} */ @Override public double calcTC(double molarMass, double density) { // System.out.println("TC ccc " + TBPfractionCoefs[0][0]); @@ -152,6 +164,7 @@ public double calcTC(double molarMass, double density) { + TBPfractionCoefs[0][2] * molarMass + TBPfractionCoefs[0][3] / molarMass; } + /** {@inheritDoc} */ @Override public double calcPC(double molarMass, double density) { if (molarMass < 1120) { @@ -165,6 +178,7 @@ public double calcPC(double molarMass, double density) { + TBPfractionCoefs[1][2] / molarMass + TBPfractionCoefs[1][3] / Math.pow(molarMass, 2.0)); } + /** {@inheritDoc} */ @Override public double calcm(double molarMass, double density) { if (molarMass < 1120) { @@ -176,6 +190,7 @@ public double calcm(double molarMass, double density) { + TBPfractionCoefs[2][2] * density + TBPfractionCoefs[2][3] * Math.pow(molarMass, 2.0); } + /** {@inheritDoc} */ @Override public double calcTB(double molarMass, double density) { if (molarMass < 540) { @@ -186,6 +201,7 @@ public double calcTB(double molarMass, double density) { } } + /** {@inheritDoc} */ @Override public double calcRacketZ(SystemInterface thermoSystem, double molarMass, double density) { double penelouxC = (thermoSystem.getPhase(0).getMolarVolume() - molarMass / (density * 10.0)); @@ -256,6 +272,7 @@ public RiaziDaubert() { calcm = false; } + /** {@inheritDoc} */ @Override public double calcTC(double molarMass, double density) { // molarMass=molarMass*1e3; @@ -268,6 +285,7 @@ public double calcTC(double molarMass, double density) { // Math.pow(sig2, c); } + /** {@inheritDoc} */ @Override public double calcPC(double molarMass, double density) { if (molarMass > 300) { @@ -288,6 +306,7 @@ public double calcAcentricFactor2(double molarMass, double density) { / (TC / TB - 1.0) - 1.0; } + /** {@inheritDoc} */ @Override public double calcTB(double molarMass, double density) { // Soreide method (Whitson book) @@ -296,6 +315,7 @@ public double calcTB(double molarMass, double density) { * Math.exp(-4.922e-3 * molarMass - 4.7685 * density + 3.462e-3 * molarMass * density)); // 97.58*Math.pow(molarMass,0.3323)*Math.pow(density,0.04609); } + /** {@inheritDoc} */ @Override public double calcAcentricFactor(double molarMass, double density) { double TC = calcTC(molarMass, density); @@ -326,6 +346,7 @@ public LeeKesler() { calcm = false; } + /** {@inheritDoc} */ @Override public double calcTC(double molarMass, double density) { double sg = density; @@ -335,6 +356,7 @@ public double calcTC(double molarMass, double density) { return TC; } + /** {@inheritDoc} */ @Override public double calcPC(double molarMass, double density) { double sg = density; @@ -347,6 +369,7 @@ public double calcPC(double molarMass, double density) { return PC; } + /** {@inheritDoc} */ @Override public double calcAcentricFactor(double molarMass, double density) { return super.calcAcentricFactorKeslerLee(molarMass, density); @@ -364,6 +387,7 @@ public TwuModel() { calcm = false; } + /** {@inheritDoc} */ @Override public double calcTC(double molarMass, double density) { double sg = density; @@ -417,6 +441,7 @@ public double solveMW(double TB) { return MW_alkane; } + /** {@inheritDoc} */ @Override public double calcPC(double molarMass, double density) { double sg = density; @@ -447,6 +472,7 @@ public double calcPC(double molarMass, double density) { return PC * 10.0; // * 10 due to conversion MPa to bar } + /** {@inheritDoc} */ @Override public double calcCriticalVolume(double molarMass, double density) { double sg = density; diff --git a/src/main/java/neqsim/thermo/characterization/WaxCharacterise.java b/src/main/java/neqsim/thermo/characterization/WaxCharacterise.java index 744b87844..acf55c266 100644 --- a/src/main/java/neqsim/thermo/characterization/WaxCharacterise.java +++ b/src/main/java/neqsim/thermo/characterization/WaxCharacterise.java @@ -54,6 +54,7 @@ public abstract class WaxBaseModel implements WaxModelInterface { double[] parameterWaxHeatOfFusion = new double[1]; double[] parameterWaxTriplePointTemperature = new double[1]; + /** {@inheritDoc} */ @Override public WaxBaseModel clone() { WaxBaseModel clonedSystem = null; @@ -65,29 +66,35 @@ public WaxBaseModel clone() { return clonedSystem; } + /** {@inheritDoc} */ @Override public void addTBPWax() {} + /** {@inheritDoc} */ @Override public void setWaxParameters(double[] parameters) { parameterWax = parameters; } + /** {@inheritDoc} */ @Override public void setWaxParameter(int i, double parameters) { parameterWax[i] = parameters; } + /** {@inheritDoc} */ @Override public void setParameterWaxHeatOfFusion(int i, double parameters) { parameterWaxHeatOfFusion[i] = parameters; } + /** {@inheritDoc} */ @Override public void setParameterWaxTriplePointTemperature(int i, double parameters) { parameterWaxTriplePointTemperature[i] = parameters; } + /** {@inheritDoc} */ @Override public double[] getWaxParameters() { return parameterWax; @@ -164,6 +171,7 @@ public double calcPCwax(int componentNumber, String normalComponent) { 3.46); } + /** {@inheritDoc} */ @Override public void addTBPWax() { int numberOfCOmponents = thermoSystem.getPhase(0).getNumberOfComponents(); @@ -239,6 +247,7 @@ public void addTBPWax() { } } + /** {@inheritDoc} */ @Override public void removeWax() { for (int i = 0; i < thermoSystem.getPhase(0).getNumberOfComponents(); i++) { diff --git a/src/main/java/neqsim/thermo/mixingrule/CPAMixingRules.java b/src/main/java/neqsim/thermo/mixingrule/CPAMixingRules.java index 4177e7a5d..6a5e8cdc3 100644 --- a/src/main/java/neqsim/thermo/mixingrule/CPAMixingRules.java +++ b/src/main/java/neqsim/thermo/mixingrule/CPAMixingRules.java @@ -76,56 +76,56 @@ public double calcXi(int siteNumber, int compnumb, PhaseInterface phase, double return 1.0; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcXi(int[][][] assosScheme, int[][][][] assosScheme2, int siteNumber, int compnumb, PhaseInterface phase, double temperature, double pressure, int numbcomp) { return 1.0; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcDelta(int siteNumber1, int siteNumber2, int compnumb1, int compnumb2, PhaseInterface phase, double temperature, double pressure, int numbcomp) { return 1.0; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcDeltaNog(int siteNumber1, int siteNumber2, int compnumb1, int compnumb2, PhaseInterface phase, double temperature, double pressure, int numbcomp) { return 1.0; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcDeltadN(int derivativeComp, int siteNumber1, int siteNumber2, int compnumb1, int compnumb2, PhaseInterface phase, double temperature, double pressure, int numbcomp) { return 1.0; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcDeltadT(int siteNumber1, int siteNumber2, int compnumb1, int compnumb2, PhaseInterface phase, double temperature, double pressure, int numbcomp) { return 1.0; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcDeltadV(int siteNumber1, int siteNumber2, int compnumb1, int compnumb2, PhaseInterface phase, double temperature, double pressure, int numbcomp) { return 1.0; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcDeltadTdT(int siteNumber1, int siteNumber2, int compnumb1, int compnumb2, PhaseInterface phase, double temperature, double pressure, int numbcomp) { return 1.0; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcDeltadTdV(int siteNumber1, int siteNumber2, int compnumb1, int compnumb2, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -137,7 +137,7 @@ public class CPA_Radoch extends CPA_Radoch_base { /** Serialization version UID. */ private static final long serialVersionUID = 1000; - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public String getName() { return mixingRuleName; @@ -171,7 +171,7 @@ public double getCrossAssociationVolume(int compnumb1, int compnumb2, PhaseInter * phase.getComponent(compnumb2).getAssociationVolume()); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcDelta(int siteNumber1, int siteNumber2, int compnumb1, int compnumb2, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -248,7 +248,7 @@ public double calcDelta(int compnumb1, int compnumb2, PhaseInterface phase, doub * ((PhaseCPAInterface) phase).getGcpa(); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcDeltaNog(int siteNumber1, int siteNumber2, int compnumb1, int compnumb2, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -285,7 +285,7 @@ public double calcDeltaNog(int siteNumber1, int siteNumber2, int compnumb1, int * getCrossAssociationVolume(compnumb1, compnumb2, phase, temperature, pressure, numbcomp); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcDeltadN(int derivativeComp, int siteNumber1, int siteNumber2, int compnumb1, int compnumb2, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -295,7 +295,7 @@ public double calcDeltadN(int derivativeComp, int siteNumber1, int siteNumber2, * ((ComponentSrkCPA) phase.getComponent(derivativeComp)).calc_lngi(phase); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcDeltadT(int siteNumber1, int siteNumber2, int compnumb1, int compnumb2, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -358,7 +358,7 @@ public double calcDeltadT(int siteNumber1, int siteNumber2, int compnumb1, int c * ((PhaseCPAInterface) phase).getGcpa(); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcDeltadV(int siteNumber1, int siteNumber2, int compnumb1, int compnumb2, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -368,7 +368,7 @@ public double calcDeltadV(int siteNumber1, int siteNumber2, int compnumb1, int c * ((PhaseCPAInterface) phase).getGcpav(); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcDeltadTdV(int siteNumber1, int siteNumber2, int compnumb1, int compnumb2, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -403,7 +403,7 @@ public double calcDeltadTdV(int siteNumber1, int siteNumber2, int compnumb1, int * ((PhaseCPAInterface) phase).getGcpa() * ((PhaseCPAInterface) phase).getGcpav(); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcDeltadTdT(int siteNumber1, int siteNumber2, int compnumb1, int compnumb2, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -585,7 +585,7 @@ public double getCrossAssociationVolume(int siteNumber1, int siteNumber2, int co * phase.getComponent(compnumb2).getAssociationVolumeSAFT()) * extrwterm; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcDelta(int siteNumber1, int siteNumber2, int compnumb1, int compnumb2, PhaseInterface phase, double temperature, double pressure, int numbcomp) { diff --git a/src/main/java/neqsim/thermo/mixingrule/EosMixingRules.java b/src/main/java/neqsim/thermo/mixingrule/EosMixingRules.java index 136a2d40a..1ea4f0cf7 100644 --- a/src/main/java/neqsim/thermo/mixingrule/EosMixingRules.java +++ b/src/main/java/neqsim/thermo/mixingrule/EosMixingRules.java @@ -112,25 +112,25 @@ public class ClassicVdW implements EosMixingRulesInterface { /** Serialization version UID. */ private static final long serialVersionUID = 1000; - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public String getName() { return mixingRuleName; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public PhaseInterface getGEPhase() { return null; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public void setMixingRuleGEModel(java.lang.String GEmodel) { mixingRuleGEModel = GEmodel; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double getBinaryInteractionParameter(int i, int j) { if (i == j) { @@ -139,7 +139,7 @@ public double getBinaryInteractionParameter(int i, int j) { return intparam[i][j]; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double[][] getBinaryInteractionParameters() { return intparam; @@ -147,7 +147,7 @@ public double[][] getBinaryInteractionParameters() { public void prettyPrintKij() {} - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double getBinaryInteractionParameterT1(int i, int j) { if (i == j) { @@ -192,7 +192,7 @@ public double getbij(ComponentEosInterface compi, ComponentEosInterface compj) { } } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public void setBinaryInteractionParameter(int i, int j, double value) { // System.out.println("intparam: " + intparam[i][j] + " value " + value); @@ -200,14 +200,14 @@ public void setBinaryInteractionParameter(int i, int j, double value) { intparam[j][i] = value; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public void setBinaryInteractionParameterij(int i, int j, double value) { intparamij[i][j] = value; intparamji[j][i] = value; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public void setBinaryInteractionParameterji(int i, int j, double value) { // System.out.println("intparam: " + intparam[i][j] + " value " + value); @@ -215,7 +215,7 @@ public void setBinaryInteractionParameterji(int i, int j, double value) { intparamij[j][i] = value; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public void setBinaryInteractionParameterT1(int i, int j, double value) { // System.out.println("intparam: " + intparam[i][j] + " value " + value); @@ -233,7 +233,7 @@ public void setCalcEOSInteractionParameters(boolean CalcEOSInteractionParameters calcEOSInteractionParameters = CalcEOSInteractionParameters2; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public void setnEOSkij(double n) { nEOSkij = n; @@ -247,7 +247,7 @@ public double getB() { return Btot; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcA(PhaseInterface phase, double temperature, double pressure, int numbcomp) { double aij = 0.0; @@ -265,7 +265,7 @@ public double calcA(PhaseInterface phase, double temperature, double pressure, i return A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcB(PhaseInterface phase, double temperature, double pressure, int numbcomp) { B = 0.0; @@ -282,7 +282,7 @@ public double calcB(PhaseInterface phase, double temperature, double pressure, i return B; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAi(int compNumb, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -298,7 +298,7 @@ public double calcAi(int compNumb, PhaseInterface phase, double temperature, dou return 2.0 * Ai; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcBi(int compNumb, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -332,7 +332,7 @@ public double calcBi2(int compNumb, PhaseInterface phase, double temperature, do return ans1 / (phase.getNumberOfMolesInPhase() * phase.getNumberOfMolesInPhase()); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcBij(int compNumb, int compNumbj, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -344,7 +344,7 @@ public double calcBij(int compNumb, int compNumbj, PhaseInterface phase, double / phase.getNumberOfMolesInPhase(); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAiT(int compNumb, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -362,7 +362,7 @@ public double calcAiT(int compNumb, PhaseInterface phase, double temperature, do return 2.0 * A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAij(int compNumb, int compNumbj, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -374,7 +374,7 @@ public double calcAij(int compNumb, int compNumbj, PhaseInterface phase, double return 2.0 * aij; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAT(PhaseInterface phase, double temperature, double pressure, int numbcomp) { double A = 0.0; @@ -388,7 +388,7 @@ public double calcAT(PhaseInterface phase, double temperature, double pressure, return 0.5 * A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcATT(PhaseInterface phase, double temperature, double pressure, int numbcomp) { double aij = 0; @@ -413,7 +413,7 @@ public double calcATT(PhaseInterface phase, double temperature, double pressure, return A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public ClassicVdW clone() { ClassicVdW clonedSystem = null; @@ -436,7 +436,7 @@ public double getkij(double temp, int i, int j) { return intparam[i][j]; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcA(PhaseInterface phase, double temperature, double pressure, int numbcomp) { double aij = 0; @@ -528,7 +528,7 @@ public double calcAiT(int compNumb, PhaseInterface phase, double temperature, do return 2.0 * A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAij(int compNumb, int compNumbj, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -539,7 +539,7 @@ public double calcAij(int compNumb, int compNumbj, PhaseInterface phase, double return 2.0 * aij; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAT(PhaseInterface phase, double temperature, double pressure, int numbcomp) { double A = 0.0; @@ -554,7 +554,7 @@ public double calcAT(PhaseInterface phase, double temperature, double pressure, return 0.5 * A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcATT(PhaseInterface phase, double temperature, double pressure, int numbcomp) { double aij = 0; @@ -591,7 +591,7 @@ public double calcATT(PhaseInterface phase, double temperature, double pressure, return A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public ClassicSRK clone() { ClassicSRK clonedSystem = null; @@ -610,7 +610,7 @@ public class ClassicSRKT extends ClassicSRK { /** Serialization version UID. */ private static final long serialVersionUID = 1000; - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double getkij(double temperature, int i, int j) { return intparam[i][j] + intparamT[i][j] * (temperature / 273.15 - 1.0); @@ -626,7 +626,7 @@ public double getkijdTdT(double temperature, int i, int j) { return 0.0; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAiT(int compNumb, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -668,7 +668,7 @@ public double calcAiTT(int compNumb, PhaseInterface phase, double temperature, d return 2.0 * A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcATT(PhaseInterface phase, double temperature, double pressure, int numbcomp) { double aij = 0.0; @@ -709,7 +709,7 @@ public double calcATT(PhaseInterface phase, double temperature, double pressure, return A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public ClassicSRKT clone() { ClassicSRKT clonedSystem = null; @@ -819,7 +819,7 @@ public double getkijdndn(int k, int l, PhaseInterface phase, double temperature, return temp; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcA(PhaseInterface phase, double temperature, double pressure, int numbcomp) { double aij = 0; @@ -847,7 +847,7 @@ public double calcA(PhaseInterface phase, double temperature, double pressure, i return A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAi(int compNumb, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -887,7 +887,7 @@ public double calcAi(int compNumb, PhaseInterface phase, double temperature, dou return 2.0 * A1 + A2; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAij(int compNumb, int compNumbj, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -935,7 +935,7 @@ public double calcAij(int compNumb, int compNumbj, PhaseInterface phase, double return A1 + A2 + A4; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAiT(int compNumb, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -988,7 +988,7 @@ public class ClassicSRKT2 extends ClassicSRKT { /** Serialization version UID. */ private static final long serialVersionUID = 1000; - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double getkij(double temperature, int i, int j) { if (intparamTType[i][j] == 0) { @@ -1000,7 +1000,7 @@ public double getkij(double temperature, int i, int j) { } } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double getkijdT(double temperature, int i, int j) { if (intparamTType[i][j] == 0) { @@ -1012,7 +1012,7 @@ public double getkijdT(double temperature, int i, int j) { } } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double getkijdTdT(double temperature, int i, int j) { if (intparamTType[i][j] == 0) { @@ -1024,7 +1024,7 @@ public double getkijdTdT(double temperature, int i, int j) { } } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public ClassicSRKT clone() { ClassicSRKT clonedSystem = null; @@ -1075,7 +1075,7 @@ public SRKHuronVidal(PhaseInterface phase, double[][] HValpha, double[][] HVDij, gePhase.setProperties(phase); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public void setHVDijParameter(int i, int j, double value) { HVDij[i][j] = value; @@ -1084,13 +1084,13 @@ public void setHVDijParameter(int i, int j, double value) { gePhase.setDij(HVDij); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double getHVDijParameter(int i, int j) { return HVDij[i][j]; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public void setHVDijTParameter(int i, int j, double value) { HVDijT[i][j] = value; @@ -1098,13 +1098,13 @@ public void setHVDijTParameter(int i, int j, double value) { gePhase.setDijT(HVDijT); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double getHVDijTParameter(int i, int j) { return HVDijT[i][j]; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public void setHValphaParameter(int i, int j, double value) { HValpha[i][j] = value; @@ -1112,26 +1112,26 @@ public void setHValphaParameter(int i, int j, double value) { gePhase.setAlpha(HValpha); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double getHValphaParameter(int i, int j) { return HValpha[i][j]; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double getKijWongSandler(int i, int j) { return WSintparam[i][j]; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public void setKijWongSandler(int i, int j, double value) { WSintparam[i][j] = value; WSintparam[j][i] = value; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcA(PhaseInterface phase, double temperature, double pressure, int numbcomp) { double A = 0.0; @@ -1151,7 +1151,7 @@ public double calcA(PhaseInterface phase, double temperature, double pressure, i return A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAi(int compNumb, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -1167,7 +1167,7 @@ public double calcAi(int compNumb, PhaseInterface phase, double temperature, dou return A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAiT(int compNumb, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -1191,7 +1191,7 @@ public double calcAiT(int compNumb, PhaseInterface phase, double temperature, do return A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAT(PhaseInterface phase, double temperature, double pressure, int numbcomp) { double A = 0; @@ -1213,7 +1213,7 @@ public double calcAT(PhaseInterface phase, double temperature, double pressure, return A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAij(int compNumb, int compNumbj, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -1448,39 +1448,39 @@ public void init(PhaseInterface phase, double temperature, double pressure, int } } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public PhaseInterface getGEPhase() { return gePhase; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public void setHVDijParameter(int i, int j, double value) { HVDij[i][j] = value; gePhase.setDij(HVDij); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double getHVDijParameter(int i, int j) { return HVDij[i][j]; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public void setHVDijTParameter(int i, int j, double value) { HVDijT[i][j] = value; gePhase.setDijT(HVDijT); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double getHVDijTParameter(int i, int j) { return HVDijT[i][j]; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public void setHValphaParameter(int i, int j, double value) { HValpha[i][j] = value; @@ -1488,26 +1488,26 @@ public void setHValphaParameter(int i, int j, double value) { gePhase.setAlpha(HValpha); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double getHValphaParameter(int i, int j) { return HValpha[i][j]; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double getKijWongSandler(int i, int j) { return WSintparam[i][j]; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public void setKijWongSandler(int i, int j, double value) { WSintparam[i][j] = value; WSintparam[j][i] = value; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcA(PhaseInterface phase, double temperature, double pressure, int numbcomp) { double A = 0.0; @@ -1521,7 +1521,7 @@ public double calcA(PhaseInterface phase, double temperature, double pressure, i return A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAi(int compNumb, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -1540,7 +1540,7 @@ public double calcAi(int compNumb, PhaseInterface phase, double temperature, dou return A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAij(int compNumb, int compNumbj, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -1558,7 +1558,7 @@ public double calcAij(int compNumb, int compNumbj, PhaseInterface phase, double return A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAT(PhaseInterface phase, double temperature, double pressure, int numbcomp) { double A = 0.0; @@ -1571,7 +1571,7 @@ public double calcAT(PhaseInterface phase, double temperature, double pressure, return A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcATT(PhaseInterface phase, double temperature, double pressure, int numbcomp) { double A = 0.0; @@ -1583,7 +1583,7 @@ public double calcATT(PhaseInterface phase, double temperature, double pressure, return A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAiT(int compNumb, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -1680,7 +1680,7 @@ public WongSandlerMixingRule(PhaseInterface phase, double[][] WSalpha, double[][ super(phase, WSalpha, WSDij, WSDijT, mixRule); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public void init(PhaseInterface phase, double temperature, double pressure, int numbcomp) { ComponentEosInterface[] compArray = (ComponentEosInterface[]) phase.getcomponentArray(); @@ -1842,7 +1842,7 @@ public void init(PhaseInterface phase, double temperature, double pressure, int } } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcA(PhaseInterface phase, double temperature, double pressure, int numbcomp) { double A = 0; @@ -1854,7 +1854,7 @@ public double calcA(PhaseInterface phase, double temperature, double pressure, i return A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAi(int compNumb, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -1870,7 +1870,7 @@ public double calcAi(int compNumb, PhaseInterface phase, double temperature, dou return A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAT(PhaseInterface phase, double temperature, double pressure, int numbcomp) { double A = 0; @@ -1885,7 +1885,7 @@ public double calcAT(PhaseInterface phase, double temperature, double pressure, return A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcATT(PhaseInterface phase, double temperature, double pressure, int numbcomp) { double A = 0; @@ -1903,7 +1903,7 @@ public double calcATT(PhaseInterface phase, double temperature, double pressure, return A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAiT(int compNumb, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -1923,7 +1923,7 @@ public double calcAiT(int compNumb, PhaseInterface phase, double temperature, do return A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcAij(int compNumb, int compNumbj, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -1946,7 +1946,7 @@ public double calcAij(int compNumb, int compNumbj, PhaseInterface phase, double return A; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcB(PhaseInterface phase, double temperature, double pressure, int numbcomp) { double B = b_mix * phase.getNumberOfMolesInPhase(); @@ -1954,7 +1954,7 @@ public double calcB(PhaseInterface phase, double temperature, double pressure, i return B; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcBi(int compNumb, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -1977,7 +1977,7 @@ public double calcBiT(int compNumb, PhaseInterface phase, double temperature, do return bit; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcBij(int compNumb, int compNumbj, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -1990,7 +1990,7 @@ public class ElectrolyteMixRule implements ElectrolyteMixingRulesInterface { /** Serialization version UID. */ private static final long serialVersionUID = 1000; - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public String getName() { return mixingRuleName; @@ -2000,7 +2000,7 @@ public ElectrolyteMixRule(PhaseInterface phase) { calcWij(phase); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public void calcWij(PhaseInterface phase) { ComponentEosInterface[] compArray = (ComponentEosInterface[]) phase.getcomponentArray(); @@ -2040,14 +2040,14 @@ public void calcWij(PhaseInterface phase) { } } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcWij(int compNumbi, int compNumj, PhaseInterface phase, double temperature, double pressure, int numbcomp) { return -2.0 * getWij(compNumbi, compNumj, temperature); // iwij[0][compNumbi][compNumj]; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public void setWijParameter(int i, int j, double value) { // System.out.println("intparam: " + value); @@ -2055,53 +2055,53 @@ public void setWijParameter(int i, int j, double value) { wij[0][j][i] = value; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double getWijParameter(int i, int j) { return wij[0][i][j]; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public void setWijT1Parameter(int i, int j, double value) { wij[1][i][j] = value; wij[1][j][i] = value; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double gettWijT1Parameter(int i, int j) { return wij[1][i][j]; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public void setWijT2Parameter(int i, int j, double value) { wij[2][i][j] = value; wij[2][j][i] = value; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double gettWijT2Parameter(int i, int j) { return wij[2][i][j]; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double getWij(int i, int j, double temperature) { return wij[0][i][j] + wij[1][i][j] * (1.0 / temperature - 1.0 / 298.15) + wij[2][i][j] * ((298.15 - temperature) / temperature + Math.log(temperature / 298.15)); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double getWijT(int i, int j, double temperature) { return (-wij[1][i][j] / (temperature * temperature) - wij[2][i][j] * (298.15 - temperature) / (temperature * temperature)); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double getWijTT(int i, int j, double temperature) { return (2.0 * wij[1][i][j] / (temperature * temperature * temperature) @@ -2109,7 +2109,7 @@ public double getWijTT(int i, int j, double temperature) { / (temperature * temperature * temperature)); } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcW(PhaseInterface phase, double temperature, double pressure, int numbcomp) { ComponentEosInterface[] compArray = (ComponentEosInterface[]) phase.getcomponentArray(); @@ -2123,7 +2123,7 @@ public double calcW(PhaseInterface phase, double temperature, double pressure, i return -W; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcWi(int compNumb, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -2136,7 +2136,7 @@ public double calcWi(int compNumb, PhaseInterface phase, double temperature, dou return -2.0 * Wi; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcWiT(int compNumb, PhaseInterface phase, double temperature, double pressure, int numbcomp) { @@ -2148,7 +2148,7 @@ public double calcWiT(int compNumb, PhaseInterface phase, double temperature, do return -2.0 * WiT; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcWT(PhaseInterface phase, double temperature, double pressure, int numbcomp) { ComponentEosInterface[] compArray = (ComponentEosInterface[]) phase.getcomponentArray(); @@ -2163,7 +2163,7 @@ public double calcWT(PhaseInterface phase, double temperature, double pressure, return -WT; } - /** {@inheritdoc} */ + /** {@inheritDoc} */ @Override public double calcWTT(PhaseInterface phase, double temperature, double pressure, int numbcomp) { ComponentEosInterface[] compArray = (ComponentEosInterface[]) phase.getcomponentArray(); diff --git a/src/test/java/neqsim/thermo/system/SystemThermoNameTagTest.java b/src/test/java/neqsim/thermo/system/SystemThermoNameTagTest.java new file mode 100644 index 000000000..c0e94fddd --- /dev/null +++ b/src/test/java/neqsim/thermo/system/SystemThermoNameTagTest.java @@ -0,0 +1,47 @@ +package neqsim.thermo.system; + +import static org.junit.jupiter.api.Assertions.assertArrayEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; +import neqsim.thermodynamicoperations.ThermodynamicOperations; + +public class SystemThermoNameTagTest { + static neqsim.thermo.system.SystemInterface testSystem = null; + + /** + *
+ * setUp. + *
+ */ + @BeforeAll + public static void setUp() { + testSystem = new neqsim.thermo.system.SystemPrEos(298.0, 10.0); + testSystem.addComponent("nitrogen", 0.01); + testSystem.addComponent("CO2", 0.01); + testSystem.addComponent("methane", 0.68); + testSystem.setMixingRule("classic"); + ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); + testOps.TPflash(); + testSystem.initProperties(); + } + + @Test + public void SetNameTag() { + String[] a = testSystem.getCompNames(); + String[] b = testSystem.getComponentNames(); + assertArrayEquals(a, b); + + SystemInterface tmpSystem = testSystem.clone(); + tmpSystem.setFluidName(null); + String[] c = tmpSystem.getCompNames(); + assertArrayEquals(a, c); + + String suffix = "test"; + tmpSystem.setComponentNameTag(suffix); + String[] c2 = tmpSystem.getCompNames(); + for (String str : c2) { + assertTrue(str.endsWith(suffix)); + } + } +} diff --git a/src/test/java/neqsim/thermodynamicoperations/ThermodynamicOperationsTest.java b/src/test/java/neqsim/thermodynamicoperations/ThermodynamicOperationsTest.java index 6b31360aa..6731eaf40 100644 --- a/src/test/java/neqsim/thermodynamicoperations/ThermodynamicOperationsTest.java +++ b/src/test/java/neqsim/thermodynamicoperations/ThermodynamicOperationsTest.java @@ -56,11 +56,12 @@ void testFlash() { @Test void testFluidDefined() { - double[] fractions = new double[] { 98.0, 2.0 }; - List