From a42070da209015295d3feda4fbb1fd7d10d026d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=85smund=20V=C3=A5ge=20Fannemel?= <34712686+asmfstatoil@users.noreply.github.com> Date: Mon, 13 Nov 2023 12:55:54 +0100 Subject: [PATCH] feat: 101325.0 -> atm --- .../PFCTConductivityMethodMod86.java | 4 +- .../VolumeFlowTransmitter.java | 9 +- .../processModules/SeparationTrainModule.java | 5 +- .../SeparationTrainModuleSimple.java | 5 +- .../WettedWallColumnSampleCreator.java | 3 +- src/main/java/neqsim/thermo/phase/Phase.java | 12 +- .../neqsim/thermo/phase/PhaseInterface.java | 231 +++++----- .../neqsim/thermo/system/SystemInterface.java | 394 +++++++----------- .../neqsim/thermo/system/SystemThermo.java | 18 +- .../util/empiric/BukacekWaterInGas.java | 5 +- .../util/readwrite/EclipseFluidReadWrite.java | 5 +- src/main/java/neqsim/util/unit/RateUnit.java | 6 +- .../util/example/MasstransferMeOH.java | 4 +- .../TEGdehydrationProcessDistillation.java | 12 +- .../TEGdehydrationProcessDistillation3.java | 12 +- ...TEGdehydrationProcessDistillationAaHa.java | 13 +- .../TEGdehydrationProcessDistillationGFA.java | 13 +- .../thermo/util/example/HydrateFlash.java | 3 +- .../thermo/util/example/TPflashDehyd.java | 2 +- 19 files changed, 332 insertions(+), 424 deletions(-) diff --git a/src/main/java/neqsim/physicalProperties/physicalPropertyMethods/commonPhasePhysicalProperties/conductivity/PFCTConductivityMethodMod86.java b/src/main/java/neqsim/physicalProperties/physicalPropertyMethods/commonPhasePhysicalProperties/conductivity/PFCTConductivityMethodMod86.java index 79b1d6762..b425eba7b 100644 --- a/src/main/java/neqsim/physicalProperties/physicalPropertyMethods/commonPhasePhysicalProperties/conductivity/PFCTConductivityMethodMod86.java +++ b/src/main/java/neqsim/physicalProperties/physicalPropertyMethods/commonPhasePhysicalProperties/conductivity/PFCTConductivityMethodMod86.java @@ -264,8 +264,8 @@ public double getRefComponentViscosity(double temp, double pres) { 4.2903609488e-2, 1.4529023444e2, 6.1276818706e3}; // double viscRefK[] = {-9.74602, 18.0834, -4126.66, 44.6055, 0.9676544, 81.8134, 15649.9}; - double molDens = - 101325.0 / ThermodynamicConstantsInterface.R / phase.getPhase().getTemperature() / 1.0e3; + double molDens = ThermodynamicConstantsInterface.atm / ThermodynamicConstantsInterface.R + / phase.getPhase().getTemperature() / 1.0e3; double critMolDens = 10.15; double redMolDens = (molDens - critMolDens) / critMolDens; double viscRefO = GVcoef[0] * Math.pow(temp, -1.0) + GVcoef[1] * Math.pow(temp, -2.0 / 3.0) diff --git a/src/main/java/neqsim/processSimulation/measurementDevice/VolumeFlowTransmitter.java b/src/main/java/neqsim/processSimulation/measurementDevice/VolumeFlowTransmitter.java index aabd8a74b..2a3f95245 100644 --- a/src/main/java/neqsim/processSimulation/measurementDevice/VolumeFlowTransmitter.java +++ b/src/main/java/neqsim/processSimulation/measurementDevice/VolumeFlowTransmitter.java @@ -1,6 +1,7 @@ package neqsim.processSimulation.measurementDevice; import neqsim.processSimulation.processEquipment.stream.StreamInterface; +import neqsim.thermo.ThermodynamicConstantsInterface; /** *

