diff --git a/pom.xml b/pom.xml
index 5661e44a97..2302fbf11c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
gasOutStream
.
*
*
- * @return a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface} object
+ * @return a
+ * {@link neqsim.processSimulation.processEquipment.stream.StreamInterface}
+ * object
*/
public StreamInterface getGasOutStream() {
return gasOutStream;
@@ -219,7 +220,9 @@ public StreamInterface getGasOutStream() {
* Getter for the field liquidOutStream
.
*
*
- * @return a {@link neqsim.processSimulation.processEquipment.stream.StreamInterface} object
+ * @return a
+ * {@link neqsim.processSimulation.processEquipment.stream.StreamInterface}
+ * object
*/
public StreamInterface getLiquidOutStream() {
return liquidOutStream;
@@ -231,7 +234,9 @@ public StreamInterface getLiquidOutStream() {
*
*
* @param trayNumber a int
- * @return a {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray} object
+ * @return a
+ * {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray}
+ * object
*/
public SimpleTray getTray(int trayNumber) {
return trays.get(trayNumber);
@@ -498,12 +503,15 @@ public boolean massBalanceCheck() {
+ trays.get(i).getGasOutStream().getPressure() + " temperature "
+ trays.get(i).getGasOutStream().getTemperature("C"));
/*
- * System.out.println( "tray " + i + " number of input streams " + numberOfInputStreams +
+ * System.out.println( "tray " + i + " number of input streams " +
+ * numberOfInputStreams +
* " water in gasout " +
* trays.get(i).getGasOutStream().getFluid().getPhase(0).getComponent("water")
* .getNumberOfmoles() + " water in liquidout " +
- * trays.get(i).getLiquidOutStream().getFluid().getPhase(0).getComponent( "water")
- * .getNumberOfmoles() + " pressure " + trays.get(i).getGasOutStream().getPressure() +
+ * trays.get(i).getLiquidOutStream().getFluid().getPhase(0).getComponent(
+ * "water")
+ * .getNumberOfmoles() + " pressure " +
+ * trays.get(i).getGasOutStream().getPressure() +
* " temperature " + trays.get(i).getGasOutStream().getTemperature("C"));
*/
}
@@ -554,8 +562,7 @@ public void energyBalanceCheck() {
* @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 - 0.0), 15.000);
+ neqsim.thermo.system.SystemInterface testSystem = new neqsim.thermo.system.SystemSrkEos((273.15 - 0.0), 15.000);
// testSystem.addComponent("methane", 10.00);
testSystem.addComponent("ethane", 10.0);
testSystem.addComponent("CO2", 10.0);
@@ -579,8 +586,7 @@ public static void main(String[] args) {
// column.getCondenser().setHeatInput(-70000.0);
// ((Condenser) column.getCondenser()).setRefluxRatio(0.2);
- neqsim.processSimulation.processSystem.ProcessSystem operations =
- new neqsim.processSimulation.processSystem.ProcessSystem();
+ neqsim.processSimulation.processSystem.ProcessSystem operations = new neqsim.processSimulation.processSystem.ProcessSystem();
operations.add(stream_1);
operations.add(column);
operations.run();
@@ -595,7 +601,9 @@ public static void main(String[] args) {
* getReboiler.
*
*
- * @return a {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray} object
+ * @return a
+ * {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray}
+ * object
*/
public SimpleTray getReboiler() {
return trays.get(0);
@@ -606,7 +614,9 @@ public SimpleTray getReboiler() {
* getCondenser.
*
*
- * @return a {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray} object
+ * @return a
+ * {@link neqsim.processSimulation.processEquipment.distillation.SimpleTray}
+ * object
*/
public SimpleTray getCondenser() {
return trays.get(trays.size() - 1);
diff --git a/src/main/java/neqsim/thermodynamicOperations/ThermodynamicOperations.java b/src/main/java/neqsim/thermodynamicOperations/ThermodynamicOperations.java
index 18c08aa989..bdd1c095f9 100644
--- a/src/main/java/neqsim/thermodynamicOperations/ThermodynamicOperations.java
+++ b/src/main/java/neqsim/thermodynamicOperations/ThermodynamicOperations.java
@@ -86,7 +86,8 @@ public class ThermodynamicOperations implements java.io.Serializable, Cloneable
* Constructor for ThermodynamicOperations.
*
*/
- public ThermodynamicOperations() {}
+ public ThermodynamicOperations() {
+ }
/**
* @@ -121,11 +122,12 @@ public void TPSolidflash() { } /** - * Method to perform a flash at given temperature, pressure and specified volume The number of + * Method to perform a flash at given temperature, pressure and specified volume + * The number of * moles in the system are changed to match the specified volume. * * @param volumeSpec is the specified volume - * @param unit Supported units are m3 + * @param unit Supported units are m3 */ public void TPVflash(double volumeSpec, String unit) { unit = "m3"; @@ -147,8 +149,7 @@ public void TPflash() { system.setTotalNumberOfMoles(1.0); system.init(1); } - operation = - new neqsim.thermodynamicOperations.flashOps.TPflash(system, system.doSolidPhaseCheck()); + operation = new neqsim.thermodynamicOperations.flashOps.TPflash(system, system.doSolidPhaseCheck()); if (!isRunAsThread()) { getOperation().run(); } else { @@ -169,7 +170,8 @@ public void TPflash() { * TPflash. *
* - * @param checkForSolids Set true to check for solid phase and do solid phase calculations. + * @param checkForSolids Set true to check for solid phase and do solid phase + * calculations. */ public void TPflash(boolean checkForSolids) { operation = new neqsim.thermodynamicOperations.flashOps.TPflash(system, checkForSolids); @@ -181,7 +183,7 @@ public void TPflash(boolean checkForSolids) { * TPgradientFlash. * * - * @param height a double + * @param height a double * @param temperature a double * @return a {@link neqsim.thermo.system.SystemInterface} object */ @@ -220,8 +222,7 @@ public void saturateWithWater() { */ public void chemicalEquilibrium() { if (system.isChemicalSystem()) { - operation = - new neqsim.thermodynamicOperations.chemicalEquilibrium.ChemicalEquilibrium(system); + operation = new neqsim.thermodynamicOperations.chemicalEquilibrium.ChemicalEquilibrium(system); getOperation().run(); } } @@ -232,7 +233,7 @@ public void chemicalEquilibrium() { * * * @param Hspec a double - * @param type a int + * @param type a int */ public void PHflash(double Hspec, int type) { if (system.getPhase(0).getNumberOfComponents() == 1) { @@ -246,7 +247,7 @@ public void PHflash(double Hspec, int type) { /** * Method to perform a PH flash calculation. * - * @param Hspec is the enthalpy in the specified unit + * @param Hspec is the enthalpy in the specified unit * @param enthalpyUnit Supported units are J, J/mol, J/kg and kJ/kg */ public void PHflash(double Hspec, String enthalpyUnit) { @@ -306,10 +307,10 @@ public void PUflash(double Uspec) { * PUflash. * * - * @param Pspec a double - * @param Uspec a double + * @param Pspec a double + * @param Uspec a double * @param unitPressure a {@link java.lang.String} object - * @param unitEnergy a {@link java.lang.String} object + * @param unitEnergy a {@link java.lang.String} object */ public void PUflash(double Pspec, double Uspec, String unitPressure, String unitEnergy) { system.setPressure(Pspec, unitPressure); @@ -321,7 +322,7 @@ public void PUflash(double Pspec, double Uspec, String unitPressure, String unit * PUflash. * * - * @param Uspec a double + * @param Uspec a double * @param unitEnergy a {@link java.lang.String} object */ public void PUflash(double Uspec, String unitEnergy) { @@ -337,8 +338,7 @@ public void PUflash(double Uspec, String unitEnergy) { conversionFactorEntr = 1.0 / system.getTotalNumberOfMoles() / system.getMolarMass(); break; case "kJ/kg": - conversionFactorEntr = - 1.0 / system.getTotalNumberOfMoles() / system.getMolarMass() / 1000.0; + conversionFactorEntr = 1.0 / system.getTotalNumberOfMoles() / system.getMolarMass() / 1000.0; break; default: break; @@ -352,7 +352,7 @@ public void PUflash(double Uspec, String unitEnergy) { * * * @param Hspec a double - * @param type a int + * @param type a int */ public void PHflash2(double Hspec, int type) { operation = new PHflash(system, Hspec, type); @@ -398,10 +398,11 @@ public void PSflash(double Sspec) { } /** - * Method to perform a PS flash calculation for a specified entropy and pressure. + * Method to perform a PS flash calculation for a specified entropy and + * pressure. * * @param Sspec is the entropy in the specified unit - * @param unit Supported units are J/K, J/molK, J/kgK and kJ/kgK + * @param unit Supported units are J/K, J/molK, J/kgK and kJ/kgK */ public void PSflash(double Sspec, String unit) { double conversionFactor = 1.0; @@ -436,10 +437,11 @@ public void TSflash(double Sspec) { } /** - * Method to perform a TS flash calculation for a specified entropy and pressure. + * Method to perform a TS flash calculation for a specified entropy and + * pressure. * * @param Sspec is the entropy in the specified unit - * @param unit Supported units are J/K, J/molK, J/kgK and kJ/kgK + * @param unit Supported units are J/K, J/molK, J/kgK and kJ/kgK */ public void TSflash(double Sspec, String unit) { double conversionFactor = 1.0; @@ -492,9 +494,9 @@ public void PSflash2(double Sspec) { * VSflash. * * - * @param volume a double - * @param entropy a double - * @param unitVol a {@link java.lang.String} object + * @param volume a double + * @param entropy a double + * @param unitVol a {@link java.lang.String} object * @param unitEntropy a {@link java.lang.String} object */ public void VSflash(double volume, double entropy, String unitVol, String unitEntropy) { @@ -520,8 +522,7 @@ public void VSflash(double volume, double entropy, String unitVol, String unitEn conversionFactorEntr = 1.0 / system.getTotalNumberOfMoles() / system.getMolarMass(); break; case "kJ/kgK": - conversionFactorEntr = - 1.0 / system.getTotalNumberOfMoles() / system.getMolarMass() / 1000.0; + conversionFactorEntr = 1.0 / system.getTotalNumberOfMoles() / system.getMolarMass() / 1000.0; break; default: break; @@ -534,7 +535,7 @@ public void VSflash(double volume, double entropy, String unitVol, String unitEn * VSflash. * * - * @param volume a double + * @param volume a double * @param entropy a double */ public void VSflash(double volume, double entropy) { @@ -548,7 +549,7 @@ public void VSflash(double volume, double entropy) { * * * @param Vspec a double - * @param unit a {@link java.lang.String} object + * @param unit a {@link java.lang.String} object */ public void TVflash(double Vspec, String unit) { double conversionFactor = 1.0; @@ -579,7 +580,7 @@ public void TVflash(double Vspec) { * PVrefluxFlash. * * - * @param refluxspec a double + * @param refluxspec a double * @param refluxPhase a int */ public void PVrefluxFlash(double refluxspec, int refluxPhase) { @@ -605,9 +606,9 @@ public void VHflash(double Vspec, double Hspec) { * VHflash. * * - * @param volume a double - * @param enthalpy a double - * @param unitVol a {@link java.lang.String} object + * @param volume a double + * @param enthalpy a double + * @param unitVol a {@link java.lang.String} object * @param unitEnthalpy a {@link java.lang.String} object */ public void VHflash(double volume, double enthalpy, String unitVol, String unitEnthalpy) { @@ -633,8 +634,7 @@ public void VHflash(double volume, double enthalpy, String unitVol, String unitE conversionFactorEntr = 1.0 / system.getTotalNumberOfMoles() / system.getMolarMass(); break; case "kJ/kg": - conversionFactorEntr = - 1.0 / system.getTotalNumberOfMoles() / system.getMolarMass() / 1000.0; + conversionFactorEntr = 1.0 / system.getTotalNumberOfMoles() / system.getMolarMass() / 1000.0; break; default: break; @@ -647,9 +647,9 @@ public void VHflash(double volume, double enthalpy, String unitVol, String unitE * VUflash. * * - * @param volume a double - * @param energy a double - * @param unitVol a {@link java.lang.String} object + * @param volume a double + * @param energy a double + * @param unitVol a {@link java.lang.String} object * @param unitEnergy a {@link java.lang.String} object */ public void VUflash(double volume, double energy, String unitVol, String unitEnergy) { @@ -675,8 +675,7 @@ public void VUflash(double volume, double energy, String unitVol, String unitEne conversionFactorEntr = 1.0 / system.getTotalNumberOfMoles() / system.getMolarMass(); break; case "kJ/kg": - conversionFactorEntr = - 1.0 / system.getTotalNumberOfMoles() / system.getMolarMass() / 1000.0; + conversionFactorEntr = 1.0 / system.getTotalNumberOfMoles() / system.getMolarMass() / 1000.0; break; default: break; @@ -858,8 +857,8 @@ public void checkScalePotential(int phaseNumber) throws Exception { * addIonToScaleSaturation. * * - * @param phaseNumber a int - * @param scaleSaltName a {@link java.lang.String} object + * @param phaseNumber a int + * @param scaleSaltName a {@link java.lang.String} object * @param nameOfIonToBeAdded a {@link java.lang.String} object * @throws java.lang.Exception if any. */ @@ -993,7 +992,7 @@ public void calcSolidComlexTemperature(String comp1, String comp2) throws Except * * * @param temperature an array of {@link double} objects - * @param pressure an array of {@link double} objects + * @param pressure an array of {@link double} objects * @return an array of {@link double} objects */ public double[] calcImobilePhaseHydrateTemperature(double[] temperature, double[] pressure) { @@ -1005,9 +1004,12 @@ public double[] calcImobilePhaseHydrateTemperature(double[] temperature, double[ for (int i = 0; i < temperature.length; i++) { /* * opsTemp = new ThermodynamicOperations(systemTemp); - * systemTemp.setTemperature(temperature[i]); systemTemp.setPressure(pressure[i]); - * systemTemp.init(0); systemTemp.display(); try { opsTemp.hydrateFormationTemperature(); } - * catch (Exception ex) { logger.error(ex.getMessage(),e); } systemTemp.display(); hydTemps[i] + * systemTemp.setTemperature(temperature[i]); + * systemTemp.setPressure(pressure[i]); + * systemTemp.init(0); systemTemp.display(); try { + * opsTemp.hydrateFormationTemperature(); } + * catch (Exception ex) { logger.error(ex.getMessage(),e); } + * systemTemp.display(); hydTemps[i] * = systemTemp.getTemperature(); * */ @@ -1060,7 +1062,7 @@ public double calcTOLHydrateFormationTemperature() { * hydrateInhibitorConcentration. * * - * @param inhibitorName a {@link java.lang.String} object + * @param inhibitorName a {@link java.lang.String} object * @param hydEqTemperature a double * @throws java.lang.Exception if any. */ @@ -1076,7 +1078,7 @@ public void hydrateInhibitorConcentration(String inhibitorName, double hydEqTemp * * * @param inhibitorName a {@link java.lang.String} object - * @param wtfrac a double + * @param wtfrac a double * @throws java.lang.Exception if any. */ public void hydrateInhibitorConcentrationSet(String inhibitorName, double wtfrac) @@ -1204,7 +1206,7 @@ public void hydrateEquilibriumLine(double minimumPressure, double maximumPressur * calcCricoP. * * - * @param cricondenBar an array of {@link double} objects + * @param cricondenBar an array of {@link double} objects * @param cricondenBarX an array of {@link double} objects * @param cricondenBarY an array of {@link double} objects */ @@ -1222,7 +1224,7 @@ public void calcCricoP(double[] cricondenBar, double[] cricondenBarX, double[] c * calcCricoT. * * - * @param cricondenTherm an array of {@link double} objects + * @param cricondenTherm an array of {@link double} objects * @param cricondenThermX an array of {@link double} objects * @param cricondenThermY an array of {@link double} objects */ @@ -1373,7 +1375,7 @@ public void constantPhaseFractionTemperatureFlash(double fraction) throws Except * * @param componentName a {@link java.lang.String} object * @param specification a {@link java.lang.String} object - * @param spec a double + * @param spec a double * @throws java.lang.Exception if any. */ public void dewPointMach(String componentName, String specification, double spec) @@ -1430,8 +1432,8 @@ public void dewPointMach(String componentName, String specification, double spec * @throws java.lang.Exception if any. */ public void dewPointTemperatureFlash() throws Exception { - ConstantDutyFlashInterface operation = - new neqsim.thermodynamicOperations.flashOps.saturationOps.dewPointTemperatureFlash(system); + ConstantDutyFlashInterface operation = new neqsim.thermodynamicOperations.flashOps.saturationOps.dewPointTemperatureFlash( + system); operation.run(); if (Double.isNaN(system.getTemperature()) || operation.isSuperCritical()) { throw new neqsim.util.exception.IsNaNException(this.getClass().getSimpleName(), @@ -1448,8 +1450,8 @@ public void dewPointTemperatureFlash() throws Exception { * @throws java.lang.Exception if any. */ public void dewPointTemperatureFlash(boolean derivatives) throws Exception { - ConstantDutyFlashInterface operation = - new neqsim.thermodynamicOperations.flashOps.saturationOps.dewPointTemperatureFlash(system); + ConstantDutyFlashInterface operation = new neqsim.thermodynamicOperations.flashOps.saturationOps.dewPointTemperatureFlash( + system); if (derivatives) { operation = new dewPointTemperatureFlashDer(system); } @@ -1532,7 +1534,7 @@ public void calcPTphaseEnvelope() { * * * @param bubfirst a boolean - * @param lowPres a double + * @param lowPres a double */ public void calcPTphaseEnvelope(boolean bubfirst, double lowPres) { double phasefraction = 1.0 - 1e-10; @@ -1588,7 +1590,7 @@ public void calcPTphaseEnvelope(boolean bubfirst) { * calcPTphaseEnvelope. * * - * @param lowPres a double + * @param lowPres a double * @param phasefraction a double */ public void calcPTphaseEnvelope(double lowPres, double phasefraction) { @@ -1615,14 +1617,14 @@ public void calcPTphaseEnvelopeNew() { * OLGApropTable. * * - * @param minTemp a double - * @param maxTemp a double + * @param minTemp a double + * @param maxTemp a double * @param temperatureSteps a int - * @param minPres a double - * @param maxPres a double - * @param pressureSteps a int - * @param filename a {@link java.lang.String} object - * @param TABtype a int + * @param minPres a double + * @param maxPres a double + * @param pressureSteps a int + * @param filename a {@link java.lang.String} object + * @param TABtype a int */ public void OLGApropTable(double minTemp, double maxTemp, int temperatureSteps, double minPres, double maxPres, int pressureSteps, String filename, int TABtype) { @@ -1640,14 +1642,14 @@ public void OLGApropTable(double minTemp, double maxTemp, int temperatureSteps, * OLGApropTablePH. * * - * @param minEnthalpy a double - * @param maxEnthalpy a double + * @param minEnthalpy a double + * @param maxEnthalpy a double * @param enthalpySteps a int - * @param minPres a double - * @param maxPres a double + * @param minPres a double + * @param maxPres a double * @param pressureSteps a int - * @param filename a {@link java.lang.String} object - * @param TABtype a int + * @param filename a {@link java.lang.String} object + * @param TABtype a int */ public void OLGApropTablePH(double minEnthalpy, double maxEnthalpy, int enthalpySteps, double minPres, double maxPres, int pressureSteps, String filename, int TABtype) { @@ -1717,8 +1719,7 @@ public double[][] getData() { * @return an array of {@link java.lang.String} objects */ public String[][] getDataPoints() { - String[][] str = - new String[getOperation().getPoints(0).length][getOperation().getPoints(0)[0].length]; + String[][] str = new String[getOperation().getPoints(0).length][getOperation().getPoints(0)[0].length]; for (int i = 0; i < getOperation().getPoints(0).length; i++) { for (int j = 0; j < getOperation().getPoints(0)[0].length; j++) { str[i][j] = Double.toString(getOperation().getPoints(0)[i][j]); @@ -1907,8 +1908,8 @@ public void calcIonComposition(int phaseNumber) { * * * @param flashType Type of flash. - * @param spec1 Value of spec1 - * @param spec2 Value of spec2 + * @param spec1 Value of spec1 + * @param spec2 Value of spec2 * @param unitSpec1 Unit of spec1 * @param unitSpec2 Unit of spec2 */ @@ -1943,16 +1944,19 @@ public void flash(FlashType flashType, double spec1, double spec2, String unitSp } /** - * Perform flashes and return System properties per set of Spec1 and Spec2. Possible to specify + * Perform flashes and return System properties per set of Spec1 and Spec2. + * Possible to specify * fractions for each value of Spec1. * - * @param Spec1 Flash pressure in bar absolute. - * @param Spec2 Flash specification. Depends on FlashMode. Temperature in Kelvin, entalphy in - * J/mol or entropy in J/molK. - * @param FlashMode 1 - PT 2 - PH 3 - PS - * @param components Not yet in use. - * @param onlineFractions Specify fractions per sample instance or null to use static composition - * specified in system. + * @param Spec1 Flash pressure in bar absolute. + * @param Spec2 Flash specification. Depends on FlashMode. Temperature + * in Kelvin, entalphy in + * J/mol or entropy in J/molK. + * @param FlashMode 1 - PT 2 - PH 3 - PS + * @param components Not yet in use. + * @param onlineFractions Specify fractions per sample instance or null to use + * static composition + * specified in system. * @return Object CalculationResult object */ public CalculationResult propertyFlash(List