diff --git a/src/main/java/neqsim/PVTsimulation/simulation/SaturationPressure.java b/src/main/java/neqsim/PVTsimulation/simulation/SaturationPressure.java
index b82cbcf3d3..2b22f83c9f 100644
--- a/src/main/java/neqsim/PVTsimulation/simulation/SaturationPressure.java
+++ b/src/main/java/neqsim/PVTsimulation/simulation/SaturationPressure.java
@@ -117,7 +117,7 @@ public static void main(String[] args) {
// satPresSim.getThermoSystem().display();
/*
* double saturationPressure = 350.0; double saturationTemperature = 273.15 + 80;
- *
+ *
* TuningInterface tuning = new TuneToSaturation(satPresSim);
* tuning.setSaturationConditions(saturationTemperature, saturationPressure); tuning.run();
* tuning.getSimulation().getThermoSystem().display();
diff --git a/src/main/java/neqsim/PVTsimulation/simulation/SaturationTemperature.java b/src/main/java/neqsim/PVTsimulation/simulation/SaturationTemperature.java
index 7cd1761062..ab17808195 100644
--- a/src/main/java/neqsim/PVTsimulation/simulation/SaturationTemperature.java
+++ b/src/main/java/neqsim/PVTsimulation/simulation/SaturationTemperature.java
@@ -108,7 +108,7 @@ public static void main(String[] args) {
// satPresSim.getThermoSystem().display();
/*
* double saturationPressure = 350.0; double saturationTemperature = 273.15 + 80;
- *
+ *
* TuningInterface tuning = new TuneToSaturation(satPresSim);
* tuning.setSaturationConditions(saturationTemperature, saturationPressure); tuning.run();
* tuning.getSimulation().getThermoSystem().display();
diff --git a/src/main/java/neqsim/chemicalReactions/chemicalEquilibriaum/ChemicalEquilibrium.java b/src/main/java/neqsim/chemicalReactions/chemicalEquilibriaum/ChemicalEquilibrium.java
index ab3115c7ce..2db46cae9f 100644
--- a/src/main/java/neqsim/chemicalReactions/chemicalEquilibriaum/ChemicalEquilibrium.java
+++ b/src/main/java/neqsim/chemicalReactions/chemicalEquilibriaum/ChemicalEquilibrium.java
@@ -517,9 +517,9 @@ public double innerStep(int i, double[] n_omega, int check, double step, boolean
* public double step(){ double step=1.0; int i, check=0; double[] F = new double[NSPEC]; double[]
* F_omega = new double[NSPEC]; double[] chem_pot = new double[NSPEC]; double[] n_omega = new
* double[NSPEC];
- *
+ *
* Matrix F_matrix, F_omega_matrix, fs_matrix, f_matrix, f_omega_matrix; double fs,f,f_omega;
- *
+ *
* for(i = 0;i
Getter for the field flowArrangement
.
+ * Getter for the field flowArrangement
.
+ *
Setter for the field flowArrangement
.
+ * Setter for the field flowArrangement
.
+ *
* getMixedStream. *
- * + * * @return a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface} **/ public StreamInterface getMixedStream() { diff --git a/src/main/java/neqsim/processSimulation/processEquipment/pipeline/AdiabaticTwoPhasePipe.java b/src/main/java/neqsim/processSimulation/processEquipment/pipeline/AdiabaticTwoPhasePipe.java index 4a74e3eb3e..987a1d909b 100644 --- a/src/main/java/neqsim/processSimulation/processEquipment/pipeline/AdiabaticTwoPhasePipe.java +++ b/src/main/java/neqsim/processSimulation/processEquipment/pipeline/AdiabaticTwoPhasePipe.java @@ -284,6 +284,7 @@ public void run(UUID id) { system.setTotalFlowRate(flowLimit, maxflowunit); system.init(1); } + // SetTotalFlowRate resets beta factors, but they are fixed in run below inStream.getThermoSystem().setTotalFlowRate(system.getFlowRate(maxflowunit), maxflowunit); inStream.run(id); } else { diff --git a/src/main/java/neqsim/processSimulation/processEquipment/pipeline/PipeBeggsAndBrills.java b/src/main/java/neqsim/processSimulation/processEquipment/pipeline/PipeBeggsAndBrills.java index 6f0b3aa78f..a4b82cb141 100644 --- a/src/main/java/neqsim/processSimulation/processEquipment/pipeline/PipeBeggsAndBrills.java +++ b/src/main/java/neqsim/processSimulation/processEquipment/pipeline/PipeBeggsAndBrills.java @@ -342,7 +342,7 @@ public void calculateMissingValue() { /** * Calculates the length based on the elevation and angle. - * + * * @return the calculated length. */ private double calculateLength() { @@ -350,9 +350,8 @@ private double calculateLength() { } /** - * * Calculates the elevation based on the length and angle. - * + * * @return the calculated elevation. */ private double calculateElevation() { @@ -360,9 +359,8 @@ private double calculateElevation() { } /** - * * Calculates the angle based on the length and elevation. - * + * * @return the calculated angle. */ private double calculateAngle() { @@ -370,7 +368,6 @@ private double calculateAngle() { } /** - * * /** *
* calcFlowRegime.
@@ -878,9 +875,9 @@ public Double getSegmentPressure(int index) {
}
/**
- *
- * @return list of results
- *
+ * Get Pressure
+ *
+ * @return ArrayList of pressure drop profile
*/
public List
* Get setGasFlowRate
*
* Get getGasFlowRate
*
* Get setOilFlowRate
*
* Get getOilFlowRate
*
* Get setWaterFlowRate
*
* Get getWaterFlowRate
*
* Constructor for PressureDrop. *
- * + * * @param name the name of the pressure drop unit */ public PressureDrop(String name) { diff --git a/src/main/java/neqsim/processSimulation/processEquipment/util/Recycle.java b/src/main/java/neqsim/processSimulation/processEquipment/util/Recycle.java index 38a007c079..d1a2ade68a 100644 --- a/src/main/java/neqsim/processSimulation/processEquipment/util/Recycle.java +++ b/src/main/java/neqsim/processSimulation/processEquipment/util/Recycle.java @@ -294,9 +294,7 @@ public void setDownstreamProperties() { public void run(UUID id) { iterations++; /* - * if(firstTime || iterations>maxIterations) { firstTime=false; return; - * - * } + * if(firstTime || iterations>maxIterations) { firstTime=false; return; } */ double enthalpy = 0.0; diff --git a/src/main/java/neqsim/processSimulation/processSystem/ProcessModule.java b/src/main/java/neqsim/processSimulation/processSystem/ProcessModule.java index fcb410d63e..ed528a1d22 100644 --- a/src/main/java/neqsim/processSimulation/processSystem/ProcessModule.java +++ b/src/main/java/neqsim/processSimulation/processSystem/ProcessModule.java @@ -16,9 +16,7 @@ * then run only once. * * @author [seros] - * * @version 1.0 - * */ public class ProcessModule extends SimulationBaseClass { private static final long serialVersionUID = 1000; diff --git a/src/main/java/neqsim/processSimulation/processSystem/ProcessSystem.java b/src/main/java/neqsim/processSimulation/processSystem/ProcessSystem.java index 00c7679bf8..d0a2a555cd 100644 --- a/src/main/java/neqsim/processSimulation/processSystem/ProcessSystem.java +++ b/src/main/java/neqsim/processSimulation/processSystem/ProcessSystem.java @@ -473,16 +473,14 @@ public void run(UUID id) { /* * signalDB = new String[1000][1 + 3 * measurementDevices.size()]; - * + * * signalDB[timeStepNumber] = new String[1 + 3 * measurementDevices.size()]; for (int i = 0; i * < measurementDevices.size(); i++) { signalDB[timeStepNumber][0] = Double.toString(time); * signalDB[timeStepNumber][3 * i + 1] = ((MeasurementDeviceInterface) * measurementDevices.get(i)) .getName(); signalDB[timeStepNumber][3 * i + 2] = Double * .toString(((MeasurementDeviceInterface) measurementDevices.get(i)).getMeasuredValue()); * signalDB[timeStepNumber][3 * i + 3] = ((MeasurementDeviceInterface) - * measurementDevices.get(i)) .getUnit(); - * - * } + * measurementDevices.get(i)) .getUnit(); } */ } while ((!isConverged || (iter < 2 && hasResycle)) && iter < 100); @@ -948,12 +946,12 @@ public boolean equals(Object obj) { /* * @XmlRootElement private class Report extends Object{ public Double name; public * ArrayListConstructor for DPCUModule.
+ *+ * Constructor for DPCUModule. + *
* * @param name a {@link java.lang.String} object */ @@ -150,55 +152,54 @@ public void initializeModule() { /* * Cooler inletCooler = new Cooler("inlet well stream cooler", feedStream); * inletCooler.setOutTemperature(inletSepTemperature + 273.15); - * + * * inletSeparator = new Separator("Inlet separator", inletCooler.getOutStream()); - * + * * Cooler gasCooler = new Cooler("separator gas cooler", inletSeparator.getGasOutStream()); * gasCooler.setOutTemperature(gasScrubberTemperature + 273.15); - * + * * oilPump = new Pump("liquid pump", inletSeparator.getLiquidOutStream()); * oilPump.setOutletPressure(liquidPumpPressure); - * + * * Separator gasScrubber = new Separator("HC dew point control scrubber", * gasCooler.getOutStream()); - * + * * Recycle HPliquidRecycle = new Recycle("Resycle"); double tolerance = 1e-2; * HPliquidRecycle.setTolerance(tolerance); * HPliquidRecycle.addStream(gasScrubber.getLiquidOutStream()); * inletSeparator.addStream(HPliquidRecycle.getOutStream()); - * + * * Compressor firstStageCompressor = new Compressor("1st stage compressor", * gasScrubber.getGasOutStream()); * firstStageCompressor.setOutletPressure(firstStageOutPressure); - * + * * glycolFeedStream.getThermoSystem().setPressure(firstStageOutPressure); - * + * * Mixer glycolMixer = new Mixer("glycol injection mixer"); * glycolMixer.addStream(firstStageCompressor.getOutStream()); * glycolMixer.addStream(glycolFeedStream); - * + * * Cooler mixerAfterCooler = new Cooler("glycol mixer after cooler", * glycolMixer.getOutStream()); mixerAfterCooler.setOutTemperature(glycolScrubberTemperature + * 273.15); - * + * * glycolScrubber = new Separator("Water dew point control scrubber", * mixerAfterCooler.getOutStream()); - * + * * secondStageCompressor = new Compressor("2nd stage compressor", * glycolScrubber.getGasOutStream()); * secondStageCompressor.setOutletPressure(secondStageOutPressure); - * + * * secondStageAfterCooler = new Cooler("second stage after cooler", * secondStageCompressor.getOutStream()); * secondStageAfterCooler.setOutTemperature(exportGasTemperature + 273.15); - * + * * getOperations().add(inletCooler); getOperations().add(inletSeparator); * getOperations().add(gasCooler); getOperations().add(oilPump); * getOperations().add(gasScrubber); getOperations().add(HPliquidRecycle); * getOperations().add(firstStageCompressor); getOperations().add(glycolMixer); * getOperations().add(mixerAfterCooler); getOperations().add(glycolScrubber); * getOperations().add(secondStageCompressor); getOperations().add(secondStageAfterCooler); - * */ } diff --git a/src/main/java/neqsim/processSimulation/processSystem/processModules/GlycolDehydrationlModule.java b/src/main/java/neqsim/processSimulation/processSystem/processModules/GlycolDehydrationlModule.java index cb369fd0bb..7d630d93d5 100644 --- a/src/main/java/neqsim/processSimulation/processSystem/processModules/GlycolDehydrationlModule.java +++ b/src/main/java/neqsim/processSimulation/processSystem/processModules/GlycolDehydrationlModule.java @@ -1,10 +1,8 @@ package neqsim.processSimulation.processSystem.processModules; import java.util.UUID; - import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; - import neqsim.processSimulation.processEquipment.ProcessEquipmentBaseClass; import neqsim.processSimulation.processEquipment.absorber.SimpleTEGAbsorber; import neqsim.processSimulation.processEquipment.heatExchanger.Cooler; @@ -63,7 +61,9 @@ public class GlycolDehydrationlModule extends ProcessModuleBaseClass { double regenerationPressure = 1.4; /** - *Constructor for GlycolDehydrationlModule.
+ *+ * Constructor for GlycolDehydrationlModule. + *
* * @param name a {@link java.lang.String} object */ @@ -203,7 +203,6 @@ public void initializeModule() { * stripperColumn.addFeedStream(valveMP.getOutStream(), 3); * stripperColumn.setCondenserTemperature(273.15 + 80.0); ((Reboiler) * stripperColumn.getReboiler()).setRefluxRatio(11.7); - * */ Heater reboiler = new Heater("reboiler", valveMP.getOutletStream()); diff --git a/src/main/java/neqsim/standards/gasQuality/GasChromotograpyhBase.java b/src/main/java/neqsim/standards/gasQuality/GasChromotograpyhBase.java index f0238c9e29..4d68315ab3 100644 --- a/src/main/java/neqsim/standards/gasQuality/GasChromotograpyhBase.java +++ b/src/main/java/neqsim/standards/gasQuality/GasChromotograpyhBase.java @@ -20,7 +20,6 @@ public class GasChromotograpyhBase extends neqsim.standards.Standard { * * * @param thermoSystem a {@link neqsim.thermo.system.SystemInterface} object - * */ public GasChromotograpyhBase(SystemInterface thermoSystem) { super("gas chromotography", "Gas composition", thermoSystem); diff --git a/src/main/java/neqsim/standards/salesContract/ContractInterface.java b/src/main/java/neqsim/standards/salesContract/ContractInterface.java index e40361a6fe..fb4bbcb159 100644 --- a/src/main/java/neqsim/standards/salesContract/ContractInterface.java +++ b/src/main/java/neqsim/standards/salesContract/ContractInterface.java @@ -130,7 +130,6 @@ public interface ContractInterface { /** * Prints the contract. - * */ public default void prettyPrint() { neqsim.thermo.util.readwrite.TablePrinter.printTable(getResultTable()); diff --git a/src/main/java/neqsim/statistics/parameterFitting/nonLinearParameterFitting/LevenbergMarquardt.java b/src/main/java/neqsim/statistics/parameterFitting/nonLinearParameterFitting/LevenbergMarquardt.java index ab0682cd47..64dc6d3ca6 100644 --- a/src/main/java/neqsim/statistics/parameterFitting/nonLinearParameterFitting/LevenbergMarquardt.java +++ b/src/main/java/neqsim/statistics/parameterFitting/nonLinearParameterFitting/LevenbergMarquardt.java @@ -124,12 +124,12 @@ public static void main(String[] args) { /* * LevenbergMarquardt optim = new LevenbergMarquardt(); TestFunction testFunction = new * TestFunction(); // optim.setFunction(testFunction); - * + * * SampleValue[] sample = new SampleValue[3]; double sample1[] = { 6 }; sample[0] = new * SampleValue(8.5,0.1,sample1); double sample2[] = { 4 }; sample[1] = new * SampleValue(5.5,0.1,sample2); double sample3[] = { 4 }; sample[2] = new * SampleValue(5.51,0.1,sample3); - * + * * SampleSet sampleSet = new SampleSet(sample); sampleSet = * sampleSet.createNewNormalDistributedSet(); optim.setSampleSet(sampleSet); optim.solve(); * optim.runMonteCarloSimulation(); diff --git a/src/main/java/neqsim/thermo/ThermodynamicModelTest.java b/src/main/java/neqsim/thermo/ThermodynamicModelTest.java index 9edbd34cb0..668ef92a07 100644 --- a/src/main/java/neqsim/thermo/ThermodynamicModelTest.java +++ b/src/main/java/neqsim/thermo/ThermodynamicModelTest.java @@ -422,6 +422,7 @@ public boolean checkNumerically() { } /** + * Setter for property maxError. * * @param maxErr before test will report failed Set maximum allowed error in model check */ diff --git a/src/main/java/neqsim/thermo/atomElement/UNIFACgroup.java b/src/main/java/neqsim/thermo/atomElement/UNIFACgroup.java index 8587b6f348..df47c24957 100644 --- a/src/main/java/neqsim/thermo/atomElement/UNIFACgroup.java +++ b/src/main/java/neqsim/thermo/atomElement/UNIFACgroup.java @@ -284,7 +284,7 @@ public double calcXComp(ComponentGEUnifac component) { } /* * public double calcXMix(PhaseGEUnifac phase) { double temp = 0.0, temp2 = 0.0, tempVal = 0.0; - * + * * for (int j = 0; j < phase.getNumberOfComponents(); j++) { for (int i = 0; i < * ((ComponentGEUnifac) phase.getComponent(j)).getNumberOfUNIFACgroups(); i++) { tempVal = * phase.getComponent(j).getNumberOfMolesInPhase() * ((ComponentGEUnifac) @@ -409,7 +409,7 @@ public double getQMixdN(int comp) { } /* * public double getXMixdN(int comp) { return xMixdN[comp]; } - * + * * public void setXMixdN(double[] xMixdN) { this.xMixdN = xMixdN; } */ diff --git a/src/main/java/neqsim/thermo/characterization/Characterise.java b/src/main/java/neqsim/thermo/characterization/Characterise.java index 56c8dfb76b..34cd86f10a 100644 --- a/src/main/java/neqsim/thermo/characterization/Characterise.java +++ b/src/main/java/neqsim/thermo/characterization/Characterise.java @@ -27,7 +27,9 @@ public class Characterise implements java.io.Serializable, Cloneable { protected TBPfractionModel TBPfractionModelSelector; /** - *Constructor for Characterise.
+ *+ * Constructor for Characterise. + *
*/ public Characterise() {} @@ -163,17 +165,13 @@ public void characterisePlusFraction() { } /* - * * public boolean addPlusFraction(int start, int end) { plusFractionModel = new * PlusCharacterize(system); if (TBPCharacterise.hasPlusFraction()) { * TBPCharacterise.groupTBPfractions(); TBPCharacterise.generateTBPFractions(); return true; } * else { System.out.println("not able to generate pluss fraction"); return false; } } * - * * public boolean characterize2() { if (TBPCharacterise.groupTBPfractions()) { * TBPCharacterise.solve(); return true; } else { System.out.println("not able to generate pluss * fraction"); return false; } } - * - * */ } diff --git a/src/main/java/neqsim/thermo/component/ComponentEos.java b/src/main/java/neqsim/thermo/component/ComponentEos.java index 0ef2e50011..935d52ae0c 100644 --- a/src/main/java/neqsim/thermo/component/ComponentEos.java +++ b/src/main/java/neqsim/thermo/component/ComponentEos.java @@ -106,7 +106,6 @@ public ComponentEos(String name, double moles, double molesInPhase, int compInde * @param M Molar mass * @param a Acentric factor * @param moles Number of moles - * */ public ComponentEos(int number, double TC, double PC, double M, double a, double moles) { super(number, TC, PC, M, a, moles); @@ -227,7 +226,7 @@ public AttractiveTermInterface getAttractiveTerm() { /** * Get reduced temperature. - * + * * @param temperature temperature of fluid * @return double reduced temperature T/TC */ diff --git a/src/main/java/neqsim/thermo/component/ComponentGE.java b/src/main/java/neqsim/thermo/component/ComponentGE.java index de8ced038f..0260c74beb 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGE.java +++ b/src/main/java/neqsim/thermo/component/ComponentGE.java @@ -12,6 +12,7 @@ import neqsim.thermo.phase.PhaseInterface; /** + * Abstract class ComponentGE. * * @author Even Solbraa */ diff --git a/src/main/java/neqsim/thermo/component/ComponentGENRTLmodifiedWS.java b/src/main/java/neqsim/thermo/component/ComponentGENRTLmodifiedWS.java index 145fa1fc26..65b12537ff 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGENRTLmodifiedWS.java +++ b/src/main/java/neqsim/thermo/component/ComponentGENRTLmodifiedWS.java @@ -233,7 +233,7 @@ public double getGamma(PhaseInterface phase, int numberOfComponents, double temp - dA6dTetter); /* * if(w==0){ dlngammadtold = dlngammadt; temperature +=0.0001; } - * + * * if(w==1){ lngammaold = lngamma; temperature -=0.0002; } } */ // System.out.println("deriv: " + lngammaold + " " + lngamma + " " + diff --git a/src/main/java/neqsim/thermo/component/ComponentGEUnifac.java b/src/main/java/neqsim/thermo/component/ComponentGEUnifac.java index 96d42b9c34..642d9f6cce 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGEUnifac.java +++ b/src/main/java/neqsim/thermo/component/ComponentGEUnifac.java @@ -262,15 +262,13 @@ public double fugcoefDiffTemp(PhaseInterface phase, int numberOfComponents, doub * numberOfComponents, temperature, pressure, pt)); return * NumericalDerivative.fugcoefDiffPres(this, phase, numberOfComponents, temperature, pressure, * pt); } - * + * * public double fugcoefDiffTemp(PhaseInterface phase, int numberOfComponents, double temperature, * double pressure, PhaseType pt){ NumericalDerivative deriv = new NumericalDerivative(); // * System.out.println("dfugdT : " + NumericalDerivative.fugcoefDiffTemp(this, phase, * numberOfComponents, temperature, pressure, pt)); return * NumericalDerivative.fugcoefDiffTemp(this, phase, numberOfComponents, temperature, pressure, - * pt); - * - * } + * pt); } */ /** diff --git a/src/main/java/neqsim/thermo/component/ComponentGEUniquac.java b/src/main/java/neqsim/thermo/component/ComponentGEUniquac.java index c564397515..2178437dae 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGEUniquac.java +++ b/src/main/java/neqsim/thermo/component/ComponentGEUniquac.java @@ -111,47 +111,42 @@ public double getGamma(PhaseInterface phase, int numberOfComponents, double temp /* * double V = 0, F = 0, a, gammaC = 0, gammaR = 0, temp1 = 0, temp2 = 0, temp3=0, temp4 = 0, * temp5=0, gamma; int j, k; - * - * + * * ComponentGEInterface[] compArray = (ComponentGEInterface[]) phase.getcomponentArray(); - * - * + * * for (j=0;j< numberOfComponents;j++){ - * + * * temp1 = temp1 + compArray[j].getx()*((ComponentGEUniquac) compArray[j]).getr(); temp2 = temp2 * + (((ComponentGEUniquac) compArray[j]).getq() * compArray[j].getx()); } - * - * + * * V = V + this.getr() / temp1; //System.out.println("V: " + V); F = F + this.getq() / temp2; * //System.out.println("F: " + F); - * + * * gammaC = 1 - V + Math.log(V) - 5 * this.getq() * (1 - V/F + Math.log(V/F)); - * + * * // System.out.println("gammaC: " + gammaC); - * + * * temp1 = 0; temp2 = 0; temp3 = 0; - * + * * for (k=0;k< numberOfComponents;k++){ temp4 = 0; temp4 = * (intparam[compArray[k].getIndex()][this.getIndex()]/temperature); temp1 = temp1 + * compArray[k].getq() * compArray[k].getx() * * Math.exp(-intparam[compArray[k].getIndex()][this.getIndex()]/temperature); temp2 = temp2 + * compArray[k].getq() * compArray[k].getx(); } - * + * * for (k=0;k< numberOfComponents;k++){ temp5 = 0; for (j=0;j< numberOfComponents;j++){ temp5 = * temp5 + compArray[j].getq() * compArray[j].getx() * - * Math.exp(-intparam[compArray[j].getIndex()][compArray[k].getIndex()]/ temperature); - * - * } - * + * Math.exp(-intparam[compArray[j].getIndex()][compArray[k].getIndex()]/ temperature); } + * * temp3 = temp3 + (compArray[k].getq() * compArray[k].getx() * Math.exp(- * intparam[this.getIndex()][compArray[k].getIndex()]/temperature)) / temp5; } - * + * * gammaR = this.getq() * (1 - Math.log(temp1/temp2) - temp3); - * + * * //System.out.println("gammaR: " + gammaR); - * + * * gamma = Math.exp(gammaR + gammaC); - * + * * //System.out.println("comp: " + this.getIndex() + " gamma NRTL : " +gamma); * //System.out.println("gamma: " + gamma); */ @@ -202,15 +197,13 @@ public double fugcoefDiffTemp(PhaseInterface phase, int numberOfComponents, doub * numberOfComponents, temperature, pressure, pt)); return * NumericalDerivative.fugcoefDiffPres(this, phase, numberOfComponents, temperature, pressure, * pt); } - * + * * public double fugcoefDiffTemp(PhaseInterface phase, int numberOfComponents, double temperature, * double pressure, PhaseType pt){ NumericalDerivative deriv = new NumericalDerivative(); // * System.out.println("dfugdT : " + NumericalDerivative.fugcoefDiffTemp(this, phase, * numberOfComponents, temperature, pressure, pt)); return * NumericalDerivative.fugcoefDiffTemp(this, phase, numberOfComponents, temperature, pressure, - * pt); - * - * } + * pt); } */ /** diff --git a/src/main/java/neqsim/thermo/component/ComponentGEUniquacmodifiedHV.java b/src/main/java/neqsim/thermo/component/ComponentGEUniquacmodifiedHV.java index 6ade2c3b15..a0c16c996d 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGEUniquacmodifiedHV.java +++ b/src/main/java/neqsim/thermo/component/ComponentGEUniquacmodifiedHV.java @@ -10,7 +10,8 @@ import neqsim.thermo.phase.PhaseType; /** - * + * Abstract class ComponentGEUniquacmodifiedHV + * * @author Even Solbraa */ abstract class ComponentGEUniquacmodifiedHV extends ComponentGEUniquac { diff --git a/src/main/java/neqsim/thermo/component/ComponentGeDuanSun.java b/src/main/java/neqsim/thermo/component/ComponentGeDuanSun.java index eff4dd2b7b..041723bfc5 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGeDuanSun.java +++ b/src/main/java/neqsim/thermo/component/ComponentGeDuanSun.java @@ -223,7 +223,7 @@ public double getGammaNRTL(PhaseInterface phase, int numberOfComponents, double - dA6dTetter); /* * if(w==0){ dlngammadtold = dlngammadt; temperature +=0.0001; } - * + * * if(w==1){ lngammaold = lngamma; temperature -=0.0002; } } */ // System.out.println("deriv: " + lngammaold + " " + lngamma + " " + @@ -292,9 +292,7 @@ public double getGammaNRTL(PhaseInterface phase, int numberOfComponents, double * public double getHenryCoef(double temperature) { // System.out.println("henry " + // * Math.exp(henryCoefParameter[0]+henryCoefParameter[1]/temperature+ * henryCoefParameter[2]*Math.log(temperature)+henryCoefParameter[3]*temperature )*100*0.01802); - * if (componentName.equals("CO2")) { // return } return super.getHenryCoef(temperature); - * - * } + * if (componentName.equals("CO2")) { // return } return super.getHenryCoef(temperature); } */ /** {@inheritDoc} */ @@ -522,7 +520,7 @@ public double getGammaPitzer(PhaseInterface phase, int numberOfComponents, doubl * double pressure, PhaseType pt){ dfugdp = (Math.log(fugcoef(phase, numberOfComponents, * temperature, pressure+0.01, pt))-Math.log(fugcoef(phase, numberOfComponents, temperature, * pressure-0.01, pt)))/0.02; return dfugdp; } - * + * * public double fugcoefDiffTemp(PhaseInterface phase, int numberOfComponents, double temperature, * double pressure, PhaseType pt){ dfugdt = (Math.log(fugcoef(phase, numberOfComponents, * temperature+0.01, pressure, pt))-Math.log(fugcoef(phase, numberOfComponents, temperature-0.01, diff --git a/src/main/java/neqsim/thermo/component/ComponentGeNRTL.java b/src/main/java/neqsim/thermo/component/ComponentGeNRTL.java index 0d060cce33..0e64f3926d 100644 --- a/src/main/java/neqsim/thermo/component/ComponentGeNRTL.java +++ b/src/main/java/neqsim/thermo/component/ComponentGeNRTL.java @@ -190,7 +190,7 @@ public double getGamma(PhaseInterface phase, int numberOfComponents, double temp - dA6dTetter); /* * if(w==0){ dlngammadtold = dlngammadt; temperature +=0.0001; } - * + * * if(w==1){ lngammaold = lngamma; temperature -=0.0002; } } */ // System.out.println("deriv: " + lngammaold + " " + lngamma + " " + @@ -260,7 +260,7 @@ public double getGamma(PhaseInterface phase, int numberOfComponents, double temp * double pressure, PhaseType pt){ dfugdp = (Math.log(fugcoef(phase, numberOfComponents, * temperature, pressure+0.01, pt))-Math.log(fugcoef(phase, numberOfComponents, temperature, * pressure-0.01, pt)))/0.02; return dfugdp; } - * + * * public double fugcoefDiffTemp(PhaseInterface phase, int numberOfComponents, double temperature, * double pressure, PhaseType pt){ dfugdt = (Math.log(fugcoef(phase, numberOfComponents, * temperature+0.01, pressure, pt))-Math.log(fugcoef(phase, numberOfComponents, temperature-0.01, diff --git a/src/main/java/neqsim/thermo/component/ComponentHydrateGF.java b/src/main/java/neqsim/thermo/component/ComponentHydrateGF.java index dd3f1c106f..51732ea42b 100644 --- a/src/main/java/neqsim/thermo/component/ComponentHydrateGF.java +++ b/src/main/java/neqsim/thermo/component/ComponentHydrateGF.java @@ -134,7 +134,6 @@ public double fugcoef(PhaseInterface phase, int numberOfComps, double temp, doub * (getEmptyHydrateStructureVapourPressure(hydrateStructure, temp) * Math.exp(solvol / (R * * temp) * (pres - getEmptyHydrateStructureVapourPressure(hydrateStructure, temp)) * * 1e5))); - * */ // System.out.println("pointing " // +(Math.exp(solvol/(R*temp)*((pres-getEmptyHydrateStructureVapourPressure(hydrateStruct,temp))*1e5)))); diff --git a/src/main/java/neqsim/thermo/component/ComponentPrCPA.java b/src/main/java/neqsim/thermo/component/ComponentPrCPA.java index 02a8471204..854c8d9156 100644 --- a/src/main/java/neqsim/thermo/component/ComponentPrCPA.java +++ b/src/main/java/neqsim/thermo/component/ComponentPrCPA.java @@ -4,7 +4,8 @@ import neqsim.thermo.phase.PhaseInterface; /** - * + * Abstract class ComponentPrCPA. + * * @author Even Solbraa */ abstract class ComponentPrCPA extends ComponentPR implements ComponentCPAInterface { diff --git a/src/main/java/neqsim/thermo/phase/PhaseEos.java b/src/main/java/neqsim/thermo/phase/PhaseEos.java index d86008fd5b..162b88bdff 100644 --- a/src/main/java/neqsim/thermo/phase/PhaseEos.java +++ b/src/main/java/neqsim/thermo/phase/PhaseEos.java @@ -14,6 +14,7 @@ import neqsim.thermo.mixingRule.EosMixingRulesInterface; /** + * Abstract class PhaseEos. * * @author Even Solbraa */ diff --git a/src/main/java/neqsim/thermo/phase/PhaseGEUniquacmodifiedHV.java b/src/main/java/neqsim/thermo/phase/PhaseGEUniquacmodifiedHV.java index 5d76fca720..6e69f0aa53 100644 --- a/src/main/java/neqsim/thermo/phase/PhaseGEUniquacmodifiedHV.java +++ b/src/main/java/neqsim/thermo/phase/PhaseGEUniquacmodifiedHV.java @@ -43,7 +43,7 @@ public double getExcessGibbsEnergy(PhaseInterface phase, int numberOfComponents, /* * ComponentGEInterface[] comp_Array = (ComponentGEInterface[]) this.getcomponentArray(); - * + * * for (int i = 0; i < numberOfComponents; i++) { GE = GE + comp_Array[i].getx() * * Math.log(comp_Array[i].getGamma(phase, numberOfComponents, temperature, pressure, pt)); } */ diff --git a/src/main/java/neqsim/thermo/phase/PhaseInterface.java b/src/main/java/neqsim/thermo/phase/PhaseInterface.java index b40def85e9..f6d015a6a7 100644 --- a/src/main/java/neqsim/thermo/phase/PhaseInterface.java +++ b/src/main/java/neqsim/thermo/phase/PhaseInterface.java @@ -716,7 +716,7 @@ public void init(double totalNumberOfMoles, int numberOfComponents, int initType *
* Change the number of moles of component of phase,i.e., numberOfMolesInPhase
but do
* not change the total number of moles of component in system.
- *
+ *
* NB! Phase fraction beta
is not updated by this method. Must be done separately to
* keep consistency between phase and component calculation of total number of moles in system.
*
numberOfMolesInPhase
, and
* total number of moles of component in system, i.e., numberOfMoles
with the same
* amount.
- *
+ *
* NB! Phase fraction beta
is not updated by this method. Must be done separately to
* keep consistency between phase and component calculation of total number of moles in system.
*
@@ -751,7 +751,7 @@ public default void addMolesChemReac(int component, double dn) {
* Component
properties for the number of moles of component of phase, i.e.,
* numberOfMolesInPhase
, and total number of moles of component in system, i.e.,
* numberOfMoles
with separate amounts.
- *
+ *
* NB! Phase fraction beta
is not updated by this method. Must be done separately to
* keep consistency between phase and component calculation of total number of moles in system.
*
diff --git a/src/main/java/neqsim/thermo/phase/PhasePCSAFTRahmat.java b/src/main/java/neqsim/thermo/phase/PhasePCSAFTRahmat.java
index bfb9af91f4..8b9c39d214 100644
--- a/src/main/java/neqsim/thermo/phase/PhasePCSAFTRahmat.java
+++ b/src/main/java/neqsim/thermo/phase/PhasePCSAFTRahmat.java
@@ -1159,23 +1159,22 @@ public double molarVolume(double pressure, double temperature, double A, double
* = 1.0 + Btemp/Math.pow(BonVold,2.0)*(Btemp/numberOfMolesInPhase*dFdVdV()); //dhh =
* -2.0*Btemp/Math.pow(BonV,3.0)*(Btemp/numberOfMolesInPhase*dFdVdV())-Math.pow(
* Btemp,2.0)/Math.pow(BonV,4.0)*(Btemp/numberOfMolesInPhase*dFdVdVdV());
- *
+ *
* //made by Rahmat
- *
+ *
* BonV = BonVold - 0.5* (2* h * dh / ((2* Math.pow(dh,2) - h * dhh)));
- *
+ *
* double dBonV = BonV - BonVold; dhh = (dh - dhOld)/ dBonV; dhOld = dh;
- *
+ *
* hOld = h;
- *
- *
+ *
* //d1 = - h/dh; //d2 = - dh/dhh; //BonV += d1; //*(1.0+0.5*-1.0); /*
* if(Math.abs(d1/d2)<=1.0){ BonV += d1*(1.0+0.5*d1/d2); } else if(d1/d2<-1){ BonV +=
* d1*(1.0+0.5*-1.0); } else if(d1/d2>1){ BonV += d2; double hnew = h +d2*-h/d1;
* if(Math.abs(hnew)>Math.abs(h)){ System.out.println("volume correction needed...."); BonV =
* phase== 1 ? 2.0/(2.0+temperature/getPseudoCriticalTemperature()):pressure*getB()/(
* numberOfMolesInPhase*temperature*R); } }
- *
+ *
* if(BonV>1){ BonV=1.0-1.0e-6; BonVold=10; } if (BonV < 0) { BonV = 1.0e-16; BonVold = 10; }
*/
// setMolarVolume(1.0 / BonV * Btemp / numberOfMolesInPhase);
@@ -1189,11 +1188,10 @@ public double molarVolume(double pressure, double temperature, double A, double
// System.out.println("iterations " + iterations);
/*
* if(BonV<0){ BonV = pressure*getB()/(numberOfMolesInPhase*temperature*R); setMolarVolume(1.0 /
- * BonV * Btemp / numberOfMolesInPhase); Z = pressure*getMolarVolume()/(R*temperature);
- *
- * } if(iterations>=6000) throw new util.exception.TooManyIterationsException();
+ * BonV * Btemp / numberOfMolesInPhase); Z = pressure*getMolarVolume()/(R*temperature); }
+ * if(iterations>=6000) throw new util.exception.TooManyIterationsException();
* if(Double.isNaN(getMolarVolume())) throw new util.exception.IsNaNException();
- *
+ *
* // if(pt==0) System.out.println("density " + getDensity()); //"BonV: " + BonV +
* " "+" itert: " + iterations +" " + " phase " + pt+ " " + h + " " +dh + " B " + Btemp +
* " D " + Dtemp + " gv" + gV() + " fv " + fv() + " fvv" + fVV());
diff --git a/src/main/java/neqsim/thermo/phase/PhaseSrkCPA.java b/src/main/java/neqsim/thermo/phase/PhaseSrkCPA.java
index d05d5d4eec..3ad5f08fdc 100644
--- a/src/main/java/neqsim/thermo/phase/PhaseSrkCPA.java
+++ b/src/main/java/neqsim/thermo/phase/PhaseSrkCPA.java
@@ -780,12 +780,11 @@ public double molarVolume(double pressure, double temperature, double A, double
* = calcRootVolFinder(pt); // BonV = molarVolumeChangePhase(pressure, temperature, A, B, pt);
* // BonV = 0.9999; // BonV = pt == 1 ? 2.0 / (2.0 + temperature /
* getPseudoCriticalTemperature()) : pressure * getB() / (numberOfMolesInPhase * temperature *
- * R); }
- *
- * } else if (BonV < 0) { if (iterations < 10) { BonV = Math.abs(BonVold + BonV) / 2.0; } else
- * { // BonV = calcRootVolFinder(pt); // return molarVolumeChangePhase(pressure, temperature,
- * A, B, pt); // BonV = pt == 1 ? 2.0 / (2.0 + temperature / getPseudoCriticalTemperature()) :
- * pressure * getB() / (numberOfMolesInPhase * temperature * R); } }
+ * R); } } else if (BonV < 0) { if (iterations < 10) { BonV = Math.abs(BonVold + BonV) / 2.0;
+ * } else { // BonV = calcRootVolFinder(pt); // return molarVolumeChangePhase(pressure,
+ * temperature, A, B, pt); // BonV = pt == 1 ? 2.0 / (2.0 + temperature /
+ * getPseudoCriticalTemperature()) : pressure * getB() / (numberOfMolesInPhase * temperature *
+ * R); } }
*/
setMolarVolume(1.0 / BonV * Btemp / numberOfMolesInPhase);
Z = pressure * getMolarVolume() / (R * temperature);
diff --git a/src/main/java/neqsim/thermo/phase/PhaseUMRCPA.java b/src/main/java/neqsim/thermo/phase/PhaseUMRCPA.java
index 42014b2969..9aebd2f09c 100644
--- a/src/main/java/neqsim/thermo/phase/PhaseUMRCPA.java
+++ b/src/main/java/neqsim/thermo/phase/PhaseUMRCPA.java
@@ -780,12 +780,11 @@ public double molarVolume(double pressure, double temperature, double A, double
* = calcRootVolFinder(pt); // BonV = molarVolumeChangePhase(pressure, temperature, A, B, pt);
* // BonV = 0.9999; // BonV = pt == 1 ? 2.0 / (2.0 + temperature /
* getPseudoCriticalTemperature()) : pressure * getB() / (numberOfMolesInPhase * temperature *
- * R); }
- *
- * } else if (BonV < 0) { if (iterations < 10) { BonV = Math.abs(BonVold + BonV) / 2.0; } else
- * { // BonV = calcRootVolFinder(pt); // return molarVolumeChangePhase(pressure, temperature,
- * A, B, pt); // BonV = pt == 1 ? 2.0 / (2.0 + temperature / getPseudoCriticalTemperature()) :
- * pressure * getB() / (numberOfMolesInPhase * temperature * R); } }
+ * R); } } else if (BonV < 0) { if (iterations < 10) { BonV = Math.abs(BonVold + BonV) / 2.0;
+ * } else { // BonV = calcRootVolFinder(pt); // return molarVolumeChangePhase(pressure,
+ * temperature, A, B, pt); // BonV = pt == 1 ? 2.0 / (2.0 + temperature /
+ * getPseudoCriticalTemperature()) : pressure * getB() / (numberOfMolesInPhase * temperature *
+ * R); } }
*/
setMolarVolume(1.0 / BonV * Btemp / numberOfMolesInPhase);
Z = pressure * getMolarVolume() / (R * temperature);
diff --git a/src/main/java/neqsim/thermo/system/SystemInterface.java b/src/main/java/neqsim/thermo/system/SystemInterface.java
index 75db75ed2f..784d749c82 100644
--- a/src/main/java/neqsim/thermo/system/SystemInterface.java
+++ b/src/main/java/neqsim/thermo/system/SystemInterface.java
@@ -1181,7 +1181,7 @@ public default void addComponent(String name) {
/**
*
* Getter for property beta
.
- *
+ *
* Gets value for heaviest phase.
*
- * sq. - *
- * - * @param x a double - * @return a double - */ - public double sq(double x) { - return x * x; + // The compositions in the x() array use the following order and must be sent as + // mole fractions: + // 0 - PLACEHOLDER + // 1 - Methane + // 2 - Nitrogen + // 3 - Carbon dioxide + // 4 - Ethane + // 5 - Propane + // 6 - Isobutane + // 7 - n-Butane + // 8 - Isopentane + // 9 - n-Pentane + // 10 - n-Hexane + // 11 - n-Heptane + // 12 - n-Octane + // 13 - n-Nonane + // 14 - n-Decane + // 15 - Hydrogen + // 16 - Oxygen + // 17 - Carbon monoxide + // 18 - Water + // 19 - Hydrogen sulfide + // 20 - Helium + // 21 - Argon + // + // For example, a mixture (in moles) of 94% methane, 5% CO2, and 1% helium would + // be (in mole fractions): + // x(1)=0.94, x(3)=0.05, x(20)=0.01 + + // Variables containing the common parameters in the DETAIL equations + double RDetail; + int NcDetail = 21, MaxFlds = 21, NTerms = 58; + double epsilon = 1e-15; + int[] fn = new int[NTerms + 1]; + int[] gn = new int[NTerms + 1]; + int[] qn = new int[NTerms + 1]; + double[] an = new double[NTerms + 1]; + double[] un = new double[NTerms + 1]; + int[] bn = new int[NTerms + 1]; + int[] kn = new int[NTerms + 1]; + + double[][][] Bsnij2 = new double[MaxFlds + 1][MaxFlds + 1][18 + 1]; + double[] Bs = new double[18 + 1]; + double[] Csn = new double[NTerms + 1]; + + double[] Fi = new double[MaxFlds + 1]; + double[] Gi = new double[MaxFlds + 1]; + double[] Qi = new double[MaxFlds + 1]; + + double[] Ki25 = new double[MaxFlds + 1]; + double[] Ei25 = new double[MaxFlds + 1]; + + double[][] Kij5 = new double[MaxFlds + 1][MaxFlds + 1]; + double[][] Uij5 = new double[MaxFlds + 1][MaxFlds + 1]; + double[][] Gij5 = new double[MaxFlds + 1][MaxFlds + 1]; + + double[] Tun = new double[NTerms + 1]; + double Told; + double[][] n0i = new double[MaxFlds + 1][7 + 1]; + double[][] th0i = new double[MaxFlds + 1][7 + 1]; + + double[] MMiDetail = new double[MaxFlds + 1]; + double[] xold = new double[MaxFlds + 1]; + double K3; + double dPdDsave; + + /** + *+ * sq. + *
+ * + * @param x a double + * @return a double + */ + public double sq(double x) { + return x * x; + } + + /** + *+ * MolarMassDetail. + *
+ * + * @param x an array of {@link double} objects + * @param Mm a {@link org.netlib.util.doubleW} object + */ + public void MolarMassDetail(double[] x, doubleW Mm) { + // Calculate molar mass of the mixture with the compositions contained in the + // x() input array + + // Inputs: + // x() - Composition (mole fraction) + // Do not send mole percents or mass fractions in the x() array, otherwise the + // output will be incorrect. + // The sum of the compositions in the x() array must be equal to one. + // The order of the fluids in this array is given at the top of this code. + + // Outputs: + // Mm - Molar mass (g/mol) + + Mm.val = 0; + for (int i = 1; i <= NcDetail; ++i) { + Mm.val += x[i] * MMiDetail[i]; } - - /** - *- * MolarMassDetail. - *
- * - * @param x an array of {@link double} objects - * @param Mm a {@link org.netlib.util.doubleW} object - */ - public void MolarMassDetail(double[] x, doubleW Mm) { - // Calculate molar mass of the mixture with the compositions contained in the - // x() input array - - // Inputs: - // x() - Composition (mole fraction) - // Do not send mole percents or mass fractions in the x() array, otherwise the - // output will be incorrect. - // The sum of the compositions in the x() array must be equal to one. - // The order of the fluids in this array is given at the top of this code. - - // Outputs: - // Mm - Molar mass (g/mol) - - Mm.val = 0; - for (int i = 1; i <= NcDetail; ++i) { - Mm.val += x[i] * MMiDetail[i]; - } + } + + /** + *+ * PressureDetail. + *
+ * + * @param T a double + * @param D a double + * @param x an array of {@link double} objects + * @param P a {@link org.netlib.util.doubleW} object + * @param Z a {@link org.netlib.util.doubleW} object + */ + public void PressureDetail(double T, double D, double[] x, doubleW P, doubleW Z) { + // Sub Pressure(T, D, x, P, Z) + + // Calculate pressure as a function of temperature and density. The derivative + // d(P)/d(D) is also calculated + // for use in the iterative DensityDetail subroutine (and is only returned as a + // common variable). + + // Inputs: + // T - Temperature (K) + // D - Density (mol/l) + // x() - Composition (mole fraction) + // Do not send mole percents or mass fractions in the x() array, otherwise the + // output will be incorrect. + // The sum of the compositions in the x() array must be equal to one. + + // Outputs: + // P - Pressure (kPa) + // Z - Compressibility factor + // dPdDsave - d(P)/d(D) [kPa/(mol/l)] (at constant temperature) + // - This variable is cached in the common variables for use in the iterative + // density solver, but not returned as an argument. + + doubleW[][] ar = new doubleW[3 + 1][3 + 1]; + for (int i = 0; i < 4; i++) { + for (int j = 0; j < 4; j++) { + ar[i][j] = new doubleW(0.0d); + } } - - /** - *- * PressureDetail. - *
- * - * @param T a double - * @param D a double - * @param x an array of {@link double} objects - * @param P a {@link org.netlib.util.doubleW} object - * @param Z a {@link org.netlib.util.doubleW} object - */ - public void PressureDetail(double T, double D, double[] x, doubleW P, doubleW Z) { - // Sub Pressure(T, D, x, P, Z) - - // Calculate pressure as a function of temperature and density. The derivative - // d(P)/d(D) is also calculated - // for use in the iterative DensityDetail subroutine (and is only returned as a - // common variable). - - // Inputs: - // T - Temperature (K) - // D - Density (mol/l) - // x() - Composition (mole fraction) - // Do not send mole percents or mass fractions in the x() array, otherwise the - // output will be incorrect. - // The sum of the compositions in the x() array must be equal to one. - - // Outputs: - // P - Pressure (kPa) - // Z - Compressibility factor - // dPdDsave - d(P)/d(D) [kPa/(mol/l)] (at constant temperature) - // - This variable is cached in the common variables for use in the iterative - // density solver, but not returned as an argument. - - doubleW[][] ar = new doubleW[3 + 1][3 + 1]; - for (int i = 0; i < 4; i++) { - for (int j = 0; j < 4; j++) { - ar[i][j] = new doubleW(0.0d); - } - } - xTermsDetail(x); - AlpharDetail(0, 2, T, D, ar); - Z.val = 1 + ar[0][1].val / RDetail / T; // ar(0,1) is the first derivative of alpha(r) with - // respect to density - P.val = D * RDetail * T * Z.val; - dPdDsave = RDetail * T + 2 * ar[0][1].val + ar[0][2].val; // d(P)/d(D) for use in density - // iteration + xTermsDetail(x); + AlpharDetail(0, 2, T, D, ar); + Z.val = 1 + ar[0][1].val / RDetail / T; // ar(0,1) is the first derivative of alpha(r) with + // respect to density + P.val = D * RDetail * T * Z.val; + dPdDsave = RDetail * T + 2 * ar[0][1].val + ar[0][2].val; // d(P)/d(D) for use in density + // iteration + } + + /** + *+ * DensityDetail. + *
+ * + * @param T a double + * @param P a double + * @param x an array of {@link double} objects + * @param D a {@link org.netlib.util.doubleW} object + * @param ierr a {@link org.netlib.util.intW} object + * @param herr a {@link org.netlib.util.StringW} object + */ + public void DensityDetail(double T, double P, double[] x, doubleW D, intW ierr, StringW herr) { + // Sub DensityDetail(T, P, x, D, ierr, herr) + + // Calculate density as a function of temperature and pressure. This is an + // iterative routine that calls PressureDetail + // to find the correct state point. Generally only 6 iterations at most are + // required. + // If the iteration fails to converge, the ideal gas density and an error + // message are returned. + // No checks are made to determine the phase boundary, which would have + // guaranteed that the output is in the gas phase. + // It is up to the user to locate the phase boundary, and thus identify the + // phase of the T and P inputs. + // If the state point is 2-phase, the output density will represent a metastable + // state. + + // Inputs: + // T - Temperature (K) + // P - Pressure (kPa) + // x() - Composition (mole fraction) + + // Outputs: + // D - Density (mol/l) (make D negative and send as an input to use as an + // initial guess) + // ierr - Error number (0 indicates no error) + // herr - Error message if ierr is not equal to zero + + double plog, vlog, dpdlv, vdiff, tolr; + doubleW P2 = new doubleW(0.0d); + doubleW Z = new doubleW(0.0d); + ierr.val = 0; + herr.val = ""; + if (Math.abs(P) < epsilon) { + D.val = 0.0; + return; } - - /** - *- * DensityDetail. - *
- * - * @param T a double - * @param P a double - * @param x an array of {@link double} objects - * @param D a {@link org.netlib.util.doubleW} object - * @param ierr a {@link org.netlib.util.intW} object - * @param herr a {@link org.netlib.util.StringW} object - */ - public void DensityDetail(double T, double P, double[] x, doubleW D, intW ierr, - StringW herr) { - // Sub DensityDetail(T, P, x, D, ierr, herr) - - // Calculate density as a function of temperature and pressure. This is an - // iterative routine that calls PressureDetail - // to find the correct state point. Generally only 6 iterations at most are - // required. - // If the iteration fails to converge, the ideal gas density and an error - // message are returned. - // No checks are made to determine the phase boundary, which would have - // guaranteed that the output is in the gas phase. - // It is up to the user to locate the phase boundary, and thus identify the - // phase of the T and P inputs. - // If the state point is 2-phase, the output density will represent a metastable - // state. - - // Inputs: - // T - Temperature (K) - // P - Pressure (kPa) - // x() - Composition (mole fraction) - - // Outputs: - // D - Density (mol/l) (make D negative and send as an input to use as an - // initial guess) - // ierr - Error number (0 indicates no error) - // herr - Error message if ierr is not equal to zero - - double plog, vlog, dpdlv, vdiff, tolr; - doubleW P2 = new doubleW(0.0d); - doubleW Z = new doubleW(0.0d); - ierr.val = 0; - herr.val = ""; - if (Math.abs(P) < epsilon) { - D.val = 0.0; - return; - } - tolr = 0.0000001; - if (D.val > -epsilon) { - D.val = P / RDetail / T; // Ideal gas estimate - } else { - D.val = Math.abs(D.val); // If D<0, then use as initial estimate - } - plog = Math.log(P); - vlog = -Math.log(D.val); - for (int it = 1; it <= 20; ++it) { - if (vlog < -7 || vlog > 100) { - ierr.val = 1; - herr.val = - "Calculation failed to converge in DETAIL method, ideal gas density returned."; - D.val = P / RDetail / T; - return; - } - D.val = Math.exp(-vlog); - PressureDetail(T, D.val, x, P2, Z); - if (dPdDsave < epsilon || P2.val < epsilon) { - vlog += 0.1; - } else { - // Find the next density with a first order Newton's type iterative scheme, with - // log(P) as the known variable and log(v) as the unknown property. - // See AGA 8 publication for further information. - dpdlv = -D.val * dPdDsave; // d(p)/d[log(v)] - vdiff = (Math.log(P2.val) - plog) * P2.val / dpdlv; - vlog = vlog - vdiff; - if (Math.abs(vdiff) < tolr) { - D.val = Math.exp(-vlog); - return; // Iteration converged - } - } - } + tolr = 0.0000001; + if (D.val > -epsilon) { + D.val = P / RDetail / T; // Ideal gas estimate + } else { + D.val = Math.abs(D.val); // If D<0, then use as initial estimate + } + plog = Math.log(P); + vlog = -Math.log(D.val); + for (int it = 1; it <= 20; ++it) { + if (vlog < -7 || vlog > 100) { ierr.val = 1; herr.val = "Calculation failed to converge in DETAIL method, ideal gas density returned."; D.val = P / RDetail / T; return; - } - - /** - *- * PropertiesDetail. - *
- * - * @param T a double - * @param D a double - * @param x an array of {@link double} objects - * @param P a {@link org.netlib.util.doubleW} object - * @param Z a {@link org.netlib.util.doubleW} object - * @param dPdD a {@link org.netlib.util.doubleW} object - * @param d2PdD2 a {@link org.netlib.util.doubleW} object - * @param d2PdTD a {@link org.netlib.util.doubleW} object - * @param dPdT a {@link org.netlib.util.doubleW} object - * @param U a {@link org.netlib.util.doubleW} object - * @param H a {@link org.netlib.util.doubleW} object - * @param S a {@link org.netlib.util.doubleW} object - * @param Cv a {@link org.netlib.util.doubleW} object - * @param Cp a {@link org.netlib.util.doubleW} object - * @param W a {@link org.netlib.util.doubleW} object - * @param G a {@link org.netlib.util.doubleW} object - * @param JT a {@link org.netlib.util.doubleW} object - * @param Kappa a {@link org.netlib.util.doubleW} object - */ - public void PropertiesDetail(double T, double D, double[] x, doubleW P, doubleW Z, - doubleW dPdD, doubleW d2PdD2, doubleW d2PdTD, doubleW dPdT, doubleW U, doubleW H, - doubleW S, doubleW Cv, doubleW Cp, doubleW W, doubleW G, doubleW JT, doubleW Kappa) { - // Sub Properties(T, D, x, P, Z, dPdD, d2PdD2, d2PdTD, dPdT, U, H, S, Cv, Cp, W, - // G, JT, Kappa) - - // Calculate thermodynamic properties as a function of temperature and density. - // Calls are made to the subroutines - // Molarmass, Alpha0Detail, and AlpharDetail. If the density is not known, call - // subroutine DensityDetail first - // with the known values of pressure and temperature. - - // Inputs: - // T - Temperature (K) - // D - Density (mol/l) - // x() - Composition (mole fraction) - - // Outputs: - // P - Pressure (kPa) - // Z - Compressibility factor - // dPdD - First derivative of pressure with respect to density at constant - // temperature [kPa/(mol/l)] - // d2PdD2 - Second derivative of pressure with respect to density at constant - // temperature [kPa/(mol/l)^2] - // d2PdTD - Second derivative of pressure with respect to temperature and - // density [kPa/(mol/l)/K] (currently not calculated) - // dPdT - First derivative of pressure with respect to temperature at constant - // density (kPa/K) - // U - Internal energy (J/mol) - // H - Enthalpy (J/mol) - // S - Entropy [J/(mol-K)] - // Cv - Isochoric heat capacity [J/(mol-K)] - // Cp - Isobaric heat capacity [J/(mol-K)] - // W - Speed of sound (m/s) - // G - Gibbs energy (J/mol) - // JT - Joule-Thomson coefficient (K/kPa) - // Kappa - Isentropic Exponent - doubleW A = new doubleW(0.0d); - doubleW[] a0 = new doubleW[2 + 1]; - for (int i = 0; i < 3; i++) { - a0[i] = new doubleW(0.0d); + } + D.val = Math.exp(-vlog); + PressureDetail(T, D.val, x, P2, Z); + if (dPdDsave < epsilon || P2.val < epsilon) { + vlog += 0.1; + } else { + // Find the next density with a first order Newton's type iterative scheme, with + // log(P) as the known variable and log(v) as the unknown property. + // See AGA 8 publication for further information. + dpdlv = -D.val * dPdDsave; // d(p)/d[log(v)] + vdiff = (Math.log(P2.val) - plog) * P2.val / dpdlv; + vlog = vlog - vdiff; + if (Math.abs(vdiff) < tolr) { + D.val = Math.exp(-vlog); + return; // Iteration converged } - doubleW[][] ar = new doubleW[3 + 1][3 + 1]; + } + } + ierr.val = 1; + herr.val = "Calculation failed to converge in DETAIL method, ideal gas density returned."; + D.val = P / RDetail / T; + return; + } + + /** + *+ * PropertiesDetail. + *
+ * + * @param T a double + * @param D a double + * @param x an array of {@link double} objects + * @param P a {@link org.netlib.util.doubleW} object + * @param Z a {@link org.netlib.util.doubleW} object + * @param dPdD a {@link org.netlib.util.doubleW} object + * @param d2PdD2 a {@link org.netlib.util.doubleW} object + * @param d2PdTD a {@link org.netlib.util.doubleW} object + * @param dPdT a {@link org.netlib.util.doubleW} object + * @param U a {@link org.netlib.util.doubleW} object + * @param H a {@link org.netlib.util.doubleW} object + * @param S a {@link org.netlib.util.doubleW} object + * @param Cv a {@link org.netlib.util.doubleW} object + * @param Cp a {@link org.netlib.util.doubleW} object + * @param W a {@link org.netlib.util.doubleW} object + * @param G a {@link org.netlib.util.doubleW} object + * @param JT a {@link org.netlib.util.doubleW} object + * @param Kappa a {@link org.netlib.util.doubleW} object + */ + public void PropertiesDetail(double T, double D, double[] x, doubleW P, doubleW Z, doubleW dPdD, + doubleW d2PdD2, doubleW d2PdTD, doubleW dPdT, doubleW U, doubleW H, doubleW S, doubleW Cv, + doubleW Cp, doubleW W, doubleW G, doubleW JT, doubleW Kappa) { + // Sub Properties(T, D, x, P, Z, dPdD, d2PdD2, d2PdTD, dPdT, U, H, S, Cv, Cp, W, + // G, JT, Kappa) + + // Calculate thermodynamic properties as a function of temperature and density. + // Calls are made to the subroutines + // Molarmass, Alpha0Detail, and AlpharDetail. If the density is not known, call + // subroutine DensityDetail first + // with the known values of pressure and temperature. + + // Inputs: + // T - Temperature (K) + // D - Density (mol/l) + // x() - Composition (mole fraction) + + // Outputs: + // P - Pressure (kPa) + // Z - Compressibility factor + // dPdD - First derivative of pressure with respect to density at constant + // temperature [kPa/(mol/l)] + // d2PdD2 - Second derivative of pressure with respect to density at constant + // temperature [kPa/(mol/l)^2] + // d2PdTD - Second derivative of pressure with respect to temperature and + // density [kPa/(mol/l)/K] (currently not calculated) + // dPdT - First derivative of pressure with respect to temperature at constant + // density (kPa/K) + // U - Internal energy (J/mol) + // H - Enthalpy (J/mol) + // S - Entropy [J/(mol-K)] + // Cv - Isochoric heat capacity [J/(mol-K)] + // Cp - Isobaric heat capacity [J/(mol-K)] + // W - Speed of sound (m/s) + // G - Gibbs energy (J/mol) + // JT - Joule-Thomson coefficient (K/kPa) + // Kappa - Isentropic Exponent + doubleW A = new doubleW(0.0d); + doubleW[] a0 = new doubleW[2 + 1]; + for (int i = 0; i < 3; i++) { + a0[i] = new doubleW(0.0d); + } + doubleW[][] ar = new doubleW[3 + 1][3 + 1]; - for (int i = 0; i < 4; i++) { - for (int j = 0; j < 4; j++) { - ar[i][j] = new doubleW(0.0d); - } - } - doubleW Mm = new doubleW(0.0d); - MolarMassDetail(x, Mm); - xTermsDetail(x); - - // Calculate the ideal gas Helmholtz energy, and its first and second - // derivatives with respect to temperature. - Alpha0Detail(T, D, x, a0); - - // Calculate the real gas Helmholtz energy, and its derivatives with respect to - // temperature and/or density. - AlpharDetail(2, 3, T, D, ar); - - double R = RDetail; - double RT = R * T; - Z.val = 1 + ar[0][1].val / RT; - P.val = D * RT * Z.val; - dPdD.val = RT + 2 * ar[0][1].val + ar[0][2].val; - dPdT.val = D * R + D * ar[1][1].val; - A.val = a0[0].val + ar[0][0].val; - S.val = -a0[1].val - ar[1][0].val; - U.val = A.val + T * S.val; - Cv.val = -(a0[2].val + ar[2][0].val); - if (D > epsilon) { - H.val = U.val + P.val / D; - G.val = A.val + P.val / D; - Cp.val = Cv.val + T * sq(dPdT.val / D) / dPdD.val; - d2PdD2.val = (2 * ar[0][1].val + 4 * ar[0][2].val + ar[0][3].val) / D; - JT.val = (T / D * dPdT.val / dPdD.val - 1) / Cp.val / D; - } else { - H.val = U.val + RT; - G.val = A.val + RT; - Cp.val = Cv.val + R; - d2PdD2.val = 0; - JT.val = 1E+20; // =(dB/dT*T-B)/Cp for an ideal gas, but dB/dT is not calculated here - } - W.val = 1000 * Cp.val / Cv.val * dPdD.val / Mm.val; - if (W.val < 0) { - W.val = 0; - } - W.val = Math.sqrt(W.val); - Kappa.val = W.val * W.val * Mm.val / (RT * 1000 * Z.val); - d2PdTD.val = 0; + for (int i = 0; i < 4; i++) { + for (int j = 0; j < 4; j++) { + ar[i][j] = new doubleW(0.0d); + } + } + doubleW Mm = new doubleW(0.0d); + MolarMassDetail(x, Mm); + xTermsDetail(x); + + // Calculate the ideal gas Helmholtz energy, and its first and second + // derivatives with respect to temperature. + Alpha0Detail(T, D, x, a0); + + // Calculate the real gas Helmholtz energy, and its derivatives with respect to + // temperature and/or density. + AlpharDetail(2, 3, T, D, ar); + + double R = RDetail; + double RT = R * T; + Z.val = 1 + ar[0][1].val / RT; + P.val = D * RT * Z.val; + dPdD.val = RT + 2 * ar[0][1].val + ar[0][2].val; + dPdT.val = D * R + D * ar[1][1].val; + A.val = a0[0].val + ar[0][0].val; + S.val = -a0[1].val - ar[1][0].val; + U.val = A.val + T * S.val; + Cv.val = -(a0[2].val + ar[2][0].val); + if (D > epsilon) { + H.val = U.val + P.val / D; + G.val = A.val + P.val / D; + Cp.val = Cv.val + T * sq(dPdT.val / D) / dPdD.val; + d2PdD2.val = (2 * ar[0][1].val + 4 * ar[0][2].val + ar[0][3].val) / D; + JT.val = (T / D * dPdT.val / dPdD.val - 1) / Cp.val / D; + } else { + H.val = U.val + RT; + G.val = A.val + RT; + Cp.val = Cv.val + R; + d2PdD2.val = 0; + JT.val = 1E+20; // =(dB/dT*T-B)/Cp for an ideal gas, but dB/dT is not calculated here + } + W.val = 1000 * Cp.val / Cv.val * dPdD.val / Mm.val; + if (W.val < 0) { + W.val = 0; + } + W.val = Math.sqrt(W.val); + Kappa.val = W.val * W.val * Mm.val / (RT * 1000 * Z.val); + d2PdTD.val = 0; + } + + /** + * // Calculate terms dependent only on composition + * + * @param x Composition (mole fraction) + */ + // The following routines are low-level routines that should not be called outside of this code. + void xTermsDetail(double[] x) { + double G, Q, F, U, Q2, xij, xi2; + int icheck; + + // Check to see if a component fraction has changed. If x is the same as the + // previous call, then exit. + icheck = 0; + for (int i = 1; i <= NcDetail; ++i) { + if (Math.abs(x[i] - xold[i]) > 0.0000001) { + icheck = 1; + } + xold[i] = x[i]; + } + if (icheck == 0) { + return; } - /** - * // Calculate terms dependent only on composition - * - * @param x Composition (mole fraction) - */ - // The following routines are low-level routines that should not be called outside of this code. - void xTermsDetail(double[] x) { - double G, Q, F, U, Q2, xij, xi2; - int icheck; - - // Check to see if a component fraction has changed. If x is the same as the - // previous call, then exit. - icheck = 0; - for (int i = 1; i <= NcDetail; ++i) { - if (Math.abs(x[i] - xold[i]) > 0.0000001) { - icheck = 1; - } - xold[i] = x[i]; - } - if (icheck == 0) { - return; - } + K3 = 0; + U = 0; + G = 0; + Q = 0; + F = 0; + for (int n = 1; n <= 18; ++n) { + Bs[n] = 0; + } - K3 = 0; - U = 0; - G = 0; - Q = 0; - F = 0; + // Calculate pure fluid contributions + for (int i = 1; i <= NcDetail; ++i) { + if (x[i] > 0) { + xi2 = sq(x[i]); + K3 += x[i] * Ki25[i]; // K, U, and G are the sums of a pure fluid contribution and a + U += x[i] * Ei25[i]; // binary pair contribution + G += x[i] * Gi[i]; + Q += x[i] * Qi[i]; // Q and F depend only on the pure fluid parts + F += xi2 * Fi[i]; for (int n = 1; n <= 18; ++n) { - Bs[n] = 0; - } - - // Calculate pure fluid contributions - for (int i = 1; i <= NcDetail; ++i) { - if (x[i] > 0) { - xi2 = sq(x[i]); - K3 += x[i] * Ki25[i]; // K, U, and G are the sums of a pure fluid contribution and a - U += x[i] * Ei25[i]; // binary pair contribution - G += x[i] * Gi[i]; - Q += x[i] * Qi[i]; // Q and F depend only on the pure fluid parts - F += xi2 * Fi[i]; - for (int n = 1; n <= 18; ++n) { - Bs[n] = Bs[n] + xi2 * Bsnij2[i][i][n]; // Pure fluid contributions to second - // virial coefficient - } - } - } - K3 = sq(K3); - U = sq(U); - - // Binary pair contributions - for (int i = 1; i <= NcDetail - 1; ++i) { - if (x[i] > 0) { - for (int j = i + 1; j <= NcDetail; ++j) { - if (x[j] > 0) { - xij = 2 * x[i] * x[j]; - K3 = K3 + xij * Kij5[i][j]; - U = U + xij * Uij5[i][j]; - G = G + xij * Gij5[i][j]; - for (int n = 1; n <= 18; ++n) { - Bs[n] = Bs[n] + xij * Bsnij2[i][j][n]; // Second virial coefficients of - // mixture - } - } - } - } - } - K3 = Math.pow(K3, 0.6); - U = Math.pow(U, 0.2); - - // Third virial and higher coefficients - Q2 = sq(Q); - for (int n = 13; n <= 58; ++n) { - Csn[n] = an[n] * Math.pow(U, un[n]); - if (gn[n] == 1) { - Csn[n] = Csn[n] * G; - } - if (qn[n] == 1) { - Csn[n] = Csn[n] * Q2; - } - if (fn[n] == 1) { - Csn[n] = Csn[n] * F; - } + Bs[n] = Bs[n] + xi2 * Bsnij2[i][i][n]; // Pure fluid contributions to second + // virial coefficient } + } } - - /** - * @param T ... - * @param D ... - * @param x ... - * @param a0 ... - */ - void Alpha0Detail(double T, double D, double[] x, doubleW[] a0) { - // Private Sub Alpha0Detail(T, D, x, a0) - - // Calculate the ideal gas Helmholtz energy and its derivatives with respect to - // T and D. - // This routine is not needed when only P (or Z) is calculated. - - // Inputs: - // T - Temperature (K) - // D - Density (mol/l) - // x() - Composition (mole fraction) - - // Outputs: - // a0(0) - Ideal gas Helmholtz energy (J/mol) - // a0(1) - partial (a0)/partial(T) [J/(mol-K)] - // a0(2) - T*partial^2(a0)/partial(T)^2 [J/(mol-K)] - - double LogT, LogD, LogHyp, th0T, LogxD; - double SumHyp0, SumHyp1, SumHyp2; - double em, ep, hcn, hsn; - - a0[0].val = 0; - a0[1].val = 0; - a0[2].val = 0; - - if (D > epsilon) { - LogD = Math.log(D); - } else { - LogD = Math.log(epsilon); - } - LogT = Math.log(T); - for (int i = 1; i <= NcDetail; ++i) { - if (x[i] > 0) { - LogxD = LogD + Math.log(x[i]); - SumHyp0 = 0; - SumHyp1 = 0; - SumHyp2 = 0; - for (int j = 4; j <= 7; ++j) { - if (th0i[i][j] > 0) { - th0T = th0i[i][j] / T; - ep = Math.exp(th0T); - em = 1 / ep; - hsn = (ep - em) / 2; - hcn = (ep + em) / 2; - if (j == 4 || j == 6) { - LogHyp = Math.log(Math.abs(hsn)); - SumHyp0 += n0i[i][j] * LogHyp; - SumHyp1 += n0i[i][j] * (LogHyp - th0T * hcn / hsn); - SumHyp2 += n0i[i][j] * sq(th0T / hsn); - } else { - LogHyp = Math.log(Math.abs(hcn)); - SumHyp0 += -n0i[i][j] * LogHyp; - SumHyp1 += -n0i[i][j] * (LogHyp - th0T * hsn / hcn); - SumHyp2 += +n0i[i][j] * sq(th0T / hcn); - } - } - } - a0[0].val += - x[i] * (LogxD + n0i[i][1] + n0i[i][2] / T - n0i[i][3] * LogT + SumHyp0); - a0[1].val += x[i] * (LogxD + n0i[i][1] - n0i[i][3] * (1 + LogT) + SumHyp1); - a0[2].val += -x[i] * (n0i[i][3] + SumHyp2); + K3 = sq(K3); + U = sq(U); + + // Binary pair contributions + for (int i = 1; i <= NcDetail - 1; ++i) { + if (x[i] > 0) { + for (int j = i + 1; j <= NcDetail; ++j) { + if (x[j] > 0) { + xij = 2 * x[i] * x[j]; + K3 = K3 + xij * Kij5[i][j]; + U = U + xij * Uij5[i][j]; + G = G + xij * Gij5[i][j]; + for (int n = 1; n <= 18; ++n) { + Bs[n] = Bs[n] + xij * Bsnij2[i][j][n]; // Second virial coefficients of + // mixture } + } } - a0[0].val = a0[0].val * RDetail * T; - a0[1].val = a0[1].val * RDetail; - a0[2].val = a0[2].val * RDetail; + } } - - /** - * @param itau .... - * @param idel ... - * @param T ... - * @param D ... - * @param ar ... - */ - void AlpharDetail(int itau, int idel, double T, double D, doubleW[][] ar) { - // Private Sub AlpharDetail(itau, idel, T, D, ar) - - // Calculate the derivatives of the residual Helmholtz energy (ar) with respect - // to T and D. - // itau and idel are inputs that contain the highest derivatives needed. - // Outputs are returned in the array ar. - // Subroutine xTerms must be called before this routine if x has changed - - // Inputs: - // itau - Set this to 1 to calculate "ar" derivatives with respect to T [i.e., - // ar(1,0), ar(1,1), and ar(2,0)], otherwise set it to 0. - // idel - Currently not used, but kept as an input for future use in specifing - // the highest density derivative needed. - // T - Temperature (K) - // D - Density (mol/l) - - // Outputs: - // ar(0,0) - Residual Helmholtz energy (J/mol) - // ar(0,1) - D*partial (ar)/partial(D) (J/mol) - // ar(0,2) - D^2*partial^2(ar)/partial(D)^2 (J/mol) - // ar(0,3) - D^3*partial^3(ar)/partial(D)^3 (J/mol) - // ar(1,0) - partial (ar)/partial(T) [J/(mol-K)] - // ar(1,1) - D*partial^2(ar)/partial(D)/partial(T) [J/(mol-K)] - // ar(2,0) - T*partial^2(ar)/partial(T)^2 [J/(mol-K)] - - double ckd, bkd, Dred; - double Sum, s0, s1, s2, s3, RT; - double[] Sum0 = new double[NTerms + 1]; - double[] SumB = new double[NTerms + 1]; - double[] Dknn = new double[9 + 1]; - double[] Expn = new double[4 + 1]; - - double[] CoefD1 = new double[NTerms + 1]; - double[] CoefD2 = new double[NTerms + 1]; - double[] CoefD3 = new double[NTerms + 1]; - - double[] CoefT1 = new double[NTerms + 1]; - double[] CoefT2 = new double[NTerms + 1]; - - for (int i = 0; i < 3; ++i) { - for (int j = 0; j < 3; ++j) { - ar[i][j].val = 0; - } - } - if (Math.abs(T - Told) > 0.0000001) { - for (int n = 1; n <= 58; ++n) { - Tun[n] = Math.pow(T, -un[n]); - } - } - Told = T; - - // Precalculation of common powers and exponents of density - Dred = K3 * D; - Dknn[0] = 1; - for (int n = 1; n <= 9; ++n) { - Dknn[n] = Dred * Dknn[n - 1]; - } - Expn[0] = 1; - for (int n = 1; n <= 4; ++n) { - Expn[n] = Math.exp(-Dknn[n]); - } - RT = RDetail * T; - - for (int n = 1; n <= 58; ++n) { - // Contributions to the Helmholtz energy and its derivatives with respect to - // temperature - CoefT1[n] = RDetail * (un[n] - 1); - CoefT2[n] = CoefT1[n] * un[n]; - // Contributions to the virial coefficients - SumB[n] = 0; - Sum0[n] = 0; - if (n <= 18) { - Sum = Bs[n] * D; - if (n >= 13) { - Sum += -Csn[n] * Dred; - } - SumB[n] = Sum * Tun[n]; - } - if (n >= 13) { - // Contributions to the residual part of the Helmholtz energy - Sum0[n] = Csn[n] * Dknn[bn[n]] * Tun[n] * Expn[kn[n]]; - // Contributions to the derivatives of the Helmholtz energy with respect to - // density - bkd = bn[n] - kn[n] * Dknn[kn[n]]; - ckd = kn[n] * kn[n] * Dknn[kn[n]]; - CoefD1[n] = bkd; - CoefD2[n] = bkd * (bkd - 1) - ckd; - CoefD3[n] = (bkd - 2) * CoefD2[n] + ckd * (1 - kn[n] - 2 * bkd); + K3 = Math.pow(K3, 0.6); + U = Math.pow(U, 0.2); + + // Third virial and higher coefficients + Q2 = sq(Q); + for (int n = 13; n <= 58; ++n) { + Csn[n] = an[n] * Math.pow(U, un[n]); + if (gn[n] == 1) { + Csn[n] = Csn[n] * G; + } + if (qn[n] == 1) { + Csn[n] = Csn[n] * Q2; + } + if (fn[n] == 1) { + Csn[n] = Csn[n] * F; + } + } + } + + /** + * @param T ... + * @param D ... + * @param x ... + * @param a0 ... + */ + void Alpha0Detail(double T, double D, double[] x, doubleW[] a0) { + // Private Sub Alpha0Detail(T, D, x, a0) + + // Calculate the ideal gas Helmholtz energy and its derivatives with respect to + // T and D. + // This routine is not needed when only P (or Z) is calculated. + + // Inputs: + // T - Temperature (K) + // D - Density (mol/l) + // x() - Composition (mole fraction) + + // Outputs: + // a0(0) - Ideal gas Helmholtz energy (J/mol) + // a0(1) - partial (a0)/partial(T) [J/(mol-K)] + // a0(2) - T*partial^2(a0)/partial(T)^2 [J/(mol-K)] + + double LogT, LogD, LogHyp, th0T, LogxD; + double SumHyp0, SumHyp1, SumHyp2; + double em, ep, hcn, hsn; + + a0[0].val = 0; + a0[1].val = 0; + a0[2].val = 0; + + if (D > epsilon) { + LogD = Math.log(D); + } else { + LogD = Math.log(epsilon); + } + LogT = Math.log(T); + for (int i = 1; i <= NcDetail; ++i) { + if (x[i] > 0) { + LogxD = LogD + Math.log(x[i]); + SumHyp0 = 0; + SumHyp1 = 0; + SumHyp2 = 0; + for (int j = 4; j <= 7; ++j) { + if (th0i[i][j] > 0) { + th0T = th0i[i][j] / T; + ep = Math.exp(th0T); + em = 1 / ep; + hsn = (ep - em) / 2; + hcn = (ep + em) / 2; + if (j == 4 || j == 6) { + LogHyp = Math.log(Math.abs(hsn)); + SumHyp0 += n0i[i][j] * LogHyp; + SumHyp1 += n0i[i][j] * (LogHyp - th0T * hcn / hsn); + SumHyp2 += n0i[i][j] * sq(th0T / hsn); } else { - CoefD1[n] = 0; - CoefD2[n] = 0; - CoefD3[n] = 0; + LogHyp = Math.log(Math.abs(hcn)); + SumHyp0 += -n0i[i][j] * LogHyp; + SumHyp1 += -n0i[i][j] * (LogHyp - th0T * hsn / hcn); + SumHyp2 += +n0i[i][j] * sq(th0T / hcn); } + } } + a0[0].val += x[i] * (LogxD + n0i[i][1] + n0i[i][2] / T - n0i[i][3] * LogT + SumHyp0); + a0[1].val += x[i] * (LogxD + n0i[i][1] - n0i[i][3] * (1 + LogT) + SumHyp1); + a0[2].val += -x[i] * (n0i[i][3] + SumHyp2); + } + } + a0[0].val = a0[0].val * RDetail * T; + a0[1].val = a0[1].val * RDetail; + a0[2].val = a0[2].val * RDetail; + } + + /** + * @param itau .... + * @param idel ... + * @param T ... + * @param D ... + * @param ar ... + */ + void AlpharDetail(int itau, int idel, double T, double D, doubleW[][] ar) { + // Private Sub AlpharDetail(itau, idel, T, D, ar) + + // Calculate the derivatives of the residual Helmholtz energy (ar) with respect + // to T and D. + // itau and idel are inputs that contain the highest derivatives needed. + // Outputs are returned in the array ar. + // Subroutine xTerms must be called before this routine if x has changed + + // Inputs: + // itau - Set this to 1 to calculate "ar" derivatives with respect to T [i.e., + // ar(1,0), ar(1,1), and ar(2,0)], otherwise set it to 0. + // idel - Currently not used, but kept as an input for future use in specifing + // the highest density derivative needed. + // T - Temperature (K) + // D - Density (mol/l) + + // Outputs: + // ar(0,0) - Residual Helmholtz energy (J/mol) + // ar(0,1) - D*partial (ar)/partial(D) (J/mol) + // ar(0,2) - D^2*partial^2(ar)/partial(D)^2 (J/mol) + // ar(0,3) - D^3*partial^3(ar)/partial(D)^3 (J/mol) + // ar(1,0) - partial (ar)/partial(T) [J/(mol-K)] + // ar(1,1) - D*partial^2(ar)/partial(D)/partial(T) [J/(mol-K)] + // ar(2,0) - T*partial^2(ar)/partial(T)^2 [J/(mol-K)] + + double ckd, bkd, Dred; + double Sum, s0, s1, s2, s3, RT; + double[] Sum0 = new double[NTerms + 1]; + double[] SumB = new double[NTerms + 1]; + double[] Dknn = new double[9 + 1]; + double[] Expn = new double[4 + 1]; + + double[] CoefD1 = new double[NTerms + 1]; + double[] CoefD2 = new double[NTerms + 1]; + double[] CoefD3 = new double[NTerms + 1]; + + double[] CoefT1 = new double[NTerms + 1]; + double[] CoefT2 = new double[NTerms + 1]; + + for (int i = 0; i < 3; ++i) { + for (int j = 0; j < 3; ++j) { + ar[i][j].val = 0; + } + } + if (Math.abs(T - Told) > 0.0000001) { + for (int n = 1; n <= 58; ++n) { + Tun[n] = Math.pow(T, -un[n]); + } + } + Told = T; - for (int n = 1; n <= 58; ++n) { - // Density derivatives - s0 = Sum0[n] + SumB[n]; - s1 = Sum0[n] * CoefD1[n] + SumB[n]; - s2 = Sum0[n] * CoefD2[n]; - s3 = Sum0[n] * CoefD3[n]; - ar[0][0].val = ar[0][0].val + RT * s0; - ar[0][1].val = ar[0][1].val + RT * s1; - ar[0][2].val = ar[0][2].val + RT * s2; - ar[0][3].val = ar[0][3].val + RT * s3; - // Temperature derivatives - if (itau > 0) { - ar[1][0].val = ar[1][0].val - CoefT1[n] * s0; - ar[1][1].val = ar[1][1].val - CoefT1[n] * s1; - ar[2][0].val = ar[2][0].val + CoefT2[n] * s0; - // The following are not used, but fully functional - // ar(1, 2) = ar(1, 2) - CoefT1(n) * s2; - // ar(1, 3) = ar(1, 3) - CoefT1(n) * s3; - // ar(2, 1) = ar(2, 1) + CoefT2(n) * s1; - // ar(2, 2) = ar(2, 2) + CoefT2(n) * s2; - // ar(2, 3) = ar(2, 3) + CoefT2(n) * s3; - } + // Precalculation of common powers and exponents of density + Dred = K3 * D; + Dknn[0] = 1; + for (int n = 1; n <= 9; ++n) { + Dknn[n] = Dred * Dknn[n - 1]; + } + Expn[0] = 1; + for (int n = 1; n <= 4; ++n) { + Expn[n] = Math.exp(-Dknn[n]); + } + RT = RDetail * T; + + for (int n = 1; n <= 58; ++n) { + // Contributions to the Helmholtz energy and its derivatives with respect to + // temperature + CoefT1[n] = RDetail * (un[n] - 1); + CoefT2[n] = CoefT1[n] * un[n]; + // Contributions to the virial coefficients + SumB[n] = 0; + Sum0[n] = 0; + if (n <= 18) { + Sum = Bs[n] * D; + if (n >= 13) { + Sum += -Csn[n] * Dred; } + SumB[n] = Sum * Tun[n]; + } + if (n >= 13) { + // Contributions to the residual part of the Helmholtz energy + Sum0[n] = Csn[n] * Dknn[bn[n]] * Tun[n] * Expn[kn[n]]; + // Contributions to the derivatives of the Helmholtz energy with respect to + // density + bkd = bn[n] - kn[n] * Dknn[kn[n]]; + ckd = kn[n] * kn[n] * Dknn[kn[n]]; + CoefD1[n] = bkd; + CoefD2[n] = bkd * (bkd - 1) - ckd; + CoefD3[n] = (bkd - 2) * CoefD2[n] + ckd * (1 - kn[n] - 2 * bkd); + } else { + CoefD1[n] = 0; + CoefD2[n] = 0; + CoefD3[n] = 0; + } } - // The following routine must be called once before any other routine. - /** - *- * SetupDetail. - *
- */ - public void SetupDetail() { - // Initialize all the constants and parameters in the DETAIL model. - // Some values are modified for calculations that do not depend on T, D, and x - // in order to speed up the program. - - int[] sn = new int[NTerms + 1]; - int[] wn = new int[NTerms + 1]; - - double[] Ei = new double[MaxFlds + 1]; - double[] Ki = new double[MaxFlds + 1]; - double[] Si = new double[MaxFlds + 1]; - double[] Wi = new double[MaxFlds + 1]; - double Bsnij; - double[][] Kij = new double[MaxFlds + 1][MaxFlds + 1]; - double[][] Gij = new double[MaxFlds + 1][MaxFlds + 1]; - double[][] Eij = new double[MaxFlds + 1][MaxFlds + 1]; - double[][] Uij = new double[MaxFlds + 1][MaxFlds + 1]; - - double d0; - - RDetail = 8.31451; - - // Molar masses (g/mol) - MMiDetail[1] = 16.043; // Methane - MMiDetail[2] = 28.0135; // Nitrogen - MMiDetail[3] = 44.01; // Carbon dioxide - MMiDetail[4] = 30.07; // Ethane - MMiDetail[5] = 44.097; // Propane - MMiDetail[6] = 58.123; // Isobutane - MMiDetail[7] = 58.123; // n-Butane - MMiDetail[8] = 72.15; // Isopentane - MMiDetail[9] = 72.15; // n-Pentane - MMiDetail[10] = 86.177; // Hexane - MMiDetail[11] = 100.204; // Heptane - MMiDetail[12] = 114.231; // Octane - MMiDetail[13] = 128.258; // Nonane - MMiDetail[14] = 142.285; // Decane - MMiDetail[15] = 2.0159; // Hydrogen - MMiDetail[16] = 31.9988; // Oxygen - MMiDetail[17] = 28.01; // Carbon monoxide - MMiDetail[18] = 18.0153; // Water - MMiDetail[19] = 34.082; // Hydrogen sulfide - MMiDetail[20] = 4.0026; // Helium - MMiDetail[21] = 39.948; // Argon - - // Initialize constants - Told = 0; - for (int i = 1; i <= NTerms; ++i) { - an[i] = 0; - bn[i] = 0; - gn[i] = 0; - fn[i] = 0; - kn[i] = 0; - qn[i] = 0; - sn[i] = 0; - un[i] = 0; - wn[i] = 0; - } + for (int n = 1; n <= 58; ++n) { + // Density derivatives + s0 = Sum0[n] + SumB[n]; + s1 = Sum0[n] * CoefD1[n] + SumB[n]; + s2 = Sum0[n] * CoefD2[n]; + s3 = Sum0[n] * CoefD3[n]; + ar[0][0].val = ar[0][0].val + RT * s0; + ar[0][1].val = ar[0][1].val + RT * s1; + ar[0][2].val = ar[0][2].val + RT * s2; + ar[0][3].val = ar[0][3].val + RT * s3; + // Temperature derivatives + if (itau > 0) { + ar[1][0].val = ar[1][0].val - CoefT1[n] * s0; + ar[1][1].val = ar[1][1].val - CoefT1[n] * s1; + ar[2][0].val = ar[2][0].val + CoefT2[n] * s0; + // The following are not used, but fully functional + // ar(1, 2) = ar(1, 2) - CoefT1(n) * s2; + // ar(1, 3) = ar(1, 3) - CoefT1(n) * s3; + // ar(2, 1) = ar(2, 1) + CoefT2(n) * s1; + // ar(2, 2) = ar(2, 2) + CoefT2(n) * s2; + // ar(2, 3) = ar(2, 3) + CoefT2(n) * s3; + } + } + } + + // The following routine must be called once before any other routine. + /** + *+ * SetupDetail. + *
+ */ + public void SetupDetail() { + // Initialize all the constants and parameters in the DETAIL model. + // Some values are modified for calculations that do not depend on T, D, and x + // in order to speed up the program. + + int[] sn = new int[NTerms + 1]; + int[] wn = new int[NTerms + 1]; + + double[] Ei = new double[MaxFlds + 1]; + double[] Ki = new double[MaxFlds + 1]; + double[] Si = new double[MaxFlds + 1]; + double[] Wi = new double[MaxFlds + 1]; + double Bsnij; + double[][] Kij = new double[MaxFlds + 1][MaxFlds + 1]; + double[][] Gij = new double[MaxFlds + 1][MaxFlds + 1]; + double[][] Eij = new double[MaxFlds + 1][MaxFlds + 1]; + double[][] Uij = new double[MaxFlds + 1][MaxFlds + 1]; + + double d0; + + RDetail = 8.31451; + + // Molar masses (g/mol) + MMiDetail[1] = 16.043; // Methane + MMiDetail[2] = 28.0135; // Nitrogen + MMiDetail[3] = 44.01; // Carbon dioxide + MMiDetail[4] = 30.07; // Ethane + MMiDetail[5] = 44.097; // Propane + MMiDetail[6] = 58.123; // Isobutane + MMiDetail[7] = 58.123; // n-Butane + MMiDetail[8] = 72.15; // Isopentane + MMiDetail[9] = 72.15; // n-Pentane + MMiDetail[10] = 86.177; // Hexane + MMiDetail[11] = 100.204; // Heptane + MMiDetail[12] = 114.231; // Octane + MMiDetail[13] = 128.258; // Nonane + MMiDetail[14] = 142.285; // Decane + MMiDetail[15] = 2.0159; // Hydrogen + MMiDetail[16] = 31.9988; // Oxygen + MMiDetail[17] = 28.01; // Carbon monoxide + MMiDetail[18] = 18.0153; // Water + MMiDetail[19] = 34.082; // Hydrogen sulfide + MMiDetail[20] = 4.0026; // Helium + MMiDetail[21] = 39.948; // Argon + + // Initialize constants + Told = 0; + for (int i = 1; i <= NTerms; ++i) { + an[i] = 0; + bn[i] = 0; + gn[i] = 0; + fn[i] = 0; + kn[i] = 0; + qn[i] = 0; + sn[i] = 0; + un[i] = 0; + wn[i] = 0; + } - for (int i = 1; i <= MaxFlds; ++i) { - Ei[i] = 0; - Fi[i] = 0; - Gi[i] = 0; - Ki[i] = 0; - Qi[i] = 0; - Si[i] = 0; - Wi[i] = 0; - xold[i] = 0; - for (int j = 1; j <= MaxFlds; ++j) { - Eij[i][j] = 1; - Gij[i][j] = 1; - Kij[i][j] = 1; - Uij[i][j] = 1; - } - } + for (int i = 1; i <= MaxFlds; ++i) { + Ei[i] = 0; + Fi[i] = 0; + Gi[i] = 0; + Ki[i] = 0; + Qi[i] = 0; + Si[i] = 0; + Wi[i] = 0; + xold[i] = 0; + for (int j = 1; j <= MaxFlds; ++j) { + Eij[i][j] = 1; + Gij[i][j] = 1; + Kij[i][j] = 1; + Uij[i][j] = 1; + } + } - // Coefficients of the equation of state - an[1] = 0.1538326; - an[2] = 1.341953; - an[3] = -2.998583; - an[4] = -0.04831228; - an[5] = 0.3757965; - an[6] = -1.589575; - an[7] = -0.05358847; - an[8] = 0.88659463; - an[9] = -0.71023704; - an[10] = -1.471722; - an[11] = 1.32185035; - an[12] = -0.78665925; - an[13] = 0.00000000229129; - an[14] = 0.1576724; - an[15] = -0.4363864; - an[16] = -0.04408159; - an[17] = -0.003433888; - an[18] = 0.03205905; - an[19] = 0.02487355; - an[20] = 0.07332279; - an[21] = -0.001600573; - an[22] = 0.6424706; - an[23] = -0.4162601; - an[24] = -0.06689957; - an[25] = 0.2791795; - an[26] = -0.6966051; - an[27] = -0.002860589; - an[28] = -0.008098836; - an[29] = 3.150547; - an[30] = 0.007224479; - an[31] = -0.7057529; - an[32] = 0.5349792; - an[33] = -0.07931491; - an[34] = -1.418465; - an[35] = -5.99905E-17; - an[36] = 0.1058402; - an[37] = 0.03431729; - an[38] = -0.007022847; - an[39] = 0.02495587; - an[40] = 0.04296818; - an[41] = 0.7465453; - an[42] = -0.2919613; - an[43] = 7.294616; - an[44] = -9.936757; - an[45] = -0.005399808; - an[46] = -0.2432567; - an[47] = 0.04987016; - an[48] = 0.003733797; - an[49] = 1.874951; - an[50] = 0.002168144; - an[51] = -0.6587164; - an[52] = 0.000205518; - an[53] = 0.009776195; - an[54] = -0.02048708; - an[55] = 0.01557322; - an[56] = 0.006862415; - an[57] = -0.001226752; - an[58] = 0.002850908; - - // Density exponents - bn[1] = 1; - bn[2] = 1; - bn[3] = 1; - bn[4] = 1; - bn[5] = 1; - bn[6] = 1; - bn[7] = 1; - bn[8] = 1; - bn[9] = 1; - bn[10] = 1; - bn[11] = 1; - bn[12] = 1; - bn[13] = 1; - bn[14] = 1; - bn[15] = 1; - bn[16] = 1; - bn[17] = 1; - bn[18] = 1; - bn[19] = 2; - bn[20] = 2; - bn[21] = 2; - bn[22] = 2; - bn[23] = 2; - bn[24] = 2; - bn[25] = 2; - bn[26] = 2; - bn[27] = 2; - bn[28] = 3; - bn[29] = 3; - bn[30] = 3; - bn[31] = 3; - bn[32] = 3; - bn[33] = 3; - bn[34] = 3; - bn[35] = 3; - bn[36] = 3; - bn[37] = 3; - bn[38] = 4; - bn[39] = 4; - bn[40] = 4; - bn[41] = 4; - bn[42] = 4; - bn[43] = 4; - bn[44] = 4; - bn[45] = 5; - bn[46] = 5; - bn[47] = 5; - bn[48] = 5; - bn[49] = 5; - bn[50] = 6; - bn[51] = 6; - bn[52] = 7; - bn[53] = 7; - bn[54] = 8; - bn[55] = 8; - bn[56] = 8; - bn[57] = 9; - bn[58] = 9; - - // Exponents on density in EXP[-cn*D^kn] part - // The cn part in this term is not included in this program since it is 1 when - // kn<>0][and 0 otherwise - kn[13] = 3; - kn[14] = 2; - kn[15] = 2; - kn[16] = 2; - kn[17] = 4; - kn[18] = 4; - kn[21] = 2; - kn[22] = 2; - kn[23] = 2; - kn[24] = 4; - kn[25] = 4; - kn[26] = 4; - kn[27] = 4; - kn[29] = 1; - kn[30] = 1; - kn[31] = 2; - kn[32] = 2; - kn[33] = 3; - kn[34] = 3; - kn[35] = 4; - kn[36] = 4; - kn[37] = 4; - kn[40] = 2; - kn[41] = 2; - kn[42] = 2; - kn[43] = 4; - kn[44] = 4; - kn[46] = 2; - kn[47] = 2; - kn[48] = 4; - kn[49] = 4; - kn[51] = 2; - kn[53] = 2; - kn[54] = 1; - kn[55] = 2; - kn[56] = 2; - kn[57] = 2; - kn[58] = 2; - - // Temperature exponents - un[1] = 0; - un[2] = 0.5; - un[3] = 1; - un[4] = 3.5; - un[5] = -0.5; - un[6] = 4.5; - un[7] = 0.5; - un[8] = 7.5; - un[9] = 9.5; - un[10] = 6; - un[11] = 12; - un[12] = 12.5; - un[13] = -6; - un[14] = 2; - un[15] = 3; - un[16] = 2; - un[17] = 2; - un[18] = 11; - un[19] = -0.5; - un[20] = 0.5; - un[21] = 0; - un[22] = 4; - un[23] = 6; - un[24] = 21; - un[25] = 23; - un[26] = 22; - un[27] = -1; - un[28] = -0.5; - un[29] = 7; - un[30] = -1; - un[31] = 6; - un[32] = 4; - un[33] = 1; - un[34] = 9; - un[35] = -13; - un[36] = 21; - un[37] = 8; - un[38] = -0.5; - un[39] = 0; - un[40] = 2; - un[41] = 7; - un[42] = 9; - un[43] = 22; - un[44] = 23; - un[45] = 1; - un[46] = 9; - un[47] = 3; - un[48] = 8; - un[49] = 23; - un[50] = 1.5; - un[51] = 5; - un[52] = -0.5; - un[53] = 4; - un[54] = 7; - un[55] = 3; - un[56] = 0; - un[57] = 1; - un[58] = 0; - - // Flags - fn[13] = 1; - fn[27] = 1; - fn[30] = 1; - fn[35] = 1; - gn[5] = 1; - gn[6] = 1; - gn[25] = 1; - gn[29] = 1; - gn[32] = 1; - gn[33] = 1; - gn[34] = 1; - gn[51] = 1; - gn[54] = 1; - gn[56] = 1; - qn[7] = 1; - qn[16] = 1; - qn[26] = 1; - qn[28] = 1; - qn[37] = 1; - qn[42] = 1; - qn[47] = 1; - qn[49] = 1; - qn[52] = 1; - qn[58] = 1; - sn[8] = 1; - sn[9] = 1; - wn[10] = 1; - wn[11] = 1; - wn[12] = 1; - - // Energy parameters - Ei[1] = 151.3183; - Ei[2] = 99.73778; - Ei[3] = 241.9606; - Ei[4] = 244.1667; - Ei[5] = 298.1183; - Ei[6] = 324.0689; - Ei[7] = 337.6389; - Ei[8] = 365.5999; - Ei[9] = 370.6823; - Ei[10] = 402.636293; - Ei[11] = 427.72263; - Ei[12] = 450.325022; - Ei[13] = 470.840891; - Ei[14] = 489.558373; - Ei[15] = 26.95794; - Ei[16] = 122.7667; - Ei[17] = 105.5348; - Ei[18] = 514.0156; - Ei[19] = 296.355; - Ei[20] = 2.610111; - Ei[21] = 119.6299; - - // Size parameters - Ki[1] = 0.4619255; - Ki[2] = 0.4479153; - Ki[3] = 0.4557489; - Ki[4] = 0.5279209; - Ki[5] = 0.583749; - Ki[6] = 0.6406937; - Ki[7] = 0.6341423; - Ki[8] = 0.6738577; - Ki[9] = 0.6798307; - Ki[10] = 0.7175118; - Ki[11] = 0.7525189; - Ki[12] = 0.784955; - Ki[13] = 0.8152731; - Ki[14] = 0.8437826; - Ki[15] = 0.3514916; - Ki[16] = 0.4186954; - Ki[17] = 0.4533894; - Ki[18] = 0.3825868; - Ki[19] = 0.4618263; - Ki[20] = 0.3589888; - Ki[21] = 0.4216551; - - // Orientation parameters - Gi[2] = 0.027815; - Gi[3] = 0.189065; - Gi[4] = 0.0793; - Gi[5] = 0.141239; - Gi[6] = 0.256692; - Gi[7] = 0.281835; - Gi[8] = 0.332267; - Gi[9] = 0.366911; - Gi[10] = 0.289731; - Gi[11] = 0.337542; - Gi[12] = 0.383381; - Gi[13] = 0.427354; - Gi[14] = 0.469659; - Gi[15] = 0.034369; - Gi[16] = 0.021; - Gi[17] = 0.038953; - Gi[18] = 0.3325; - Gi[19] = 0.0885; - - // Quadrupole parameters - Qi[3] = 0.69; - Qi[18] = 1.06775; - Qi[19] = 0.633276; - Fi[15] = 1; // High temperature parameter - Si[18] = 1.5822; // Dipole parameter - Si[19] = 0.39; // Dipole parameter - Wi[18] = 1; // Association parameter - - // Energy parameters - Eij[1][2] = 0.97164; - Eij[1][3] = 0.960644; - Eij[1][5] = 0.994635; - Eij[1][6] = 1.01953; - Eij[1][7] = 0.989844; - Eij[1][8] = 1.00235; - Eij[1][9] = 0.999268; - Eij[1][10] = 1.107274; - Eij[1][11] = 0.88088; - Eij[1][12] = 0.880973; - Eij[1][13] = 0.881067; - Eij[1][14] = 0.881161; - Eij[1][15] = 1.17052; - Eij[1][17] = 0.990126; - Eij[1][18] = 0.708218; - Eij[1][19] = 0.931484; - Eij[2][3] = 1.02274; - Eij[2][4] = 0.97012; - Eij[2][5] = 0.945939; - Eij[2][6] = 0.946914; - Eij[2][7] = 0.973384; - Eij[2][8] = 0.95934; - Eij[2][9] = 0.94552; - Eij[2][15] = 1.08632; - Eij[2][16] = 1.021; - Eij[2][17] = 1.00571; - Eij[2][18] = 0.746954; - Eij[2][19] = 0.902271; - Eij[3][4] = 0.925053; - Eij[3][5] = 0.960237; - Eij[3][6] = 0.906849; - Eij[3][7] = 0.897362; - Eij[3][8] = 0.726255; - Eij[3][9] = 0.859764; - Eij[3][10] = 0.855134; - Eij[3][11] = 0.831229; - Eij[3][12] = 0.80831; - Eij[3][13] = 0.786323; - Eij[3][14] = 0.765171; - Eij[3][15] = 1.28179; - Eij[3][17] = 1.5; - Eij[3][18] = 0.849408; - Eij[3][19] = 0.955052; - Eij[4][5] = 1.02256; - Eij[4][7] = 1.01306; - Eij[4][9] = 1.00532; - Eij[4][15] = 1.16446; - Eij[4][18] = 0.693168; - Eij[4][19] = 0.946871; - Eij[5][7] = 1.0049; - Eij[5][15] = 1.034787; - Eij[6][15] = 1.3; - Eij[7][15] = 1.3; - Eij[10][19] = 1.008692; - Eij[11][19] = 1.010126; - Eij[12][19] = 1.011501; - Eij[13][19] = 1.012821; - Eij[14][19] = 1.014089; - Eij[15][17] = 1.1; - - // Conformal energy parameters - Uij[1][2] = 0.886106; - Uij[1][3] = 0.963827; - Uij[1][5] = 0.990877; - Uij[1][7] = 0.992291; - Uij[1][9] = 1.00367; - Uij[1][10] = 1.302576; - Uij[1][11] = 1.191904; - Uij[1][12] = 1.205769; - Uij[1][13] = 1.219634; - Uij[1][14] = 1.233498; - Uij[1][15] = 1.15639; - Uij[1][19] = 0.736833; - Uij[2][3] = 0.835058; - Uij[2][4] = 0.816431; - Uij[2][5] = 0.915502; - Uij[2][7] = 0.993556; - Uij[2][15] = 0.408838; - Uij[2][19] = 0.993476; - Uij[3][4] = 0.96987; - Uij[3][10] = 1.066638; - Uij[3][11] = 1.077634; - Uij[3][12] = 1.088178; - Uij[3][13] = 1.098291; - Uij[3][14] = 1.108021; - Uij[3][17] = 0.9; - Uij[3][19] = 1.04529; - Uij[4][5] = 1.065173; - Uij[4][6] = 1.25; - Uij[4][7] = 1.25; - Uij[4][8] = 1.25; - Uij[4][9] = 1.25; - Uij[4][15] = 1.61666; - Uij[4][19] = 0.971926; - Uij[10][19] = 1.028973; - Uij[11][19] = 1.033754; - Uij[12][19] = 1.038338; - Uij[13][19] = 1.042735; - Uij[14][19] = 1.046966; - - // Size parameters - Kij[1][2] = 1.00363; - Kij[1][3] = 0.995933; - Kij[1][5] = 1.007619; - Kij[1][7] = 0.997596; - Kij[1][9] = 1.002529; - Kij[1][10] = 0.982962; - Kij[1][11] = 0.983565; - Kij[1][12] = 0.982707; - Kij[1][13] = 0.981849; - Kij[1][14] = 0.980991; - Kij[1][15] = 1.02326; - Kij[1][19] = 1.00008; - Kij[2][3] = 0.982361; - Kij[2][4] = 1.00796; - Kij[2][15] = 1.03227; - Kij[2][19] = 0.942596; - Kij[3][4] = 1.00851; - Kij[3][10] = 0.910183; - Kij[3][11] = 0.895362; - Kij[3][12] = 0.881152; - Kij[3][13] = 0.86752; - Kij[3][14] = 0.854406; - Kij[3][19] = 1.00779; - Kij[4][5] = 0.986893; - Kij[4][15] = 1.02034; - Kij[4][19] = 0.999969; - Kij[10][19] = 0.96813; - Kij[11][19] = 0.96287; - Kij[12][19] = 0.957828; - Kij[13][19] = 0.952441; - Kij[14][19] = 0.948338; - - // Orientation parameters - Gij[1][3] = 0.807653; - Gij[1][15] = 1.95731; - Gij[2][3] = 0.982746; - Gij[3][4] = 0.370296; - Gij[3][18] = 1.67309; - - // Ideal gas parameters - n0i[1][3] = 4.00088; - n0i[1][4] = 0.76315; - n0i[1][5] = 0.0046; - n0i[1][6] = 8.74432; - n0i[1][7] = -4.46921; - n0i[1][1] = 29.83843397; - n0i[1][2] = -15999.69151; - n0i[2][3] = 3.50031; - n0i[2][4] = 0.13732; - n0i[2][5] = -0.1466; - n0i[2][6] = 0.90066; - n0i[2][7] = 0; - n0i[2][1] = 17.56770785; - n0i[2][2] = -2801.729072; - n0i[3][3] = 3.50002; - n0i[3][4] = 2.04452; - n0i[3][5] = -1.06044; - n0i[3][6] = 2.03366; - n0i[3][7] = 0.01393; - n0i[3][1] = 20.65844696; - n0i[3][2] = -4902.171516; - n0i[4][3] = 4.00263; - n0i[4][4] = 4.33939; - n0i[4][5] = 1.23722; - n0i[4][6] = 13.1974; - n0i[4][7] = -6.01989; - n0i[4][1] = 36.73005938; - n0i[4][2] = -23639.65301; - n0i[5][3] = 4.02939; - n0i[5][4] = 6.60569; - n0i[5][5] = 3.197; - n0i[5][6] = 19.1921; - n0i[5][7] = -8.37267; - n0i[5][1] = 44.70909619; - n0i[5][2] = -31236.63551; - n0i[6][3] = 4.06714; - n0i[6][4] = 8.97575; - n0i[6][5] = 5.25156; - n0i[6][6] = 25.1423; - n0i[6][7] = 16.1388; - n0i[6][1] = 34.30180349; - n0i[6][2] = -38525.50276; - n0i[7][3] = 4.33944; - n0i[7][4] = 9.44893; - n0i[7][5] = 6.89406; - n0i[7][6] = 24.4618; - n0i[7][7] = 14.7824; - n0i[7][1] = 36.53237783; - n0i[7][2] = -38957.80933; - n0i[8][3] = 4; - n0i[8][4] = 11.7618; - n0i[8][5] = 20.1101; - n0i[8][6] = 33.1688; - n0i[8][7] = 0; - n0i[8][1] = 43.17218626; - n0i[8][2] = -51198.30946; - n0i[9][3] = 4; - n0i[9][4] = 8.95043; - n0i[9][5] = 21.836; - n0i[9][6] = 33.4032; - n0i[9][7] = 0; - n0i[9][1] = 42.67837089; - n0i[9][2] = -45215.83; - n0i[10][3] = 4; - n0i[10][4] = 11.6977; - n0i[10][5] = 26.8142; - n0i[10][6] = 38.6164; - n0i[10][7] = 0; - n0i[10][1] = 46.99717188; - n0i[10][2] = -52746.83318; - n0i[11][3] = 4; - n0i[11][4] = 13.7266; - n0i[11][5] = 30.4707; - n0i[11][6] = 43.5561; - n0i[11][7] = 0; - n0i[11][1] = 52.07631631; - n0i[11][2] = -57104.81056; - n0i[12][3] = 4; - n0i[12][4] = 15.6865; - n0i[12][5] = 33.8029; - n0i[12][6] = 48.1731; - n0i[12][7] = 0; - n0i[12][1] = 57.25830934; - n0i[12][2] = -60546.76385; - n0i[13][3] = 4; - n0i[13][4] = 18.0241; - n0i[13][5] = 38.1235; - n0i[13][6] = 53.3415; - n0i[13][7] = 0; - n0i[13][1] = 62.09646901; - n0i[13][2] = -66600.12837; - n0i[14][3] = 4; - n0i[14][4] = 21.0069; - n0i[14][5] = 43.4931; - n0i[14][6] = 58.3657; - n0i[14][7] = 0; - n0i[14][1] = 65.93909154; - n0i[14][2] = -74131.45483; - n0i[15][3] = 2.47906; - n0i[15][4] = 0.95806; - n0i[15][5] = 0.45444; - n0i[15][6] = 1.56039; - n0i[15][7] = -1.3756; - n0i[15][1] = 13.07520288; - n0i[15][2] = -5836.943696; - n0i[16][3] = 3.50146; - n0i[16][4] = 1.07558; - n0i[16][5] = 1.01334; - n0i[16][6] = 0; - n0i[16][7] = 0; - n0i[16][1] = 16.8017173; - n0i[16][2] = -2318.32269; - n0i[17][3] = 3.50055; - n0i[17][4] = 1.02865; - n0i[17][5] = 0.00493; - n0i[17][6] = 0; - n0i[17][7] = 0; - n0i[17][1] = 17.45786899; - n0i[17][2] = -2635.244116; - n0i[18][3] = 4.00392; - n0i[18][4] = 0.01059; - n0i[18][5] = 0.98763; - n0i[18][6] = 3.06904; - n0i[18][7] = 0; - n0i[18][1] = 21.57882705; - n0i[18][2] = -7766.733078; - n0i[19][3] = 4; - n0i[19][4] = 3.11942; - n0i[19][5] = 1.00243; - n0i[19][6] = 0; - n0i[19][7] = 0; - n0i[19][1] = 21.5830944; - n0i[19][2] = -6069.035869; - n0i[20][3] = 2.5; - n0i[20][4] = 0; - n0i[20][5] = 0; - n0i[20][6] = 0; - n0i[20][7] = 0; - n0i[20][1] = 10.04639507; - n0i[20][2] = -745.375; - n0i[21][3] = 2.5; - n0i[21][4] = 0; - n0i[21][5] = 0; - n0i[21][6] = 0; - n0i[21][7] = 0; - n0i[21][1] = 10.04639507; - n0i[21][2] = -745.375; - th0i[1][4] = 820.659; - th0i[1][5] = 178.41; - th0i[1][6] = 1062.82; - th0i[1][7] = 1090.53; - th0i[2][4] = 662.738; - th0i[2][5] = 680.562; - th0i[2][6] = 1740.06; - th0i[2][7] = 0; - th0i[3][4] = 919.306; - th0i[3][5] = 865.07; - th0i[3][6] = 483.553; - th0i[3][7] = 341.109; - th0i[4][4] = 559.314; - th0i[4][5] = 223.284; - th0i[4][6] = 1031.38; - th0i[4][7] = 1071.29; - th0i[5][4] = 479.856; - th0i[5][5] = 200.893; - th0i[5][6] = 955.312; - th0i[5][7] = 1027.29; - th0i[6][4] = 438.27; - th0i[6][5] = 198.018; - th0i[6][6] = 1905.02; - th0i[6][7] = 893.765; - th0i[7][4] = 468.27; - th0i[7][5] = 183.636; - th0i[7][6] = 1914.1; - th0i[7][7] = 903.185; - th0i[8][4] = 292.503; - th0i[8][5] = 910.237; - th0i[8][6] = 1919.37; - th0i[8][7] = 0; - th0i[9][4] = 178.67; - th0i[9][5] = 840.538; - th0i[9][6] = 1774.25; - th0i[9][7] = 0; - th0i[10][4] = 182.326; - th0i[10][5] = 859.207; - th0i[10][6] = 1826.59; - th0i[10][7] = 0; - th0i[11][4] = 169.789; - th0i[11][5] = 836.195; - th0i[11][6] = 1760.46; - th0i[11][7] = 0; - th0i[12][4] = 158.922; - th0i[12][5] = 815.064; - th0i[12][6] = 1693.07; - th0i[12][7] = 0; - th0i[13][4] = 156.854; - th0i[13][5] = 814.882; - th0i[13][6] = 1693.79; - th0i[13][7] = 0; - th0i[14][4] = 164.947; - th0i[14][5] = 836.264; - th0i[14][6] = 1750.24; - th0i[14][7] = 0; - th0i[15][4] = 228.734; - th0i[15][5] = 326.843; - th0i[15][6] = 1651.71; - th0i[15][7] = 1671.69; - th0i[16][4] = 2235.71; - th0i[16][5] = 1116.69; - th0i[16][6] = 0; - th0i[16][7] = 0; - th0i[17][4] = 1550.45; - th0i[17][5] = 704.525; - th0i[17][6] = 0; - th0i[17][7] = 0; - th0i[18][4] = 268.795; - th0i[18][5] = 1141.41; - th0i[18][6] = 2507.37; - th0i[18][7] = 0; - th0i[19][4] = 1833.63; - th0i[19][5] = 847.181; - th0i[19][6] = 0; - th0i[19][7] = 0; - th0i[20][4] = 0; - th0i[20][5] = 0; - th0i[20][6] = 0; - th0i[20][7] = 0; - th0i[21][4] = 0; - th0i[21][5] = 0; - th0i[21][6] = 0; - th0i[21][7] = 0; - - // Precalculations of constants - for (int i = 1; i <= MaxFlds; ++i) { - Ki25[i] = Math.pow(Ki[i], 2.5); - Ei25[i] = Math.pow(Ei[i], 2.5); - } - for (int i = 1; i <= MaxFlds; ++i) { - for (int j = i; j <= MaxFlds; ++j) { - for (int n = 1; n <= 18; ++n) { - Bsnij = 1; - if (gn[n] == 1) { - Bsnij = Gij[i][j] * (Gi[i] + Gi[j]) / 2; - } - if (qn[n] == 1) { - Bsnij = Bsnij * Qi[i] * Qi[j]; - } - if (fn[n] == 1) { - Bsnij = Bsnij * Fi[i] * Fi[j]; - } - if (sn[n] == 1) { - Bsnij = Bsnij * Si[i] * Si[j]; - } - if (wn[n] == 1) { - Bsnij = Bsnij * Wi[i] * Wi[j]; - } - Bsnij2[i][j][n] = an[n] * Math.pow(Eij[i][j] * Math.sqrt(Ei[i] * Ei[j]), un[n]) - * Math.pow(Ki[i] * Ki[j], 1.5) * Bsnij; - } - Kij5[i][j] = (Math.pow(Kij[i][j], 5) - 1) * Ki25[i] * Ki25[j]; - Uij5[i][j] = (Math.pow(Uij[i][j], 5) - 1) * Ei25[i] * Ei25[j]; - Gij5[i][j] = (Gij[i][j] - 1) * (Gi[i] + Gi[j]) / 2; - } - } - // Ideal gas terms - d0 = 101.325 / RDetail / 298.15; - for (int i = 1; i <= MaxFlds; ++i) { - n0i[i][3] = n0i[i][3] - 1; - n0i[i][1] = n0i[i][1] - Math.log(d0); + // Coefficients of the equation of state + an[1] = 0.1538326; + an[2] = 1.341953; + an[3] = -2.998583; + an[4] = -0.04831228; + an[5] = 0.3757965; + an[6] = -1.589575; + an[7] = -0.05358847; + an[8] = 0.88659463; + an[9] = -0.71023704; + an[10] = -1.471722; + an[11] = 1.32185035; + an[12] = -0.78665925; + an[13] = 0.00000000229129; + an[14] = 0.1576724; + an[15] = -0.4363864; + an[16] = -0.04408159; + an[17] = -0.003433888; + an[18] = 0.03205905; + an[19] = 0.02487355; + an[20] = 0.07332279; + an[21] = -0.001600573; + an[22] = 0.6424706; + an[23] = -0.4162601; + an[24] = -0.06689957; + an[25] = 0.2791795; + an[26] = -0.6966051; + an[27] = -0.002860589; + an[28] = -0.008098836; + an[29] = 3.150547; + an[30] = 0.007224479; + an[31] = -0.7057529; + an[32] = 0.5349792; + an[33] = -0.07931491; + an[34] = -1.418465; + an[35] = -5.99905E-17; + an[36] = 0.1058402; + an[37] = 0.03431729; + an[38] = -0.007022847; + an[39] = 0.02495587; + an[40] = 0.04296818; + an[41] = 0.7465453; + an[42] = -0.2919613; + an[43] = 7.294616; + an[44] = -9.936757; + an[45] = -0.005399808; + an[46] = -0.2432567; + an[47] = 0.04987016; + an[48] = 0.003733797; + an[49] = 1.874951; + an[50] = 0.002168144; + an[51] = -0.6587164; + an[52] = 0.000205518; + an[53] = 0.009776195; + an[54] = -0.02048708; + an[55] = 0.01557322; + an[56] = 0.006862415; + an[57] = -0.001226752; + an[58] = 0.002850908; + + // Density exponents + bn[1] = 1; + bn[2] = 1; + bn[3] = 1; + bn[4] = 1; + bn[5] = 1; + bn[6] = 1; + bn[7] = 1; + bn[8] = 1; + bn[9] = 1; + bn[10] = 1; + bn[11] = 1; + bn[12] = 1; + bn[13] = 1; + bn[14] = 1; + bn[15] = 1; + bn[16] = 1; + bn[17] = 1; + bn[18] = 1; + bn[19] = 2; + bn[20] = 2; + bn[21] = 2; + bn[22] = 2; + bn[23] = 2; + bn[24] = 2; + bn[25] = 2; + bn[26] = 2; + bn[27] = 2; + bn[28] = 3; + bn[29] = 3; + bn[30] = 3; + bn[31] = 3; + bn[32] = 3; + bn[33] = 3; + bn[34] = 3; + bn[35] = 3; + bn[36] = 3; + bn[37] = 3; + bn[38] = 4; + bn[39] = 4; + bn[40] = 4; + bn[41] = 4; + bn[42] = 4; + bn[43] = 4; + bn[44] = 4; + bn[45] = 5; + bn[46] = 5; + bn[47] = 5; + bn[48] = 5; + bn[49] = 5; + bn[50] = 6; + bn[51] = 6; + bn[52] = 7; + bn[53] = 7; + bn[54] = 8; + bn[55] = 8; + bn[56] = 8; + bn[57] = 9; + bn[58] = 9; + + // Exponents on density in EXP[-cn*D^kn] part + // The cn part in this term is not included in this program since it is 1 when + // kn<>0][and 0 otherwise + kn[13] = 3; + kn[14] = 2; + kn[15] = 2; + kn[16] = 2; + kn[17] = 4; + kn[18] = 4; + kn[21] = 2; + kn[22] = 2; + kn[23] = 2; + kn[24] = 4; + kn[25] = 4; + kn[26] = 4; + kn[27] = 4; + kn[29] = 1; + kn[30] = 1; + kn[31] = 2; + kn[32] = 2; + kn[33] = 3; + kn[34] = 3; + kn[35] = 4; + kn[36] = 4; + kn[37] = 4; + kn[40] = 2; + kn[41] = 2; + kn[42] = 2; + kn[43] = 4; + kn[44] = 4; + kn[46] = 2; + kn[47] = 2; + kn[48] = 4; + kn[49] = 4; + kn[51] = 2; + kn[53] = 2; + kn[54] = 1; + kn[55] = 2; + kn[56] = 2; + kn[57] = 2; + kn[58] = 2; + + // Temperature exponents + un[1] = 0; + un[2] = 0.5; + un[3] = 1; + un[4] = 3.5; + un[5] = -0.5; + un[6] = 4.5; + un[7] = 0.5; + un[8] = 7.5; + un[9] = 9.5; + un[10] = 6; + un[11] = 12; + un[12] = 12.5; + un[13] = -6; + un[14] = 2; + un[15] = 3; + un[16] = 2; + un[17] = 2; + un[18] = 11; + un[19] = -0.5; + un[20] = 0.5; + un[21] = 0; + un[22] = 4; + un[23] = 6; + un[24] = 21; + un[25] = 23; + un[26] = 22; + un[27] = -1; + un[28] = -0.5; + un[29] = 7; + un[30] = -1; + un[31] = 6; + un[32] = 4; + un[33] = 1; + un[34] = 9; + un[35] = -13; + un[36] = 21; + un[37] = 8; + un[38] = -0.5; + un[39] = 0; + un[40] = 2; + un[41] = 7; + un[42] = 9; + un[43] = 22; + un[44] = 23; + un[45] = 1; + un[46] = 9; + un[47] = 3; + un[48] = 8; + un[49] = 23; + un[50] = 1.5; + un[51] = 5; + un[52] = -0.5; + un[53] = 4; + un[54] = 7; + un[55] = 3; + un[56] = 0; + un[57] = 1; + un[58] = 0; + + // Flags + fn[13] = 1; + fn[27] = 1; + fn[30] = 1; + fn[35] = 1; + gn[5] = 1; + gn[6] = 1; + gn[25] = 1; + gn[29] = 1; + gn[32] = 1; + gn[33] = 1; + gn[34] = 1; + gn[51] = 1; + gn[54] = 1; + gn[56] = 1; + qn[7] = 1; + qn[16] = 1; + qn[26] = 1; + qn[28] = 1; + qn[37] = 1; + qn[42] = 1; + qn[47] = 1; + qn[49] = 1; + qn[52] = 1; + qn[58] = 1; + sn[8] = 1; + sn[9] = 1; + wn[10] = 1; + wn[11] = 1; + wn[12] = 1; + + // Energy parameters + Ei[1] = 151.3183; + Ei[2] = 99.73778; + Ei[3] = 241.9606; + Ei[4] = 244.1667; + Ei[5] = 298.1183; + Ei[6] = 324.0689; + Ei[7] = 337.6389; + Ei[8] = 365.5999; + Ei[9] = 370.6823; + Ei[10] = 402.636293; + Ei[11] = 427.72263; + Ei[12] = 450.325022; + Ei[13] = 470.840891; + Ei[14] = 489.558373; + Ei[15] = 26.95794; + Ei[16] = 122.7667; + Ei[17] = 105.5348; + Ei[18] = 514.0156; + Ei[19] = 296.355; + Ei[20] = 2.610111; + Ei[21] = 119.6299; + + // Size parameters + Ki[1] = 0.4619255; + Ki[2] = 0.4479153; + Ki[3] = 0.4557489; + Ki[4] = 0.5279209; + Ki[5] = 0.583749; + Ki[6] = 0.6406937; + Ki[7] = 0.6341423; + Ki[8] = 0.6738577; + Ki[9] = 0.6798307; + Ki[10] = 0.7175118; + Ki[11] = 0.7525189; + Ki[12] = 0.784955; + Ki[13] = 0.8152731; + Ki[14] = 0.8437826; + Ki[15] = 0.3514916; + Ki[16] = 0.4186954; + Ki[17] = 0.4533894; + Ki[18] = 0.3825868; + Ki[19] = 0.4618263; + Ki[20] = 0.3589888; + Ki[21] = 0.4216551; + + // Orientation parameters + Gi[2] = 0.027815; + Gi[3] = 0.189065; + Gi[4] = 0.0793; + Gi[5] = 0.141239; + Gi[6] = 0.256692; + Gi[7] = 0.281835; + Gi[8] = 0.332267; + Gi[9] = 0.366911; + Gi[10] = 0.289731; + Gi[11] = 0.337542; + Gi[12] = 0.383381; + Gi[13] = 0.427354; + Gi[14] = 0.469659; + Gi[15] = 0.034369; + Gi[16] = 0.021; + Gi[17] = 0.038953; + Gi[18] = 0.3325; + Gi[19] = 0.0885; + + // Quadrupole parameters + Qi[3] = 0.69; + Qi[18] = 1.06775; + Qi[19] = 0.633276; + Fi[15] = 1; // High temperature parameter + Si[18] = 1.5822; // Dipole parameter + Si[19] = 0.39; // Dipole parameter + Wi[18] = 1; // Association parameter + + // Energy parameters + Eij[1][2] = 0.97164; + Eij[1][3] = 0.960644; + Eij[1][5] = 0.994635; + Eij[1][6] = 1.01953; + Eij[1][7] = 0.989844; + Eij[1][8] = 1.00235; + Eij[1][9] = 0.999268; + Eij[1][10] = 1.107274; + Eij[1][11] = 0.88088; + Eij[1][12] = 0.880973; + Eij[1][13] = 0.881067; + Eij[1][14] = 0.881161; + Eij[1][15] = 1.17052; + Eij[1][17] = 0.990126; + Eij[1][18] = 0.708218; + Eij[1][19] = 0.931484; + Eij[2][3] = 1.02274; + Eij[2][4] = 0.97012; + Eij[2][5] = 0.945939; + Eij[2][6] = 0.946914; + Eij[2][7] = 0.973384; + Eij[2][8] = 0.95934; + Eij[2][9] = 0.94552; + Eij[2][15] = 1.08632; + Eij[2][16] = 1.021; + Eij[2][17] = 1.00571; + Eij[2][18] = 0.746954; + Eij[2][19] = 0.902271; + Eij[3][4] = 0.925053; + Eij[3][5] = 0.960237; + Eij[3][6] = 0.906849; + Eij[3][7] = 0.897362; + Eij[3][8] = 0.726255; + Eij[3][9] = 0.859764; + Eij[3][10] = 0.855134; + Eij[3][11] = 0.831229; + Eij[3][12] = 0.80831; + Eij[3][13] = 0.786323; + Eij[3][14] = 0.765171; + Eij[3][15] = 1.28179; + Eij[3][17] = 1.5; + Eij[3][18] = 0.849408; + Eij[3][19] = 0.955052; + Eij[4][5] = 1.02256; + Eij[4][7] = 1.01306; + Eij[4][9] = 1.00532; + Eij[4][15] = 1.16446; + Eij[4][18] = 0.693168; + Eij[4][19] = 0.946871; + Eij[5][7] = 1.0049; + Eij[5][15] = 1.034787; + Eij[6][15] = 1.3; + Eij[7][15] = 1.3; + Eij[10][19] = 1.008692; + Eij[11][19] = 1.010126; + Eij[12][19] = 1.011501; + Eij[13][19] = 1.012821; + Eij[14][19] = 1.014089; + Eij[15][17] = 1.1; + + // Conformal energy parameters + Uij[1][2] = 0.886106; + Uij[1][3] = 0.963827; + Uij[1][5] = 0.990877; + Uij[1][7] = 0.992291; + Uij[1][9] = 1.00367; + Uij[1][10] = 1.302576; + Uij[1][11] = 1.191904; + Uij[1][12] = 1.205769; + Uij[1][13] = 1.219634; + Uij[1][14] = 1.233498; + Uij[1][15] = 1.15639; + Uij[1][19] = 0.736833; + Uij[2][3] = 0.835058; + Uij[2][4] = 0.816431; + Uij[2][5] = 0.915502; + Uij[2][7] = 0.993556; + Uij[2][15] = 0.408838; + Uij[2][19] = 0.993476; + Uij[3][4] = 0.96987; + Uij[3][10] = 1.066638; + Uij[3][11] = 1.077634; + Uij[3][12] = 1.088178; + Uij[3][13] = 1.098291; + Uij[3][14] = 1.108021; + Uij[3][17] = 0.9; + Uij[3][19] = 1.04529; + Uij[4][5] = 1.065173; + Uij[4][6] = 1.25; + Uij[4][7] = 1.25; + Uij[4][8] = 1.25; + Uij[4][9] = 1.25; + Uij[4][15] = 1.61666; + Uij[4][19] = 0.971926; + Uij[10][19] = 1.028973; + Uij[11][19] = 1.033754; + Uij[12][19] = 1.038338; + Uij[13][19] = 1.042735; + Uij[14][19] = 1.046966; + + // Size parameters + Kij[1][2] = 1.00363; + Kij[1][3] = 0.995933; + Kij[1][5] = 1.007619; + Kij[1][7] = 0.997596; + Kij[1][9] = 1.002529; + Kij[1][10] = 0.982962; + Kij[1][11] = 0.983565; + Kij[1][12] = 0.982707; + Kij[1][13] = 0.981849; + Kij[1][14] = 0.980991; + Kij[1][15] = 1.02326; + Kij[1][19] = 1.00008; + Kij[2][3] = 0.982361; + Kij[2][4] = 1.00796; + Kij[2][15] = 1.03227; + Kij[2][19] = 0.942596; + Kij[3][4] = 1.00851; + Kij[3][10] = 0.910183; + Kij[3][11] = 0.895362; + Kij[3][12] = 0.881152; + Kij[3][13] = 0.86752; + Kij[3][14] = 0.854406; + Kij[3][19] = 1.00779; + Kij[4][5] = 0.986893; + Kij[4][15] = 1.02034; + Kij[4][19] = 0.999969; + Kij[10][19] = 0.96813; + Kij[11][19] = 0.96287; + Kij[12][19] = 0.957828; + Kij[13][19] = 0.952441; + Kij[14][19] = 0.948338; + + // Orientation parameters + Gij[1][3] = 0.807653; + Gij[1][15] = 1.95731; + Gij[2][3] = 0.982746; + Gij[3][4] = 0.370296; + Gij[3][18] = 1.67309; + + // Ideal gas parameters + n0i[1][3] = 4.00088; + n0i[1][4] = 0.76315; + n0i[1][5] = 0.0046; + n0i[1][6] = 8.74432; + n0i[1][7] = -4.46921; + n0i[1][1] = 29.83843397; + n0i[1][2] = -15999.69151; + n0i[2][3] = 3.50031; + n0i[2][4] = 0.13732; + n0i[2][5] = -0.1466; + n0i[2][6] = 0.90066; + n0i[2][7] = 0; + n0i[2][1] = 17.56770785; + n0i[2][2] = -2801.729072; + n0i[3][3] = 3.50002; + n0i[3][4] = 2.04452; + n0i[3][5] = -1.06044; + n0i[3][6] = 2.03366; + n0i[3][7] = 0.01393; + n0i[3][1] = 20.65844696; + n0i[3][2] = -4902.171516; + n0i[4][3] = 4.00263; + n0i[4][4] = 4.33939; + n0i[4][5] = 1.23722; + n0i[4][6] = 13.1974; + n0i[4][7] = -6.01989; + n0i[4][1] = 36.73005938; + n0i[4][2] = -23639.65301; + n0i[5][3] = 4.02939; + n0i[5][4] = 6.60569; + n0i[5][5] = 3.197; + n0i[5][6] = 19.1921; + n0i[5][7] = -8.37267; + n0i[5][1] = 44.70909619; + n0i[5][2] = -31236.63551; + n0i[6][3] = 4.06714; + n0i[6][4] = 8.97575; + n0i[6][5] = 5.25156; + n0i[6][6] = 25.1423; + n0i[6][7] = 16.1388; + n0i[6][1] = 34.30180349; + n0i[6][2] = -38525.50276; + n0i[7][3] = 4.33944; + n0i[7][4] = 9.44893; + n0i[7][5] = 6.89406; + n0i[7][6] = 24.4618; + n0i[7][7] = 14.7824; + n0i[7][1] = 36.53237783; + n0i[7][2] = -38957.80933; + n0i[8][3] = 4; + n0i[8][4] = 11.7618; + n0i[8][5] = 20.1101; + n0i[8][6] = 33.1688; + n0i[8][7] = 0; + n0i[8][1] = 43.17218626; + n0i[8][2] = -51198.30946; + n0i[9][3] = 4; + n0i[9][4] = 8.95043; + n0i[9][5] = 21.836; + n0i[9][6] = 33.4032; + n0i[9][7] = 0; + n0i[9][1] = 42.67837089; + n0i[9][2] = -45215.83; + n0i[10][3] = 4; + n0i[10][4] = 11.6977; + n0i[10][5] = 26.8142; + n0i[10][6] = 38.6164; + n0i[10][7] = 0; + n0i[10][1] = 46.99717188; + n0i[10][2] = -52746.83318; + n0i[11][3] = 4; + n0i[11][4] = 13.7266; + n0i[11][5] = 30.4707; + n0i[11][6] = 43.5561; + n0i[11][7] = 0; + n0i[11][1] = 52.07631631; + n0i[11][2] = -57104.81056; + n0i[12][3] = 4; + n0i[12][4] = 15.6865; + n0i[12][5] = 33.8029; + n0i[12][6] = 48.1731; + n0i[12][7] = 0; + n0i[12][1] = 57.25830934; + n0i[12][2] = -60546.76385; + n0i[13][3] = 4; + n0i[13][4] = 18.0241; + n0i[13][5] = 38.1235; + n0i[13][6] = 53.3415; + n0i[13][7] = 0; + n0i[13][1] = 62.09646901; + n0i[13][2] = -66600.12837; + n0i[14][3] = 4; + n0i[14][4] = 21.0069; + n0i[14][5] = 43.4931; + n0i[14][6] = 58.3657; + n0i[14][7] = 0; + n0i[14][1] = 65.93909154; + n0i[14][2] = -74131.45483; + n0i[15][3] = 2.47906; + n0i[15][4] = 0.95806; + n0i[15][5] = 0.45444; + n0i[15][6] = 1.56039; + n0i[15][7] = -1.3756; + n0i[15][1] = 13.07520288; + n0i[15][2] = -5836.943696; + n0i[16][3] = 3.50146; + n0i[16][4] = 1.07558; + n0i[16][5] = 1.01334; + n0i[16][6] = 0; + n0i[16][7] = 0; + n0i[16][1] = 16.8017173; + n0i[16][2] = -2318.32269; + n0i[17][3] = 3.50055; + n0i[17][4] = 1.02865; + n0i[17][5] = 0.00493; + n0i[17][6] = 0; + n0i[17][7] = 0; + n0i[17][1] = 17.45786899; + n0i[17][2] = -2635.244116; + n0i[18][3] = 4.00392; + n0i[18][4] = 0.01059; + n0i[18][5] = 0.98763; + n0i[18][6] = 3.06904; + n0i[18][7] = 0; + n0i[18][1] = 21.57882705; + n0i[18][2] = -7766.733078; + n0i[19][3] = 4; + n0i[19][4] = 3.11942; + n0i[19][5] = 1.00243; + n0i[19][6] = 0; + n0i[19][7] = 0; + n0i[19][1] = 21.5830944; + n0i[19][2] = -6069.035869; + n0i[20][3] = 2.5; + n0i[20][4] = 0; + n0i[20][5] = 0; + n0i[20][6] = 0; + n0i[20][7] = 0; + n0i[20][1] = 10.04639507; + n0i[20][2] = -745.375; + n0i[21][3] = 2.5; + n0i[21][4] = 0; + n0i[21][5] = 0; + n0i[21][6] = 0; + n0i[21][7] = 0; + n0i[21][1] = 10.04639507; + n0i[21][2] = -745.375; + th0i[1][4] = 820.659; + th0i[1][5] = 178.41; + th0i[1][6] = 1062.82; + th0i[1][7] = 1090.53; + th0i[2][4] = 662.738; + th0i[2][5] = 680.562; + th0i[2][6] = 1740.06; + th0i[2][7] = 0; + th0i[3][4] = 919.306; + th0i[3][5] = 865.07; + th0i[3][6] = 483.553; + th0i[3][7] = 341.109; + th0i[4][4] = 559.314; + th0i[4][5] = 223.284; + th0i[4][6] = 1031.38; + th0i[4][7] = 1071.29; + th0i[5][4] = 479.856; + th0i[5][5] = 200.893; + th0i[5][6] = 955.312; + th0i[5][7] = 1027.29; + th0i[6][4] = 438.27; + th0i[6][5] = 198.018; + th0i[6][6] = 1905.02; + th0i[6][7] = 893.765; + th0i[7][4] = 468.27; + th0i[7][5] = 183.636; + th0i[7][6] = 1914.1; + th0i[7][7] = 903.185; + th0i[8][4] = 292.503; + th0i[8][5] = 910.237; + th0i[8][6] = 1919.37; + th0i[8][7] = 0; + th0i[9][4] = 178.67; + th0i[9][5] = 840.538; + th0i[9][6] = 1774.25; + th0i[9][7] = 0; + th0i[10][4] = 182.326; + th0i[10][5] = 859.207; + th0i[10][6] = 1826.59; + th0i[10][7] = 0; + th0i[11][4] = 169.789; + th0i[11][5] = 836.195; + th0i[11][6] = 1760.46; + th0i[11][7] = 0; + th0i[12][4] = 158.922; + th0i[12][5] = 815.064; + th0i[12][6] = 1693.07; + th0i[12][7] = 0; + th0i[13][4] = 156.854; + th0i[13][5] = 814.882; + th0i[13][6] = 1693.79; + th0i[13][7] = 0; + th0i[14][4] = 164.947; + th0i[14][5] = 836.264; + th0i[14][6] = 1750.24; + th0i[14][7] = 0; + th0i[15][4] = 228.734; + th0i[15][5] = 326.843; + th0i[15][6] = 1651.71; + th0i[15][7] = 1671.69; + th0i[16][4] = 2235.71; + th0i[16][5] = 1116.69; + th0i[16][6] = 0; + th0i[16][7] = 0; + th0i[17][4] = 1550.45; + th0i[17][5] = 704.525; + th0i[17][6] = 0; + th0i[17][7] = 0; + th0i[18][4] = 268.795; + th0i[18][5] = 1141.41; + th0i[18][6] = 2507.37; + th0i[18][7] = 0; + th0i[19][4] = 1833.63; + th0i[19][5] = 847.181; + th0i[19][6] = 0; + th0i[19][7] = 0; + th0i[20][4] = 0; + th0i[20][5] = 0; + th0i[20][6] = 0; + th0i[20][7] = 0; + th0i[21][4] = 0; + th0i[21][5] = 0; + th0i[21][6] = 0; + th0i[21][7] = 0; + + // Precalculations of constants + for (int i = 1; i <= MaxFlds; ++i) { + Ki25[i] = Math.pow(Ki[i], 2.5); + Ei25[i] = Math.pow(Ei[i], 2.5); + } + for (int i = 1; i <= MaxFlds; ++i) { + for (int j = i; j <= MaxFlds; ++j) { + for (int n = 1; n <= 18; ++n) { + Bsnij = 1; + if (gn[n] == 1) { + Bsnij = Gij[i][j] * (Gi[i] + Gi[j]) / 2; + } + if (qn[n] == 1) { + Bsnij = Bsnij * Qi[i] * Qi[j]; + } + if (fn[n] == 1) { + Bsnij = Bsnij * Fi[i] * Fi[j]; + } + if (sn[n] == 1) { + Bsnij = Bsnij * Si[i] * Si[j]; + } + if (wn[n] == 1) { + Bsnij = Bsnij * Wi[i] * Wi[j]; + } + Bsnij2[i][j][n] = an[n] * Math.pow(Eij[i][j] * Math.sqrt(Ei[i] * Ei[j]), un[n]) + * Math.pow(Ki[i] * Ki[j], 1.5) * Bsnij; } - return; - - // Code to produce nearly exact values for n0[1] and n0[2] - // This is not called in the current code, but included below to show how the - // values were calculated. The return above can be removed to call this code. - // T0 = 298.15; - // d0 = 101.325 / RDetail / T0; - // for (int i=1; i <= MaxFlds; ++i){ - // n1 = 0; n2 = 0; - // if (th0i[i][4] > 0) {n2 = n2 - n0i[i][4] * th0i[i][4] / tanh(th0i[i][4] / - // T0); n1 = n1 - n0i[i][4] * log(sinh(th0i[i][4] / T0));} - // if (th0i[i][5] > 0) {n2 = n2 + n0i[i][5] * th0i[i][5] * tanh(th0i[i][5] / - // T0); n1 = n1 + n0i[i][5] * log(cosh(th0i[i][5] / T0));} - // if (th0i[i][6] > 0) {n2 = n2 - n0i[i][6] * th0i[i][6] / tanh(th0i[i][6] / - // T0); n1 = n1 - n0i[i][6] * log(sinh(th0i[i][6] / T0));} - // if (th0i[i][7] > 0) {n2 = n2 + n0i[i][7] * th0i[i][7] * tanh(th0i[i][7] / - // T0); n1 = n1 + n0i[i][7] * log(cosh(th0i[i][7] / T0));} - // n0i[i][2] = n2 - n0i[i][3] * T0; - // n0i[i][3] = n0i[i][3] - 1; - // n0i[i][1] = n1 - n2 / T0 + n0i[i][3] * (1 + log(T0)) - log(d0); - // } + Kij5[i][j] = (Math.pow(Kij[i][j], 5) - 1) * Ki25[i] * Ki25[j]; + Uij5[i][j] = (Math.pow(Uij[i][j], 5) - 1) * Ei25[i] * Ei25[j]; + Gij5[i][j] = (Gij[i][j] - 1) * (Gi[i] + Gi[j]) / 2; + } } - - /** - *- * main. - *
- * - * @param args an array of {@link java.lang.String} objects - */ - @SuppressWarnings("unused") - public static void main(String[] args) { - DETAIL test = new DETAIL(); - test.SetupDetail(); - - double T = 400; - doubleW D = new doubleW(0.0); - doubleW P = new doubleW(50000.0d); - intW ierr = new intW(0); - doubleW Mm = new doubleW(0.0d); - doubleW Z = new doubleW(0.0d); - int iFlag = 0; - StringW herr = new StringW(""); - - double x[] = {0.0, 0.77824, 0.02, 0.06, 0.08, 0.03, 0.0015, 0.003, 0.0005, 0.00165, 0.00215, - 0.00088, 0.00024, 0.00015, 0.00009, 0.004, 0.005, 0.002, 0.0001, 0.0025, 0.007, - 0.001}; - - test.MolarMassDetail(x, Mm); - - System.out.println("mol mass " + Mm.val); - - test.DensityDetail(T, P.val, x, D, ierr, herr); - System.out.println("density " + D.val); - test.PressureDetail(T, D.val, x, P, Z); - System.out.println("pressure " + P.val); - System.out.println("Z " + Z.val); - - doubleW dPdD = new doubleW(0.0d), d2PdD2 = new doubleW(0.0d), d2PdTD = new doubleW(0.0d), - dPdT = new doubleW(0.0d), U = new doubleW(0.0d), H = new doubleW(0.0d), - S = new doubleW(0.0d), A = new doubleW(0.0d), P2 = new doubleW(0.0d); - doubleW Cv = new doubleW(0.0d), Cp = new doubleW(0.0d), W = new doubleW(0.0d), - G = new doubleW(0.0d), JT = new doubleW(0.0d), Kappa = new doubleW(0.0d), - PP = new doubleW(0.0d); - - test.PropertiesDetail(T, D.val, x, P, Z, dPdD, d2PdD2, d2PdTD, dPdT, U, H, S, Cv, Cp, W, - G, JT, Kappa); - - System.out.println("JT " + JT.val); - System.out.println("Kappa " + Kappa.val); + // Ideal gas terms + d0 = 101.325 / RDetail / 298.15; + for (int i = 1; i <= MaxFlds; ++i) { + n0i[i][3] = n0i[i][3] - 1; + n0i[i][1] = n0i[i][1] - Math.log(d0); } + return; + + // Code to produce nearly exact values for n0[1] and n0[2] + // This is not called in the current code, but included below to show how the + // values were calculated. The return above can be removed to call this code. + // T0 = 298.15; + // d0 = 101.325 / RDetail / T0; + // for (int i=1; i <= MaxFlds; ++i){ + // n1 = 0; n2 = 0; + // if (th0i[i][4] > 0) {n2 = n2 - n0i[i][4] * th0i[i][4] / tanh(th0i[i][4] / + // T0); n1 = n1 - n0i[i][4] * log(sinh(th0i[i][4] / T0));} + // if (th0i[i][5] > 0) {n2 = n2 + n0i[i][5] * th0i[i][5] * tanh(th0i[i][5] / + // T0); n1 = n1 + n0i[i][5] * log(cosh(th0i[i][5] / T0));} + // if (th0i[i][6] > 0) {n2 = n2 - n0i[i][6] * th0i[i][6] / tanh(th0i[i][6] / + // T0); n1 = n1 - n0i[i][6] * log(sinh(th0i[i][6] / T0));} + // if (th0i[i][7] > 0) {n2 = n2 + n0i[i][7] * th0i[i][7] * tanh(th0i[i][7] / + // T0); n1 = n1 + n0i[i][7] * log(cosh(th0i[i][7] / T0));} + // n0i[i][2] = n2 - n0i[i][3] * T0; + // n0i[i][3] = n0i[i][3] - 1; + // n0i[i][1] = n1 - n2 / T0 + n0i[i][3] * (1 + log(T0)) - log(d0); + // } + } + + /** + *+ * main. + *
+ * + * @param args an array of {@link java.lang.String} objects + */ + @SuppressWarnings("unused") + public static void main(String[] args) { + DETAIL test = new DETAIL(); + test.SetupDetail(); + + double T = 400; + doubleW D = new doubleW(0.0); + doubleW P = new doubleW(50000.0d); + intW ierr = new intW(0); + doubleW Mm = new doubleW(0.0d); + doubleW Z = new doubleW(0.0d); + int iFlag = 0; + StringW herr = new StringW(""); + + double x[] = {0.0, 0.77824, 0.02, 0.06, 0.08, 0.03, 0.0015, 0.003, 0.0005, 0.00165, 0.00215, + 0.00088, 0.00024, 0.00015, 0.00009, 0.004, 0.005, 0.002, 0.0001, 0.0025, 0.007, 0.001}; + + test.MolarMassDetail(x, Mm); + + System.out.println("mol mass " + Mm.val); + + test.DensityDetail(T, P.val, x, D, ierr, herr); + System.out.println("density " + D.val); + test.PressureDetail(T, D.val, x, P, Z); + System.out.println("pressure " + P.val); + System.out.println("Z " + Z.val); + + doubleW dPdD = new doubleW(0.0d), d2PdD2 = new doubleW(0.0d), d2PdTD = new doubleW(0.0d), + dPdT = new doubleW(0.0d), U = new doubleW(0.0d), H = new doubleW(0.0d), + S = new doubleW(0.0d), A = new doubleW(0.0d), P2 = new doubleW(0.0d); + doubleW Cv = new doubleW(0.0d), Cp = new doubleW(0.0d), W = new doubleW(0.0d), + G = new doubleW(0.0d), JT = new doubleW(0.0d), Kappa = new doubleW(0.0d), + PP = new doubleW(0.0d); + + test.PropertiesDetail(T, D.val, x, P, Z, dPdD, d2PdD2, d2PdTD, dPdT, U, H, S, Cv, Cp, W, G, JT, + Kappa); + + System.out.println("JT " + JT.val); + System.out.println("Kappa " + Kappa.val); + } } diff --git a/src/main/java/neqsim/thermo/util/GERG/GERG2008.java b/src/main/java/neqsim/thermo/util/GERG/GERG2008.java index d1fb9b2ae1..70659aada2 100644 --- a/src/main/java/neqsim/thermo/util/GERG/GERG2008.java +++ b/src/main/java/neqsim/thermo/util/GERG/GERG2008.java @@ -3283,14 +3283,14 @@ public static void main(String[] args) { /* * // test.PressureGERG(400, 12.798286, x); String herr = ""; test.DensityGERG(0, T, P, x, ierr, * herr); double pres = test.P; double molarmass = test.Mm; - * + * * // double dPdD=0.0, dPdD2=0.0, d2PdTD=0.0, dPdT=0.0, U=0.0, H=0.0, S=0.0, // Cv=0.0, Cp=0.0, * W=0.0, G=0.0, JT=0.0, Kappa=0.0, A=0.0; - * + * * // void DensityGERG(const int iFlag, const double T, const double P, const // * std::vector@@ -514,7 +510,7 @@ public void run() { * neqsim.dataPresentation.fileHandeling.createNetCDF.netCDF2D.NetCdf2D(); * file1.setOutputFileName(name1); file1.setXvalues(points2[2], "temp", "sec"); * file1.setYvalues(points2[3], "pres", "meter"); file1.createFile(); - * + * * String name2 = new String(); name2 = fileName + "Bub.nc"; file2 = new * neqsim.dataPresentation.fileHandeling.createNetCDF.netCDF2D.NetCdf2D(); * file2.setOutputFileName(name2); file2.setXvalues(points2[0], "temp", "sec"); diff --git a/src/main/java/neqsim/thermodynamicOperations/phaseEnvelopeOps/multicomponentEnvelopeOps/pTphaseEnvelope1.java b/src/main/java/neqsim/thermodynamicOperations/phaseEnvelopeOps/multicomponentEnvelopeOps/pTphaseEnvelope1.java index fed3e2a99f..72e6bbe0b2 100644 --- a/src/main/java/neqsim/thermodynamicOperations/phaseEnvelopeOps/multicomponentEnvelopeOps/pTphaseEnvelope1.java +++ b/src/main/java/neqsim/thermodynamicOperations/phaseEnvelopeOps/multicomponentEnvelopeOps/pTphaseEnvelope1.java @@ -315,7 +315,7 @@ public void run() { * neqsim.dataPresentation.fileHandeling.createNetCDF.netCDF2D.NetCdf2D(); * file1.setOutputFileName(name1); file1.setXvalues(points2[2], "temp", "sec"); * file1.setYvalues(points2[3], "pres", "meter"); file1.createFile(); - * + * * String name2 = new String(); name2 = fileName + "Bub.nc"; file2 = new * neqsim.dataPresentation.fileHandeling.createNetCDF.netCDF2D.NetCdf2D(); * file2.setOutputFileName(name2); file2.setXvalues(points2[0], "temp", "sec"); diff --git a/src/main/java/neqsim/thermodynamicOperations/phaseEnvelopeOps/multicomponentEnvelopeOps/pTphaseEnvelopeMay.java b/src/main/java/neqsim/thermodynamicOperations/phaseEnvelopeOps/multicomponentEnvelopeOps/pTphaseEnvelopeMay.java index 7aa341c63b..1876e16029 100644 --- a/src/main/java/neqsim/thermodynamicOperations/phaseEnvelopeOps/multicomponentEnvelopeOps/pTphaseEnvelopeMay.java +++ b/src/main/java/neqsim/thermodynamicOperations/phaseEnvelopeOps/multicomponentEnvelopeOps/pTphaseEnvelopeMay.java @@ -466,7 +466,7 @@ public void run() { * neqsim.dataPresentation.fileHandeling.createNetCDF.netCDF2D.NetCdf2D(); * file1.setOutputFileName(name1); file1.setXvalues(points2[2], "temp", "sec"); * file1.setYvalues(points2[3], "pres", "meter"); file1.createFile(); - * + * * String name2 = new String(); name2 = fileName + "Bub.nc"; file2 = new * neqsim.dataPresentation.fileHandeling.createNetCDF.netCDF2D.NetCdf2D(); * file2.setOutputFileName(name2); file2.setXvalues(points2[0], "temp", "sec"); diff --git a/src/main/java/neqsim/thermodynamicOperations/phaseEnvelopeOps/multicomponentEnvelopeOps/pTphaseEnvelopeNew.java b/src/main/java/neqsim/thermodynamicOperations/phaseEnvelopeOps/multicomponentEnvelopeOps/pTphaseEnvelopeNew.java index 56af56dd9f..208a35ecf6 100644 --- a/src/main/java/neqsim/thermodynamicOperations/phaseEnvelopeOps/multicomponentEnvelopeOps/pTphaseEnvelopeNew.java +++ b/src/main/java/neqsim/thermodynamicOperations/phaseEnvelopeOps/multicomponentEnvelopeOps/pTphaseEnvelopeNew.java @@ -252,7 +252,7 @@ public void run() { * neqsim.dataPresentation.fileHandeling.createNetCDF.netCDF2D.NetCdf2D(); * file1.setOutputFileName(name1); file1.setXvalues(points2[2], "temp", "sec"); * file1.setYvalues(points2[3], "pres", "meter"); file1.createFile(); - * + * * String name2 = new String(); name2 = fileName + "Bub.nc"; file2 = new * neqsim.dataPresentation.fileHandeling.createNetCDF.netCDF2D.NetCdf2D(); * file2.setOutputFileName(name2); file2.setXvalues(points2[0], "temp", "sec"); diff --git a/src/main/java/neqsim/thermodynamicOperations/propertyGenerator/OLGApropertyTableGeneratorWaterEven.java b/src/main/java/neqsim/thermodynamicOperations/propertyGenerator/OLGApropertyTableGeneratorWaterEven.java index 9640ce97bb..c592069a3a 100644 --- a/src/main/java/neqsim/thermodynamicOperations/propertyGenerator/OLGApropertyTableGeneratorWaterEven.java +++ b/src/main/java/neqsim/thermodynamicOperations/propertyGenerator/OLGApropertyTableGeneratorWaterEven.java @@ -415,9 +415,9 @@ public void run() { * { aMatrix.set(ii, 0, 1.0); aMatrix.set(ii, 1, pressures[i - ii]); aMatrix.set(ii, 2, * pressures[i - ii] * pressures[i - ii]); aMatrix.set(ii, 3, pressures[i - ii] * * pressures[i - ii] * pressures[i - ii]); } - * + * * for (int jj = 0; jj < 9; jj++) { Matrix xg = XMatrixgas.getMatrix(jj, jj, 0, 3); - * + * * try { xcoef[jj] = aMatrix.solve(xg.transpose()); } catch (Exception ex) { * logger.error(ex.getMessage(),e); } // logger.info("xcoef " + j); // xcoef.print(10, 10); * //logger.info("dss: " +ds * dxds.get(speceq, 0)); // specVal = xcoef.get(0, 0) + sny * diff --git a/src/main/java/neqsim/thermodynamicOperations/propertyGenerator/OLGApropertyTableGeneratorWaterStudents.java b/src/main/java/neqsim/thermodynamicOperations/propertyGenerator/OLGApropertyTableGeneratorWaterStudents.java index d636e59476..47ec15230a 100644 --- a/src/main/java/neqsim/thermodynamicOperations/propertyGenerator/OLGApropertyTableGeneratorWaterStudents.java +++ b/src/main/java/neqsim/thermodynamicOperations/propertyGenerator/OLGApropertyTableGeneratorWaterStudents.java @@ -1202,7 +1202,7 @@ public void run() { * (temperatures[j] - temperatures[j - 1]))); if * (names[k].equals("LIQUID-WATER SURFACE TENSION") && props[k][i][j] < 10.0e-3) { * props[k][i][j] = 25.0e-3; LWS=1; } - * + * * if (names[k].equals("LIQUID-WATER SURFACE TENSION") && props[k][i][j] > 120.0e-3) { * props[k][i][j] = 80.0e-3; LWS=1; } } */ @@ -1237,7 +1237,7 @@ public void run() { * / (pressures[i - 1] - pressures[i - 3]) * (pressures[i] - pressures[i - 1]))); if * (names[k].equals("LIQUID-WATER SURFACE TENSION") && props[k][i][j] < 10.0e-3) { * props[k][i][j] = 25.0e-3; LWS=1; } - * + * * if (names[k].equals("LIQUID-WATER SURFACE TENSION") && props[k][i][j] > 120.0e-3) { * props[k][i][j] = 80.0e-3; LWS=1; } } */ diff --git a/src/main/java/neqsim/thermodynamicOperations/propertyGenerator/OLGApropertyTableGeneratorWaterStudentsPH.java b/src/main/java/neqsim/thermodynamicOperations/propertyGenerator/OLGApropertyTableGeneratorWaterStudentsPH.java index 8d4bc0ee34..53832fc2d6 100644 --- a/src/main/java/neqsim/thermodynamicOperations/propertyGenerator/OLGApropertyTableGeneratorWaterStudentsPH.java +++ b/src/main/java/neqsim/thermodynamicOperations/propertyGenerator/OLGApropertyTableGeneratorWaterStudentsPH.java @@ -1187,7 +1187,7 @@ public void run() { * 3]) / (enthalpies[j - 1] - enthalpies[j - 3]) * (enthalpies[j] - enthalpies[j - * 1]))); if (names[k].equals("LIQUID-WATER SURFACE TENSION") && props[k][i][j] < * 10.0e-3) { props[k][i][j] = 25.0e-3; LWS=1; } - * + * * if (names[k].equals("LIQUID-WATER SURFACE TENSION") && props[k][i][j] > 120.0e-3) { * props[k][i][j] = 80.0e-3; LWS=1; } } */ @@ -1222,7 +1222,7 @@ public void run() { * / (pressures[i - 1] - pressures[i - 3]) * (pressures[i] - pressures[i - 1]))); if * (names[k].equals("LIQUID-WATER SURFACE TENSION") && props[k][i][j] < 10.0e-3) { * props[k][i][j] = 25.0e-3; LWS=1; } - * + * * if (names[k].equals("LIQUID-WATER SURFACE TENSION") && props[k][i][j] > 120.0e-3) { * props[k][i][j] = 80.0e-3; LWS=1; } } */ diff --git a/src/main/java/neqsim/util/database/NeqSimContractDataBase.java b/src/main/java/neqsim/util/database/NeqSimContractDataBase.java index cc29c7c443..1da880fb4d 100644 --- a/src/main/java/neqsim/util/database/NeqSimContractDataBase.java +++ b/src/main/java/neqsim/util/database/NeqSimContractDataBase.java @@ -57,7 +57,7 @@ public NeqSimContractDataBase() { /** * Drops and re-creates table from contents in csv file. - * + * * @param tableName Name of table to replace */ public static void updateTable(String tableName) { diff --git a/src/main/java/neqsim/util/database/NeqSimDataBase.java b/src/main/java/neqsim/util/database/NeqSimDataBase.java index ba3860c5f6..9495d05e84 100644 --- a/src/main/java/neqsim/util/database/NeqSimDataBase.java +++ b/src/main/java/neqsim/util/database/NeqSimDataBase.java @@ -419,7 +419,7 @@ public static boolean hasComponent(String compName) { /** * Drops and re-creates table from contents in csv file. - * + * * @param tableName Name of table to replace */ public static void updateTable(String tableName) { @@ -428,7 +428,7 @@ public static void updateTable(String tableName) { /** * Drops and re-creates table from contents in csv file. - * + * * @param tableName Name of table to replace * @param path Path to csv file to */ @@ -449,7 +449,7 @@ public static void updateTable(String tableName, String path) { /** * Drops and re-creates table from contents in csv file. - * + * * @param tableName Name of table to replace * @param path Path to csv file to */ diff --git a/src/main/java/neqsim/util/database/NeqSimProcessDesignDataBase.java b/src/main/java/neqsim/util/database/NeqSimProcessDesignDataBase.java index ccfabfe8f7..2f1df9965d 100644 --- a/src/main/java/neqsim/util/database/NeqSimProcessDesignDataBase.java +++ b/src/main/java/neqsim/util/database/NeqSimProcessDesignDataBase.java @@ -63,7 +63,7 @@ public NeqSimProcessDesignDataBase() { /** * Drops and re-creates table from contents in csv file. - * + * * @param tableName Name of table to replace */ public static void updateTable(String tableName) { diff --git a/src/main/java/neqsim/util/unit/LengthUnit.java b/src/main/java/neqsim/util/unit/LengthUnit.java index b8b1aad6d9..867650ab9b 100644 --- a/src/main/java/neqsim/util/unit/LengthUnit.java +++ b/src/main/java/neqsim/util/unit/LengthUnit.java @@ -21,7 +21,7 @@ public class LengthUnit extends neqsim.util.unit.BaseUnit { *
* Constructor for LengthUnit. *
- * + * * @param value Numeric value * @param name Name of unit */ diff --git a/src/main/java/neqsim/util/unit/TimeUnit.java b/src/main/java/neqsim/util/unit/TimeUnit.java index 466f12a5d7..bb5aff3a7c 100644 --- a/src/main/java/neqsim/util/unit/TimeUnit.java +++ b/src/main/java/neqsim/util/unit/TimeUnit.java @@ -21,7 +21,7 @@ public class TimeUnit extends neqsim.util.unit.BaseUnit { ** Constructor for TimeUnit. *
- * + * * @param value Numeric value * @param name Name of unit */ diff --git a/src/test/java/neqsim/PVTsimulation/simulation/SaturationTemperatureTest.java b/src/test/java/neqsim/PVTsimulation/simulation/SaturationTemperatureTest.java index b43432f72d..df9361acf2 100644 --- a/src/test/java/neqsim/PVTsimulation/simulation/SaturationTemperatureTest.java +++ b/src/test/java/neqsim/PVTsimulation/simulation/SaturationTemperatureTest.java @@ -12,7 +12,6 @@ /** * @author ESOL - * */ class SaturationTemperatureTest extends neqsim.NeqSimTest { /** @@ -57,7 +56,7 @@ void testCalcSaturationTemperature() { ** checkSaturationTemperatureToPhaseEnvelope. *
- * + * * @throws Exception */ @Test diff --git a/src/test/java/neqsim/processSimulation/measurementDevice/WellAllocatorTest.java b/src/test/java/neqsim/processSimulation/measurementDevice/WellAllocatorTest.java index 89b3ca0969..f8c775ad66 100644 --- a/src/test/java/neqsim/processSimulation/measurementDevice/WellAllocatorTest.java +++ b/src/test/java/neqsim/processSimulation/measurementDevice/WellAllocatorTest.java @@ -12,7 +12,6 @@ /** * @author ESOL - * */ class WellAllocatorTest extends neqsim.NeqSimTest { static Logger logger = LogManager.getLogger(WellAllocatorTest.class); diff --git a/src/test/java/neqsim/processSimulation/processEquipment/absorber/SimpleAbsorberTest.java b/src/test/java/neqsim/processSimulation/processEquipment/absorber/SimpleAbsorberTest.java index 154a7b4f0f..4bb8f6725f 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/absorber/SimpleAbsorberTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/absorber/SimpleAbsorberTest.java @@ -5,7 +5,7 @@ import org.junit.jupiter.api.Test; import neqsim.processSimulation.processEquipment.stream.Stream; -public class SimpleAbsorberTest extends neqsim.NeqSimTest{ +public class SimpleAbsorberTest extends neqsim.NeqSimTest { neqsim.thermo.system.SystemFurstElectrolyteEos testSystem; @BeforeEach @@ -31,7 +31,7 @@ void testRun() { * neqsim.processSimulation.processSystem.ProcessSystem operations = new * neqsim.processSimulation.processSystem.ProcessSystem(); operations.add(stream_Hot); * operations.add(absorber1); - * + * * operations.run(); */ // operations.displayResult(); diff --git a/src/test/java/neqsim/processSimulation/processEquipment/adsorber/SimpleAdsorberTest.java b/src/test/java/neqsim/processSimulation/processEquipment/adsorber/SimpleAdsorberTest.java index 5225d9c6aa..e77f00adb6 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/adsorber/SimpleAdsorberTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/adsorber/SimpleAdsorberTest.java @@ -5,7 +5,7 @@ import org.junit.jupiter.api.Test; import neqsim.processSimulation.processEquipment.stream.Stream; -public class SimpleAdsorberTest extends neqsim.NeqSimTest{ +public class SimpleAdsorberTest extends neqsim.NeqSimTest { neqsim.thermo.system.SystemFurstElectrolyteEos testSystem; @BeforeEach @@ -16,7 +16,7 @@ void setUp() { testSystem.createDatabase(true); testSystem.setMixingRule(4); } - + @Disabled("Disabled until neqsim.processSimulation.processEquipment.adsorber.SimpleAdsorber is fixed") @Test void testRun() { @@ -31,7 +31,7 @@ void testRun() { * neqsim.processSimulation.processSystem.ProcessSystem operations = new * neqsim.processSimulation.processSystem.ProcessSystem(); operations.add(stream_Hot); * operations.add(adsorber1); - * + * * operations.run(); */ // operations.displayResult(); diff --git a/src/test/java/neqsim/processSimulation/processEquipment/compressor/CompressorChartTest.java b/src/test/java/neqsim/processSimulation/processEquipment/compressor/CompressorChartTest.java index 8e5d162d59..923d2268ec 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/compressor/CompressorChartTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/compressor/CompressorChartTest.java @@ -132,7 +132,7 @@ public void test_Run() { * comp1.getPolytropicHead()); logger.info("Polytropic eff from curve:" + * comp1.getPolytropicEfficiency() * 100.0); logger.info("flow " + * stream_1.getThermoSystem().getFlowRate("m3/hr")); - * + * * logger.info("speed " + comp1.getCompressorChart().getSpeed( * stream_1.getThermoSystem().getFlowRate("m3/hr") + 10.0, comp1.getPolytropicHead())); * logger.info("pressure out " + comp1.getOutletPressure()); logger.info("temperature out " + diff --git a/src/test/java/neqsim/processSimulation/processEquipment/distillation/DistillationColumnTest.java b/src/test/java/neqsim/processSimulation/processEquipment/distillation/DistillationColumnTest.java index 98814ee444..43f5c7870a 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/distillation/DistillationColumnTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/distillation/DistillationColumnTest.java @@ -107,13 +107,11 @@ public void DistillationColumnTest() throws Exception { * System.out.println("Column in is " + totalWaterIn + " kg/hr"); * System.out.println("Column out is " + totalWaterOut + " kg/hr"); * System.out.println("Column is solved " + column.solved()); - * - * - * + * * System.out.println("Calc Water Flow rate via fluid component " + waterFlowRateInColumn); * System.out.println("Calc Water Flow rate via molar mass and flow rate total " + * waterFlowRateInColumn2 + " kg/hr"); - * + * * System.out .println("condenser temperature " + * column.getCondenser().getFluid().getTemperature("C")); System.out.println("condenser duty " + * ((Condenser) column.getCondenser()).getDuty()); diff --git a/src/test/java/neqsim/processSimulation/processEquipment/mixer/MixerTest.java b/src/test/java/neqsim/processSimulation/processEquipment/mixer/MixerTest.java index 9aa6257e64..4e156d1e81 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/mixer/MixerTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/mixer/MixerTest.java @@ -11,7 +11,6 @@ /** * @author ESOL - * */ class MixerTest { static neqsim.thermo.system.SystemInterface testSystem; diff --git a/src/test/java/neqsim/processSimulation/processEquipment/reservoir/WellFlowTest.java b/src/test/java/neqsim/processSimulation/processEquipment/reservoir/WellFlowTest.java index 58ea795fa6..039dfcab84 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/reservoir/WellFlowTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/reservoir/WellFlowTest.java @@ -118,7 +118,7 @@ void testRunTransient() { * System.out.println("reservoir pressure " + wellflow.getInletStream().getPressure("bara")); * System.out .println("pres bottomhole " + wellflow.getOutletStream().getPressure("bara") + * " bara"); - * + * * System.out.println("xmas pressure " + pipe.getOutletStream().getPressure("bara") + * " bara"); System.out .println("top side pressure " + * pipeline.getOutletStream().getPressure("bara") + " bara"); System.out diff --git a/src/test/java/neqsim/processSimulation/processEquipment/separator/SeparatorTest.java b/src/test/java/neqsim/processSimulation/processEquipment/separator/SeparatorTest.java index 1cde491703..7f7664f6c7 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/separator/SeparatorTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/separator/SeparatorTest.java @@ -11,7 +11,6 @@ /** * @author ESOL - * */ class SeparatorTest extends neqsim.NeqSimTest { static neqsim.thermo.system.SystemInterface testSystem = null; diff --git a/src/test/java/neqsim/processSimulation/processEquipment/stream/StreamTest.java b/src/test/java/neqsim/processSimulation/processEquipment/stream/StreamTest.java index f5fffc2264..2ee7739da9 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/stream/StreamTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/stream/StreamTest.java @@ -11,7 +11,6 @@ /** * @author ESOL - * */ class StreamTest extends neqsim.NeqSimTest { static neqsim.thermo.system.SystemInterface testSystem = null; diff --git a/src/test/java/neqsim/processSimulation/processSystem/GlycolRigTest.java b/src/test/java/neqsim/processSimulation/processSystem/GlycolRigTest.java index 537d765c4f..ad79656910 100644 --- a/src/test/java/neqsim/processSimulation/processSystem/GlycolRigTest.java +++ b/src/test/java/neqsim/processSimulation/processSystem/GlycolRigTest.java @@ -212,20 +212,19 @@ public void runDistillationProcessTest() { /* * logger.info("wt n-hexane from column " + * column.getLiquidOutStream().getFluid().getPhase("oil").getWtFrac("n-hexane") * 100.0); - * + * * logger.info("wt methane from column " + * column.getLiquidOutStream().getFluid().getPhase("oil").getWtFrac("methane") * 100.0); - * + * * logger.info("wt propane from column " + * column.getLiquidOutStream().getFluid().getPhase("oil").getWtFrac("propane") * 100.0); - * - * + * * logger.info("wt n-hexane from gas column " + * column.getGasOutStream().getFluid().getPhase("gas").getWtFrac("n-hexane") * 100.0); - * + * * logger.info("wt methane from gas column " + * column.getGasOutStream().getFluid().getPhase("gas").getWtFrac("methane") * 100.0); - * + * * logger.info("wt propane from gas column " + * column.getGasOutStream().getFluid().getPhase("gas").getWtFrac("propane") * 100.0); */ @@ -262,14 +261,13 @@ public void runDistillationProcessTest2() { /* * logger.info("wt n-hexane from column " + * column.getLiquidOutStream().getFluid().getPhase("oil").getWtFrac("n-hexane") * 100.0); - * + * * logger.info("wt propane from column " + * column.getLiquidOutStream().getFluid().getPhase("oil").getWtFrac("propane") * 100.0); - * - * + * * logger.info("wt n-hexane from gas column " + * column.getGasOutStream().getFluid().getPhase("gas").getWtFrac("n-hexane") * 100.0); - * + * * logger.info("wt propane from gas column " + * column.getGasOutStream().getFluid().getPhase("gas").getWtFrac("propane") * 100.0); */ @@ -320,29 +318,27 @@ public void runDistillationProcessTest3() { /* * logger.info("wt n-hexane from column " + * column.getLiquidOutStream().getFluid().getPhase("oil").getWtFrac("n-hexane") * 100.0); - * + * * logger.info("wt ethane from column " + * column.getLiquidOutStream().getFluid().getPhase("oil").getWtFrac("ethane") * 100.0); - * - * + * * logger.info("wt n-hexane from gas column " + * column.getGasOutStream().getFluid().getPhase("gas").getWtFrac("n-hexane") * 100.0); - * + * * logger.info("wt ethane from gas column " + * column.getGasOutStream().getFluid().getPhase("gas").getWtFrac("ethane") * 100.0); - * + * * logger.info("flow rate gas " + * column.getGasOutStream().getFluid().getPhase("gas").getFlowRate("kg/hr") + " kg/hr"); - * + * * logger.info("flow rate oil " + * column.getLiquidOutStream().getFluid().getPhase("oil").getFlowRate("kg/hr") + " kg/hr"); - * + * * System.out .println("flow rate oil " + feedToRegenerator.getFluid().getFlowRate("kg/hr") + * " kg/hr"); - * + * * System.out .println("flow rate gas " + feedToRegenerator2.getFluid().getFlowRate("kg/hr") + * " kg/hr"); column.massBalanceCheck(); - * */ } } diff --git a/src/test/java/neqsim/processSimulation/processSystem/waterDegasserTest.java b/src/test/java/neqsim/processSimulation/processSystem/waterDegasserTest.java index 1cf8e7374b..4cef57cca4 100644 --- a/src/test/java/neqsim/processSimulation/processSystem/waterDegasserTest.java +++ b/src/test/java/neqsim/processSimulation/processSystem/waterDegasserTest.java @@ -175,7 +175,7 @@ public void runProcess2() throws InterruptedException { * heater_TP_setter_main_stream.setOutTemperature(77.92657470703125, "C"); * heater_TP_setter_main_stream.run(); * System.out.println(heater_TP_setter_main_stream.getOutStream().getFlowRate( "kg/hr")); - * + * * neqsim.thermo.system.SystemSrkCPAstatoil fluid_test_separator = new * neqsim.thermo.system.SystemSrkCPAstatoil(273.15 + 42.0, 10.00); * fluid_test_separator.addComponent("water", 0.15); @@ -215,32 +215,32 @@ public void runProcess2() throws InterruptedException { * 036010742188/1000,608 .036010742188/(1000*0.642772477456171)); * fluid_test_separator.setMixingRule(10); fluid_test_separator.setMultiPhaseCheck(true); * fluid_test_separator.init(0); - * + * * neqsim.processSimulation.processEquipment.stream.Stream inlet_stream_test_sep = new * neqsim.processSimulation.processEquipment.stream.Stream( * "TEST_SEPARATOR_INLET,fluid_test_separator", fluid_test_separator); * inlet_stream_test_sep.setTemperature(39.92721557617188, "C"); * inlet_stream_test_sep.setPressure(1.4343990154266357, "bara"); * inlet_stream_test_sep.setFlowRate(472.5621656362427, "kg/hr"); inlet_stream_test_sep.run(); - * + * * neqsim.processSimulation.processEquipment.separator.ThreePhaseSeparator test_separator = new * neqsim.processSimulation.processEquipment.separator.ThreePhaseSeparator( * inlet_stream_test_sep); test_separator.setName("TEST_SEPARATOR"); test_separator.run(); - * + * * neqsim.processSimulation.processEquipment.heatExchanger.Heater heater_TP_setter_test_stream = * new neqsim.processSimulation.processEquipment.heatExchanger.Heater( * "TP_SETTER_FOR_THE_DEGASSER_TEST_SEP_STREAM", test_separator.getWaterOutStream()); * heater_TP_setter_test_stream.setOutPressure(6.22176469039917, "bara"); * heater_TP_setter_test_stream.setOutTemperature(77.92657470703125, "C"); * heater_TP_setter_test_stream.run(); - * + * * neqsim.processSimulation.processEquipment.mixer.StaticMixer mixing_degasser = new * neqsim.processSimulation.processEquipment.mixer.StaticMixer(); * mixing_degasser.setName("MIXING_BEFORE_THE_DEGASSER"); * mixing_degasser.addStream(heater_TP_setter_main_stream.getOutStream()); * mixing_degasser.addStream(heater_TP_setter_test_stream.getOutStream()); * mixing_degasser.run(); - * + * * System.out.println(mixing_degasser.getOutStream().getFlowRate("kg/hr")); // Should be arount * 33946.08070091751 */ diff --git a/src/test/java/neqsim/processSimulation/util/example/OffshoreProcess3.java b/src/test/java/neqsim/processSimulation/util/example/OffshoreProcess3.java index 2a483e700e..58fd9b2c76 100644 --- a/src/test/java/neqsim/processSimulation/util/example/OffshoreProcess3.java +++ b/src/test/java/neqsim/processSimulation/util/example/OffshoreProcess3.java @@ -128,11 +128,10 @@ public static void main(String[] args) { * Stream coolingWater = new Stream("cooling water", coolingWaterSYstm); * coolingWater.setFlowRate(500900.2, "kg/hr"); coolingWater.setTemperature(10.0, "C"); * coolingWater.setPressure(10.0, "bara"); - * + * * HeatExchanger heatEx = new HeatExchanger(lpcompressor.getOutStream()); * heatEx.setName("LP heat Exchanger"); heatEx.setGuessOutTemperature(273.15+40.0); * heatEx.setUAvalue(45000.0); heatEx.setFeedStream(1, coolingWater); - * */ Cooler lpHeatExchanger = @@ -281,28 +280,27 @@ public static void main(String[] args) { /* * // System.out.println("second stage comp power " + ((Compressor) // * operations.getUnit("2nd stage recompressor")).getPower()/1.0e3 + " kW"); - * + * * // System.out.println("first stage comp power " + ((Compressor) * operations.getUnit("1st stage recompressor")).getPower()/1.0e3 + " kW"); - * + * * System.out.println("gas from inlet separator " + ((Separator) * operations.getUnit("1st stage separator")) * .getGasOutStream().getFluid().getFlowRate("MSm3/day")); - * + * * System.out .println("pressure of export oil " + ((Stream) * operations.getUnit("stable oil")).getPressure("bara")); - * + * * System.out.println( "temperature of export oil " + ((Stream) * operations.getUnit("stable oil")).getTemperature("C")); - * + * * System.out.println("TVP of export oil (30.0 C) " + ((Stream) * operations.getUnit("stable oil")).TVP(30.0, "C")); - * + * * // System.out.println("entropy production " + // operations.getEntropyProduction("J/K") + * " J/K"); // System.out.println("mass balance separator " + ((Separator) * operations.getUnit("scrubber of mix gas HP")).getMassBalance("kg/sec") + " kg/sec"); - * - * + * * // liqFromlpscrubber.displayResult(); // richGas.phaseEnvelope(); // richGas.displayResult(); * operations.save("c:/temp/offshorePro.neqsim"); * inletSeparator.getLiquidOutStream().getFluid().display(); diff --git a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationAaHa.java b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationAaHa.java index 957f8841dc..c5693ce806 100644 --- a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationAaHa.java +++ b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationAaHa.java @@ -316,7 +316,7 @@ public static void main(String[] args) { * System.out.println("wt lean TEG " + ((WaterStripperColumn) * operations.getUnit("TEG stripper")) * .getSolventOutStream().getFluid().getPhase("aqueous").getWtFrac("TEG") * 100.0); - * + * * double waterInWetGasppm = * waterSaturatedFeedGas.getFluid().getPhase(0).getComponent("water").getz() * 1.0e6; double * waterInWetGaskgMSm3 = waterInWetGasppm * 0.01802 *ThermodynamicConstantsInterface.atm / @@ -337,22 +337,22 @@ public static void main(String[] args) { * System.out.println("flow rate from pump2 " + * hotLeanTEGPump2.getOutStream().getFluid().getFlowRate("kg/hr")); * System.out.println("makeup TEG " + makeupTEG.getFluid().getFlowRate("kg/hr")); - * + * * TEGFeed.getFluid().display(); absorber.run(); - * + * * System.out.println("pump power " + hotLeanTEGPump.getDuty()); * System.out.println("pump2 power " + hotLeanTEGPump2.getDuty()); * System.out.println("wt lean TEG after reboiler " + * column.getLiquidOutStream().getFluid().getPhase("aqueous").getWtFrac("TEG")); * System.out.println("temperature from pump " + * (hotLeanTEGPump2.getOutStream().getTemperature() - 273.15)); - * + * * System.out.println("flow rate from reboiler " + ((Reboiler) * column.getReboiler()).getLiquidOutStream().getFlowRate("kg/hr")); * System.out.println("flow rate from pump2 " + * hotLeanTEGPump2.getOutStream().getFluid().getFlowRate("kg/hr")); * System.out.println("flow rate to flare " + gasToFlare.getFluid().getFlowRate("kg/hr")); - * + * * System.out.println("condenser duty " + ((Condenser) ((DistillationColumn) * operations.getUnit("TEG regeneration column")).getCondenser()) .getDuty() / 1.0e3); * System.out.println( "richGLycolHeaterCondenser duty " + @@ -360,17 +360,16 @@ public static void main(String[] args) { * System.out.println("richGLycolHeaterCondenser temperature out " + * richGLycolHeaterCondenser.getOutStream().getTemperature("C")); * richGLycolHeaterCondenser.run(); - * + * * hotLeanTEGPump.getOutStream().displayResult(); flashLiquid.displayResult(); - * + * * System.out.println("Temperature rich TEG out of reflux condenser " + * richGLycolHeaterCondenser.getOutStream().getTemperature("C")); heatEx.displayResult(); * System.out.println("glycol out temperature " + * glycol_flash_valve2.getOutStream().getFluid().getTemperature("C")); * System.out.println("glycol out temperature2 " +heatEx2.getOutStream(0).getTemperature("C")); * System.out.println("glycol out temperature2 " +heatEx2.getOutStream(1).getTemperature("C")); - * - * + * * System.out.println("out water rate LP valve" + * glycol_flash_valve2.getOutStream().getFluid().getPhase(0).getComponent( * "water").getNumberOfmoles()); System.out.println("glycol out water rate reboil " + @@ -380,29 +379,26 @@ public static void main(String[] args) { * getNumberOfmoles()); System.out.println("recycle out water rate " * +recycleGasFromStripper.getOutletStream().getFluid().getComponent("water"). * getNumberOfmoles()); - * + * * System.out.println("water dew point of dry gas " + * waterDewPointAnalyser.getMeasuredValue("C")); - * - * + * * System.out.println("hydrocarbons in lean TEG " + (1.0- * stripper.getLiquidOutStream().getFluid().getPhase(0).getWtFrac("TEG")- * stripper.getLiquidOutStream().getFluid().getPhase(0).getWtFrac("water"))*1e6 + " mg/kg"); * System.out.println("hydrocarbons in rich TEG " + (1.0- * flashLiquid.getFluid().getPhase(0).getWtFrac("TEG")-flashLiquid.getFluid(). * getPhase(0).getWtFrac("water"))*1e6 + " mg/kg"); - * + * * //double dewT = ((WaterDewPointAnalyser)operations. * getMeasurementDevice("water dew point analyser")).getMeasuredValue("C"); * //waterDewPointAnalyser.setOnlineValue(measured, unit) * //waterDewPointAnalyser.setOnlineSignal(isOnlineSignal, plantName, transmitterame); - * - * - * + * * //Heat echanger test - * + * * //Sabe and Open copy of model - * + * * ProcessSystem locoperations = operations.copy(); * //((HeatExchanger)locoperations.getUnit("rich TEG heat exchanger 2")). * getInStream(0).setTemperature(298.15, "C"); @@ -417,8 +413,7 @@ public static void main(String[] args) { * eff = ((HeatExchanger)locoperations.getUnit("rich TEG heat exchanger 2")). * getThermalEffectiveness(); System.out.println("eff " + eff); //store fouling factor in * dataframe - * - * + * * dehydratedGas.getFluid().display(); */ diff --git a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationGFA.java b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationGFA.java index 76c44ce6b6..a38b44c6c9 100644 --- a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationGFA.java +++ b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationGFA.java @@ -499,22 +499,22 @@ public static void main(String[] args) { * System.out.println("flow rate from pump2 " + * hotLeanTEGPump2.getOutStream().getFluid().getFlowRate("kg/hr")); * System.out.println("makeup TEG " + makeupTEG.getFluid().getFlowRate("kg/hr")); - * + * * TEGFeed.getFluid().display(); absorber.run(); - * + * * System.out.println("pump power " + hotLeanTEGPump.getDuty()); * System.out.println("pump2 power " + hotLeanTEGPump2.getDuty()); * System.out.println("wt lean TEG after reboiler " + * column.getLiquidOutStream().getFluid().getPhase("aqueous").getWtFrac("TEG")); * System.out.println("temperature from pump " + * (hotLeanTEGPump2.getOutStream().getTemperature() - 273.15)); - * + * * System.out.println("flow rate from reboiler " + ((Reboiler) * column.getReboiler()).getLiquidOutStream().getFlowRate("kg/hr")); * System.out.println("flow rate from pump2 " + * hotLeanTEGPump2.getOutStream().getFluid().getFlowRate("kg/hr")); * System.out.println("flow rate to flare " + gasToFlare.getFluid().getFlowRate("kg/hr")); - * + * * System.out.println("condenser duty " + ((Condenser) ((DistillationColumn) * operations.getUnit("TEG regeneration column")).getCondenser()) .getDuty() / 1.0e3); * System.out.println( "richGLycolHeaterCondenser duty " + @@ -522,17 +522,16 @@ public static void main(String[] args) { * System.out.println("richGLycolHeaterCondenser temperature out " + * richGLycolHeaterCondenser.getOutStream().getTemperature("C")); * richGLycolHeaterCondenser.run(); - * + * * hotLeanTEGPump.getOutStream().displayResult(); flashLiquid.displayResult(); - * + * * System.out.println("Temperature rich TEG out of reflux condenser " + * richGLycolHeaterCondenser.getOutStream().getTemperature("C")); heatEx.displayResult(); * System.out.println("glycol out temperature " + * glycol_flash_valve2.getOutStream().getFluid().getTemperature("C")); * System.out.println("glycol out temperature2 " +heatEx2.getOutStream(0).getTemperature("C")); * System.out.println("glycol out temperature2 " +heatEx2.getOutStream(1).getTemperature("C")); - * - * + * * System.out.println("out water rate LP valve" + * glycol_flash_valve2.getOutStream().getFluid().getPhase(0).getComponent("water"). * getNumberOfmoles()); System.out.println("glycol out water rate reboil " + ((Reboiler) @@ -542,19 +541,17 @@ public static void main(String[] args) { * getNumberOfmoles()); System.out.println("recycle out water rate " * +recycleGasFromStripper.getOutletStream().getFluid().getComponent("water"). * getNumberOfmoles()); - * + * * System.out.println("water dew point of dry gas " + * waterDewPointAnalyser.getMeasuredValue("C")); - * + * * //double dewT = * ((WaterDewPointAnalyser)operations.getMeasurementDevice("water dew point analyser")). * getMeasuredValue("C"); //waterDewPointAnalyser.setOnlineValue(measured, unit) * //waterDewPointAnalyser.setOnlineSignal(isOnlineSignal, plantName, transmitterame); - * - * - * + * * //Heat exchanger test - * + * * //Sabe and Open copy of model */ // ProcessSystem locoperations = operations.copy(); diff --git a/src/test/java/neqsim/processSimulation/util/example/TestNeqsim.java b/src/test/java/neqsim/processSimulation/util/example/TestNeqsim.java index 689464d53c..76dbeb30fe 100644 --- a/src/test/java/neqsim/processSimulation/util/example/TestNeqsim.java +++ b/src/test/java/neqsim/processSimulation/util/example/TestNeqsim.java @@ -118,12 +118,12 @@ public static void main(String[] args) { /* * temperature[i] = compressor1.getOutStream().getTemperature(); work [i] = * compressor1.getTotalWork(); - * + * * Cp_Vapour [i] = compressor1.getOutStream().getThermoSystem().getPhase(0).getCp(); Cp_liquid * [i] = compressor1.getOutStream().getThermoSystem().getPhase(1).getCp(); Cp [i] = * compressor1.getOutStream().getThermoSystem().getPhase(0).getBeta() * Cp_Vapour [i] + * compressor1.getOutStream().getThermoSystem().getPhase(1).getBeta()* Cp_liquid [i]; - * + * * Density_Vapour [i] = compressor1.getOutStream().getThermoSystem().getPhase(0).getDensity(); * Density_liquid [i] = compressor1.getOutStream().getThermoSystem().getPhase(1).getDensity(); * Density [i] = compressor1.getOutStream().getThermoSystem().getWtFraction(0) * Density_Vapour @@ -140,21 +140,14 @@ public static void main(String[] args) { } // catch(Exception ex){ /* - * System.out.println( "P_out" ); for (int i=0;i<10;i++ ) { System.out.println(20 + 5*i); - * - * } - * + * System.out.println( "P_out" ); for (int i=0;i<10;i++ ) { System.out.println(20 + 5*i); } + * * System.out.println( "Temperature" ); for (int i=0;i<10;i++ ) { System.out.println( - * temperature[i] ); - * - * } - * - * System.out.println( "Work" ); for (int i=0;i<10;i++ ) { System.out.println( work [i] ); - * - * } System.out.println( "Cp" ); for (int i=0;i<10;i++ ) { System.out.println( Cp [i] ); - * - * } - * + * temperature[i] ); } + * + * System.out.println( "Work" ); for (int i=0;i<10;i++ ) { System.out.println( work [i] ); } + * System.out.println( "Cp" ); for (int i=0;i<10;i++ ) { System.out.println( Cp [i] ); } + * * System.out.println( "Density" ); for (int i=0;i<10;i++ ) { System.out.println( Density [i] ); */ } diff --git a/src/test/java/neqsim/processSimulation/util/example/TestTransientFlow.java b/src/test/java/neqsim/processSimulation/util/example/TestTransientFlow.java index d6ef3fd9e7..c047e2ec8d 100644 --- a/src/test/java/neqsim/processSimulation/util/example/TestTransientFlow.java +++ b/src/test/java/neqsim/processSimulation/util/example/TestTransientFlow.java @@ -122,11 +122,11 @@ public static void main(String args[]) { * // transient behaviour operations.setTimeStep(1.1); for(int i=0;i<50;i++){ * operations.runTransient(); System.out.println("liquid level " + separator_1.getLiquidLevel()+ * " PRESSURE " + separator_1.getGasOutStream().getPressure()); } - * + * * operations.setTimeStep(30.0); for(int i=0;i<2000;i++){ operations.runTransient(); * System.out.println("liquid level " + separator_1.getLiquidLevel()+ " PRESSURE " + * separator_1.getGasOutStream().getPressure()); } operations.displayResult(); - * + * * operations.displayResult(); */ } diff --git a/src/test/java/neqsim/processSimulation/util/example/destillation1.java b/src/test/java/neqsim/processSimulation/util/example/destillation1.java index ae1770fa08..6edfddf53e 100644 --- a/src/test/java/neqsim/processSimulation/util/example/destillation1.java +++ b/src/test/java/neqsim/processSimulation/util/example/destillation1.java @@ -7,64 +7,66 @@ import neqsim.thermodynamicOperations.ThermodynamicOperations; /** - *destillation1 class.
+ *+ * destillation1 class. + *
* * @author asmund * @version $Id: $Id * @since 2.2.3 */ public class destillation1 { - /** - * This method is just meant to test the thermo package. - * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String args[]) { - neqsim.thermo.system.SystemInterface testSystem = - new neqsim.thermo.system.SystemSrkEos((273.15 + 63.0), 16.00); - // testSystem.addComponent("methane", 1.00); - testSystem.addComponent("ethane", 0.002); - // testSystem.addComponent("CO2", 10.00); - testSystem.addComponent("propane", 0.605900); - testSystem.addComponent("i-butane", 0.1473); - testSystem.addComponent("n-butane", 0.2414); - testSystem.addComponent("i-pentane", 0.00322); - testSystem.addComponent("n-pentane", 0.0002); - testSystem.addComponent("methanol", 0.00005); - // testSystem.addComponent("n-heptane", 100.0); - testSystem.createDatabase(true); - testSystem.setMixingRule(2); - ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); - testOps.TPflash(); - testSystem.display(); + /** + * This method is just meant to test the thermo package. + * + * @param args an array of {@link java.lang.String} objects + */ + public static void main(String args[]) { + neqsim.thermo.system.SystemInterface testSystem = + new neqsim.thermo.system.SystemSrkEos((273.15 + 63.0), 16.00); + // testSystem.addComponent("methane", 1.00); + testSystem.addComponent("ethane", 0.002); + // testSystem.addComponent("CO2", 10.00); + testSystem.addComponent("propane", 0.605900); + testSystem.addComponent("i-butane", 0.1473); + testSystem.addComponent("n-butane", 0.2414); + testSystem.addComponent("i-pentane", 0.00322); + testSystem.addComponent("n-pentane", 0.0002); + testSystem.addComponent("methanol", 0.00005); + // testSystem.addComponent("n-heptane", 100.0); + testSystem.createDatabase(true); + testSystem.setMixingRule(2); + ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); + testOps.TPflash(); + testSystem.display(); - Stream stream_1 = new Stream("Stream1", testSystem); + Stream stream_1 = new Stream("Stream1", testSystem); - DistillationColumn column = new DistillationColumn(9, true, true); - column.addFeedStream(stream_1, 4); - ((Reboiler) column.getReboiler()).setRefluxRatio(3.7); - ((Condenser) column.getCondenser()).setRefluxRatio(10.7); - // column.setReboilerTemperature(360); - // column.setReboilerTemperature(300); - /* - * Heater heater = new Heater((Stream) column.getGasOutStream()); heater.setdT(-15.0); - * - * DistillationColumn column2 = new DistillationColumn(4, true, true); - * column2.addFeedStream(heater.getOutStream(), 2); ((Reboiler) - * column2.getReboiler()).setRefluxRatio(0.01); ((Condenser) - * column2.getCondenser()).setRefluxRatio(0.01); - */ + DistillationColumn column = new DistillationColumn(9, true, true); + column.addFeedStream(stream_1, 4); + ((Reboiler) column.getReboiler()).setRefluxRatio(3.7); + ((Condenser) column.getCondenser()).setRefluxRatio(10.7); + // column.setReboilerTemperature(360); + // column.setReboilerTemperature(300); + /* + * Heater heater = new Heater((Stream) column.getGasOutStream()); heater.setdT(-15.0); + * + * DistillationColumn column2 = new DistillationColumn(4, true, true); + * column2.addFeedStream(heater.getOutStream(), 2); ((Reboiler) + * column2.getReboiler()).setRefluxRatio(0.01); ((Condenser) + * column2.getCondenser()).setRefluxRatio(0.01); + */ - neqsim.processSimulation.processSystem.ProcessSystem operations = - new neqsim.processSimulation.processSystem.ProcessSystem(); - operations.add(stream_1); - operations.add(column); - // operations.add(heater); - // operations.add(column2); + neqsim.processSimulation.processSystem.ProcessSystem operations = + new neqsim.processSimulation.processSystem.ProcessSystem(); + operations.add(stream_1); + operations.add(column); + // operations.add(heater); + // operations.add(column2); - operations.run(); - // column.getReboiler().displayResult(); - // column.getCondenser().displayResult(); - // operations.displayResult(); - } + operations.run(); + // column.getReboiler().displayResult(); + // column.getCondenser().displayResult(); + // operations.displayResult(); + } } diff --git a/src/test/java/neqsim/processSimulation/util/example/shtokman.java b/src/test/java/neqsim/processSimulation/util/example/shtokman.java index 746751e2d9..4a6e1e0ad1 100644 --- a/src/test/java/neqsim/processSimulation/util/example/shtokman.java +++ b/src/test/java/neqsim/processSimulation/util/example/shtokman.java @@ -63,7 +63,7 @@ public static void main(String args[]) { // ThermodynamicOperations ops = new ThermodynamicOperations(stream_2.getThermoSystem()); /* * try { // ops.TPflash(); - * + * * ops.waterPrecipitationTemperature(); stream_2.getThermoSystem().display(); * stream_2.getThermoSystem().init(0); ops.hydrateFormationTemperature(2); * stream_2.getThermoSystem().display(); // stream_2.getThermoSystem().display(); // @@ -73,7 +73,7 @@ public static void main(String args[]) { * getThermoSystem().getPhase(1).getComponent("MEG").getMolarMass(); double wtwater = * stream_2.getThermoSystem().getPhase(1).getComponent("water").getx()*stream_2. * getThermoSystem().getPhase(1).getComponent("water").getMolarMass(); - * + * * System.out.println("wt% MEG " + wtMEG/(wtMEG+wtwater)*100); // operations.displayResult(); */ } diff --git a/src/test/java/neqsim/standards/gasQuality/Standard_ISO6976Test.java b/src/test/java/neqsim/standards/gasQuality/Standard_ISO6976Test.java index f0340b8529..076cb9ae3a 100644 --- a/src/test/java/neqsim/standards/gasQuality/Standard_ISO6976Test.java +++ b/src/test/java/neqsim/standards/gasQuality/Standard_ISO6976Test.java @@ -11,7 +11,6 @@ /** * @author ESOL - * */ class Standard_ISO6976Test extends neqsim.NeqSimTest { static SystemInterface testSystem = null; @@ -112,16 +111,13 @@ void testCalculate2() { * testSystem.addComponent("22-dim-C3", 0.001015); testSystem.addComponent("n-hexane", * 0.002865); testSystem.addComponent("nitrogen", 0.01023); testSystem.addComponent("CO2", * 0.015236); - * */ /* - * * testSystem.addComponent("methane", 0.9247); testSystem.addComponent("ethane", 0.035); * testSystem.addComponent("propane", 0.0098); testSystem.addComponent("n-butane", 0.0022); * testSystem.addComponent("i-butane", 0.0034); testSystem.addComponent("n-pentane", 0.0006); * testSystem.addComponent("nitrogen", 0.0175); testSystem.addComponent("CO2", 0.0068); - * */ // testSystem.addComponent("water", 0.016837); @@ -130,7 +126,7 @@ void testCalculate2() { * testSystem.addComponent("n-hexane", 0.0); testSystem.addComponent("n-heptane", 0.0); * testSystem.addComponent("n-octane", 0.0); testSystem.addComponent("n-nonane", 0.0); * testSystem.addComponent("nC10", 0.0); - * + * * testSystem.addComponent("CO2", 0.68); testSystem.addComponent("H2S", 0.0); * testSystem.addComponent("water", 0.0); testSystem.addComponent("oxygen", 0.0); * testSystem.addComponent("carbonmonoxide", 0.0); testSystem.addComponent("nitrogen", 1.75); @@ -161,7 +157,7 @@ void testCalculate2() { * StandardInterface standardUK = new UKspecifications_ICF_SI(testSystem); * standardUK.calculate(); logger.info("ICF " + * standardUK.getValue("IncompleteCombustionFactor", "")); - * + * * logger.info("HID " + testSystem.getPhase(0).getComponent("methane").getHID(273.15 - 150.0)); * logger.info("Hres " + testSystem.getPhase(0).getComponent("methane").getHresTP(273.15 - * 150.0)); diff --git a/src/test/java/neqsim/standards/gasQuality/Standard_ISO6976_2016_Test.java b/src/test/java/neqsim/standards/gasQuality/Standard_ISO6976_2016_Test.java index 86e9b06e1a..645ff2638e 100644 --- a/src/test/java/neqsim/standards/gasQuality/Standard_ISO6976_2016_Test.java +++ b/src/test/java/neqsim/standards/gasQuality/Standard_ISO6976_2016_Test.java @@ -11,7 +11,6 @@ /** * @author ESOL - * */ class Standard_ISO6976_2016_Test extends neqsim.NeqSimTest { static SystemInterface testSystem = null; @@ -126,7 +125,7 @@ void testCalculate2() { * StandardInterface standardUK = new UKspecifications_ICF_SI(testSystem); * standardUK.calculate(); logger.info("ICF " + * standardUK.getValue("IncompleteCombustionFactor", "")); - * + * * logger.info("HID " + testSystem.getPhase(0).getComponent("methane").getHID(273.15 - 150.0)); * logger.info("Hres " + testSystem.getPhase(0).getComponent("methane").getHresTP(273.15 - * 150.0)); diff --git a/src/test/java/neqsim/standards/salesContract/BaseContractTest.java b/src/test/java/neqsim/standards/salesContract/BaseContractTest.java index 9328d9db83..5b4cec7959 100644 --- a/src/test/java/neqsim/standards/salesContract/BaseContractTest.java +++ b/src/test/java/neqsim/standards/salesContract/BaseContractTest.java @@ -9,7 +9,6 @@ /** * @author ESOL - * */ class BaseContractTest extends neqsim.NeqSimTest { static SystemInterface testSystem = null; diff --git a/src/test/java/neqsim/thermo/component/ComponentHydrateGFTest.java b/src/test/java/neqsim/thermo/component/ComponentHydrateGFTest.java index 1e0e256f34..97c69fefdb 100644 --- a/src/test/java/neqsim/thermo/component/ComponentHydrateGFTest.java +++ b/src/test/java/neqsim/thermo/component/ComponentHydrateGFTest.java @@ -12,7 +12,6 @@ /** * @author ESOL - * */ class ComponentHydrateGFTest extends neqsim.NeqSimTest { static Logger logger = LogManager.getLogger(ComponentHydrateGFTest.class); diff --git a/src/test/java/neqsim/thermo/system/SystemUMRCPAEoStest.java b/src/test/java/neqsim/thermo/system/SystemUMRCPAEoStest.java index 87122f1eb6..fd0d106f26 100644 --- a/src/test/java/neqsim/thermo/system/SystemUMRCPAEoStest.java +++ b/src/test/java/neqsim/thermo/system/SystemUMRCPAEoStest.java @@ -204,7 +204,7 @@ public void checkFugacityCoefficientsDn2() { ** checkPhaseEnvelope. *
- * + * * @throws Exception */ // @Test diff --git a/src/test/java/neqsim/thermo/system/SystemUMRPRUMCEosNewTest.java b/src/test/java/neqsim/thermo/system/SystemUMRPRUMCEosNewTest.java index d545100170..14af4075e1 100644 --- a/src/test/java/neqsim/thermo/system/SystemUMRPRUMCEosNewTest.java +++ b/src/test/java/neqsim/thermo/system/SystemUMRPRUMCEosNewTest.java @@ -189,7 +189,7 @@ public void checkFugacityCoefficientsDn2() { ** checkPhaseEnvelope. *
- * + * * @throws Exception */ @Test @@ -220,7 +220,7 @@ public void checkPhaseEnvelope() throws Exception { ** checkPhaseEnvelope2. *
- * + * * @throws Exception */ @Test diff --git a/src/test/java/neqsim/thermo/util/example/BubbleFlashCPA.java b/src/test/java/neqsim/thermo/util/example/BubbleFlashCPA.java index d0f6c99655..33f06f01ef 100644 --- a/src/test/java/neqsim/thermo/util/example/BubbleFlashCPA.java +++ b/src/test/java/neqsim/thermo/util/example/BubbleFlashCPA.java @@ -47,13 +47,13 @@ public static void main(String args[]) { testSystem.addComponent("TEG", 100.0); /* * testSystem.addComponent("methane", 69.243); - * + * * testSystem.addComponent("CO2", 4.113); testSystem.addComponent("ethane", 8.732); * testSystem.addComponent("propane", 4.27); testSystem.addComponent("n-pentane", 1.641); * testSystem.addComponent("i-pentane", 0.877); - * + * * testSystem.addComponent("benzene", 1.27); - * + * * testSystem.addTBPfraction("C6", 1.49985, 86.178 / 1000.0, 0.664); * testSystem.addTBPfraction("C7", 1.359864, 96.0 / 1000.0, 0.738); * testSystem.addTBPfraction("C8", 0.939906, 107.0 / 1000.0, 0.765); diff --git a/src/test/java/neqsim/thermo/util/example/DewPointCurve.java b/src/test/java/neqsim/thermo/util/example/DewPointCurve.java index d131330c59..81d6eb1416 100644 --- a/src/test/java/neqsim/thermo/util/example/DewPointCurve.java +++ b/src/test/java/neqsim/thermo/util/example/DewPointCurve.java @@ -92,7 +92,6 @@ public static void main(String args[]) { * testSystem.getPhase(1).getActivityCoefficientSymetric(i)); } * System.out.println("activity coeff " + testSystem.getPhase(1).getComponent(1).getName() + " " * + testSystem.getPhase(1).getActivityCoefficient(1, 0)); - * */ } } diff --git a/src/test/java/neqsim/thermo/util/example/HydrateFlash.java b/src/test/java/neqsim/thermo/util/example/HydrateFlash.java index 29579bbd76..a7c4d5639b 100644 --- a/src/test/java/neqsim/thermo/util/example/HydrateFlash.java +++ b/src/test/java/neqsim/thermo/util/example/HydrateFlash.java @@ -167,10 +167,8 @@ public static void main(String args[]) { * * testSystem2.setMixingRule(7); testSystem2.init(0); testSystem2.init(1); * ThermodynamicOperations testOps2 = new ThermodynamicOperations(testSystem2); try { - * testOps2.waterDewPointTemperatureFlash(); - * - * } catch (Exception ex) { logger.error(ex.getMessage()) } testSystem2.display(); - * + * testOps2.waterDewPointTemperatureFlash(); } catch (Exception ex) { + * logger.error(ex.getMessage()) } testSystem2.display(); */ } } diff --git a/src/test/java/neqsim/thermo/util/example/LNGFlash.java b/src/test/java/neqsim/thermo/util/example/LNGFlash.java index 9c6afda1b4..ea57a444f5 100644 --- a/src/test/java/neqsim/thermo/util/example/LNGFlash.java +++ b/src/test/java/neqsim/thermo/util/example/LNGFlash.java @@ -66,8 +66,6 @@ public static void main(String args[]) { * ThermodynamicOperations(testSystem); try { testOps.TPflash(); // testSystem.display(); // * testOps.freezingPointTemperatureFlash(); // testOps.calcWAT(); testSystem.display(); } catch * (Exception ex) { logger.error(ex.getMessage(),e); } } - * - * */ } } diff --git a/src/test/java/neqsim/thermo/util/example/PS_PH_flash.java b/src/test/java/neqsim/thermo/util/example/PS_PH_flash.java index 0e1c685257..c31fd705d7 100644 --- a/src/test/java/neqsim/thermo/util/example/PS_PH_flash.java +++ b/src/test/java/neqsim/thermo/util/example/PS_PH_flash.java @@ -74,11 +74,10 @@ public static void main(String args[]) { double entropy = testSystem.getEntropy(); /* * testSystem.setTemperature(273.15 + 0.0); testSystem.setPressure(100.0); try { - * testOps.TPflash(); // testOps.bubblePointTemperatureFlash(); } catch (Exception ex) { - * - * } testSystem.init(2); testSystem.setPressure(100.0); // System.out.println("entropy spec" + + * testOps.TPflash(); // testOps.bubblePointTemperatureFlash(); } catch (Exception ex) { } + * testSystem.init(2); testSystem.setPressure(100.0); // System.out.println("entropy spec" + * entropy); - * + * * // testSystem.setPressure(20.894745); */ testSystem.setPressure(10.0); diff --git a/src/test/java/neqsim/thermo/util/example/PhaseEnvelope.java b/src/test/java/neqsim/thermo/util/example/PhaseEnvelope.java index b724bdb320..fb958e0187 100644 --- a/src/test/java/neqsim/thermo/util/example/PhaseEnvelope.java +++ b/src/test/java/neqsim/thermo/util/example/PhaseEnvelope.java @@ -109,10 +109,10 @@ public static void main(String args[]) { * testOps.setRunAsThread(true); testOps.waterDewPointLine(10, 200); boolean isFinished = * testOps.waitAndCheckForFinishedCalculation(50000); double[][] waterData = * testOps.getData(); - * + * * testOps.hydrateEquilibriumLine(10, 200); isFinished = * testOps.waitAndCheckForFinishedCalculation(50000); double[][] hydData = testOps.getData(); - * + * * testSystem.addComponent("water", * -testSystem.getPhase(0).getComponent("water").getNumberOfmoles()); */ diff --git a/src/test/java/neqsim/thermo/util/example/ReadFluidData2.java b/src/test/java/neqsim/thermo/util/example/ReadFluidData2.java index 6d9024070d..64cfb4d9dc 100644 --- a/src/test/java/neqsim/thermo/util/example/ReadFluidData2.java +++ b/src/test/java/neqsim/thermo/util/example/ReadFluidData2.java @@ -53,7 +53,7 @@ public static void main(String args[]) { * // // ""); // testSystem.addComponent("water", 1.0); testSystem.setMixingRule(2); // * testSystem.setMultiPhaseCheck(true); //testSystem.setMultiPhaseCheck(false); * ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); - * + * * try { testOps.TPflash(); testSystem.display(); testOps.PSflash(-123.108602625942); * testSystem.display(); testSystem.setPressure(100.0); testOps.PSflash(-119.003271056256); * testSystem.display(); System.out.println("entropy " + testSystem.getEntropy()); diff --git a/src/test/java/neqsim/thermo/util/example/TPflash.java b/src/test/java/neqsim/thermo/util/example/TPflash.java index 93a5159a9a..ae044a6929 100644 --- a/src/test/java/neqsim/thermo/util/example/TPflash.java +++ b/src/test/java/neqsim/thermo/util/example/TPflash.java @@ -48,7 +48,7 @@ public static void main(String[] args) { * testSystem.addTBPfraction("C10", 1.0, 225.5046 / 1000.0, 841.1014 / 1000.0); * testSystem.setMolarComposition(new double[] { 0.829, 0, 0.0007, 0.002, 0.0707, 0.0072, * 0.0051, 0.0019, 0.0062, 0.0048, 0.006, 0.0074, 0.0109, 0.0109, 0.0062, 0.031 }); - * + * * testSystem.setHeavyTBPfractionAsPlusFraction(); * testSystem.getCharacterization().characterisePlusFraction(); */ diff --git a/src/test/java/neqsim/thermo/util/example/TPflashDehyd.java b/src/test/java/neqsim/thermo/util/example/TPflashDehyd.java index 01447b327f..ed8f2e83a3 100644 --- a/src/test/java/neqsim/thermo/util/example/TPflashDehyd.java +++ b/src/test/java/neqsim/thermo/util/example/TPflashDehyd.java @@ -75,30 +75,30 @@ public static void main(String[] args) { // testSystem.init(1); /* * testSystem.init(2); - * + * * // testSystem.init(1); // testSystem.init(2); // testSystem.init(3); // * System.out.println("heat cap " + (testSystem.getPhase(1).getCp())); // * testOps.calcPTphaseEnvelope(); testSystem.display(); // testSystem.getPhase(0).getCp(); } * catch (Exception ex) { System.out.println(ex.toString()); } - * + * * /* System.out.println("gas density " + (testSystem.getPhase(0).getDensity())); * System.out.println("gas density " + (1.0 / (testSystem.getPhase(0).getDensity() / * testSystem.getPhase(0).getMolarMass()))); - * + * * System.out.println("liq density " + (testSystem.getPhase(1).getDensity())); * System.out.println("liq density " + (1.0 / (testSystem.getPhase(1).getDensity() / * testSystem.getPhase(1).getMolarMass()))); - * + * * testSystem.initPhysicalProperties(); testSystem.init(1); - * + * * System.out.println("start....."); testSystem.setEmptyFluid(); * testSystem.setMolarComposition(new double[]{1.0, 1e-20, 1e-20}); testSystem.init(0, 0); * testSystem.init(1); testSystem.display(); - * + * * System.out.println("end....."); testSystem.setMolarComposition(new double[]{0.000001, * 0.00001, 1e-20}); // testSystem.init(1); testSystem.init(0, 0); testSystem.init(1); // * testSystem.display(); - * + * * /* testSystem.initPhysicalProperties(); double rho1 = * testSystem.getPhase(0).getPhysicalProperties().getDensity(); System.out.println("drhodP " + * testSystem.getPhase(0).getdrhodP()); System.out.println("drhodT " + @@ -106,10 +106,10 @@ public static void main(String[] args) { * testSystem.setPressure(testSystem.getPressure() + 0.001); testSystem.init(1); // * testSystem.display(); // testSystem.initPhysicalProperties(); double rho2 = * testSystem.getPhase(0).getPhysicalProperties().getDensity(); - * + * * //System.out.println("drhodPnum " + (rho2 - rho1) / 0.01); System.out.println("drhodTnum " + * (rho2 - rho1) / 0.001); - * + * * testSystem.saveFluid(2327); testSystem.saveFluid(2301); // testSystem.setNumberOfPhases(1); * // testSystem.setTemperature(299.0); // testSystem.init(1); // * testSystem.getPhase(0).getEntropy(); // System.out.println("enthalpy " + @@ -119,8 +119,7 @@ public static void main(String[] args) { * testSystem.getPhase(0).getCp()); System.out.println("enthalpy " + * testSystem.getPhase(0).getEnthalpy()); System.out.println("entropy " + * testSystem.getPhase(0).getEntropy()); - * - * + * * testSystem.init(2); System.out.println("Cp " + testSystem.getPhase(0).getCp()); * System.out.println("enthalpy " + testSystem.getPhase(0).getEnthalpy()); * System.out.println("entropy " + testSystem.getPhase(0).getEntropy()); testSystem.init(3); @@ -132,7 +131,7 @@ public static void main(String[] args) { * ThermodynamicOperations(testSystem); try { // testOps.freezingPointTemperatureFlash(); * testOps.TPflash(); // testOps.calcPTphaseEnvelope(); // testOps.display(); // * testSystem.display(); } catch (Exception ex) { System.out.println(ex.toString()); } - * + * * /* double h1 = testSystem.getPhase(0).getEntropy(); System.out.println("H " + * testSystem.getPhase(0).getEntropy()); System.out.println("H dP " + * testSystem.getPhase(0).getEntropydT()); testSystem.setTemperature(testSystem.getTemperature() @@ -147,7 +146,7 @@ public static void main(String[] args) { * (testSystem.getPhase(1).getComponent("methane").getx() / * testSystem.getPhase(0).getComponent("methane").getx()); * System.out.println("selectivity CO2/methane " + seletivity); - * + * * double seletivity2 = testSystem.getPhase(1).getComponent("CO2").getx() / * testSystem.getPhase(0).getComponent("CO2").getx() / * (testSystem.getPhase(1).getComponent("ethane").getx() / @@ -162,24 +161,23 @@ public static void main(String[] args) { * testSystem.getPhase(2).getWtFraction(testSystem) + * testSystem.getPhase(1).getWtFraction(testSystem) + * testSystem.getPhase(0).getWtFraction(testSystem)); - * + * * double a = testSystem.getPhase(0).getBeta() * testSystem.getPhase(0).getMolarMass() / * testSystem.getMolarMass(); double seletivity = * testSystem.getPhase(1).getComponent("CO2").getx() / * testSystem.getPhase(0).getComponent("CO2").getx() / * (testSystem.getPhase(1).getComponent("methane").getx() / * testSystem.getPhase(0).getComponent("methane").getx()); - * - * + * * double solubility = testSystem.getPhase(1).getComponent("CO2").getx() * * ThermodynamicConstantsInterface.R * 298.15 /ThermodynamicConstantsInterface.atm / * (testSystem.getPhase(1).getMolarMass()) * 1000; - * + * * System.out.println("selectivity " + seletivity); System.out.println("CO2 solubility " + * solubility); System.out.println("Z " + testSystem.getPhase(0).getZ()); // * testSystem.getPhase(0).getComponentWithIndex(1); // testSystem.saveObject(300); // * System.out.println("ethanol activity " + testSystem.getPhase(0).getActivityCoefficient(0)); - * + * * //testSystem. // System.out.println("water activity " + * testSystem.getPhase(1).getActivityCoefficient(1)); // System.out.println("TEG activity " + * testSystem.getPhase(1).getActivityCoefficient(0)); // testSystem.display(); diff --git a/src/test/java/neqsim/thermo/util/example/TPflashMethanolWaterPropane.java b/src/test/java/neqsim/thermo/util/example/TPflashMethanolWaterPropane.java index fd83bee68d..04da438fc9 100644 --- a/src/test/java/neqsim/thermo/util/example/TPflashMethanolWaterPropane.java +++ b/src/test/java/neqsim/thermo/util/example/TPflashMethanolWaterPropane.java @@ -32,7 +32,7 @@ public static void main(String args[]) { /* * testSystem.addComponent("methane", 150.0e-2); testSystem.addComponent("propane", 150.0e-3); * testSystem.addComponent("methanol", 0.5); testSystem.addComponent("water", 0.5); - * + * * testSystem.createDatabase(true); testSystem.setMixingRule(10); * testSystem.setMultiPhaseCheck(true); */ diff --git a/src/test/java/neqsim/thermo/util/example/TestCharacterizationCondensate.java b/src/test/java/neqsim/thermo/util/example/TestCharacterizationCondensate.java index b3adc4d207..654c1104f8 100644 --- a/src/test/java/neqsim/thermo/util/example/TestCharacterizationCondensate.java +++ b/src/test/java/neqsim/thermo/util/example/TestCharacterizationCondensate.java @@ -112,7 +112,7 @@ public static void main(String args[]) { /* * System.out.println("molar mass " * +testSystem.getPhase(0).getComponent("PC4_PC").getMolarMass() ); - * + * * testSystem.setMolarCompositionOfPlusFluid(new double[]{0.02, 0.005, 0.4, 0.01, 0.01, 0.02, * 0.02, 0.01 ,0.01, 0.01, 0.01 ,0.01, 0.01, 0.2 }); try { testOps.TPflash(); // * testOps.hydrateFormationTemperature(); // testOps.dewPointTemperatureFlash(); } catch diff --git a/src/test/java/neqsim/thermo/util/readwrite/EclipseFluidReadWriteTest.java b/src/test/java/neqsim/thermo/util/readwrite/EclipseFluidReadWriteTest.java index f81e9baf61..68c145c7d6 100644 --- a/src/test/java/neqsim/thermo/util/readwrite/EclipseFluidReadWriteTest.java +++ b/src/test/java/neqsim/thermo/util/readwrite/EclipseFluidReadWriteTest.java @@ -8,7 +8,6 @@ /** * @author ESOL - * */ class EclipseFluidReadWriteTest extends neqsim.NeqSimTest { static neqsim.thermo.system.SystemInterface testSystem = null; @@ -28,7 +27,7 @@ static void setUpBeforeClass() throws Exception {} /** * Test method for * {@link neqsim.thermo.util.readwrite.EclipseFluidReadWrite#read(java.lang.String)}. - * + * * @throws IOException */ @Test diff --git a/src/test/java/neqsim/thermodynamicOperations/flashOps/Degasser.java b/src/test/java/neqsim/thermodynamicOperations/flashOps/Degasser.java index a2d7521321..566a6d4e83 100644 --- a/src/test/java/neqsim/thermodynamicOperations/flashOps/Degasser.java +++ b/src/test/java/neqsim/thermodynamicOperations/flashOps/Degasser.java @@ -9,7 +9,6 @@ /** * @author ESOL - * */ class Degasser { static neqsim.thermo.system.SystemInterface testSystem = null; @@ -181,7 +180,7 @@ void testRun2() { * "/workspaces/neqsim/src/test/java/neqsim/thermodynamicOperations/flashOps/my_process.xml"); * String xmlContents = ""; try { //xmlContents = Files.readString(filePath); } catch * (IOException e) { e.printStackTrace(); } - * + * * // Deserialize from xml neqsim.processSimulation.processSystem.ProcessSystem operationsCopy = * (neqsim.processSimulation.processSystem.ProcessSystem) xstream.fromXML(xmlContents); * operationsCopy.run(); neqsim.processSimulation.processEquipment.separator.Separator diff --git a/src/test/java/neqsim/thermodynamicOperations/flashOps/PHFlashGERG2008Test.java b/src/test/java/neqsim/thermodynamicOperations/flashOps/PHFlashGERG2008Test.java index ee0a6020ad..731e7d5f63 100644 --- a/src/test/java/neqsim/thermodynamicOperations/flashOps/PHFlashGERG2008Test.java +++ b/src/test/java/neqsim/thermodynamicOperations/flashOps/PHFlashGERG2008Test.java @@ -7,7 +7,6 @@ /** * @author ESOL - * */ class PHFlashGERG2008Test { static neqsim.thermo.system.SystemInterface testSystem = null; diff --git a/src/test/java/neqsim/thermodynamicOperations/flashOps/PHFlashTest.java b/src/test/java/neqsim/thermodynamicOperations/flashOps/PHFlashTest.java index 406dc3ddef..f2239b838a 100644 --- a/src/test/java/neqsim/thermodynamicOperations/flashOps/PHFlashTest.java +++ b/src/test/java/neqsim/thermodynamicOperations/flashOps/PHFlashTest.java @@ -7,7 +7,6 @@ /** * @author ESOL - * */ class PHFlashTest { static neqsim.thermo.system.SystemInterface testSystem = null; diff --git a/src/test/java/neqsim/thermodynamicOperations/flashOps/PSFlashGERG2008Test.java b/src/test/java/neqsim/thermodynamicOperations/flashOps/PSFlashGERG2008Test.java index 88f027f499..d7345039c1 100644 --- a/src/test/java/neqsim/thermodynamicOperations/flashOps/PSFlashGERG2008Test.java +++ b/src/test/java/neqsim/thermodynamicOperations/flashOps/PSFlashGERG2008Test.java @@ -7,7 +7,6 @@ /** * @author ESOL - * */ class PSFlashGERG2008Test { static neqsim.thermo.system.SystemInterface testSystem = null; diff --git a/src/test/java/neqsim/thermodynamicOperations/flashOps/TPFlashTest.java b/src/test/java/neqsim/thermodynamicOperations/flashOps/TPFlashTest.java index 83590e1678..a700beed41 100644 --- a/src/test/java/neqsim/thermodynamicOperations/flashOps/TPFlashTest.java +++ b/src/test/java/neqsim/thermodynamicOperations/flashOps/TPFlashTest.java @@ -7,7 +7,6 @@ /** * @author ESOL - * */ class TPFlashTest { static neqsim.thermo.system.SystemInterface testSystem = null; diff --git a/src/test/java/neqsim/thermodynamicOperations/flashOps/TPFlashTestHighTemp.java b/src/test/java/neqsim/thermodynamicOperations/flashOps/TPFlashTestHighTemp.java index bf81197f26..4dac61a32a 100644 --- a/src/test/java/neqsim/thermodynamicOperations/flashOps/TPFlashTestHighTemp.java +++ b/src/test/java/neqsim/thermodynamicOperations/flashOps/TPFlashTestHighTemp.java @@ -7,7 +7,6 @@ /** * @author ESOL - * */ class TPFlashTestHighTemp { static neqsim.thermo.system.SystemInterface testSystem = null; diff --git a/src/test/java/neqsim/thermodynamicOperations/flashOps/TPFlashTestWellFluid.java b/src/test/java/neqsim/thermodynamicOperations/flashOps/TPFlashTestWellFluid.java index d95732acf9..1ba453a913 100644 --- a/src/test/java/neqsim/thermodynamicOperations/flashOps/TPFlashTestWellFluid.java +++ b/src/test/java/neqsim/thermodynamicOperations/flashOps/TPFlashTestWellFluid.java @@ -7,7 +7,6 @@ /** * @author ESOL - * */ class TPFlashTestWellFluid { static neqsim.thermo.system.SystemInterface wellFluid = null; diff --git a/src/test/java/neqsim/thermodynamicOperations/flashOps/WaxFlashTest.java b/src/test/java/neqsim/thermodynamicOperations/flashOps/WaxFlashTest.java index 98d7283308..a59583debd 100644 --- a/src/test/java/neqsim/thermodynamicOperations/flashOps/WaxFlashTest.java +++ b/src/test/java/neqsim/thermodynamicOperations/flashOps/WaxFlashTest.java @@ -11,7 +11,6 @@ /** * @author ESOL - * */ class WaxFlashTest { static Logger logger = LogManager.getLogger(WaxFlashTest.class); diff --git a/src/test/java/neqsim/thermodynamicOperations/util/example/PhaseEnvelope.java b/src/test/java/neqsim/thermodynamicOperations/util/example/PhaseEnvelope.java index e5e15d1140..5cc91bae76 100644 --- a/src/test/java/neqsim/thermodynamicOperations/util/example/PhaseEnvelope.java +++ b/src/test/java/neqsim/thermodynamicOperations/util/example/PhaseEnvelope.java @@ -9,11 +9,11 @@ /* *PhaseEnvelope class. Created on 27. september 2001, 10:21 Updated on May 2019 by Nefeli
- * + * * @author esol - * + * * @version $Id: $Id - * + * * @since 2.2.3 */ public class PhaseEnvelope {