@@ -58,13 +59,13 @@ public double getMeasuredValue(String unit) { } else if (unit.equals("Nm^3/day")) { return stream.getThermoSystem().getPhase(measuredPhaseNumber).getNumberOfMolesInPhase() * neqsim.thermo.ThermodynamicConstantsInterface.R - * neqsim.thermo.ThermodynamicConstantsInterface.normalStateTemperature / 101325.0 * 3600.0 - * 24; + * neqsim.thermo.ThermodynamicConstantsInterface.normalStateTemperature + / ThermodynamicConstantsInterface.atm * 3600.0 * 24; } else if (unit.equals("Sm^3/day")) { return stream.getThermoSystem().getPhase(measuredPhaseNumber).getNumberOfMolesInPhase() * neqsim.thermo.ThermodynamicConstantsInterface.R - * neqsim.thermo.ThermodynamicConstantsInterface.standardStateTemperature / 101325.0 - * 3600.0 * 24; + * neqsim.thermo.ThermodynamicConstantsInterface.standardStateTemperature + / ThermodynamicConstantsInterface.atm * 3600.0 * 24; } else { return stream.getThermoSystem().getPhase(measuredPhaseNumber).getNumberOfMolesInPhase() * stream.getThermoSystem().getPhase(measuredPhaseNumber).getMolarMass() / stream diff --git a/src/main/java/neqsim/processSimulation/processSystem/processModules/SeparationTrainModule.java b/src/main/java/neqsim/processSimulation/processSystem/processModules/SeparationTrainModule.java index c7f7a0470..db3b13941 100644 --- a/src/main/java/neqsim/processSimulation/processSystem/processModules/SeparationTrainModule.java +++ b/src/main/java/neqsim/processSimulation/processSystem/processModules/SeparationTrainModule.java @@ -342,8 +342,9 @@ public static void main(String[] args) { * getPhase(0).getPhysicalProperties().getDensity() * 3600.0 + " m^3/hr"); * System.out.println("Export gas flow " + * separationModule.getOutputStream("gas exit stream").getThermoSystem(). - * getTotalNumberOfMoles() * ThermodynamicConstantsInterface.R * (273.15 + 15.0) / 101325.0 * - * 3600.0 * 24 / 1.0e6 + " MSm^3/day"); System.out.println("oil/water heater duty " + ((Heater) + * getTotalNumberOfMoles() * ThermodynamicConstantsInterface.R * (273.15 + 15.0) + * /ThermodynamicConstantsInterface.atm * 3600.0 * 24 / 1.0e6 + " MSm^3/day"); + * System.out.println("oil/water heater duty " + ((Heater) * separationModule.getOperations().getUnit("oil/water heater")).getEnergyInput( ) + " W"); * System.out.println("Export oil cooler duty " + ((Cooler) * separationModule.getOperations().getUnit("export oil cooler")).getEnergyInput () + " W"); diff --git a/src/main/java/neqsim/processSimulation/processSystem/processModules/SeparationTrainModuleSimple.java b/src/main/java/neqsim/processSimulation/processSystem/processModules/SeparationTrainModuleSimple.java index 6cb3273d7..49ee75b16 100644 --- a/src/main/java/neqsim/processSimulation/processSystem/processModules/SeparationTrainModuleSimple.java +++ b/src/main/java/neqsim/processSimulation/processSystem/processModules/SeparationTrainModuleSimple.java @@ -338,8 +338,9 @@ public static void main(String[] args) { * getPhase(0).getPhysicalProperties().getDensity() * 3600.0 + " m^3/hr"); * System.out.println("Export gas flow " + * separationModule.getOutputStream("gas exit stream").getThermoSystem(). - * getTotalNumberOfMoles() * ThermodynamicConstantsInterface.R * (273.15 + 15.0) / 101325.0 * - * 3600.0 * 24 / 1.0e6 + " MSm^3/day"); System.out.println("oil/water heater duty " + ((Heater) + * getTotalNumberOfMoles() * ThermodynamicConstantsInterface.R * (273.15 + 15.0) + * /ThermodynamicConstantsInterface.atm * 3600.0 * 24 / 1.0e6 + " MSm^3/day"); + * System.out.println("oil/water heater duty " + ((Heater) * separationModule.getOperations().getUnit("oil/water heater")).getEnergyInput( ) + " W"); * System.out.println("Export oil cooler duty " + ((Cooler) * separationModule.getOperations().getUnit("export oil cooler")).getEnergyInput () + " W"); diff --git a/src/main/java/neqsim/statistics/experimentalSampleCreation/sampleCreator/wettedWallColumnSampleCreator/WettedWallColumnSampleCreator.java b/src/main/java/neqsim/statistics/experimentalSampleCreation/sampleCreator/wettedWallColumnSampleCreator/WettedWallColumnSampleCreator.java index ca225d464..6c6b69cac 100644 --- a/src/main/java/neqsim/statistics/experimentalSampleCreation/sampleCreator/wettedWallColumnSampleCreator/WettedWallColumnSampleCreator.java +++ b/src/main/java/neqsim/statistics/experimentalSampleCreation/sampleCreator/wettedWallColumnSampleCreator/WettedWallColumnSampleCreator.java @@ -190,7 +190,8 @@ public void calcdPdt() { dNdt[i] = dPdt[i] * 1.0 / dPdn[i]; err += Math.abs((dNdtOld[i] - dNdt[i])); // System.out.println("dndt: " + dNdt[i]); - dnVdt[i] = dNdt[i] * ThermodynamicConstantsInterface.R * 298.15 / 101325.0 * 1000 * 60; + dnVdt[i] = dNdt[i] * ThermodynamicConstantsInterface.R * 298.15 + / ThermodynamicConstantsInterface.atm * 1000 * 60; System.out.println("dVdt: " + dnVdt[i]); } System.out.println("err: " + err); diff --git a/src/main/java/neqsim/thermo/phase/Phase.java b/src/main/java/neqsim/thermo/phase/Phase.java index e561031c7..1b486e29b 100644 --- a/src/main/java/neqsim/thermo/phase/Phase.java +++ b/src/main/java/neqsim/thermo/phase/Phase.java @@ -2159,16 +2159,20 @@ public double getFlowRate(String flowunit) { return numberOfMolesInPhase * 3600.0; } else if (flowunit.equals("Sm3/sec")) { return numberOfMolesInPhase * ThermodynamicConstantsInterface.R - * ThermodynamicConstantsInterface.standardStateTemperature / 101325.0; + * ThermodynamicConstantsInterface.standardStateTemperature + / ThermodynamicConstantsInterface.atm; } else if (flowunit.equals("Sm3/hr")) { return numberOfMolesInPhase * 3600.0 * ThermodynamicConstantsInterface.R - * ThermodynamicConstantsInterface.standardStateTemperature / 101325.0; + * ThermodynamicConstantsInterface.standardStateTemperature + / ThermodynamicConstantsInterface.atm; } else if (flowunit.equals("Sm3/day")) { return numberOfMolesInPhase * 3600.0 * 24.0 * ThermodynamicConstantsInterface.R - * ThermodynamicConstantsInterface.standardStateTemperature / 101325.0; + * ThermodynamicConstantsInterface.standardStateTemperature + / ThermodynamicConstantsInterface.atm; } else if (flowunit.equals("MSm3/day")) { return numberOfMolesInPhase * 3600.0 * 24.0 * ThermodynamicConstantsInterface.R - * ThermodynamicConstantsInterface.standardStateTemperature / 101325.0 / 1.0e6; + * ThermodynamicConstantsInterface.standardStateTemperature + / ThermodynamicConstantsInterface.atm / 1.0e6; } else { throw new RuntimeException("failed.. unit: " + flowunit + " not supported"); } diff --git a/src/main/java/neqsim/thermo/phase/PhaseInterface.java b/src/main/java/neqsim/thermo/phase/PhaseInterface.java index 34833aedf..ba7afc9f6 100644 --- a/src/main/java/neqsim/thermo/phase/PhaseInterface.java +++ b/src/main/java/neqsim/thermo/phase/PhaseInterface.java @@ -24,10 +24,10 @@ public interface PhaseInterface extends ThermodynamicConstantsInterface, Cloneab * addcomponent. *

* - * @param name Name of component. - * @param moles a double + * @param name Name of component. + * @param moles a double * @param molesInPhase a double - * @param compNumber a int + * @param compNumber a int */ public void addComponent(String name, double moles, double molesInPhase, int compNumber); @@ -36,10 +36,10 @@ public interface PhaseInterface extends ThermodynamicConstantsInterface, Cloneab * addcomponent. *

* - * @param name Name of component. - * @param moles a double + * @param name Name of component. + * @param moles a double * @param molesInPhase a double - * @param compNumber a int + * @param compNumber a int * @deprecated Replaced by {@link addComponent} */ @Deprecated @@ -67,12 +67,10 @@ public default void addcomponent(String name, double moles, double molesInPhase, /** *

- * Returns the composition vector in unit - * molefraction/wtfraction/molespersec/volumefraction. + * Returns the composition vector in unit molefraction/wtfraction/molespersec/volumefraction. *

* - * @param unit Supported units are molefraction, wtfraction, molespersec, - * volumefraction + * @param unit Supported units are molefraction, wtfraction, molespersec, volumefraction * @return composition array with unit */ public double[] getComposition(String unit); @@ -138,8 +136,7 @@ public default void addcomponent(String name, double moles, double molesInPhase, public double getVolume(String unit); /** - * method to return heat capacity ratio/adiabatic index/Poisson constant. The - * method calculates it + * method to return heat capacity ratio/adiabatic index/Poisson constant. The method calculates it * as Cp (real) /Cv (real). * * @return gamma @@ -147,8 +144,7 @@ public default void addcomponent(String name, double moles, double molesInPhase, public double getGamma(); /** - * method to return heat capacity ratio calculated as - * Cp/(Cp-R*getNumberOfMolesInPhase). + * method to return heat capacity ratio calculated as Cp/(Cp-R*getNumberOfMolesInPhase). * * @return kappa */ @@ -243,8 +239,8 @@ public default double getGamma2() { * * @param totalNumberOfMoles Total number of moles in all phases of Stream. * @param numberOfComponents Number of components in system. - * @param type a int. Use 0 to init, and 1 to reset. - * @param beta Mole fraction of this phase in system. + * @param type a int. Use 0 to init, and 1 to reset. + * @param beta Mole fraction of this phase in system. */ public default void init(double totalNumberOfMoles, int numberOfComponents, int type, double beta) { @@ -258,9 +254,9 @@ public default void init(double totalNumberOfMoles, int numberOfComponents, int * * @param totalNumberOfMoles Total number of moles in all phases of Stream. * @param numberOfComponents Number of components in system. - * @param type a int. Use 0 to init, and 1 to reset. - * @param pt Type of phase. - * @param beta Mole fraction of this phase in system. + * @param type a int. Use 0 to init, and 1 to reset. + * @param pt Type of phase. + * @param beta Mole fraction of this phase in system. */ public void init(double totalNumberOfMoles, int numberOfComponents, int type, PhaseType pt, double beta); @@ -272,9 +268,9 @@ public void init(double totalNumberOfMoles, int numberOfComponents, int type, Ph * * @param totalNumberOfMoles Total number of moles in system. * @param numberOfComponents Number of components in system. - * @param type a int. Use 0 to init, and 1 to reset. - * @param ptNumber Phase type index. - * @param beta Mole fraction of this phase in system. + * @param type a int. Use 0 to init, and 1 to reset. + * @param ptNumber Phase type index. + * @param beta Mole fraction of this phase in system. * @deprecated Replace with init-function using PhaseType input. */ @Deprecated @@ -367,8 +363,7 @@ public default void init(double totalNumberOfMoles, int numberOfComponents, int * getcomponentArray. *

* - * @return an array of {@link neqsim.thermo.component.ComponentInterface} - * objects + * @return an array of {@link neqsim.thermo.component.ComponentInterface} objects */ public ComponentInterface[] getcomponentArray(); @@ -392,19 +387,16 @@ public default void init(double totalNumberOfMoles, int numberOfComponents, int public double getWtFraction(SystemInterface system); /** - * method to return molar volume of the phase note: without Peneloux volume - * correction. + * method to return molar volume of the phase note: without Peneloux volume correction. * * @return molar volume volume in unit m3/mol*1e5 */ public double getMolarVolume(); /** - * method to return molar volume of the fluid: - * eventual volume correction included. - * - * @param unit Supported units are m3/mol, litre/mol + * method to return molar volume of the fluid: eventual volume correction included. * + * @param unit Supported units are m3/mol, litre/mol * @return molar volume volume in unit */ public double getMolarVolume(String unit); @@ -412,9 +404,8 @@ public default void init(double totalNumberOfMoles, int numberOfComponents, int /** * method to return flow rate of a phase. * - * @param flowunit Supported units are kg/sec, kg/min, kg/hr, m3/sec, m3/min, - * m3/hr, ft3/sec, - * mole/sec, mole/min, mole/hr + * @param flowunit Supported units are kg/sec, kg/min, kg/hr, m3/sec, m3/min, m3/hr, ft3/sec, + * mole/sec, mole/min, mole/hr * @return flow rate in specified unit */ public double getFlowRate(String flowunit); @@ -424,8 +415,7 @@ public default void init(double totalNumberOfMoles, int numberOfComponents, int * setComponentArray. *

* - * @param components an array of - * {@link neqsim.thermo.component.ComponentInterface} objects + * @param components an array of {@link neqsim.thermo.component.ComponentInterface} objects */ public void setComponentArray(ComponentInterface[] components); @@ -446,8 +436,7 @@ public default void init(double totalNumberOfMoles, int numberOfComponents, int public double[] getProperties_GERG2008(); /** - * method to get density of a phase note: does not use Peneloux volume - * correction. + * method to get density of a phase note: does not use Peneloux volume correction. * * @return density with unit kg/m3 */ @@ -466,10 +455,10 @@ public default void init(double totalNumberOfMoles, int numberOfComponents, int * removeComponent. *

* - * @param name a {@link String} object - * @param moles a double + * @param name a {@link String} object + * @param moles a double * @param molesInPhase a double - * @param compNumber a int + * @param compNumber a int */ public void removeComponent(String name, double moles, double molesInPhase, int compNumber); @@ -638,8 +627,7 @@ public default double getExessGibbsEnergySymetric() { /** *

- * Getter for property beta. Beta is the mole fraction of a phase - * of all the moles of + * Getter for property beta. Beta is the mole fraction of a phase of all the moles of * a system. *

* @@ -649,8 +637,7 @@ public default double getExessGibbsEnergySymetric() { /** *

- * Setter for property beta. Beta is the mole fraction of a phase - * of all the moles of + * Setter for property beta. Beta is the mole fraction of a phase of all the moles of * a system. *

* @@ -778,7 +765,7 @@ public default double getExessGibbsEnergySymetric() { * getPureComponentFugacity. *

* - * @param k a int + * @param k a int * @param pure a boolean * @return a double */ @@ -786,18 +773,15 @@ public default double getExessGibbsEnergySymetric() { /** *

- * Change the number of moles of component of phase,i.e., - * numberOfMolesInPhase but do + * 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 of total number - * of moles 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 of total number of moles in system. *

* * @param component Component number to change - * @param dn Number of moles of component added to phase + * @param dn Number of moles of component added to phase */ public default void addMoles(int component, double dn) { addMolesChemReac(component, dn, 0); @@ -805,20 +789,16 @@ public default void addMoles(int component, double dn) { /** *

- * Change the number of moles of component of phase, i.e., - * numberOfMolesInPhase, and - * total number of moles of component in system, i.e., - * numberOfMoles with the same + * Change the number of moles of component of phase, i.e., 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 of total number - * of moles 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 of total number of moles in system. *

* * @param component Component number to change - * @param dn Number of moles of component added to phase and system + * @param dn Number of moles of component added to phase and system */ public default void addMolesChemReac(int component, double dn) { addMolesChemReac(component, dn, dn); @@ -826,23 +806,18 @@ public default void addMolesChemReac(int component, double dn) { /** *

- * Change the number of moles of component of phase, i.e., - * numberOfMolesInPhase and - * 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., + * Change the number of moles of component of phase, i.e., numberOfMolesInPhase and + * 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 of total number - * of moles 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 of total number of moles in system. *

* * @param component Component number to change - * @param dn Number of moles of component to add to phase - * @param totdn Number of moles of component to add to system + * @param dn Number of moles of component to add to phase + * @param totdn Number of moles of component to add to system */ public void addMolesChemReac(int component, double dn, double totdn); @@ -908,8 +883,7 @@ public default void addMolesChemReac(int component, double dn) { * getPhysicalProperties. *

* - * @return a - * {@link neqsim.physicalProperties.physicalPropertySystem.PhysicalPropertiesInterface} + * @return a {@link neqsim.physicalProperties.physicalPropertySystem.PhysicalPropertiesInterface} * object */ public neqsim.physicalProperties.physicalPropertySystem.PhysicalPropertiesInterface getPhysicalProperties(); @@ -919,13 +893,13 @@ public default void addMolesChemReac(int component, double dn) { * molarVolume. *

* - * @param pressure a double + * @param pressure a double * @param temperature a double - * @param A a double - * @param B a double - * @param phase a int + * @param A a double + * @param B a double + * @param phase a int * @return a double - * @throws neqsim.util.exception.IsNaNException if any. + * @throws neqsim.util.exception.IsNaNException if any. * @throws neqsim.util.exception.TooManyIterationsException if any. */ double molarVolume(double pressure, double temperature, double A, double B, int phase) @@ -936,10 +910,10 @@ public default void addMolesChemReac(int component, double dn) { * geta. *

* - * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object + * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object * @param temperature a double - * @param pressure a double - * @param numbcomp a int + * @param pressure a double + * @param numbcomp a int * @return a double */ public double geta(PhaseInterface phase, double temperature, double pressure, int numbcomp); @@ -949,10 +923,10 @@ public default void addMolesChemReac(int component, double dn) { * getb. *

* - * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object + * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object * @param temperature a double - * @param pressure a double - * @param numbcomp a int + * @param pressure a double + * @param numbcomp a int * @return a double */ public double getb(PhaseInterface phase, double temperature, double pressure, int numbcomp); @@ -972,10 +946,10 @@ public default void addMolesChemReac(int component, double dn) { * calcA. *

* - * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object + * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object * @param temperature a double - * @param pressure a double - * @param numbcomp a int + * @param pressure a double + * @param numbcomp a int * @return a double */ double calcA(PhaseInterface phase, double temperature, double pressure, int numbcomp); @@ -985,10 +959,10 @@ public default void addMolesChemReac(int component, double dn) { * calcB. *

* - * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object + * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object * @param temperature a double - * @param pressure a double - * @param numbcomp a int + * @param pressure a double + * @param numbcomp a int * @return a double */ double calcB(PhaseInterface phase, double temperature, double pressure, int numbcomp); @@ -998,11 +972,11 @@ public default void addMolesChemReac(int component, double dn) { * calcAi. *

* - * @param compNumb a int - * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object + * @param compNumb a int + * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object * @param temperature a double - * @param pressure a double - * @param numbcomp a int + * @param pressure a double + * @param numbcomp a int * @return a double */ double calcAi(int compNumb, PhaseInterface phase, double temperature, double pressure, @@ -1013,11 +987,11 @@ public default void addMolesChemReac(int component, double dn) { * calcAiT. *

* - * @param compNumb a int - * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object + * @param compNumb a int + * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object * @param temperature a double - * @param pressure a double - * @param numbcomp a int + * @param pressure a double + * @param numbcomp a int * @return a double */ double calcAiT(int compNumb, PhaseInterface phase, double temperature, double pressure, @@ -1028,12 +1002,12 @@ public default void addMolesChemReac(int component, double dn) { * calcAij. *

* - * @param compNumb a int - * @param j a int - * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object + * @param compNumb a int + * @param j a int + * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object * @param temperature a double - * @param pressure a double - * @param numbcomp a int + * @param pressure a double + * @param numbcomp a int * @return a double */ double calcAij(int compNumb, int j, PhaseInterface phase, double temperature, double pressure, @@ -1044,12 +1018,12 @@ public default void addMolesChemReac(int component, double dn) { * calcBij. *

* - * @param compNumb a int - * @param j a int - * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object + * @param compNumb a int + * @param j a int + * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object * @param temperature a double - * @param pressure a double - * @param numbcomp a int + * @param pressure a double + * @param numbcomp a int * @return a double */ double calcBij(int compNumb, int j, PhaseInterface phase, double temperature, double pressure, @@ -1060,11 +1034,11 @@ public default void addMolesChemReac(int component, double dn) { * calcAT. *

* - * @param compNumb a int - * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object + * @param compNumb a int + * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object * @param temperature a double - * @param pressure a double - * @param numbcomp a int + * @param pressure a double + * @param numbcomp a int * @return a double */ double calcAT(int compNumb, PhaseInterface phase, double temperature, double pressure, @@ -1075,11 +1049,11 @@ public default void addMolesChemReac(int component, double dn) { * calcBi. *

* - * @param compNumb a int - * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object + * @param compNumb a int + * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object * @param temperature a double - * @param pressure a double - * @param numbcomp a int + * @param pressure a double + * @param numbcomp a int * @return a double */ double calcBi(int compNumb, PhaseInterface phase, double temperature, double pressure, @@ -1233,8 +1207,7 @@ public default void addMolesChemReac(int component, double dn) { public double getCv(String unit); /** - * method to return real gas isentropic exponent (kappa = - Cp/Cv*(v/p)*dp/dv - * method to return + * method to return real gas isentropic exponent (kappa = - Cp/Cv*(v/p)*dp/dv method to return * heat capacity ratio/adiabatic index/Poisson constant. * * @return kappa @@ -1318,8 +1291,7 @@ public default void addMolesChemReac(int component, double dn) { * getComponents. *

* - * @return an array of {@link neqsim.thermo.component.ComponentInterface} - * objects + * @return an array of {@link neqsim.thermo.component.ComponentInterface} objects */ ComponentInterface[] getComponents(); @@ -1888,7 +1860,7 @@ public default void addMolesChemReac(int component, double dn) { * Indexed setter for property refPhase. *

* - * @param index a int + * @param index a int * @param refPhase a {@link neqsim.thermo.phase.PhaseInterface} object */ public void setRefPhase(int index, neqsim.thermo.phase.PhaseInterface refPhase); @@ -1898,8 +1870,7 @@ public default void addMolesChemReac(int component, double dn) { * Setter for property refPhase. *

* - * @param refPhase an array of {@link neqsim.thermo.phase.PhaseInterface} - * objects + * @param refPhase an array of {@link neqsim.thermo.phase.PhaseInterface} objects */ public void setRefPhase(neqsim.thermo.phase.PhaseInterface[] refPhase); @@ -1926,11 +1897,11 @@ public default void addMolesChemReac(int component, double dn) { * setParams. *

* - * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object - * @param alpha an array of {@link double} objects - * @param Dij an array of {@link double} objects - * @param DijT an array of {@link double} objects - * @param mixRule an array of {@link String} objects + * @param phase a {@link neqsim.thermo.phase.PhaseInterface} object + * @param alpha an array of {@link double} objects + * @param Dij an array of {@link double} objects + * @param DijT an array of {@link double} objects + * @param mixRule an array of {@link String} objects * @param intparam an array of {@link double} objects */ public void setParams(PhaseInterface phase, double[][] alpha, double[][] Dij, double[][] DijT, diff --git a/src/main/java/neqsim/thermo/system/SystemInterface.java b/src/main/java/neqsim/thermo/system/SystemInterface.java index a213c7fc2..b5ce9ee19 100644 --- a/src/main/java/neqsim/thermo/system/SystemInterface.java +++ b/src/main/java/neqsim/thermo/system/SystemInterface.java @@ -31,7 +31,7 @@ public interface SystemInterface extends Cloneable, java.io.Serializable { * saveFluid. *

* - * @param id a int + * @param id a int * @param text a {@link java.lang.String} object */ public void saveFluid(int id, String text); @@ -68,10 +68,10 @@ public interface SystemInterface extends Cloneable, java.io.Serializable { * addPhaseFractionToPhase. *

* - * @param fraction a double + * @param fraction a double * @param specification a {@link java.lang.String} object * @param fromPhaseName a {@link java.lang.String} object - * @param toPhaseName a {@link java.lang.String} object + * @param toPhaseName a {@link java.lang.String} object */ public void addPhaseFractionToPhase(double fraction, String specification, String fromPhaseName, String toPhaseName); @@ -81,22 +81,20 @@ public void addPhaseFractionToPhase(double fraction, String specification, Strin * addPhaseFractionToPhase. *

* - * @param fraction a double - * @param specification a {@link java.lang.String} object + * @param fraction a double + * @param specification a {@link java.lang.String} object * @param specifiedStream a {@link java.lang.String} object - * @param fromPhaseName a {@link java.lang.String} object - * @param toPhaseName a {@link java.lang.String} object + * @param fromPhaseName a {@link java.lang.String} object + * @param toPhaseName a {@link java.lang.String} object */ public void addPhaseFractionToPhase(double fraction, String specification, String specifiedStream, String fromPhaseName, String toPhaseName); /** - * Add named components to a System. Does nothing if components already exist in - * System. + * Add named components to a System. Does nothing if components already exist in System. * - * @param names Names of the components to be added. See NeqSim database for - * available components - * in the database. + * @param names Names of the components to be added. See NeqSim database for available components + * in the database. */ public default void addComponents(String[] names) { for (int i = 0; i < names.length; i++) { @@ -105,13 +103,11 @@ public default void addComponents(String[] names) { } /** - * Add named components to a System with a number of moles. If component already - * exists, the moles + * Add named components to a System with a number of moles. If component already exists, the moles * will be added to the component. * - * @param names Names of the components to be added. See NeqSim database for - * available components - * in the database. + * @param names Names of the components to be added. See NeqSim database for available components + * in the database. * @param moles Number of moles to add per component. */ public default void addComponents(String[] names, double[] moles) { @@ -168,27 +164,21 @@ public default String[][] calcResultTable() { public int getNumberOfComponents(); /** - * This method is used to set the total molar composition of a plus fluid. The - * total flow rate + * This method is used to set the total molar composition of a plus fluid. The total flow rate * will be kept constant. The input mole fractions will be normalized. * - * @param molefractions is a double array taking the molar fraction of the - * components in the - * fluid. THe last molfraction is the mole fraction of the - * plus component + * @param molefractions is a double array taking the molar fraction of the components in the + * fluid. THe last molfraction is the mole fraction of the plus component */ public void setMolarCompositionPlus(double[] molefractions); /** - * This method is used to set the total molar composition of a characterized - * fluid. The total flow + * This method is used to set the total molar composition of a characterized fluid. The total flow * rate will be kept constant. The input mole fractions will be normalized. * - * @param molefractions is a double array taking the molar fraction of the - * components in the - * fluid. THe last fraction in the array is the total - * molefraction of the characterized - * components. + * @param molefractions is a double array taking the molar fraction of the components in the + * fluid. THe last fraction in the array is the total molefraction of the characterized + * components. */ public void setMolarCompositionOfPlusFluid(double[] molefractions); @@ -204,14 +194,13 @@ public default String[][] calcResultTable() { * method to return exergy in a specified unit. * * @param temperatureOfSurroundings in Kelvin - * @param exergyUnit a {@link java.lang.String} object + * @param exergyUnit a {@link java.lang.String} object * @return exergy in specified unit */ public double getExergy(double temperatureOfSurroundings, String exergyUnit); /** - * method to get the Joule Thomson Coefficient of a system. Based on a phase - * mole fraction basis + * method to get the Joule Thomson Coefficient of a system. Based on a phase mole fraction basis * average * * @return Joule Thomson coefficient in K/bar @@ -219,8 +208,7 @@ public default String[][] calcResultTable() { public double getJouleThomsonCoefficient(); /** - * method to get the Joule Thomson Coefficient of a system. Based on a phase - * mole fraction basis + * method to get the Joule Thomson Coefficient of a system. Based on a phase mole fraction basis * average. * * @param unit Supported units are K/bar, C/bar @@ -238,8 +226,7 @@ public default String[][] calcResultTable() { /** *

- * Get sum of mole fractions for all components. NB! init(0) must be called - * first. + * Get sum of mole fractions for all components. NB! init(0) must be called first. *

* * @return a double @@ -247,8 +234,7 @@ public default String[][] calcResultTable() { public double getMoleFractionsSum(); /** - * method to get the speed of sound of a system. The sound speed is implemented - * based on a molar + * method to get the speed of sound of a system. The sound speed is implemented based on a molar * average over the phases * * @param unit Supported units are m/s, km/h @@ -257,8 +243,7 @@ public default String[][] calcResultTable() { public double getSoundSpeed(String unit); /** - * method to get the speed of sound of a system. The sound speed is implemented - * based on a molar + * method to get the speed of sound of a system. The sound speed is implemented based on a molar * average over the phases * * @return speed of sound in m/s @@ -287,8 +272,7 @@ public default String[][] calcResultTable() { public void initPhysicalProperties(String propertyName); /** - * Calculates thermodynamic and physical properties of a fluid using - * initThermoProperties() and + * Calculates thermodynamic and physical properties of a fluid using initThermoProperties() and * initPhysicalProperties(). */ public void initProperties(); @@ -309,12 +293,9 @@ public static SystemInterface addFluids(SystemInterface addFluid1, SystemInterfa /** * method to return interfacial tension between two phases. * - * @param phase1 phase type of phase1 as string (valid phases are gas, oil, - * aqueous) - * @param phase2 phase type of phase2 as string (valid phases are gas, oil, - * aqueous) - * @return interfacial tension with unit N/m. If one or both phases does not - * exist - the method + * @param phase1 phase type of phase1 as string (valid phases are gas, oil, aqueous) + * @param phase2 phase type of phase2 as string (valid phases are gas, oil, aqueous) + * @return interfacial tension with unit N/m. If one or both phases does not exist - the method * will return NaN */ public double getInterfacialTension(String phase1, String phase2); @@ -335,7 +316,7 @@ public static SystemInterface addFluids(SystemInterface addFluid1, SystemInterfa * * @param phase1 phase number of phase1 * @param phase2 phase number of phase2 - * @param unit a {@link java.lang.String} object + * @param unit a {@link java.lang.String} object * @return interfacial tension with specified unit */ public double getInterfacialTension(int phase1, int phase2, String unit); @@ -374,10 +355,8 @@ public default double getGamma2() { /** * method to return flow rate of fluid. * - * @param flowunit Supported units are kg/sec, kg/min, kg/hr, kg/day, m3/sec, - * m3/min, m3/hr, - * idSm3/hr, Sm3/sec, Sm3/hr, Sm3/day, MSm3/day, mole/sec, - * mole/min, mole/hr + * @param flowunit Supported units are kg/sec, kg/min, kg/hr, kg/day, m3/sec, m3/min, m3/hr, + * idSm3/hr, Sm3/sec, Sm3/hr, Sm3/day, MSm3/day, mole/sec, mole/min, mole/hr * @return flow rate in specified unit */ public double getFlowRate(String flowunit); @@ -393,7 +372,7 @@ public default double getGamma2() { * method to set the pressure of a fluid (same pressure for all phases). * * @param newPressure in specified unit - * @param unit unit can be bar, bara, barg or atm + * @param unit unit can be bar, bara, barg or atm */ public void setPressure(double newPressure, String unit); @@ -412,7 +391,7 @@ public default double getGamma2() { *

* * @param newTemperature a double - * @param phaseNumber a int + * @param phaseNumber a int */ public void setTemperature(double newTemperature, int phaseNumber); @@ -420,13 +399,12 @@ public default double getGamma2() { * method to set the temperature of a fluid (same temperature for all phases). * * @param newTemperature in specified unit - * @param unit unit can be C or K (Celsius or Kelvin) + * @param unit unit can be C or K (Celsius or Kelvin) */ public void setTemperature(double newTemperature, String unit); /** - * method to return the volume fraction of a phase note: without Peneloux volume - * correction. + * method to return the volume fraction of a phase note: without Peneloux volume correction. * * @param phaseNumber number of the phase to get volume fraction for * @return volume fraction @@ -434,8 +412,7 @@ public default double getGamma2() { public double getVolumeFraction(int phaseNumber); /** - * method to return the volume fraction of a phase note: with Peneloux volume - * correction. + * method to return the volume fraction of a phase note: with Peneloux volume correction. * * @param phaseNumber number of the phase to get volume fraction for * @return volume fraction @@ -529,7 +506,7 @@ public default void removeMoles() { * saveObjectToFile. *

* - * @param filePath a {@link java.lang.String} object + * @param filePath a {@link java.lang.String} object * @param fluidName a {@link java.lang.String} object */ public void saveObjectToFile(String filePath, String fluidName); @@ -539,7 +516,7 @@ public default void removeMoles() { * readObjectFromFile. *

* - * @param filePath a {@link java.lang.String} object + * @param filePath a {@link java.lang.String} object * @param fluidName a {@link java.lang.String} object * @return a {@link neqsim.thermo.system.SystemInterface} object */ @@ -607,7 +584,7 @@ public default void removeMoles() { * changeComponentName. *

* - * @param name a {@link java.lang.String} object + * @param name a {@link java.lang.String} object * @param newName a {@link java.lang.String} object */ public void changeComponentName(String name, String newName); @@ -719,10 +696,8 @@ public default boolean IsPhase(int i) { *

* * @param flowRate a double - * @param flowunit a {@link java.lang.String} object. flow units are: kg/sec, - * kg/min, kg/hr - * m3/sec, m3/min, m3/hr, mole/sec, mole/min, mole/hr, Sm3/hr, - * Sm3/day, idSm3/hr, idSm3/day + * @param flowunit a {@link java.lang.String} object. flow units are: kg/sec, kg/min, kg/hr + * m3/sec, m3/min, m3/hr, mole/sec, mole/min, mole/hr, Sm3/hr, Sm3/day, idSm3/hr, idSm3/day */ public void setTotalFlowRate(double flowRate, String flowunit); @@ -874,7 +849,7 @@ public default boolean IsPhase(int i) { * saveObject. *

* - * @param ID a int + * @param ID a int * @param text a {@link java.lang.String} object */ public void saveObject(int ID, String text); @@ -957,8 +932,7 @@ public default boolean IsPhase(int i) { /** *

- * This method is used to set the total molar composition of a fluid. The total - * flow rate will be + * This method is used to set the total molar composition of a fluid. The total flow rate will be * kept constant. The input mole fractions will be normalized. *

* @@ -967,12 +941,10 @@ public default boolean IsPhase(int i) { public void setMolarComposition(double[] moles); /** - * return the phase of to specified type if the phase does not exist, the method - * will return null. + * return the phase of to specified type if the phase does not exist, the method will return null. * - * @param phaseTypeName the phase type to be returned (gas, oil, aqueous, wax, - * hydrate are - * supported) + * @param phaseTypeName the phase type to be returned (gas, oil, aqueous, wax, hydrate are + * supported) * @return a {@link neqsim.thermo.phase.PhaseInterface} object */ public PhaseInterface getPhaseOfType(String phaseTypeName); @@ -991,8 +963,8 @@ public default boolean IsPhase(int i) { * * @param componentName selected name of the component to be added * @param numberOfMoles number of moles to be added - * @param molarMass molar mass of the component in kg/mol - * @param density density of the component in g/cm3 + * @param molarMass molar mass of the component in kg/mol + * @param density density of the component in g/cm3 */ public void addTBPfraction(String componentName, double numberOfMoles, double molarMass, double density); @@ -1002,13 +974,13 @@ public void addTBPfraction(String componentName, double numberOfMoles, double mo * addTBPfraction. *

* - * @param componentName a {@link java.lang.String} object - * @param numberOfMoles a double - * @param molarMass a double - * @param density a double + * @param componentName a {@link java.lang.String} object + * @param numberOfMoles a double + * @param molarMass a double + * @param density a double * @param criticalTemperature a double - * @param criticalPressure a double - * @param acentricFactor a double + * @param criticalPressure a double + * @param acentricFactor a double */ public void addTBPfraction(String componentName, double numberOfMoles, double molarMass, double density, double criticalTemperature, double criticalPressure, double acentricFactor); @@ -1020,8 +992,8 @@ public void addTBPfraction(String componentName, double numberOfMoles, double mo * * @param componentName a {@link java.lang.String} object * @param numberOfMoles a double - * @param molarMass a double - * @param density a double + * @param molarMass a double + * @param density a double */ public void addPlusFraction(String componentName, double numberOfMoles, double molarMass, double density); @@ -1032,7 +1004,7 @@ public void addPlusFraction(String componentName, double numberOfMoles, double m *

* * @param componentName a {@link java.lang.String} object - * @param value a double + * @param value a double */ public void addSalt(String componentName, double value); @@ -1123,14 +1095,13 @@ public default boolean hasSolidPhase() { *

* * @param model a {@link java.lang.String} object - * @param val a double + * @param val a double * @param phase a int */ public void tuneModel(String model, double val, int phase); /** - * add a component to a fluid. If component already exists, the moles will be - * added to the + * add a component to a fluid. If component already exists, the moles will be added to the * existing component. * * @param inComponent Component object to add. @@ -1138,38 +1109,30 @@ public default boolean hasSolidPhase() { public void addComponent(ComponentInterface inComponent); /** - * add a component to a fluid. If component already exists, the moles will be - * added to the + * add a component to a fluid. If component already exists, the moles will be added to the * existing component. * - * @param name Name of the component to add. See NeqSim database for component - * in the database. + * @param name Name of the component to add. See NeqSim database for component in the database. */ public void addComponent(String name); /** - * add a component to a fluid. If component already exists, the moles will be - * added to the + * add a component to a fluid. If component already exists, the moles will be added to the * existing component. * - * @param moles number of moles (per second) of the component to be added to the - * fluid - * @param name Name of the component to add. See NeqSim database for component - * in the database. + * @param moles number of moles (per second) of the component to be added to the fluid + * @param name Name of the component to add. See NeqSim database for component in the database. */ public void addComponent(String name, double moles); /** - * add a component to a fluid. If component already exists, the moles will be - * added to the + * add a component to a fluid. If component already exists, the moles will be added to the * existing component. * - * @param name Name of the component to add. See NeqSim database for - * component in the database. - * @param value The amount - * @param unitName the unit of rate (sported units are kg/sec, mol/sec, - * Nlitre/min, kg/hr, - * Sm^3/hr, Sm^3/day, MSm^3/day .. + * @param name Name of the component to add. See NeqSim database for component in the database. + * @param value The amount + * @param unitName the unit of rate (sported units are kg/sec, mol/sec, Nlitre/min, kg/hr, + * Sm^3/hr, Sm^3/day, MSm^3/day .. */ public void addComponent(String name, double value, String unitName); @@ -1178,37 +1141,30 @@ public default boolean hasSolidPhase() { * addComponent. *

* - * @param name Name of the component to add. See NeqSim database for component - * in the database. - * @param moles number of moles (per second) of the component to be added to the - * fluid - * @param TC Critical temperature - * @param PC Critical pressure - * @param acs a double + * @param name Name of the component to add. See NeqSim database for component in the database. + * @param moles number of moles (per second) of the component to be added to the fluid + * @param TC Critical temperature + * @param PC Critical pressure + * @param acs a double */ public void addComponent(String name, double moles, double TC, double PC, double acs); /** - * add a component to a fluid. If component already exists, the moles will be - * added to the + * add a component to a fluid. If component already exists, the moles will be added to the * existing component. * - * @param name Name of the component to add. See NeqSim database for - * component in the database. - * @param moles number of moles (per second) of the component to be added - * to the fluid + * @param name Name of the component to add. See NeqSim database for component in the database. + * @param moles number of moles (per second) of the component to be added to the fluid * @param phaseNumber Number of the phase to add the component to */ public void addComponent(String name, double moles, int phaseNumber); /** - * add a component to a fluid. I component already exists, it will be added to - * the component + * add a component to a fluid. I component already exists, it will be added to the component * - * @param name Name of the component to add. See NeqSim database for - * component in the database. - * @param value rate of the component to add to the fluid - * @param unitName the unit of the flow rate (eg. mol/sec, kg/sec, etc.) + * @param name Name of the component to add. See NeqSim database for component in the database. + * @param value rate of the component to add to the fluid + * @param unitName the unit of the flow rate (eg. mol/sec, kg/sec, etc.) * @param phaseNumber Number of the phase to add the component to */ public void addComponent(String name, double value, String unitName, int phaseNumber); @@ -1219,8 +1175,7 @@ public default boolean hasSolidPhase() { *

* * @param index Component number to add - * @param moles number of moles (per second) of the component to be added to the - * fluid + * @param moles number of moles (per second) of the component to be added to the fluid */ public void addComponent(int index, double moles); @@ -1229,9 +1184,8 @@ public default boolean hasSolidPhase() { * addComponent. *

* - * @param index Component number to add - * @param moles number of moles (per second) of the component to be added - * to the fluid + * @param index Component number to add + * @param moles number of moles (per second) of the component to be added to the fluid * @param phaseNumber Number of the phase to add the component to */ public void addComponent(int index, double moles, int phaseNumber); @@ -1241,8 +1195,7 @@ public default boolean hasSolidPhase() { * removeComponent. *

* - * @param name Name of the component to remove. See NeqSim database for - * component in the database. + * @param name Name of the component to remove. See NeqSim database for component in the database. */ public void removeComponent(String name); @@ -1269,8 +1222,7 @@ public default boolean hasSolidPhase() { /** *

- * Setter for property beta. NB! Sets beta = b for first phase and - * 1-b for second + * Setter for property beta. NB! Sets beta = b for first phase and 1-b for second * phase, not for multiphase systems. *

* @@ -1284,7 +1236,7 @@ public default boolean hasSolidPhase() { *

* * @param phase Phase number to set beta for. - * @param b Beta value to set. + * @param b Beta value to set. */ public void setBeta(int phase, double b); @@ -1310,19 +1262,13 @@ public default boolean hasSolidPhase() { /** * method to set mixing rule used for the fluid. * - * @param type The type of mixing rule to be used for the fluid. 1 - classic - * mixing rule with all - * kij set to zero 2 -classic mixing rule with kij from NeqSim - * database 3- classic mixing - * rule with temperature dependent kij 4- Huron Vidal mixing rule - * with parameters from - * NeqSim database 7 -classic mixing rule with kij of CPA from - * NeqSim Database 9 - * -classicmixing rule with temperature dependent kij of CPA from - * NeqSim database - * 10-classic mixing rule with temperature and composition dependent - * kij of CPA from NeqSim - * database + * @param type The type of mixing rule to be used for the fluid. 1 - classic mixing rule with all + * kij set to zero 2 -classic mixing rule with kij from NeqSim database 3- classic mixing + * rule with temperature dependent kij 4- Huron Vidal mixing rule with parameters from + * NeqSim database 7 -classic mixing rule with kij of CPA from NeqSim Database 9 + * -classicmixing rule with temperature dependent kij of CPA from NeqSim database + * 10-classic mixing rule with temperature and composition dependent kij of CPA from NeqSim + * database */ public void setMixingRule(int type); @@ -1339,7 +1285,7 @@ public default boolean hasSolidPhase() { *

* * @param typename a {@link java.lang.String} object - * @param GEmodel a {@link java.lang.String} object + * @param GEmodel a {@link java.lang.String} object */ public void setMixingRule(String typename, String GEmodel); @@ -1432,9 +1378,9 @@ public default boolean hasSolidPhase() { * write. *

* - * @param name a {@link java.lang.String} object + * @param name a {@link java.lang.String} object * @param filename a {@link java.lang.String} object - * @param newfile a boolean + * @param newfile a boolean */ public void write(String name, String filename, boolean newfile); @@ -1489,15 +1435,14 @@ public default boolean hasSolidPhase() { * this.phaseIndex[index] = phaseIndex; *

* - * @param index a int + * @param index a int * @param phaseIndex a int */ public void setPhaseIndex(int index, int phaseIndex); /** *

- * Set phaseArray[phaseIndex] = phase. NB! Transfers the pressure - * and temperature + * Set phaseArray[phaseIndex] = phase. NB! Transfers the pressure and temperature * from the currently existing phase object at index numb *

* @@ -1507,26 +1452,17 @@ public default boolean hasSolidPhase() { public void setPhase(PhaseInterface phase, int index); /** - * method to read pure component and interaction parameters from the NeqSim - * database and create + * method to read pure component and interaction parameters from the NeqSim database and create * temporary tables with parameters for active fluid. * - * @param reset If reset is set to true, new temporary tables with parameters - * for the added - * components will be created. When parameters are needed (eg. when - * adding components or - * when setting a mixing rule) it will try to find them in the - * temporary tables first eg. - * COMPTEMP (for pure component parameters) and INTERTEMP (for - * interaction parameters). If - * reset is set to false it will not create new temporary tables. - * If a fluid is created - * with the same components many times, performance improvements - * will be obtained, if - * temporary tables are created the first time (reset=true), and - * then the same tables is - * used when creating new fluids with the same temporary tables - * (reset=false) + * @param reset If reset is set to true, new temporary tables with parameters for the added + * components will be created. When parameters are needed (eg. when adding components or + * when setting a mixing rule) it will try to find them in the temporary tables first eg. + * COMPTEMP (for pure component parameters) and INTERTEMP (for interaction parameters). If + * reset is set to false it will not create new temporary tables. If a fluid is created + * with the same components many times, performance improvements will be obtained, if + * temporary tables are created the first time (reset=true), and then the same tables is + * used when creating new fluids with the same temporary tables (reset=false) */ public void createDatabase(boolean reset); @@ -1574,21 +1510,16 @@ public default boolean hasSolidPhase() { public boolean doMultiPhaseCheck(); /** - * method to specify if calculations should check for more than two fluid - * phases. + * method to specify if calculations should check for more than two fluid phases. * - * @param doMultiPhaseCheck Specify if the calculations should check for more - * than two fluid - * phases. Default is two fluid phases (gas and - * liquid). If set to true the program will - * check for gas and multiple liquid phases (eg. - * gas-oil-aqueous). + * @param doMultiPhaseCheck Specify if the calculations should check for more than two fluid + * phases. Default is two fluid phases (gas and liquid). If set to true the program will + * check for gas and multiple liquid phases (eg. gas-oil-aqueous). */ public void setMultiPhaseCheck(boolean doMultiPhaseCheck); /** - * Calculate thermodynamic properties of the fluid using the init type set in - * fluid. + * Calculate thermodynamic properties of the fluid using the init type set in fluid. * * @see getInitType */ @@ -1597,34 +1528,25 @@ public default void init() { } /** - * method to calculate thermodynamic properties of the fluid. The temperature, - * pressure, number of + * method to calculate thermodynamic properties of the fluid. The temperature, pressure, number of * phases and composition of the phases will be used as basis for calculation. * - * @param number - The number can be 0, 1, 2 or 3. 0: Set feed composition for - * all phases. 1: - * Calculation of density, fugacities and Z-factor 2: 1 + - * calculation of enthalpy, entropy, - * Cp, Cv, and most other thermodynamic properties 3: 1+2 + - * Calculation of composition - * derivatives of fugacity coefficients. + * @param number - The number can be 0, 1, 2 or 3. 0: Set feed composition for all phases. 1: + * Calculation of density, fugacities and Z-factor 2: 1 + calculation of enthalpy, entropy, + * Cp, Cv, and most other thermodynamic properties 3: 1+2 + Calculation of composition + * derivatives of fugacity coefficients. */ public void init(int number); /** - * method to calculate thermodynamic properties of the selected phase. The - * temperature, pressure, - * number of phases and composition of the phase will be used as basis for - * calculation. + * method to calculate thermodynamic properties of the selected phase. The temperature, pressure, + * number of phases and composition of the phase will be used as basis for calculation. * - * @param number - The number can be 0, 1, 2 or 3. 0: Set feed composition. 1: - * Calculation of - * density, fugacities and Z-factor 2: 1 + calculation of - * enthalpy, entropy, Cp, Cv, and - * most other thermodynamic properties 3: 1+2 + Calculation of - * composition derivatives of - * fugacity coefficients. - * @param phase a int + * @param number - The number can be 0, 1, 2 or 3. 0: Set feed composition. 1: Calculation of + * density, fugacities and Z-factor 2: 1 + calculation of enthalpy, entropy, Cp, Cv, and + * most other thermodynamic properties 3: 1+2 + Calculation of composition derivatives of + * fugacity coefficients. + * @param phase a int */ public void init(int number, int phase); @@ -1680,7 +1602,7 @@ public default void prettyPrint() { *

* * @param addSystem a {@link neqsim.thermo.system.SystemInterface} object - * @param phase phase number of phase to add fluid to + * @param phase phase number of phase to add fluid to * @return SystemInterface */ public SystemInterface addFluid(SystemInterface addSystem, int phase); @@ -1728,9 +1650,8 @@ public default void prettyPrint() { * calcBeta. For simple gas liquid systems. *

* - * @return Beta Mole fraction contained in the heaviest phase, i.e., liquid - * phase. - * @throws neqsim.util.exception.IsNaNException if any. + * @return Beta Mole fraction contained in the heaviest phase, i.e., liquid phase. + * @throws neqsim.util.exception.IsNaNException if any. * @throws neqsim.util.exception.TooManyIterationsException if any. */ public double calcBeta() @@ -1882,16 +1803,14 @@ public double calcBeta() public void isChemicalSystem(boolean temp); /** - * method to return molar volume of the fluid note: without Peneloux volume - * correction. + * method to return molar volume of the fluid note: without Peneloux volume correction. * * @return molar volume volume in unit m3/mol*1e5 */ public double getMolarVolume(); /** - * method to return molar volume of the fluid: - * eventual volume correction included. + * method to return molar volume of the fluid: eventual volume correction included. * * @param unit Supported units are m3/mol, litre/mol * @@ -1941,16 +1860,14 @@ public double calcBeta() * getInterphaseProperties. *

* - * @return a - * {@link neqsim.physicalProperties.interfaceProperties.InterphasePropertiesInterface} + * @return a {@link neqsim.physicalProperties.interfaceProperties.InterphasePropertiesInterface} * object */ public InterphasePropertiesInterface getInterphaseProperties(); /** *

- * Calculate system beta values using Phase.getNumberOfMolesInPhase and - * getTotalNumberOfMoles. + * Calculate system beta values using Phase.getNumberOfMolesInPhase and getTotalNumberOfMoles. *

*/ public void initBeta(); @@ -2015,7 +1932,7 @@ public double calcBeta() * Change the phase type of a given phase. * * @param phaseToChange the phase number of the phase to set phase type - * @param newPhaseType the phasetype number to set + * @param newPhaseType the phasetype number to set * @deprecated Replaced by {@link setPhaseType} */ @Deprecated @@ -2037,14 +1954,14 @@ public default void setPhaseType(int phaseToChange, String phaseTypeName) { * Change the phase type of a given phase. * * @param phaseToChange the phase number of the phase to set phase type - * @param pt PhaseType to set + * @param pt PhaseType to set */ public void setPhaseType(int phaseToChange, PhaseType pt); /** * Set phase type of all phases. * - * @param phases Set to "all" to set all phases, else nothing happens. + * @param phases Set to "all" to set all phases, else nothing happens. * @param newPhaseType the phasetype number to set * @deprecated Replaced by {@link setAllPhaseType} */ @@ -2268,8 +2185,7 @@ public default ComponentInterface getComponent(int i) { public PhaseInterface getLiquidPhase(); /** - * method to return compressibility factor of a fluid compressibility factor is - * defined in EoS + * method to return compressibility factor of a fluid compressibility factor is defined in EoS * from PV=ZnRT where V is total volume of fluid. * * @return compressibility factor Z @@ -2372,7 +2288,7 @@ public default ComponentInterface getComponent(int i) { * method to return phase fraction of selected phase. * * @param phaseTypeName gas/oil/aqueous - * @param unit mole/volume/weight + * @param unit mole/volume/weight * @return phase: fraction in specified unit */ public double getPhaseFraction(String phaseTypeName, String unit); @@ -2382,9 +2298,9 @@ public default ComponentInterface getComponent(int i) { * getProperty. *

* - * @param prop a {@link java.lang.String} object + * @param prop a {@link java.lang.String} object * @param compName a {@link java.lang.String} object - * @param phase a int + * @param phase a int * @return a double */ public double getProperty(String prop, String compName, int phase); @@ -2394,7 +2310,7 @@ public default ComponentInterface getComponent(int i) { * getProperty. *

* - * @param prop a {@link java.lang.String} object + * @param prop a {@link java.lang.String} object * @param phase a int * @return a double */ @@ -2674,10 +2590,10 @@ public void setImplementedCompositionDeriativesofFugacity( * addCharacterized. *

* - * @param charNames an array of {@link java.lang.String} objects - * @param charFlowrate an array of {@link double} objects - * @param molarMass an array of {@link double} objects - * @param relativedensity an array of {@link double} objects + * @param charNames an array of {@link java.lang.String} objects + * @param charFlowrate an array of {@link double} objects + * @param molarMass an array of {@link double} objects + * @param relativedensity an array of {@link double} objects * @param lastIsPlusFraction True if last fraction is a Plus fraction */ public void addOilFractions(String[] charNames, double[] charFlowrate, double[] molarMass, @@ -2688,12 +2604,12 @@ public void addOilFractions(String[] charNames, double[] charFlowrate, double[] * addCharacterized. *

* - * @param charNames an array of {@link java.lang.String} objects - * @param charFlowrate an array of {@link double} objects - * @param molarMass an array of {@link double} objects - * @param relativedensity an array of {@link double} objects - * @param lastIsPlusFraction True if last fraction is a Plus fraction - * @param lumpComponents True if component should be lumped + * @param charNames an array of {@link java.lang.String} objects + * @param charFlowrate an array of {@link double} objects + * @param molarMass an array of {@link double} objects + * @param relativedensity an array of {@link double} objects + * @param lastIsPlusFraction True if last fraction is a Plus fraction + * @param lumpComponents True if component should be lumped * @param numberOfPseudoComponents number of pseudo components */ public void addOilFractions(String[] charNames, double[] charFlowrate, double[] molarMass, @@ -2705,9 +2621,9 @@ public void addOilFractions(String[] charNames, double[] charFlowrate, double[] * addCharacterized. *

* - * @param charNames an array of {@link java.lang.String} objects - * @param charFlowrate an array of {@link double} objects - * @param molarMass an array of {@link double} objects + * @param charNames an array of {@link java.lang.String} objects + * @param charFlowrate an array of {@link double} objects + * @param molarMass an array of {@link double} objects * @param relativedensity an array of {@link double} objects */ public void addCharacterized(String[] charNames, double[] charFlowrate, double[] molarMass, diff --git a/src/main/java/neqsim/thermo/system/SystemThermo.java b/src/main/java/neqsim/thermo/system/SystemThermo.java index 849744312..960a20347 100644 --- a/src/main/java/neqsim/thermo/system/SystemThermo.java +++ b/src/main/java/neqsim/thermo/system/SystemThermo.java @@ -731,19 +731,24 @@ public double getFlowRate(String flowunit) { return totalNumberOfMoles * getMolarMass() * 3600.0 / getIdealLiquidDensity("kg/m3"); } else if (flowunit.equals("Sm3/sec")) { return totalNumberOfMoles * ThermodynamicConstantsInterface.R - * ThermodynamicConstantsInterface.standardStateTemperature / 101325.0; + * ThermodynamicConstantsInterface.standardStateTemperature + / ThermodynamicConstantsInterface.atm; } else if (flowunit.equals("Sm3/hr")) { return totalNumberOfMoles * 3600.0 * ThermodynamicConstantsInterface.R - * ThermodynamicConstantsInterface.standardStateTemperature / 101325.0; + * ThermodynamicConstantsInterface.standardStateTemperature + / ThermodynamicConstantsInterface.atm; } else if (flowunit.equals("Sm3/day")) { return totalNumberOfMoles * 3600.0 * 24.0 * ThermodynamicConstantsInterface.R - * ThermodynamicConstantsInterface.standardStateTemperature / 101325.0; + * ThermodynamicConstantsInterface.standardStateTemperature + / ThermodynamicConstantsInterface.atm; } else if (flowunit.equals("MSm3/day")) { return totalNumberOfMoles * 3600.0 * 24.0 * ThermodynamicConstantsInterface.R - * ThermodynamicConstantsInterface.standardStateTemperature / 101325.0 / 1.0e6; + * ThermodynamicConstantsInterface.standardStateTemperature + / ThermodynamicConstantsInterface.atm / 1.0e6; } else if (flowunit.equals("MSm3/hr")) { return totalNumberOfMoles * 3600.0 * ThermodynamicConstantsInterface.R - * ThermodynamicConstantsInterface.standardStateTemperature / 101325.0 / 1.0e6; + * ThermodynamicConstantsInterface.standardStateTemperature + / ThermodynamicConstantsInterface.atm / 1.0e6; } else if (flowunit.equals("mole/sec")) { return totalNumberOfMoles; } else if (flowunit.equals("mole/min")) { @@ -2868,7 +2873,8 @@ public double getDensity(String unit) { conversionFactor = 0.0624279606; break; case "kg/Sm3": - return getMolarMass() * 101325.0 / ThermodynamicConstantsInterface.R + return getMolarMass() * ThermodynamicConstantsInterface.atm + / ThermodynamicConstantsInterface.R / ThermodynamicConstantsInterface.standardStateTemperature; case "mol/m3": conversionFactor = 1.0 / getMolarMass(); diff --git a/src/main/java/neqsim/thermo/util/empiric/BukacekWaterInGas.java b/src/main/java/neqsim/thermo/util/empiric/BukacekWaterInGas.java index 193f0ce95..069591118 100644 --- a/src/main/java/neqsim/thermo/util/empiric/BukacekWaterInGas.java +++ b/src/main/java/neqsim/thermo/util/empiric/BukacekWaterInGas.java @@ -39,7 +39,10 @@ public static double getWaterInGas(double temperature, double pressure) { double ans = mgwaterSm3 / molarMassGas; // mol water /Sm3 gas - double molgasSm3 = 101325.0 / (ThermodynamicConstantsInterface.R * 288.15); // mol gas/ Sm3 + double molgasSm3 = + ThermodynamicConstantsInterface.atm / (ThermodynamicConstantsInterface.R * 288.15); // mol + // gas/ + // Sm3 return ans / molgasSm3; } diff --git a/src/main/java/neqsim/thermo/util/readwrite/EclipseFluidReadWrite.java b/src/main/java/neqsim/thermo/util/readwrite/EclipseFluidReadWrite.java index 4b6771141..009145fc2 100644 --- a/src/main/java/neqsim/thermo/util/readwrite/EclipseFluidReadWrite.java +++ b/src/main/java/neqsim/thermo/util/readwrite/EclipseFluidReadWrite.java @@ -134,9 +134,8 @@ public static SystemInterface read(String inputFile, String pseudoNameIn) { * @return a {@link neqsim.thermo.system.SystemInterface} object */ public static SystemInterface read(String inputFile) { - neqsim.thermo.system.SystemInterface fluid = - new neqsim.thermo.system.SystemSrkEos(288.15, - ThermodynamicConstantsInterface.referencePressure); + neqsim.thermo.system.SystemInterface fluid = new neqsim.thermo.system.SystemSrkEos(288.15, + ThermodynamicConstantsInterface.referencePressure); double[][] kij = null; try (BufferedReader br = new BufferedReader(new FileReader(new File(inputFile)))) { diff --git a/src/main/java/neqsim/util/unit/RateUnit.java b/src/main/java/neqsim/util/unit/RateUnit.java index 15d47b6e1..21bf9714e 100644 --- a/src/main/java/neqsim/util/unit/RateUnit.java +++ b/src/main/java/neqsim/util/unit/RateUnit.java @@ -67,9 +67,11 @@ public double getValue(String tounit) { */ public double getConversionFactor(String name) { double mol_m3 = 0.0; - double mol_Sm3 = 101325.0 / (ThermodynamicConstantsInterface.R * standardStateTemperature); + double mol_Sm3 = ThermodynamicConstantsInterface.atm + / (ThermodynamicConstantsInterface.R * standardStateTemperature); if (boilp < 25) { - mol_m3 = 101325.0 / (ThermodynamicConstantsInterface.R * standardStateTemperature); + mol_m3 = ThermodynamicConstantsInterface.atm + / (ThermodynamicConstantsInterface.R * standardStateTemperature); } else { mol_m3 = 1.0 / (molarmass) * stddens * 1000; } diff --git a/src/test/java/neqsim/processSimulation/util/example/MasstransferMeOH.java b/src/test/java/neqsim/processSimulation/util/example/MasstransferMeOH.java index c462c8e62..eac949222 100644 --- a/src/test/java/neqsim/processSimulation/util/example/MasstransferMeOH.java +++ b/src/test/java/neqsim/processSimulation/util/example/MasstransferMeOH.java @@ -91,8 +91,8 @@ public static void main(String[] args) { // column")).setNumberOfTrays(2); System.out.println( "water in wet gas [kg/MSm3] " + ((Stream) operations.getUnit("water saturated feed gas")) - .getFluid().getPhase(0).getComponent("water").getz() * 1.0e6 * 0.01802 * 101325.0 - / (ThermodynamicConstantsInterface.R * 288.15)); + .getFluid().getPhase(0).getComponent("water").getz() * 1.0e6 * 0.01802 + * ThermodynamicConstantsInterface.atm / (ThermodynamicConstantsInterface.R * 288.15)); // mainMixer.getFluid().display(); // scrubber.getGasOutStream().displayResult(); System.out.println("hydt " + gasFromScrubber.getHydrateEquilibriumTemperature()); diff --git a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillation.java b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillation.java index 2474db6b6..a90c0bbe6 100644 --- a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillation.java +++ b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillation.java @@ -248,8 +248,8 @@ public static void main(String[] args) { // column")).setNumberOfTrays(2); System.out .println("water in wet gas " + ((Stream) operations.getUnit("water saturated feed gas")) - .getFluid().getPhase(0).getComponent("water").getz() * 1.0e6 * 0.01802 * 101325.0 - / (ThermodynamicConstantsInterface.R * 288.15)); + .getFluid().getPhase(0).getComponent("water").getz() * 1.0e6 * 0.01802 + * ThermodynamicConstantsInterface.atm / (ThermodynamicConstantsInterface.R * 288.15)); System.out.println("water in dry gas " + ((Stream) operations.getUnit("dry gas from absorber")) .getFluid().getPhase(0).getComponent("water").getz() * 1.0e6); System.out.println("reboiler duty (KW) " @@ -260,14 +260,14 @@ public static void main(String[] args) { double waterInWetGasppm = waterSaturatedFeedGas.getFluid().getPhase(0).getComponent("water").getz() * 1.0e6; - double waterInWetGaskgMSm3 = - waterInWetGasppm * 0.01802 * 101325.0 / (ThermodynamicConstantsInterface.R * 288.15); + double waterInWetGaskgMSm3 = waterInWetGasppm * 0.01802 * ThermodynamicConstantsInterface.atm + / (ThermodynamicConstantsInterface.R * 288.15); double TEGfeedwt = TEGFeed.getFluid().getPhase("aqueous").getWtFrac("TEG"); double TEGfeedflw = TEGFeed.getFlowRate("kg/hr"); double waterInDehydratedGasppm = dehydratedGas.getFluid().getPhase(0).getComponent("water").getz() * 1.0e6; - double waterInDryGaskgMSm3 = - waterInDehydratedGasppm * 0.01802 * 101325.0 / (ThermodynamicConstantsInterface.R * 288.15); + double waterInDryGaskgMSm3 = waterInDehydratedGasppm * 0.01802 + * ThermodynamicConstantsInterface.atm / (ThermodynamicConstantsInterface.R * 288.15); double richTEG2 = richTEG.getFluid().getPhase("aqueous").getWtFrac("TEG"); System.out.println("reboiler duty (KW) " + ((Reboiler) column.getReboiler()).getDuty() / 1.0e3); System.out.println("flow rate from reboiler " diff --git a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillation3.java b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillation3.java index c776395c1..410031f18 100644 --- a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillation3.java +++ b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillation3.java @@ -245,8 +245,8 @@ public static void main(String[] args) { // column")).setNumberOfTrays(2); System.out .println("water in wet gas " + ((Stream) operations.getUnit("water saturated feed gas")) - .getFluid().getPhase(0).getComponent("water").getz() * 1.0e6 * 0.01802 * 101325.0 - / (ThermodynamicConstantsInterface.R * 288.15)); + .getFluid().getPhase(0).getComponent("water").getz() * 1.0e6 * 0.01802 + * ThermodynamicConstantsInterface.atm / (ThermodynamicConstantsInterface.R * 288.15)); System.out.println("water in dry gas " + ((Stream) operations.getUnit("dry gas from absorber")) .getFluid().getPhase(0).getComponent("water").getz() * 1.0e6); System.out.println("reboiler duty (KW) " @@ -257,14 +257,14 @@ public static void main(String[] args) { double waterInWetGasppm = waterSaturatedFeedGas.getFluid().getPhase(0).getComponent("water").getz() * 1.0e6; - double waterInWetGaskgMSm3 = - waterInWetGasppm * 0.01802 * 101325.0 / (ThermodynamicConstantsInterface.R * 288.15); + double waterInWetGaskgMSm3 = waterInWetGasppm * 0.01802 * ThermodynamicConstantsInterface.atm + / (ThermodynamicConstantsInterface.R * 288.15); double TEGfeedwt = TEGFeed.getFluid().getPhase("aqueous").getWtFrac("TEG"); double TEGfeedflw = TEGFeed.getFlowRate("kg/hr"); double waterInDehydratedGasppm = dehydratedGas.getFluid().getPhase(0).getComponent("water").getz() * 1.0e6; - double waterInDryGaskgMSm3 = - waterInDehydratedGasppm * 0.01802 * 101325.0 / (ThermodynamicConstantsInterface.R * 288.15); + double waterInDryGaskgMSm3 = waterInDehydratedGasppm * 0.01802 + * ThermodynamicConstantsInterface.atm / (ThermodynamicConstantsInterface.R * 288.15); double richTEG2 = richTEG.getFluid().getPhase("aqueous").getWtFrac("TEG"); System.out.println("reboiler duty (KW) " + ((Reboiler) column.getReboiler()).getDuty() / 1.0e3); System.out.println("flow rate from reboiler " diff --git a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationAaHa.java b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationAaHa.java index 6512301d8..957f8841d 100644 --- a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationAaHa.java +++ b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationAaHa.java @@ -306,9 +306,10 @@ public static void main(String[] args) { /* * System.out.println("water in wet gas " + ((Stream) * operations.getUnit("water saturated feed gas")).getFluid() - * .getPhase(0).getComponent("water").getz() * 1.0e6 * 0.01802 * 101325.0 / - * (ThermodynamicConstantsInterface.R * 288.15)); System.out.println("water in dry gas " + - * ((Stream) operations.getUnit("dry gas from absorber")).getFluid() + * .getPhase(0).getComponent("water").getz() * 1.0e6 * 0.01802 + * *ThermodynamicConstantsInterface.atm / (ThermodynamicConstantsInterface.R * 288.15)); + * System.out.println("water in dry gas " + ((Stream) + * operations.getUnit("dry gas from absorber")).getFluid() * .getPhase(0).getComponent("water").getz() * 1.0e6); System.out.println("reboiler duty (KW) " * + ((Reboiler) ((DistillationColumn) * operations.getUnit("TEG regeneration column")).getReboiler()) .getDuty() / 1.0e3); @@ -318,13 +319,13 @@ public static void main(String[] args) { * * double waterInWetGasppm = * waterSaturatedFeedGas.getFluid().getPhase(0).getComponent("water").getz() * 1.0e6; double - * waterInWetGaskgMSm3 = waterInWetGasppm * 0.01802 * 101325.0 / + * waterInWetGaskgMSm3 = waterInWetGasppm * 0.01802 *ThermodynamicConstantsInterface.atm / * (ThermodynamicConstantsInterface.R * 288.15); double TEGfeedwt = * TEGFeed.getFluid().getPhase("aqueous").getWtFrac("TEG"); double TEGfeedflw = * TEGFeed.getFlowRate("kg/hr"); double waterInDehydratedGasppm = * dehydratedGas.getFluid().getPhase(0).getComponent("water").getz() * 1.0e6; double - * waterInDryGaskgMSm3 = waterInDehydratedGasppm * 0.01802 * 101325.0 / - * (ThermodynamicConstantsInterface.R * 288.15); double richTEG2 = + * waterInDryGaskgMSm3 = waterInDehydratedGasppm * 0.01802 *ThermodynamicConstantsInterface.atm + * / (ThermodynamicConstantsInterface.R * 288.15); double richTEG2 = * richTEG.getFluid().getPhase("aqueous").getWtFrac("TEG"); double temp = * ((Stream)operations.getUnit("feed to TEG absorber")).getFluid().getPhase(0). * getComponent("water").getz()*1.0e6*0.01802*101325.0/(ThermodynamicConstantsInterface.R*288.15 diff --git a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationGFA.java b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationGFA.java index d1be3eecb..76c44ce6b 100644 --- a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationGFA.java +++ b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationGFA.java @@ -453,9 +453,10 @@ public static void main(String[] args) { /* * System.out.println("water in wet gas " + ((Stream) * operations.getUnit("water saturated feed gas")).getFluid() - * .getPhase(0).getComponent("water").getz() * 1.0e6 * 0.01802 * 101325.0 / - * (ThermodynamicConstantsInterface.R * 288.15)); System.out.println("water in dry gas " + - * ((Stream) operations.getUnit("dry gas from absorber")).getFluid() + * .getPhase(0).getComponent("water").getz() * 1.0e6 * 0.01802 + * *ThermodynamicConstantsInterface.atm / (ThermodynamicConstantsInterface.R * 288.15)); + * System.out.println("water in dry gas " + ((Stream) + * operations.getUnit("dry gas from absorber")).getFluid() * .getPhase(0).getComponent("water").getz() * 1.0e6); System.out.println("reboiler duty (KW) " * + ((Reboiler) ((DistillationColumn) * operations.getUnit("TEG regeneration column")).getReboiler()) .getDuty() / 1.0e3); @@ -480,13 +481,13 @@ public static void main(String[] args) { /* * double waterInWetGasppm = * waterSaturatedFeedGas.getFluid().getPhase(0).getComponent("water").getz() * 1.0e6; double - * waterInWetGaskgMSm3 = waterInWetGasppm * 0.01802 * 101325.0 / + * waterInWetGaskgMSm3 = waterInWetGasppm * 0.01802 *ThermodynamicConstantsInterface.atm / * (ThermodynamicConstantsInterface.R * 288.15); double TEGfeedwt = * TEGFeed.getFluid().getPhase("aqueous").getWtFrac("TEG"); double TEGfeedflw = * TEGFeed.getFlowRate("kg/hr"); double waterInDehydratedGasppm = * dehydratedGas.getFluid().getPhase(0).getComponent("water").getz() * 1.0e6; double - * waterInDryGaskgMSm3 = waterInDehydratedGasppm * 0.01802 * 101325.0 / - * (ThermodynamicConstantsInterface.R * 288.15); double richTEG2 = + * waterInDryGaskgMSm3 = waterInDehydratedGasppm * 0.01802 *ThermodynamicConstantsInterface.atm + * / (ThermodynamicConstantsInterface.R * 288.15); double richTEG2 = * richTEG.getFluid().getPhase("aqueous").getWtFrac("TEG"); double temp = * ((Stream)operations.getUnit("feed to TEG absorber")).getFluid().getPhase(0).getComponent( * "water").getz()*1.0e6*0.01802*101325.0/(ThermodynamicConstantsInterface.R*288.15); diff --git a/src/test/java/neqsim/thermo/util/example/HydrateFlash.java b/src/test/java/neqsim/thermo/util/example/HydrateFlash.java index 342860f53..29579bbd7 100644 --- a/src/test/java/neqsim/thermo/util/example/HydrateFlash.java +++ b/src/test/java/neqsim/thermo/util/example/HydrateFlash.java @@ -150,7 +150,8 @@ public static void main(String args[]) { // testSystem.display(); // System.out.println("kg vann/MSm^3 gas " + // (testSystem.getPhase(0).getComponent("water").getx() * - // testSystem.getPhase(0).getComponent("water").getMolarMass() * 101325.0 / + // testSystem.getPhase(0).getComponent("water").getMolarMass() + // *ThermodynamicConstantsInterface.atm / // ThermodynamicConstantsInterface.R / 288.15) * 1.0e6); // System.out.println("activity coef water " + // testSystem.getPhase(1).getActivityCoefficientSymetric(1)); diff --git a/src/test/java/neqsim/thermo/util/example/TPflashDehyd.java b/src/test/java/neqsim/thermo/util/example/TPflashDehyd.java index feed0754e..70bd2bf68 100644 --- a/src/test/java/neqsim/thermo/util/example/TPflashDehyd.java +++ b/src/test/java/neqsim/thermo/util/example/TPflashDehyd.java @@ -172,7 +172,7 @@ public static void main(String[] args) { * * * double solubility = testSystem.getPhase(1).getComponent("CO2").getx() * - * ThermodynamicConstantsInterface.R * 298.15 / 101325.0 / + * ThermodynamicConstantsInterface.R * 298.15 /ThermodynamicConstantsInterface.atm / * (testSystem.getPhase(1).getMolarMass()) * 1000; * * System.out.println("selectivity " + seletivity); System.out.println("CO2 solubility " +