diff --git a/src/main/java/neqsim/pvtsimulation/simulation/SaturationPressure.java b/src/main/java/neqsim/pvtsimulation/simulation/SaturationPressure.java index ef53f902d..a1c455e67 100644 --- a/src/main/java/neqsim/pvtsimulation/simulation/SaturationPressure.java +++ b/src/main/java/neqsim/pvtsimulation/simulation/SaturationPressure.java @@ -2,6 +2,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -91,6 +92,7 @@ public void run() { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { // SystemInterface tempSystem = new SystemSrkCPAstatoil(273.15 + 120, 100.0); SystemInterface tempSystem = new SystemSrkEos(273.15 + 120, 100.0); diff --git a/src/main/java/neqsim/pvtsimulation/simulation/SaturationTemperature.java b/src/main/java/neqsim/pvtsimulation/simulation/SaturationTemperature.java index 31854bd81..2e8734865 100644 --- a/src/main/java/neqsim/pvtsimulation/simulation/SaturationTemperature.java +++ b/src/main/java/neqsim/pvtsimulation/simulation/SaturationTemperature.java @@ -2,6 +2,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -81,6 +82,7 @@ public void run() { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { SystemInterface tempSystem = new SystemSrkEos(273.15 + 20, 60.0); tempSystem.addComponent("nitrogen", 0.34); diff --git a/src/main/java/neqsim/pvtsimulation/simulation/SeparatorTest.java b/src/main/java/neqsim/pvtsimulation/simulation/SeparatorTest.java index 6d928ba76..ae06d9eb0 100644 --- a/src/main/java/neqsim/pvtsimulation/simulation/SeparatorTest.java +++ b/src/main/java/neqsim/pvtsimulation/simulation/SeparatorTest.java @@ -6,6 +6,7 @@ import neqsim.thermo.phase.PhaseType; import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -100,6 +101,7 @@ && getThermoSystem().getPhase(0).getType() == PhaseType.GAS) { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { SystemInterface tempSystem = new SystemSrkEos(298.0, 300.0); tempSystem.addComponent("nitrogen", 0.64); diff --git a/src/main/java/neqsim/thermo/util/benchmark/TPflash_benchmark.java b/src/main/java/neqsim/thermo/util/benchmark/TPflash_benchmark.java index a5fa145bd..ce08e015a 100644 --- a/src/main/java/neqsim/thermo/util/benchmark/TPflash_benchmark.java +++ b/src/main/java/neqsim/thermo/util/benchmark/TPflash_benchmark.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -22,6 +23,7 @@ public class TPflash_benchmark { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkEos(303.15, 35.01325); // SystemInterface testSystem = new SystemSrkCPAstatoil(303.15, 10.0); diff --git a/src/main/java/neqsim/thermo/util/benchmark/TPflash_benchmark_UMR.java b/src/main/java/neqsim/thermo/util/benchmark/TPflash_benchmark_UMR.java index 5cb519e38..b80b1f33e 100644 --- a/src/main/java/neqsim/thermo/util/benchmark/TPflash_benchmark_UMR.java +++ b/src/main/java/neqsim/thermo/util/benchmark/TPflash_benchmark_UMR.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemUMRPRUMCEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -23,6 +24,7 @@ public class TPflash_benchmark_UMR { * @param args an array of {@link java.lang.String} objects */ @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { double[][] points; diff --git a/src/main/java/neqsim/thermo/util/empiric/BukacekWaterInGas.java b/src/main/java/neqsim/thermo/util/empiric/BukacekWaterInGas.java index 069591118..5ad9b2bdb 100644 --- a/src/main/java/neqsim/thermo/util/empiric/BukacekWaterInGas.java +++ b/src/main/java/neqsim/thermo/util/empiric/BukacekWaterInGas.java @@ -1,6 +1,7 @@ package neqsim.thermo.util.empiric; import neqsim.thermo.ThermodynamicConstantsInterface; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -76,6 +77,7 @@ public static double waterDewPointTemperature(double moleFractionWaterInGas, dou * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { System.out.println("water in gas " + BukacekWaterInGas.getWaterInGas(273.15 - 18.0, 70.0)); diff --git a/src/main/java/neqsim/thermodynamicoperations/phaseenvelopeops/multicomponentenvelopeops/SysNewtonRhapsonPhaseEnvelope2.java b/src/main/java/neqsim/thermodynamicoperations/phaseenvelopeops/multicomponentenvelopeops/SysNewtonRhapsonPhaseEnvelope2.java index 7ae497c7e..201ca9c18 100644 --- a/src/main/java/neqsim/thermodynamicoperations/phaseenvelopeops/multicomponentenvelopeops/SysNewtonRhapsonPhaseEnvelope2.java +++ b/src/main/java/neqsim/thermodynamicoperations/phaseenvelopeops/multicomponentenvelopeops/SysNewtonRhapsonPhaseEnvelope2.java @@ -8,6 +8,7 @@ import org.apache.logging.log4j.Logger; import neqsim.mathlib.nonlinearsolver.NewtonRhapson; import neqsim.thermo.system.SystemInterface; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -502,6 +503,7 @@ public void solve(int np) { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { /* * sysNewtonRhapson test=new sysNewtonRhapson(); double[] constants = new double[]{0.4,0.4}; diff --git a/src/test/java/neqsim/chemicalreactions/util/example/NaturalGasCombustion.java b/src/test/java/neqsim/chemicalreactions/util/example/NaturalGasCombustion.java index 3d03fb3e0..494f36a25 100644 --- a/src/test/java/neqsim/chemicalreactions/util/example/NaturalGasCombustion.java +++ b/src/test/java/neqsim/chemicalreactions/util/example/NaturalGasCombustion.java @@ -3,38 +3,44 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

NaturalGasCombustion class.

+ *

+ * NaturalGasCombustion class. + *

* * @author asmund * @version $Id: $Id * @since 2.2.3 */ -public class NaturalGasCombustion extends neqsim.NeqSimTest{ - /** - *

main.

- * - * @param args an array of {@link java.lang.String} objects - */ - @SuppressWarnings("unused") - public static void main(String[] args) { - SystemInterface testSystem = new SystemSrkEos(303.3, 2.8); +public class NaturalGasCombustion extends neqsim.NeqSimTest { + /** + *

+ * main. + *

+ * + * @param args an array of {@link java.lang.String} objects + */ + @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport + public static void main(String[] args) { + SystemInterface testSystem = new SystemSrkEos(303.3, 2.8); - testSystem.addComponent("methane", 5.0, "kg/sec"); - // testSystem.addComponent("nitrogen", 100.0, "kg/sec"); - testSystem.addComponent("oxygen", 40.0, "kg/sec"); - testSystem.chemicalReactionInit(); + testSystem.addComponent("methane", 5.0, "kg/sec"); + // testSystem.addComponent("nitrogen", 100.0, "kg/sec"); + testSystem.addComponent("oxygen", 40.0, "kg/sec"); + testSystem.chemicalReactionInit(); - testSystem.createDatabase(true); - testSystem.setMixingRule(2); - testSystem.init(0); - testSystem.setMaxNumberOfPhases(1); - testSystem.setNumberOfPhases(1); - testSystem.getChemicalReactionOperations().solveChemEq(0, 0); - // testSystem.getChemicalReactionOperations().solveChemEq(0,1); - testSystem.display(); - ThermodynamicOperations ops = new ThermodynamicOperations(testSystem); - // ops.compustionCalc(); - } + testSystem.createDatabase(true); + testSystem.setMixingRule(2); + testSystem.init(0); + testSystem.setMaxNumberOfPhases(1); + testSystem.setNumberOfPhases(1); + testSystem.getChemicalReactionOperations().solveChemEq(0, 0); + // testSystem.getChemicalReactionOperations().solveChemEq(0,1); + testSystem.display(); + ThermodynamicOperations ops = new ThermodynamicOperations(testSystem); + // ops.compustionCalc(); + } } diff --git a/src/test/java/neqsim/fluidmechanics/util/example/WettedWall_CO2_water.java b/src/test/java/neqsim/fluidmechanics/util/example/WettedWall_CO2_water.java index eb0cedb8e..9cdb8c1e3 100644 --- a/src/test/java/neqsim/fluidmechanics/util/example/WettedWall_CO2_water.java +++ b/src/test/java/neqsim/fluidmechanics/util/example/WettedWall_CO2_water.java @@ -7,6 +7,7 @@ import neqsim.process.processmodel.ProcessSystem; import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -23,6 +24,7 @@ public class WettedWall_CO2_water extends neqsim.NeqSimTest { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkEos((273.15 + 5.0), 45.00); testSystem.addComponent("methane", 0.15, 0); diff --git a/src/test/java/neqsim/physicalproperties/util/examples/TPflashTest.java b/src/test/java/neqsim/physicalproperties/util/examples/TPflashTest.java index ab2dfaadd..9a8b31f29 100644 --- a/src/test/java/neqsim/physicalproperties/util/examples/TPflashTest.java +++ b/src/test/java/neqsim/physicalproperties/util/examples/TPflashTest.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPAstatoil; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -26,6 +27,7 @@ public class TPflashTest { * @param args an array of {@link java.lang.String} objects */ @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkCPAstatoil(273.15 + 20, 30.0); // SystemInterface testSystem = new SystemSrkCPAstatoil(273.15+20, 1.0); diff --git a/src/test/java/neqsim/physicalproperties/util/examples/TPflashWater.java b/src/test/java/neqsim/physicalproperties/util/examples/TPflashWater.java index a35a7491a..af6d992d8 100644 --- a/src/test/java/neqsim/physicalproperties/util/examples/TPflashWater.java +++ b/src/test/java/neqsim/physicalproperties/util/examples/TPflashWater.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPAstatoil; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TPflashWater { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkCPAstatoil(273.15 + 40.0, 100.01325); ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); diff --git a/src/test/java/neqsim/physicalproperties/util/examples/TPflash_1.java b/src/test/java/neqsim/physicalproperties/util/examples/TPflash_1.java index 2b28644ae..ab0fc162a 100644 --- a/src/test/java/neqsim/physicalproperties/util/examples/TPflash_1.java +++ b/src/test/java/neqsim/physicalproperties/util/examples/TPflash_1.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TPflash_1 { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkEos(273.15 + 55, 100.0); ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); diff --git a/src/test/java/neqsim/physicalproperties/util/examples/TestCondensate.java b/src/test/java/neqsim/physicalproperties/util/examples/TestCondensate.java index 788b18039..24d68669f 100644 --- a/src/test/java/neqsim/physicalproperties/util/examples/TestCondensate.java +++ b/src/test/java/neqsim/physicalproperties/util/examples/TestCondensate.java @@ -7,6 +7,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemPrEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -27,6 +28,7 @@ public class TestCondensate { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { // SystemInterface testSystem = new SystemSrkEos(273.15 + 15.0, // ThermodynamicConstantsInterface.referencePressure); diff --git a/src/test/java/neqsim/physicalproperties/util/examples/TestDiffusionCoefficient.java b/src/test/java/neqsim/physicalproperties/util/examples/TestDiffusionCoefficient.java index 271649bd5..14acfe1ca 100644 --- a/src/test/java/neqsim/physicalproperties/util/examples/TestDiffusionCoefficient.java +++ b/src/test/java/neqsim/physicalproperties/util/examples/TestDiffusionCoefficient.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TestDiffusionCoefficient { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkEos(273.15 + 28.66, 12.2); testSystem.addComponent("nitrogen", 0.037); diff --git a/src/test/java/neqsim/physicalproperties/util/examples/TestSolidAdsorption.java b/src/test/java/neqsim/physicalproperties/util/examples/TestSolidAdsorption.java index 7ebd864b9..f05d52b8a 100644 --- a/src/test/java/neqsim/physicalproperties/util/examples/TestSolidAdsorption.java +++ b/src/test/java/neqsim/physicalproperties/util/examples/TestSolidAdsorption.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TestSolidAdsorption { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkEos(288.15, 1.4); testSystem.addComponent("methane", 1.0); diff --git a/src/test/java/neqsim/physicalproperties/util/examples/TestSurfaceTenison.java b/src/test/java/neqsim/physicalproperties/util/examples/TestSurfaceTenison.java index 2a825f352..76df911c0 100644 --- a/src/test/java/neqsim/physicalproperties/util/examples/TestSurfaceTenison.java +++ b/src/test/java/neqsim/physicalproperties/util/examples/TestSurfaceTenison.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TestSurfaceTenison { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkEos(273.15 + 28.66, 12.2); // SystemInterface testSystem = new SystemPrEos(273.15 + 10.0, 50.0); diff --git a/src/test/java/neqsim/physicalproperties/util/examples/TestSurfaceTension2.java b/src/test/java/neqsim/physicalproperties/util/examples/TestSurfaceTension2.java index c378dddd3..d1a3d0e97 100644 --- a/src/test/java/neqsim/physicalproperties/util/examples/TestSurfaceTension2.java +++ b/src/test/java/neqsim/physicalproperties/util/examples/TestSurfaceTension2.java @@ -3,59 +3,63 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

TestSurfaceTension2 class.

+ *

+ * TestSurfaceTension2 class. + *

* * @author ESOL * @version $Id: $Id * @since 2.2.3 */ public class TestSurfaceTension2 { - // John debug + // John debug - /** - *

- * main. - *

- * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String args[]) { - int gtmethod = 1; // 2; John changed + /** + *

+ * main. + *

+ * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + int gtmethod = 1; // 2; John changed - SystemInterface testSystem = new SystemSrkEos(445.0, 105); - testSystem.getCharacterization().setTBPModel("PedersenSRK"); - // testSystem.addComponent("nitrogen", 0.0); - // testSystem.addComponent("TEG", 3.0); - // testSystem.addComponent("CO2", 0); - testSystem.addComponent("methane", 28.13913); - testSystem.addComponent("ethane", 3.48); - testSystem.addComponent("propane", 1.64); - testSystem.addComponent("i-butane", 1.22); - testSystem.addComponent("n-butane", 6.86); - // testSystem.addComponent("i-pentane", 6.49); - testSystem.addComponent("n-pentane", 7.52); - // testSystem.addComponent("n-hexane", 0); - testSystem.addComponent("n-heptane", 13.16); - // testSystem.addComponent("n-octane", 12.64); - testSystem.addComponent("n-nonane", 7.13); + SystemInterface testSystem = new SystemSrkEos(445.0, 105); + testSystem.getCharacterization().setTBPModel("PedersenSRK"); + // testSystem.addComponent("nitrogen", 0.0); + // testSystem.addComponent("TEG", 3.0); + // testSystem.addComponent("CO2", 0); + testSystem.addComponent("methane", 28.13913); + testSystem.addComponent("ethane", 3.48); + testSystem.addComponent("propane", 1.64); + testSystem.addComponent("i-butane", 1.22); + testSystem.addComponent("n-butane", 6.86); + // testSystem.addComponent("i-pentane", 6.49); + testSystem.addComponent("n-pentane", 7.52); + // testSystem.addComponent("n-hexane", 0); + testSystem.addComponent("n-heptane", 13.16); + // testSystem.addComponent("n-octane", 12.64); + testSystem.addComponent("n-nonane", 7.13); - // testSystem.addTBPfraction("C10", 22.1, 230.3 / 1000.0, 0.859); - // testSystem.setHeavyTBPfractionAsPlusFraction(); - // testSystem.getCharacterization().characterisePlusFraction(); - testSystem.createDatabase(true); - testSystem.setMixingRule(2); - testSystem.useVolumeCorrection(true); - testSystem.init(0); - testSystem.setMultiPhaseCheck(true); - testSystem.getInterphaseProperties().setInterfacialTensionModel(gtmethod); // GT == 1, LGT=2 + // testSystem.addTBPfraction("C10", 22.1, 230.3 / 1000.0, 0.859); + // testSystem.setHeavyTBPfractionAsPlusFraction(); + // testSystem.getCharacterization().characterisePlusFraction(); + testSystem.createDatabase(true); + testSystem.setMixingRule(2); + testSystem.useVolumeCorrection(true); + testSystem.init(0); + testSystem.setMultiPhaseCheck(true); + testSystem.getInterphaseProperties().setInterfacialTensionModel(gtmethod); // GT == 1, LGT=2 - ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); - testOps.TPflash(); + ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); + testOps.TPflash(); - testSystem.display(); - testOps.calcPTphaseEnvelope(); - testOps.displayResult(); - } + testSystem.display(); + testOps.calcPTphaseEnvelope(); + testOps.displayResult(); + } } diff --git a/src/test/java/neqsim/physicalproperties/util/examples/TestSurfaceTensionOde.java b/src/test/java/neqsim/physicalproperties/util/examples/TestSurfaceTensionOde.java index b9163dd36..e0e0bdca0 100644 --- a/src/test/java/neqsim/physicalproperties/util/examples/TestSurfaceTensionOde.java +++ b/src/test/java/neqsim/physicalproperties/util/examples/TestSurfaceTensionOde.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -26,6 +27,7 @@ public class TestSurfaceTensionOde { * @param args an array of {@link java.lang.String} objects */ @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { double yscale; SystemInterface testSystem = new SystemSrkEos(273.15, 1.0); diff --git a/src/test/java/neqsim/process/util/example/LNGfilling.java b/src/test/java/neqsim/process/util/example/LNGfilling.java index 3496aea92..5565d576d 100644 --- a/src/test/java/neqsim/process/util/example/LNGfilling.java +++ b/src/test/java/neqsim/process/util/example/LNGfilling.java @@ -8,6 +8,7 @@ import neqsim.process.equipment.mixer.Mixer; import neqsim.process.equipment.stream.Stream; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -26,6 +27,7 @@ public class LNGfilling { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { neqsim.thermo.system.SystemInterface testSystem = new neqsim.thermo.system.SystemSrkEos((273.15 - 163.0), 1.000); diff --git a/src/test/java/neqsim/process/util/example/LNGfilling2.java b/src/test/java/neqsim/process/util/example/LNGfilling2.java index 8383eed6e..4570431d2 100644 --- a/src/test/java/neqsim/process/util/example/LNGfilling2.java +++ b/src/test/java/neqsim/process/util/example/LNGfilling2.java @@ -3,59 +3,65 @@ import neqsim.process.equipment.stream.Stream; import neqsim.process.equipment.stream.StreamInterface; import neqsim.process.equipment.tank.Tank; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

LNGfilling2 class.

+ *

+ * LNGfilling2 class. + *

* * @author ESOL * @version $Id: $Id * @since 2.2.3 */ public class LNGfilling2 { - /** - *

main.

- * - * @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 - 150.3), 1.02); - testSystem.addComponent("nitrogen", 0.1e-6); - testSystem.addComponent("methane", 90e-6); - testSystem.addComponent("ethane", 5e-6); - testSystem.addComponent("propane", 3e-6); - testSystem.addComponent("i-butane", 3e-6); - testSystem.addComponent("n-butane", 3e-6); - - testSystem.createDatabase(true); - testSystem.setMixingRule(2); - - neqsim.thermodynamicoperations.ThermodynamicOperations ops = - new neqsim.thermodynamicoperations.ThermodynamicOperations(testSystem); - ops.TPflash(); - testSystem.display(); - - Stream stream_1 = new Stream("Methane Stream", testSystem); - - Tank tank = new neqsim.process.equipment.tank.Tank("tank"); - tank.addStream(stream_1); - - StreamInterface liqstream = tank.getLiquidOutStream(); - - neqsim.process.processmodel.ProcessSystem operations = - new neqsim.process.processmodel.ProcessSystem(); - operations.add(stream_1); - operations.add(tank); - operations.add(liqstream); - operations.run(); - operations.displayResult(); - - operations.setTimeStep(1); - stream_1.getThermoSystem().setTotalNumberOfMoles(1e-10); - tank.getGasOutStream().getThermoSystem().setTotalNumberOfMoles(1e-6); - tank.getLiquidOutStream().getThermoSystem().setTotalNumberOfMoles(0.000001); - - operations.runTransient(1); - // operations.displayResult(); - } + /** + *

+ * main. + *

+ * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + neqsim.thermo.system.SystemInterface testSystem = + new neqsim.thermo.system.SystemSrkEos((273.15 - 150.3), 1.02); + testSystem.addComponent("nitrogen", 0.1e-6); + testSystem.addComponent("methane", 90e-6); + testSystem.addComponent("ethane", 5e-6); + testSystem.addComponent("propane", 3e-6); + testSystem.addComponent("i-butane", 3e-6); + testSystem.addComponent("n-butane", 3e-6); + + testSystem.createDatabase(true); + testSystem.setMixingRule(2); + + neqsim.thermodynamicoperations.ThermodynamicOperations ops = + new neqsim.thermodynamicoperations.ThermodynamicOperations(testSystem); + ops.TPflash(); + testSystem.display(); + + Stream stream_1 = new Stream("Methane Stream", testSystem); + + Tank tank = new neqsim.process.equipment.tank.Tank("tank"); + tank.addStream(stream_1); + + StreamInterface liqstream = tank.getLiquidOutStream(); + + neqsim.process.processmodel.ProcessSystem operations = + new neqsim.process.processmodel.ProcessSystem(); + operations.add(stream_1); + operations.add(tank); + operations.add(liqstream); + operations.run(); + operations.displayResult(); + + operations.setTimeStep(1); + stream_1.getThermoSystem().setTotalNumberOfMoles(1e-10); + tank.getGasOutStream().getThermoSystem().setTotalNumberOfMoles(1e-6); + tank.getLiquidOutStream().getThermoSystem().setTotalNumberOfMoles(0.000001); + + operations.runTransient(1); + // operations.displayResult(); + } } diff --git a/src/test/java/neqsim/process/util/example/LNGtankfilling.java b/src/test/java/neqsim/process/util/example/LNGtankfilling.java index 5b0d42ad6..cdc52d7af 100644 --- a/src/test/java/neqsim/process/util/example/LNGtankfilling.java +++ b/src/test/java/neqsim/process/util/example/LNGtankfilling.java @@ -7,183 +7,187 @@ import neqsim.process.measurementdevice.PressureTransmitter; import neqsim.process.measurementdevice.TemperatureTransmitter; import neqsim.thermo.ThermodynamicConstantsInterface; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

LNGtankfilling class.

+ *

+ * LNGtankfilling class. + *

* * @author ESOL * @version $Id: $Id * @since 2.2.3 */ public class LNGtankfilling { - /** - *

main.

- * - * @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), 1.02); - double total1 = 9.5; - testSystem.addComponent("nitrogen", total1 * 429.9 / (16.0 / 1000.0) / 3600.0); - testSystem.addComponent("methane", - total1 / 1.0e5 * 0.970934 * 429.9 / (16.0 / 1000.0) / 3600.0); - testSystem.addComponent("ethane", - total1 / 1.0e5 * 0.02432 * 429.9 / (16.0 / 1000.0) / 3600.0); - testSystem.addComponent("propane", - total1 / 1.0e5 * 0.003646 * 429.9 / (16.0 / 1000.0) / 3600.0); - testSystem.addComponent("i-butane", - total1 / 1.0e5 * 0.000641 * 429.9 / (16.0 / 1000.0) / 3600.0); - testSystem.addComponent("n-butane", - total1 / 1.0e5 * 0.000406 * 429.9 / (16.0 / 1000.0) / 3600.0); - - testSystem.createDatabase(true); - testSystem.setMixingRule(2); - - neqsim.thermo.system.SystemInterface testSystem2 = - new neqsim.thermo.system.SystemSrkEos((273.15 - 165.0), 7.2); - total1 = 9.5; - testSystem2.addComponent("nitrogen", total1 * 0.000122 * 429.9 / (16.0 / 1000.0) / 3600.0); - testSystem2.addComponent("methane", total1 * 0.970934 * 429.9 / (16.0 / 1000.0) / 3600.0); - testSystem2.addComponent("ethane", total1 * 0.02432 * 429.9 / (16.0 / 1000.0) / 3600.0); - testSystem2.addComponent("propane", total1 * 0.003646 * 429.9 / (16.0 / 1000.0) / 3600.0); - testSystem2.addComponent("i-butane", total1 * 0.000641 * 429.9 / (16.0 / 1000.0) / 3600.0); - testSystem2.addComponent("n-butane", total1 * 0.000406 * 429.9 / (16.0 / 1000.0) / 3600.0); - - testSystem2.createDatabase(true); - testSystem2.setMixingRule(2); - - neqsim.thermodynamicoperations.ThermodynamicOperations ops = - new neqsim.thermodynamicoperations.ThermodynamicOperations(testSystem); - ops.TPflash(); - testSystem.display(); - - Stream stream_1 = new Stream("Methane Stream", testSystem); - - ValveInterface valve = new ThrottlingValve("valve", stream_1); - valve.setOutletPressure(ThermodynamicConstantsInterface.referencePressure + 0.110); - - Tank tank = new neqsim.process.equipment.tank.Tank("tank"); - tank.addStream(valve.getOutletStream()); - // tank.addStream(stream_2); - - ValveInterface valve2 = new ThrottlingValve("valve2", tank.getGasOutStream()); - valve2.setOutletPressure(0.9); - - PressureTransmitter tankPressureTransmitter = - new PressureTransmitter(tank.getGasOutStream()); - tankPressureTransmitter.setUnit("bar"); - tankPressureTransmitter.setMaximumValue(1.2); - tankPressureTransmitter.setMinimumValue(0.9); - - TemperatureTransmitter tankTemperatureTransmitter = - new TemperatureTransmitter(tank.getGasOutStream()); - tankTemperatureTransmitter.setUnit("K"); - tankTemperatureTransmitter.setMaximumValue(0.0); - tankTemperatureTransmitter.setMinimumValue(400.0); - - // ControllerDeviceInterface pressureController = new ControllerDeviceBaseClass(); - // pressureController.setTransmitter(tankPressureTransmitter); - // pressureController.setReverseActing(false); - // pressureController.setControllerSetPoint(ThermodynamicConstantsInterface.referencePressure+0.110); - // pressureController.setControllerParameters(2.0,400,0); - - neqsim.process.processmodel.ProcessSystem operations = - new neqsim.process.processmodel.ProcessSystem(); - operations.add(stream_1); - operations.add(valve); - operations.add(tank); - operations.add(valve2); - - operations.add(tankPressureTransmitter); - // valve2.setController(pressureController); - - operations.add(tankTemperatureTransmitter); - - operations.run(); - // operations.displayResult(); - - valve2.setCv(100.0); - - operations.setTimeStep(10); - - stream_1.setThermoSystem(testSystem2); - tank.getLiquidOutStream().getThermoSystem().setTotalNumberOfMoles(1.0e-10); - valve2.setPercentValveOpening(0); - - for (int i = 0; i < 100; i++) { - operations.runTransient(); - // operations.displayResult(); - if (i % 6 == 0) { - tank.displayResult(); - } - } - - operations.printLogFile("c:/temp3.txt"); - operations.setTimeStep(10); - - for (int i = 0; i < 100; i++) { - operations.runTransient(); - // operations.displayResult(); - if (i % 6 == 0) { - tank.displayResult(); - } - } - - operations.printLogFile("c:/temp4.txt"); - - operations.setTimeStep(10); - - for (int i = 0; i < 100; i++) { - operations.runTransient(); - // operations.displayResult(); - if (i % 6 == 0) { - tank.displayResult(); - } - } - - operations.printLogFile("c:/temp5.txt"); - - operations.setTimeStep(10); - - for (int i = 0; i < 100; i++) { - operations.runTransient(); - // operations.displayResult(); - if (i % 6 == 0) { - tank.displayResult(); - } - } - - operations.printLogFile("c:/temp6.txt"); - - for (int i = 0; i < 100; i++) { - operations.runTransient(); - // operations.displayResult(); - if (i % 6 == 0) { - tank.displayResult(); - } - } - - operations.printLogFile("c:/temp7.txt"); - - for (int i = 0; i < 100; i++) { - operations.runTransient(); - // operations.displayResult(); - if (i % 6 == 0) { - tank.displayResult(); - } - } - - operations.printLogFile("c:/temp8.txt"); - - for (int i = 0; i < 100; i++) { - operations.runTransient(); - // operations.displayResult(); - if (i % 6 == 0) { - tank.displayResult(); - } - } - - operations.printLogFile("c:/temp9.txt"); + /** + *

+ * main. + *

+ * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + neqsim.thermo.system.SystemInterface testSystem = + new neqsim.thermo.system.SystemSrkEos((273.15 + 0.0), 1.02); + double total1 = 9.5; + testSystem.addComponent("nitrogen", total1 * 429.9 / (16.0 / 1000.0) / 3600.0); + testSystem.addComponent("methane", + total1 / 1.0e5 * 0.970934 * 429.9 / (16.0 / 1000.0) / 3600.0); + testSystem.addComponent("ethane", total1 / 1.0e5 * 0.02432 * 429.9 / (16.0 / 1000.0) / 3600.0); + testSystem.addComponent("propane", + total1 / 1.0e5 * 0.003646 * 429.9 / (16.0 / 1000.0) / 3600.0); + testSystem.addComponent("i-butane", + total1 / 1.0e5 * 0.000641 * 429.9 / (16.0 / 1000.0) / 3600.0); + testSystem.addComponent("n-butane", + total1 / 1.0e5 * 0.000406 * 429.9 / (16.0 / 1000.0) / 3600.0); + + testSystem.createDatabase(true); + testSystem.setMixingRule(2); + + neqsim.thermo.system.SystemInterface testSystem2 = + new neqsim.thermo.system.SystemSrkEos((273.15 - 165.0), 7.2); + total1 = 9.5; + testSystem2.addComponent("nitrogen", total1 * 0.000122 * 429.9 / (16.0 / 1000.0) / 3600.0); + testSystem2.addComponent("methane", total1 * 0.970934 * 429.9 / (16.0 / 1000.0) / 3600.0); + testSystem2.addComponent("ethane", total1 * 0.02432 * 429.9 / (16.0 / 1000.0) / 3600.0); + testSystem2.addComponent("propane", total1 * 0.003646 * 429.9 / (16.0 / 1000.0) / 3600.0); + testSystem2.addComponent("i-butane", total1 * 0.000641 * 429.9 / (16.0 / 1000.0) / 3600.0); + testSystem2.addComponent("n-butane", total1 * 0.000406 * 429.9 / (16.0 / 1000.0) / 3600.0); + + testSystem2.createDatabase(true); + testSystem2.setMixingRule(2); + + neqsim.thermodynamicoperations.ThermodynamicOperations ops = + new neqsim.thermodynamicoperations.ThermodynamicOperations(testSystem); + ops.TPflash(); + testSystem.display(); + + Stream stream_1 = new Stream("Methane Stream", testSystem); + + ValveInterface valve = new ThrottlingValve("valve", stream_1); + valve.setOutletPressure(ThermodynamicConstantsInterface.referencePressure + 0.110); + + Tank tank = new neqsim.process.equipment.tank.Tank("tank"); + tank.addStream(valve.getOutletStream()); + // tank.addStream(stream_2); + + ValveInterface valve2 = new ThrottlingValve("valve2", tank.getGasOutStream()); + valve2.setOutletPressure(0.9); + + PressureTransmitter tankPressureTransmitter = new PressureTransmitter(tank.getGasOutStream()); + tankPressureTransmitter.setUnit("bar"); + tankPressureTransmitter.setMaximumValue(1.2); + tankPressureTransmitter.setMinimumValue(0.9); + + TemperatureTransmitter tankTemperatureTransmitter = + new TemperatureTransmitter(tank.getGasOutStream()); + tankTemperatureTransmitter.setUnit("K"); + tankTemperatureTransmitter.setMaximumValue(0.0); + tankTemperatureTransmitter.setMinimumValue(400.0); + + // ControllerDeviceInterface pressureController = new ControllerDeviceBaseClass(); + // pressureController.setTransmitter(tankPressureTransmitter); + // pressureController.setReverseActing(false); + // pressureController.setControllerSetPoint(ThermodynamicConstantsInterface.referencePressure+0.110); + // pressureController.setControllerParameters(2.0,400,0); + + neqsim.process.processmodel.ProcessSystem operations = + new neqsim.process.processmodel.ProcessSystem(); + operations.add(stream_1); + operations.add(valve); + operations.add(tank); + operations.add(valve2); + + operations.add(tankPressureTransmitter); + // valve2.setController(pressureController); + + operations.add(tankTemperatureTransmitter); + + operations.run(); + // operations.displayResult(); + + valve2.setCv(100.0); + + operations.setTimeStep(10); + + stream_1.setThermoSystem(testSystem2); + tank.getLiquidOutStream().getThermoSystem().setTotalNumberOfMoles(1.0e-10); + valve2.setPercentValveOpening(0); + + for (int i = 0; i < 100; i++) { + operations.runTransient(); + // operations.displayResult(); + if (i % 6 == 0) { + tank.displayResult(); + } } + + operations.printLogFile("c:/temp3.txt"); + operations.setTimeStep(10); + + for (int i = 0; i < 100; i++) { + operations.runTransient(); + // operations.displayResult(); + if (i % 6 == 0) { + tank.displayResult(); + } + } + + operations.printLogFile("c:/temp4.txt"); + + operations.setTimeStep(10); + + for (int i = 0; i < 100; i++) { + operations.runTransient(); + // operations.displayResult(); + if (i % 6 == 0) { + tank.displayResult(); + } + } + + operations.printLogFile("c:/temp5.txt"); + + operations.setTimeStep(10); + + for (int i = 0; i < 100; i++) { + operations.runTransient(); + // operations.displayResult(); + if (i % 6 == 0) { + tank.displayResult(); + } + } + + operations.printLogFile("c:/temp6.txt"); + + for (int i = 0; i < 100; i++) { + operations.runTransient(); + // operations.displayResult(); + if (i % 6 == 0) { + tank.displayResult(); + } + } + + operations.printLogFile("c:/temp7.txt"); + + for (int i = 0; i < 100; i++) { + operations.runTransient(); + // operations.displayResult(); + if (i % 6 == 0) { + tank.displayResult(); + } + } + + operations.printLogFile("c:/temp8.txt"); + + for (int i = 0; i < 100; i++) { + operations.runTransient(); + // operations.displayResult(); + if (i % 6 == 0) { + tank.displayResult(); + } + } + + operations.printLogFile("c:/temp9.txt"); + } } diff --git a/src/test/java/neqsim/process/util/example/MEGinjection.java b/src/test/java/neqsim/process/util/example/MEGinjection.java index ac751d3ba..7839e97b6 100644 --- a/src/test/java/neqsim/process/util/example/MEGinjection.java +++ b/src/test/java/neqsim/process/util/example/MEGinjection.java @@ -7,6 +7,7 @@ import neqsim.process.equipment.stream.Stream; import neqsim.process.equipment.util.Adjuster; import neqsim.process.equipment.valve.ThrottlingValve; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class MEGinjection { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { // Create the input fluid to the TEG process and saturate it with water at // scrubber conditions diff --git a/src/test/java/neqsim/process/util/example/MasstransferMeOH.java b/src/test/java/neqsim/process/util/example/MasstransferMeOH.java index 9f2283f59..9542deccf 100644 --- a/src/test/java/neqsim/process/util/example/MasstransferMeOH.java +++ b/src/test/java/neqsim/process/util/example/MasstransferMeOH.java @@ -6,6 +6,7 @@ import neqsim.process.equipment.stream.Stream; import neqsim.process.equipment.util.StreamSaturatorUtil; import neqsim.thermo.ThermodynamicConstantsInterface; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -24,6 +25,7 @@ public class MasstransferMeOH { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { // Create the input fluid to the TEG process and saturate it with water at // scrubber conditions @@ -60,8 +62,8 @@ public static void main(String[] args) { mainMixer.addStream(MeOHFeed); neqsim.process.equipment.util.NeqSimUnit pipeline = - new neqsim.process.equipment.util.NeqSimUnit(mainMixer.getOutletStream(), - "pipeline", "stratified"); + new neqsim.process.equipment.util.NeqSimUnit(mainMixer.getOutletStream(), "pipeline", + "stratified"); pipeline.setLength(123.01); GasScrubber scrubber = new GasScrubber("gas scrub", pipeline.getOutletStream()); diff --git a/src/test/java/neqsim/process/util/example/OffshoreProcess.java b/src/test/java/neqsim/process/util/example/OffshoreProcess.java index 1cfe3db17..0e73b1ce6 100644 --- a/src/test/java/neqsim/process/util/example/OffshoreProcess.java +++ b/src/test/java/neqsim/process/util/example/OffshoreProcess.java @@ -9,129 +9,133 @@ import neqsim.process.equipment.stream.NeqStream; import neqsim.process.equipment.stream.Stream; import neqsim.process.equipment.stream.StreamInterface; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

OffshoreProcess class.

+ *

+ * OffshoreProcess class. + *

* * @author asmund * @version $Id: $Id * @since 2.2.3 */ public class OffshoreProcess { - /** - * This method is just meant to test the thermo package. - * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String args[]) { - double fakt = 1000.0 / 3600.0; - neqsim.thermo.system.SystemInterface testSystem = - new neqsim.thermo.system.SystemSrkEos((273.15 - 4.3), 90.2); - testSystem.addComponent("CO2", (152.6119 + 3513.5) * fakt); - testSystem.addComponent("nitrogen", (9.8305 + 765 + 6882) * fakt); - testSystem.addComponent("methane", (2799.24 + 109822.0) * fakt); - testSystem.addComponent("ethane", (833.76 + 12449.02) * fakt); - testSystem.addComponent("propane", (781.31 + 5930.5) * fakt); - testSystem.addComponent("i-butane", (172.97 + 799.91) * fakt); - testSystem.addComponent("n-butane", (351.05 + 1355.05) * fakt); - testSystem.addComponent("i-pentane", (99.4368 + 234.68) * fakt); - testSystem.addComponent("n-pentane", (115.92 + 248.78) * fakt); - testSystem.addComponent("n-hexane", (42.3335 + 43.66) * fakt); - testSystem.addComponent("n-heptane", (15.0259 + 8.65) * fakt); - testSystem.addComponent("n-octane", (5.1311 + 1.635) * fakt); - - testSystem.addComponent("22-dim-C3", (6.3036 + 21.187) * fakt); - testSystem.addComponent("c-C5", (8.286 + 13.2836) * fakt); - testSystem.addComponent("2-m-C5", (50.3918 + 64.0821) * fakt); - testSystem.addComponent("c-C6", (45.4498 + 43.5072) * fakt); - testSystem.addComponent("benzene", (12.5589 + 113.24) * fakt); - testSystem.addComponent("2-M-C6", (17.5213 + 12.0841) * fakt); - testSystem.addComponent("3-M-C6", (35.58 + 20.804) * fakt); - - testSystem.addComponent("toluene", (14.5174 + 7.61) * fakt); - testSystem.addComponent("22-DM-C5", (7.57 + 2.86) * fakt); - testSystem.addComponent("M-cy-C5", (7.51 + 2.6357) * fakt); - - testSystem.addComponent("m-Xylene", (5.5397 + 1.36) * fakt); - testSystem.addComponent("2-M-C8", (2.8017 + 0.5818) * fakt); - testSystem.addComponent("n-nonane", (1.5738 + 0.258) * fakt); - - testSystem.addComponent("p-Xylene", (1.93 + 1.02) * fakt); - testSystem.addComponent("o-Xylene", (1.1343 + 0.27) * fakt); - - testSystem.addComponent("nC10", (1.5464 + 0.145) * fakt); - testSystem.addComponent("nC12", (0.2741 + 7.8295e-3) * fakt); - - testSystem.createDatabase(true); - testSystem.setMixingRule(2); - - Stream stream_1 = new Stream("Stream1", testSystem); - - Separator separator = new Separator("Separator 1", stream_1); - - StreamInterface stream_2 = separator.getGasOutStream(); - stream_2.setName("gas out stream"); - - StreamInterface stream_3 = separator.getLiquidOutStream(); - stream_2.setName("liquid out stream"); - - Compressor compressor1 = new Compressor("compressor1", stream_2); - compressor1.setOutletPressure(131.3); - - StreamInterface stream_4 = compressor1.getOutletStream(); - stream_4.setName("gas compressor out stream"); - - Compressor compressor2 = new Compressor("compressor2", stream_3); - compressor2.setOutletPressure(131.3); - - StreamInterface stream_5 = compressor2.getOutletStream(); - stream_5.setName("liquid compressor out stream"); - - Mixer mixer = new StaticPhaseMixer("Mixer 1"); - mixer.addStream(stream_4); - mixer.addStream(stream_5); - - NeqStream stream_6 = new NeqStream("after mixer stream", mixer.getOutletStream()); - - Pipeline pipe = new TwoPhasePipeLine("pipe", stream_6); - pipe.setOutputFileName("c:/tempAsgard.nc"); - pipe.setInitialFlowPattern("annular"); - int numberOfLegs = 1, numberOfNodesInLeg = 120; - double[] legHeights = {0, 0}; - double[] legPositions = {0.0, 74.0}; - double[] pipeDiameters = {1.02507588, 1.02507588}; - double[] outerTemperature = {275.0, 275.0}; - double[] pipeWallRoughness = {1e-5, 1e-5}; - pipe.setNumberOfLegs(numberOfLegs); - pipe.setNumberOfNodesInLeg(numberOfNodesInLeg); - pipe.setLegPositions(legPositions); - pipe.setHeightProfile(legHeights); - pipe.setPipeDiameters(pipeDiameters); - pipe.setPipeWallRoughness(pipeWallRoughness); - pipe.setOuterTemperatures(outerTemperature); - - pipe.setEquilibriumMassTransfer(false); - pipe.setEquilibriumHeatTransfer(false); - - neqsim.process.processmodel.ProcessSystem operations = - new neqsim.process.processmodel.ProcessSystem(); - operations.add(stream_1); - operations.add(separator); - operations.add(stream_2); - operations.add(stream_3); - operations.add(compressor1); - operations.add(stream_4); - operations.add(compressor2); - operations.add(stream_5); - operations.add(mixer); - operations.add(stream_6); - operations.add(pipe); - - operations.run(); - operations.displayResult(); - - // ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); - // testOps.calcPTphaseEnvelope(); - // testOps.displayResult(); - } + /** + * This method is just meant to test the thermo package. + * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + double fakt = 1000.0 / 3600.0; + neqsim.thermo.system.SystemInterface testSystem = + new neqsim.thermo.system.SystemSrkEos((273.15 - 4.3), 90.2); + testSystem.addComponent("CO2", (152.6119 + 3513.5) * fakt); + testSystem.addComponent("nitrogen", (9.8305 + 765 + 6882) * fakt); + testSystem.addComponent("methane", (2799.24 + 109822.0) * fakt); + testSystem.addComponent("ethane", (833.76 + 12449.02) * fakt); + testSystem.addComponent("propane", (781.31 + 5930.5) * fakt); + testSystem.addComponent("i-butane", (172.97 + 799.91) * fakt); + testSystem.addComponent("n-butane", (351.05 + 1355.05) * fakt); + testSystem.addComponent("i-pentane", (99.4368 + 234.68) * fakt); + testSystem.addComponent("n-pentane", (115.92 + 248.78) * fakt); + testSystem.addComponent("n-hexane", (42.3335 + 43.66) * fakt); + testSystem.addComponent("n-heptane", (15.0259 + 8.65) * fakt); + testSystem.addComponent("n-octane", (5.1311 + 1.635) * fakt); + + testSystem.addComponent("22-dim-C3", (6.3036 + 21.187) * fakt); + testSystem.addComponent("c-C5", (8.286 + 13.2836) * fakt); + testSystem.addComponent("2-m-C5", (50.3918 + 64.0821) * fakt); + testSystem.addComponent("c-C6", (45.4498 + 43.5072) * fakt); + testSystem.addComponent("benzene", (12.5589 + 113.24) * fakt); + testSystem.addComponent("2-M-C6", (17.5213 + 12.0841) * fakt); + testSystem.addComponent("3-M-C6", (35.58 + 20.804) * fakt); + + testSystem.addComponent("toluene", (14.5174 + 7.61) * fakt); + testSystem.addComponent("22-DM-C5", (7.57 + 2.86) * fakt); + testSystem.addComponent("M-cy-C5", (7.51 + 2.6357) * fakt); + + testSystem.addComponent("m-Xylene", (5.5397 + 1.36) * fakt); + testSystem.addComponent("2-M-C8", (2.8017 + 0.5818) * fakt); + testSystem.addComponent("n-nonane", (1.5738 + 0.258) * fakt); + + testSystem.addComponent("p-Xylene", (1.93 + 1.02) * fakt); + testSystem.addComponent("o-Xylene", (1.1343 + 0.27) * fakt); + + testSystem.addComponent("nC10", (1.5464 + 0.145) * fakt); + testSystem.addComponent("nC12", (0.2741 + 7.8295e-3) * fakt); + + testSystem.createDatabase(true); + testSystem.setMixingRule(2); + + Stream stream_1 = new Stream("Stream1", testSystem); + + Separator separator = new Separator("Separator 1", stream_1); + + StreamInterface stream_2 = separator.getGasOutStream(); + stream_2.setName("gas out stream"); + + StreamInterface stream_3 = separator.getLiquidOutStream(); + stream_2.setName("liquid out stream"); + + Compressor compressor1 = new Compressor("compressor1", stream_2); + compressor1.setOutletPressure(131.3); + + StreamInterface stream_4 = compressor1.getOutletStream(); + stream_4.setName("gas compressor out stream"); + + Compressor compressor2 = new Compressor("compressor2", stream_3); + compressor2.setOutletPressure(131.3); + + StreamInterface stream_5 = compressor2.getOutletStream(); + stream_5.setName("liquid compressor out stream"); + + Mixer mixer = new StaticPhaseMixer("Mixer 1"); + mixer.addStream(stream_4); + mixer.addStream(stream_5); + + NeqStream stream_6 = new NeqStream("after mixer stream", mixer.getOutletStream()); + + Pipeline pipe = new TwoPhasePipeLine("pipe", stream_6); + pipe.setOutputFileName("c:/tempAsgard.nc"); + pipe.setInitialFlowPattern("annular"); + int numberOfLegs = 1, numberOfNodesInLeg = 120; + double[] legHeights = {0, 0}; + double[] legPositions = {0.0, 74.0}; + double[] pipeDiameters = {1.02507588, 1.02507588}; + double[] outerTemperature = {275.0, 275.0}; + double[] pipeWallRoughness = {1e-5, 1e-5}; + pipe.setNumberOfLegs(numberOfLegs); + pipe.setNumberOfNodesInLeg(numberOfNodesInLeg); + pipe.setLegPositions(legPositions); + pipe.setHeightProfile(legHeights); + pipe.setPipeDiameters(pipeDiameters); + pipe.setPipeWallRoughness(pipeWallRoughness); + pipe.setOuterTemperatures(outerTemperature); + + pipe.setEquilibriumMassTransfer(false); + pipe.setEquilibriumHeatTransfer(false); + + neqsim.process.processmodel.ProcessSystem operations = + new neqsim.process.processmodel.ProcessSystem(); + operations.add(stream_1); + operations.add(separator); + operations.add(stream_2); + operations.add(stream_3); + operations.add(compressor1); + operations.add(stream_4); + operations.add(compressor2); + operations.add(stream_5); + operations.add(mixer); + operations.add(stream_6); + operations.add(pipe); + + operations.run(); + operations.displayResult(); + + // ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); + // testOps.calcPTphaseEnvelope(); + // testOps.displayResult(); + } } diff --git a/src/test/java/neqsim/process/util/example/OffshoreProcess2.java b/src/test/java/neqsim/process/util/example/OffshoreProcess2.java index fe6194d59..45d61a74e 100644 --- a/src/test/java/neqsim/process/util/example/OffshoreProcess2.java +++ b/src/test/java/neqsim/process/util/example/OffshoreProcess2.java @@ -8,86 +8,90 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPA; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

OffshoreProcess2 class.

+ *

+ * OffshoreProcess2 class. + *

* * @author asmund * @version $Id: $Id * @since 2.2.3 */ public class OffshoreProcess2 { - /** - * This method is just meant to test the thermo package. - * - * @param args an array of {@link java.lang.String} objects - */ - @SuppressWarnings("unused") - public static void main(String args[]) { - SystemInterface testSystem = new SystemSrkCPA(273.15 + 20.0, 31.0); - // SystemInterface testSystem = new SystemSrkSchwartzentruberEos(273.15+20.0, - // 31.0); - ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); + /** + * This method is just meant to test the thermo package. + * + * @param args an array of {@link java.lang.String} objects + */ + @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + SystemInterface testSystem = new SystemSrkCPA(273.15 + 20.0, 31.0); + // SystemInterface testSystem = new SystemSrkSchwartzentruberEos(273.15+20.0, + // 31.0); + ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); - testSystem.addComponent("nitrogen", 0.372); - testSystem.addComponent("CO2", 3.344); - testSystem.addComponent("methane", 82.224); - testSystem.addComponent("ethane", 6.812); - testSystem.addComponent("propane", 2.771); - testSystem.addComponent("i-butane", 0.434); - testSystem.addComponent("n-butane", 0.9); - testSystem.addComponent("n-pentane", 0.356); - testSystem.addComponent("i-pentane", 0.303); + testSystem.addComponent("nitrogen", 0.372); + testSystem.addComponent("CO2", 3.344); + testSystem.addComponent("methane", 82.224); + testSystem.addComponent("ethane", 6.812); + testSystem.addComponent("propane", 2.771); + testSystem.addComponent("i-butane", 0.434); + testSystem.addComponent("n-butane", 0.9); + testSystem.addComponent("n-pentane", 0.356); + testSystem.addComponent("i-pentane", 0.303); - testSystem.addTBPfraction("C6", 10.428, 86.178 / 1000.0, 0.664); - testSystem.addTBPfraction("C7", 0.626, 96.00 / 1000.0, 0.738); - testSystem.addTBPfraction("C8", 0.609, 107.00 / 1000.0, 0.7650); - testSystem.addTBPfraction("C9", 0.309, 121.00 / 1000.0, 0.781); - testSystem.addTBPfraction("C10-C11", 0.254, 140.09 / 1000.0, 0.7936); - testSystem.addTBPfraction("C12-C13", 0.137, 167.558 / 1000.0, 0.8082); - testSystem.addTBPfraction("C14-C15", 0.067, 197.395 / 1000.0, 0.8205); - testSystem.addTBPfraction("C16-C17", 0.03, 229.026 / 1000.0, 0.8313); - testSystem.addTBPfraction("C18-C20", 0.017, 261.991 / 1000.0, 0.8428); - testSystem.addTBPfraction("C21-C23", 0.005, 303.531 / 1000.0, 0.8551); - testSystem.addComponent("water", 1.0e-10); + testSystem.addTBPfraction("C6", 10.428, 86.178 / 1000.0, 0.664); + testSystem.addTBPfraction("C7", 0.626, 96.00 / 1000.0, 0.738); + testSystem.addTBPfraction("C8", 0.609, 107.00 / 1000.0, 0.7650); + testSystem.addTBPfraction("C9", 0.309, 121.00 / 1000.0, 0.781); + testSystem.addTBPfraction("C10-C11", 0.254, 140.09 / 1000.0, 0.7936); + testSystem.addTBPfraction("C12-C13", 0.137, 167.558 / 1000.0, 0.8082); + testSystem.addTBPfraction("C14-C15", 0.067, 197.395 / 1000.0, 0.8205); + testSystem.addTBPfraction("C16-C17", 0.03, 229.026 / 1000.0, 0.8313); + testSystem.addTBPfraction("C18-C20", 0.017, 261.991 / 1000.0, 0.8428); + testSystem.addTBPfraction("C21-C23", 0.005, 303.531 / 1000.0, 0.8551); + testSystem.addComponent("water", 1.0e-10); - testSystem.createDatabase(true); - testSystem.setMixingRule(7); + testSystem.createDatabase(true); + testSystem.setMixingRule(7); - SystemInterface testSystem2 = new SystemSrkCPA(273.15 + 20.0, 31.0); - testSystem2.addComponent("water", 10.0); - testSystem2.setMixingRule(7); + SystemInterface testSystem2 = new SystemSrkCPA(273.15 + 20.0, 31.0); + testSystem2.addComponent("water", 10.0); + testSystem2.setMixingRule(7); - Stream stream_1 = new Stream("Stream1", testSystem); + Stream stream_1 = new Stream("Stream1", testSystem); - Separator separator = new Separator("Separator 1", stream_1); + Separator separator = new Separator("Separator 1", stream_1); - StreamInterface stream_2 = separator.getGasOutStream(); - stream_2.setName("gas out stream"); + StreamInterface stream_2 = separator.getGasOutStream(); + stream_2.setName("gas out stream"); - StreamInterface stream_3 = separator.getLiquidOutStream(); - stream_3.setName("liquid out stream"); + StreamInterface stream_3 = separator.getLiquidOutStream(); + stream_3.setName("liquid out stream"); - Stream stream_4 = new Stream("water_stream", testSystem2); + Stream stream_4 = new Stream("water_stream", testSystem2); - Mixer mixer = new StaticPhaseMixer("Mixer 1"); - mixer.addStream(stream_2); - mixer.addStream(stream_4); + Mixer mixer = new StaticPhaseMixer("Mixer 1"); + mixer.addStream(stream_2); + mixer.addStream(stream_4); - neqsim.process.processmodel.ProcessSystem operations = - new neqsim.process.processmodel.ProcessSystem(); - operations.add(stream_1); - operations.add(separator); - operations.add(stream_2); - operations.add(stream_3); - operations.add(stream_4); - operations.add(mixer); + neqsim.process.processmodel.ProcessSystem operations = + new neqsim.process.processmodel.ProcessSystem(); + operations.add(stream_1); + operations.add(separator); + operations.add(stream_2); + operations.add(stream_3); + operations.add(stream_4); + operations.add(mixer); - operations.run(); - operations.displayResult(); + operations.run(); + operations.displayResult(); - // ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); - // testOps.calcPTphaseEnvelope(); - // testOps.displayResult(); - } + // ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); + // testOps.calcPTphaseEnvelope(); + // testOps.displayResult(); + } } diff --git a/src/test/java/neqsim/process/util/example/OffshoreProcess3.java b/src/test/java/neqsim/process/util/example/OffshoreProcess3.java index f9380ccf0..0ba262cb7 100644 --- a/src/test/java/neqsim/process/util/example/OffshoreProcess3.java +++ b/src/test/java/neqsim/process/util/example/OffshoreProcess3.java @@ -13,6 +13,7 @@ import neqsim.process.equipment.valve.ThrottlingValve; import neqsim.thermo.ThermodynamicConstantsInterface; import neqsim.thermo.system.SystemSrkEos; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -31,6 +32,7 @@ public class OffshoreProcess3 { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { neqsim.thermo.system.SystemInterface testSystem = new SystemSrkEos(354.2, 120.0); diff --git a/src/test/java/neqsim/process/util/example/OnshoreMEGprocess.java b/src/test/java/neqsim/process/util/example/OnshoreMEGprocess.java index ab76b002c..6082e8197 100644 --- a/src/test/java/neqsim/process/util/example/OnshoreMEGprocess.java +++ b/src/test/java/neqsim/process/util/example/OnshoreMEGprocess.java @@ -17,6 +17,7 @@ import neqsim.process.equipment.util.Recycle; import neqsim.process.equipment.util.StreamSaturatorUtil; import neqsim.process.equipment.valve.ThrottlingValve; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -35,6 +36,7 @@ public class OnshoreMEGprocess { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { neqsim.thermo.system.SystemInterface feedGas = new neqsim.thermo.system.SystemSrkCPAstatoil(273.15 + 42.0, 10.00); diff --git a/src/test/java/neqsim/process/util/example/OnshoreProcess1.java b/src/test/java/neqsim/process/util/example/OnshoreProcess1.java index b20a8f009..213617b11 100644 --- a/src/test/java/neqsim/process/util/example/OnshoreProcess1.java +++ b/src/test/java/neqsim/process/util/example/OnshoreProcess1.java @@ -16,6 +16,7 @@ import neqsim.process.measurementdevice.TemperatureTransmitter; import neqsim.process.measurementdevice.VolumeFlowTransmitter; import neqsim.process.measurementdevice.WaterContentAnalyser; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -35,6 +36,7 @@ public class OnshoreProcess1 { * @param args an array of {@link java.lang.String} objects */ @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { try { double totalProductionRate = 222.5808099 * 3600.0; // kg/time diff --git a/src/test/java/neqsim/process/util/example/TEGAbsorberTest.java b/src/test/java/neqsim/process/util/example/TEGAbsorberTest.java index 648fe7566..12e09f4ac 100644 --- a/src/test/java/neqsim/process/util/example/TEGAbsorberTest.java +++ b/src/test/java/neqsim/process/util/example/TEGAbsorberTest.java @@ -8,6 +8,7 @@ import neqsim.process.equipment.stream.Stream; import neqsim.process.equipment.stream.StreamInterface; import neqsim.process.equipment.valve.ThrottlingValve; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -19,107 +20,108 @@ * @since 2.2.3 */ public class TEGAbsorberTest { - /** - * This method is just meant to test the thermo package. - * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String args[]) { - neqsim.thermo.system.SystemSrkEos testSystem = - new neqsim.thermo.system.SystemSrkSchwartzentruberEos((273.15 + 20.0), 80.00); - testSystem.addComponent("methane", 120.00); - testSystem.addComponent("water", 0.1); - testSystem.addComponent("TEG", 1e-10); - testSystem.createDatabase(true); - testSystem.setMixingRule(2); - - neqsim.thermo.system.SystemSrkEos testSystem2 = - new neqsim.thermo.system.SystemSrkSchwartzentruberEos((273.15 + 20.0), 80.00); - testSystem2.addComponent("methane", 1e-10); - testSystem2.addComponent("water", 1e-9); - testSystem2.addComponent("TEG", 0.10); - testSystem2.setMixingRule(2); - - Stream fluidStreamIn = new Stream("stream to scrubber", testSystem); - - Separator gasScrubber = new GasScrubberSimple("gasInletScrubber", fluidStreamIn); - - Stream gasToAbsorber = new Stream("gas from scrubber", gasScrubber.getGasOutStream()); - - Stream TEGstreamIn = new Stream("TEGstreamIn", testSystem2); - - SimpleTEGAbsorber absorber = new SimpleTEGAbsorber("SimpleTEGAbsorber"); - absorber.addGasInStream(gasToAbsorber); - absorber.addSolventInStream(TEGstreamIn); - absorber.setNumberOfStages(5); - absorber.setStageEfficiency(0.5); - - Stream gasStreamOut = new Stream("gasStreamOut", absorber.getGasOutStream()); - - Stream TEGStreamOut = new Stream("TEGStreamOut", absorber.getSolventOutStream()); - - ThrottlingValve TEG_HPLP_valve = new ThrottlingValve("ventil", TEGStreamOut); - TEG_HPLP_valve.setOutletPressure(10.0); - - Separator MPseparator = new Separator("Separator_MP", TEG_HPLP_valve.getOutletStream()); - - StreamInterface MPstreamGas = MPseparator.getGasOutStream(); - MPstreamGas.setName("MPGasStream"); - - StreamInterface MPstreamLiq = MPseparator.getLiquidOutStream(); - MPstreamLiq.setName("MPLiqStream"); - - ThrottlingValve LP_valve = new ThrottlingValve("LPventil", MPstreamLiq); - LP_valve.setOutletPressure(1.5); - - ReBoiler reboiler = new ReBoiler("reboiler", LP_valve.getOutletStream()); - reboiler.setReboilerDuty(20000.0); - - neqsim.thermo.system.SystemSrkEos testSystem3 = - new neqsim.thermo.system.SystemSrkSchwartzentruberEos((273.15 + 20.0), 1.500); - testSystem3.addComponent("methane", 0.39); - testSystem3.addComponent("water", 1e-10); - testSystem3.addComponent("TEG", 1e-10); - testSystem3.createDatabase(true); - testSystem3.setMixingRule(2); - - Stream mixStream = new Stream("mixStream", testSystem3); - - Mixer mix = new Mixer("mixer"); - mix.addStream(reboiler.getOutletStream()); - mix.addStream(mixStream); - - StreamInterface ReboilLiqStream = mix.getOutletStream(); - ReboilLiqStream.setName("ReboilLiqStream"); - - // Stream ReboilGasStream = reboiler.getOutStream(); - // ReboilLiqStream.setName("ReboilLiqStream"); - - // processSimulation.processEquipment.absorber.SimpleGlycolAbsorber TEGabsorber = new - // processSimulation.processEquipment.absorber.SimpleGlycolAbsorber(gasStreamIn); - // TEGabsorber.setName("TEGabsorber"); - - neqsim.process.processmodel.ProcessSystem operations = - new neqsim.process.processmodel.ProcessSystem(); - operations.add(fluidStreamIn); - operations.add(gasScrubber); - operations.add(gasToAbsorber); - operations.add(TEGstreamIn); - operations.add(absorber); - operations.add(gasStreamOut); - operations.add(TEGStreamOut); - operations.add(TEG_HPLP_valve); - operations.add(MPseparator); - operations.add(MPstreamGas); - operations.add(MPstreamLiq); - operations.add(LP_valve); - operations.add(reboiler); - operations.add(mixStream); - operations.add(mix); - operations.add(ReboilLiqStream); - - operations.run(); - mix.displayResult(); - // operations.displayResult(); - } + /** + * This method is just meant to test the thermo package. + * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + neqsim.thermo.system.SystemSrkEos testSystem = + new neqsim.thermo.system.SystemSrkSchwartzentruberEos((273.15 + 20.0), 80.00); + testSystem.addComponent("methane", 120.00); + testSystem.addComponent("water", 0.1); + testSystem.addComponent("TEG", 1e-10); + testSystem.createDatabase(true); + testSystem.setMixingRule(2); + + neqsim.thermo.system.SystemSrkEos testSystem2 = + new neqsim.thermo.system.SystemSrkSchwartzentruberEos((273.15 + 20.0), 80.00); + testSystem2.addComponent("methane", 1e-10); + testSystem2.addComponent("water", 1e-9); + testSystem2.addComponent("TEG", 0.10); + testSystem2.setMixingRule(2); + + Stream fluidStreamIn = new Stream("stream to scrubber", testSystem); + + Separator gasScrubber = new GasScrubberSimple("gasInletScrubber", fluidStreamIn); + + Stream gasToAbsorber = new Stream("gas from scrubber", gasScrubber.getGasOutStream()); + + Stream TEGstreamIn = new Stream("TEGstreamIn", testSystem2); + + SimpleTEGAbsorber absorber = new SimpleTEGAbsorber("SimpleTEGAbsorber"); + absorber.addGasInStream(gasToAbsorber); + absorber.addSolventInStream(TEGstreamIn); + absorber.setNumberOfStages(5); + absorber.setStageEfficiency(0.5); + + Stream gasStreamOut = new Stream("gasStreamOut", absorber.getGasOutStream()); + + Stream TEGStreamOut = new Stream("TEGStreamOut", absorber.getSolventOutStream()); + + ThrottlingValve TEG_HPLP_valve = new ThrottlingValve("ventil", TEGStreamOut); + TEG_HPLP_valve.setOutletPressure(10.0); + + Separator MPseparator = new Separator("Separator_MP", TEG_HPLP_valve.getOutletStream()); + + StreamInterface MPstreamGas = MPseparator.getGasOutStream(); + MPstreamGas.setName("MPGasStream"); + + StreamInterface MPstreamLiq = MPseparator.getLiquidOutStream(); + MPstreamLiq.setName("MPLiqStream"); + + ThrottlingValve LP_valve = new ThrottlingValve("LPventil", MPstreamLiq); + LP_valve.setOutletPressure(1.5); + + ReBoiler reboiler = new ReBoiler("reboiler", LP_valve.getOutletStream()); + reboiler.setReboilerDuty(20000.0); + + neqsim.thermo.system.SystemSrkEos testSystem3 = + new neqsim.thermo.system.SystemSrkSchwartzentruberEos((273.15 + 20.0), 1.500); + testSystem3.addComponent("methane", 0.39); + testSystem3.addComponent("water", 1e-10); + testSystem3.addComponent("TEG", 1e-10); + testSystem3.createDatabase(true); + testSystem3.setMixingRule(2); + + Stream mixStream = new Stream("mixStream", testSystem3); + + Mixer mix = new Mixer("mixer"); + mix.addStream(reboiler.getOutletStream()); + mix.addStream(mixStream); + + StreamInterface ReboilLiqStream = mix.getOutletStream(); + ReboilLiqStream.setName("ReboilLiqStream"); + + // Stream ReboilGasStream = reboiler.getOutStream(); + // ReboilLiqStream.setName("ReboilLiqStream"); + + // processSimulation.processEquipment.absorber.SimpleGlycolAbsorber TEGabsorber = new + // processSimulation.processEquipment.absorber.SimpleGlycolAbsorber(gasStreamIn); + // TEGabsorber.setName("TEGabsorber"); + + neqsim.process.processmodel.ProcessSystem operations = + new neqsim.process.processmodel.ProcessSystem(); + operations.add(fluidStreamIn); + operations.add(gasScrubber); + operations.add(gasToAbsorber); + operations.add(TEGstreamIn); + operations.add(absorber); + operations.add(gasStreamOut); + operations.add(TEGStreamOut); + operations.add(TEG_HPLP_valve); + operations.add(MPseparator); + operations.add(MPstreamGas); + operations.add(MPstreamLiq); + operations.add(LP_valve); + operations.add(reboiler); + operations.add(mixStream); + operations.add(mix); + operations.add(ReboilLiqStream); + + operations.run(); + mix.displayResult(); + // operations.displayResult(); + } } diff --git a/src/test/java/neqsim/process/util/example/TEGdehydrationProcess2.java b/src/test/java/neqsim/process/util/example/TEGdehydrationProcess2.java index 839b1b28d..7c56f8049 100644 --- a/src/test/java/neqsim/process/util/example/TEGdehydrationProcess2.java +++ b/src/test/java/neqsim/process/util/example/TEGdehydrationProcess2.java @@ -12,6 +12,7 @@ import neqsim.process.equipment.util.Recycle; import neqsim.process.equipment.util.StreamSaturatorUtil; import neqsim.process.equipment.valve.ThrottlingValve; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -30,6 +31,7 @@ public class TEGdehydrationProcess2 { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { // Create the input fluid to the TEG process and saturate it with water at // scrubber conditions diff --git a/src/test/java/neqsim/process/util/example/TEGdehydrationProcessDistillation.java b/src/test/java/neqsim/process/util/example/TEGdehydrationProcessDistillation.java index 35b3ad947..aaa6822be 100644 --- a/src/test/java/neqsim/process/util/example/TEGdehydrationProcessDistillation.java +++ b/src/test/java/neqsim/process/util/example/TEGdehydrationProcessDistillation.java @@ -16,6 +16,7 @@ import neqsim.process.equipment.util.StreamSaturatorUtil; import neqsim.process.equipment.valve.ThrottlingValve; import neqsim.thermo.ThermodynamicConstantsInterface; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -35,6 +36,7 @@ public class TEGdehydrationProcessDistillation { * @param args an array of {@link java.lang.String} objects */ @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { // Create the input fluid to the TEG process and saturate it with water at // scrubber conditions diff --git a/src/test/java/neqsim/process/util/example/TEGdehydrationProcessDistillation3.java b/src/test/java/neqsim/process/util/example/TEGdehydrationProcessDistillation3.java index db417d9e9..4360e43d3 100644 --- a/src/test/java/neqsim/process/util/example/TEGdehydrationProcessDistillation3.java +++ b/src/test/java/neqsim/process/util/example/TEGdehydrationProcessDistillation3.java @@ -16,6 +16,7 @@ import neqsim.process.equipment.util.StreamSaturatorUtil; import neqsim.process.equipment.valve.ThrottlingValve; import neqsim.thermo.ThermodynamicConstantsInterface; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -35,6 +36,7 @@ public class TEGdehydrationProcessDistillation3 { * @param args an array of {@link java.lang.String} objects */ @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { // Create the input fluid to the TEG process and saturate it with water at // scrubber conditions diff --git a/src/test/java/neqsim/process/util/example/TEGdehydrationProcessDistillationAaHa.java b/src/test/java/neqsim/process/util/example/TEGdehydrationProcessDistillationAaHa.java index 8e299aa20..26e8e9c9f 100644 --- a/src/test/java/neqsim/process/util/example/TEGdehydrationProcessDistillationAaHa.java +++ b/src/test/java/neqsim/process/util/example/TEGdehydrationProcessDistillationAaHa.java @@ -18,6 +18,7 @@ import neqsim.process.equipment.valve.ThrottlingValve; import neqsim.process.measurementdevice.HydrateEquilibriumTemperatureAnalyser; import neqsim.thermo.ThermodynamicConstantsInterface; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -285,6 +286,7 @@ public static neqsim.process.processmodel.ProcessSystem getProcess() { * @param args an array of {@link java.lang.String} objects */ @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { neqsim.process.processmodel.ProcessSystem operations = TEGdehydrationProcessDistillationAaHa.getProcess(); diff --git a/src/test/java/neqsim/process/util/example/TEGdehydrationProcessDistillationGFA.java b/src/test/java/neqsim/process/util/example/TEGdehydrationProcessDistillationGFA.java index 15c91e3f0..445a52858 100644 --- a/src/test/java/neqsim/process/util/example/TEGdehydrationProcessDistillationGFA.java +++ b/src/test/java/neqsim/process/util/example/TEGdehydrationProcessDistillationGFA.java @@ -20,6 +20,7 @@ import neqsim.process.equipment.valve.ThrottlingValve; import neqsim.process.measurementdevice.HydrateEquilibriumTemperatureAnalyser; import neqsim.process.measurementdevice.WaterDewPointAnalyser; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -399,6 +400,7 @@ public neqsim.process.processmodel.ProcessSystem getProcess() { * @param args an array of {@link java.lang.String} objects */ @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { TEGdehydrationProcessDistillationGFA tempClass = new TEGdehydrationProcessDistillationGFA(); neqsim.process.processmodel.ProcessSystem operations = tempClass.getProcess(); diff --git a/src/test/java/neqsim/process/util/example/TEGdehydrationProcessDistillationJS.java b/src/test/java/neqsim/process/util/example/TEGdehydrationProcessDistillationJS.java index 1b6c180cf..b440f2926 100644 --- a/src/test/java/neqsim/process/util/example/TEGdehydrationProcessDistillationJS.java +++ b/src/test/java/neqsim/process/util/example/TEGdehydrationProcessDistillationJS.java @@ -16,6 +16,7 @@ import neqsim.process.equipment.util.StreamSaturatorUtil; import neqsim.process.equipment.valve.ThrottlingValve; import neqsim.process.measurementdevice.HydrateEquilibriumTemperatureAnalyser; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -406,6 +407,7 @@ public neqsim.process.processmodel.ProcessSystem getProcess() { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { TEGdehydrationProcessDistillationJS tempClass = new TEGdehydrationProcessDistillationJS(); neqsim.process.processmodel.ProcessSystem operations = tempClass.getProcess(); diff --git a/src/test/java/neqsim/process/util/example/TEGstripperProcess.java b/src/test/java/neqsim/process/util/example/TEGstripperProcess.java index d6cc4f79d..e10c4d179 100644 --- a/src/test/java/neqsim/process/util/example/TEGstripperProcess.java +++ b/src/test/java/neqsim/process/util/example/TEGstripperProcess.java @@ -2,6 +2,7 @@ import neqsim.process.equipment.absorber.WaterStripperColumn; import neqsim.process.equipment.stream.Stream; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -13,66 +14,67 @@ * @since 2.2.3 */ public class TEGstripperProcess { - /** - *

- * main. - *

- * - * @param args an array of {@link java.lang.String} objects - */ - @SuppressWarnings("unused") - public static void main(String[] args) { - neqsim.thermo.system.SystemInterface feedGas = - new neqsim.thermo.system.SystemSrkCPAstatoil(273.15 + 42.0, 10.00); - feedGas.addComponent("nitrogen", 1.03); - feedGas.addComponent("CO2", 1.42); - feedGas.addComponent("methane", 83.88); - feedGas.addComponent("ethane", 8.07); - feedGas.addComponent("propane", 3.54); - feedGas.addComponent("i-butane", 0.54); - feedGas.addComponent("n-butane", 0.84); - feedGas.addComponent("i-pentane", 0.21); - feedGas.addComponent("n-pentane", 0.19); - feedGas.addComponent("n-hexane", 0.28); - feedGas.addComponent("water", 0.0); - feedGas.addComponent("TEG", 0); - feedGas.createDatabase(true); - feedGas.setMixingRule(10); - feedGas.setMultiPhaseCheck(true); + /** + *

+ * main. + *

+ * + * @param args an array of {@link java.lang.String} objects + */ + @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport + public static void main(String[] args) { + neqsim.thermo.system.SystemInterface feedGas = + new neqsim.thermo.system.SystemSrkCPAstatoil(273.15 + 42.0, 10.00); + feedGas.addComponent("nitrogen", 1.03); + feedGas.addComponent("CO2", 1.42); + feedGas.addComponent("methane", 83.88); + feedGas.addComponent("ethane", 8.07); + feedGas.addComponent("propane", 3.54); + feedGas.addComponent("i-butane", 0.54); + feedGas.addComponent("n-butane", 0.84); + feedGas.addComponent("i-pentane", 0.21); + feedGas.addComponent("n-pentane", 0.19); + feedGas.addComponent("n-hexane", 0.28); + feedGas.addComponent("water", 0.0); + feedGas.addComponent("TEG", 0); + feedGas.createDatabase(true); + feedGas.setMixingRule(10); + feedGas.setMultiPhaseCheck(true); - Stream dryFeedGas = new Stream("input stream", feedGas); - dryFeedGas.setFlowRate(10.0, "kg/hr"); - dryFeedGas.setTemperature(200.5, "C"); - dryFeedGas.setPressure(1.21, "bara"); + Stream dryFeedGas = new Stream("input stream", feedGas); + dryFeedGas.setFlowRate(10.0, "kg/hr"); + dryFeedGas.setTemperature(200.5, "C"); + dryFeedGas.setPressure(1.21, "bara"); - neqsim.thermo.system.SystemInterface feedTEG = feedGas.clone(); - feedTEG.setMolarComposition( - new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.09, 0.91}); + neqsim.thermo.system.SystemInterface feedTEG = feedGas.clone(); + feedTEG.setMolarComposition( + new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.09, 0.91}); - Stream TEGFeed = new Stream("feed TEG", feedTEG); - TEGFeed.setFlowRate(6.1 * 1100.0, "kg/hr"); - TEGFeed.setTemperature(206.3, "C"); - TEGFeed.setPressure(1.21, "bara"); + Stream TEGFeed = new Stream("feed TEG", feedTEG); + TEGFeed.setFlowRate(6.1 * 1100.0, "kg/hr"); + TEGFeed.setTemperature(206.3, "C"); + TEGFeed.setPressure(1.21, "bara"); - WaterStripperColumn stripper = new WaterStripperColumn("SimpleTEGstripper"); - stripper.addGasInStream(dryFeedGas); - stripper.addSolventInStream(TEGFeed); - stripper.setNumberOfStages(3); - stripper.setStageEfficiency(0.5); + WaterStripperColumn stripper = new WaterStripperColumn("SimpleTEGstripper"); + stripper.addGasInStream(dryFeedGas); + stripper.addSolventInStream(TEGFeed); + stripper.setNumberOfStages(3); + stripper.setStageEfficiency(0.5); - neqsim.process.processmodel.ProcessSystem operations = - new neqsim.process.processmodel.ProcessSystem(); - operations.add(dryFeedGas); - operations.add(TEGFeed); - operations.add(stripper); + neqsim.process.processmodel.ProcessSystem operations = + new neqsim.process.processmodel.ProcessSystem(); + operations.add(dryFeedGas); + operations.add(TEGFeed); + operations.add(stripper); - operations.run(); + operations.run(); - double wtInletTEG = TEGFeed.getFluid().getPhase("aqueous").getWtFrac("TEG"); - double wtInletTEG2 = - stripper.getLiquidOutStream().getFluid().getPhase("aqueous").getWtFrac("TEG"); - double a = 1; + double wtInletTEG = TEGFeed.getFluid().getPhase("aqueous").getWtFrac("TEG"); + double wtInletTEG2 = + stripper.getLiquidOutStream().getFluid().getPhase("aqueous").getWtFrac("TEG"); + double a = 1; - stripper.displayResult(); - } + stripper.displayResult(); + } } diff --git a/src/test/java/neqsim/process/util/example/TestMechanicalDesign.java b/src/test/java/neqsim/process/util/example/TestMechanicalDesign.java index a30b548b7..361ff8f7e 100644 --- a/src/test/java/neqsim/process/util/example/TestMechanicalDesign.java +++ b/src/test/java/neqsim/process/util/example/TestMechanicalDesign.java @@ -2,98 +2,104 @@ import neqsim.process.equipment.separator.Separator; import neqsim.process.equipment.stream.Stream; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

TestMechanicalDesign class.

+ *

+ * TestMechanicalDesign class. + *

* * @author esol * @version $Id: $Id * @since 2.2.3 */ public class TestMechanicalDesign { - /** - *

main.

- * - * @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 + 20.0), 66.00); - testSystem.addComponent("methane", 5e6, "Sm3/day"); - testSystem.addComponent("water", 3000, "kg/hr"); + /** + *

+ * main. + *

+ * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + neqsim.thermo.system.SystemInterface testSystem = + new neqsim.thermo.system.SystemSrkEos((273.15 + 20.0), 66.00); + testSystem.addComponent("methane", 5e6, "Sm3/day"); + testSystem.addComponent("water", 3000, "kg/hr"); - testSystem.createDatabase(true); - testSystem.setMixingRule(2); + testSystem.createDatabase(true); + testSystem.setMixingRule(2); - Stream stream_1 = new Stream("Stream1", testSystem); - /* - * AdiabaticPipe pipel = new AdiabaticPipe(stream_1); pipel.setDiameter(1.0); - * pipel.setLength(100); - */ + Stream stream_1 = new Stream("Stream1", testSystem); + /* + * AdiabaticPipe pipel = new AdiabaticPipe(stream_1); pipel.setDiameter(1.0); + * pipel.setLength(100); + */ - Separator sep = new Separator("sep", stream_1); - // sep.addSeparatorSection("tray", ""); - // sep.getMechanicalDesign().getMaterialDesignStandard().readMaterialDesignStandard("Carbon - // Steel Plates and Sheets", "SA-516", "55", 1); - // sep.getMechanicalDesign().getJointEfficiencyStandard().readJointEfficiencyStandard("Double - // Welded", "Fully Redipgraphed"); - sep.getMechanicalDesign().setMaxOperationPressure(150.0); - sep.addSeparatorSection("top mesh", "meshpad"); + Separator sep = new Separator("sep", stream_1); + // sep.addSeparatorSection("tray", ""); + // sep.getMechanicalDesign().getMaterialDesignStandard().readMaterialDesignStandard("Carbon + // Steel Plates and Sheets", "SA-516", "55", 1); + // sep.getMechanicalDesign().getJointEfficiencyStandard().readJointEfficiencyStandard("Double + // Welded", "Fully Redipgraphed"); + sep.getMechanicalDesign().setMaxOperationPressure(150.0); + sep.addSeparatorSection("top mesh", "meshpad"); - /* - * sep.setInternalDiameter(3.750); sep.setSeparatorLength(4.0); - * sep.getMechanicalDesign().setMaxOperationPressure(70.0); - * sep.addSeparatorSection("bottom manway", "manway"); - * sep.addSeparatorSection("dp nozzle 1", "nozzle"); - * sep.getSeparatorSection("dp nozzle 1").getMechanicalDesign(). setNominalSize("DN 100"); - * sep.addSeparatorSection("dp nozzle 2", "nozzle"); - * sep.getSeparatorSection("dp nozzle 2").getMechanicalDesign(). setNominalSize("DN 100"); - * sep.addSeparatorSection("inlet vane", "vane"); - * sep.getSeparatorSection("inlet vane").setCalcEfficiency(true); - * sep.addSeparatorSection("top mesh", "meshpad"); - * sep.getSeparatorSection(1).setCalcEfficiency(true); sep.addSeparatorSection("top manway", - * "manway"); sep.getSeparatorSection("top manway").getMechanicalDesign().setANSIclass(300) - * ; sep.getSeparatorSection("top manway").getMechanicalDesign(). setNominalSize("DN 500"); - */ - neqsim.process.processmodel.ProcessSystem operations = - new neqsim.process.processmodel.ProcessSystem(); - operations.add(stream_1); - operations.add(sep); - operations.run(); - operations.displayResult(); - sep.getMechanicalDesign().calcDesign(); - // do design of process - // operations.getSystemMechanicalDesign().setCompanySpecificDesignStandards("StatoilTR"); + /* + * sep.setInternalDiameter(3.750); sep.setSeparatorLength(4.0); + * sep.getMechanicalDesign().setMaxOperationPressure(70.0); + * sep.addSeparatorSection("bottom manway", "manway"); sep.addSeparatorSection("dp nozzle 1", + * "nozzle"); sep.getSeparatorSection("dp nozzle 1").getMechanicalDesign(). + * setNominalSize("DN 100"); sep.addSeparatorSection("dp nozzle 2", "nozzle"); + * sep.getSeparatorSection("dp nozzle 2").getMechanicalDesign(). setNominalSize("DN 100"); + * sep.addSeparatorSection("inlet vane", "vane"); + * sep.getSeparatorSection("inlet vane").setCalcEfficiency(true); + * sep.addSeparatorSection("top mesh", "meshpad"); + * sep.getSeparatorSection(1).setCalcEfficiency(true); sep.addSeparatorSection("top manway", + * "manway"); sep.getSeparatorSection("top manway").getMechanicalDesign().setANSIclass(300) ; + * sep.getSeparatorSection("top manway").getMechanicalDesign(). setNominalSize("DN 500"); + */ + neqsim.process.processmodel.ProcessSystem operations = + new neqsim.process.processmodel.ProcessSystem(); + operations.add(stream_1); + operations.add(sep); + operations.run(); + operations.displayResult(); + sep.getMechanicalDesign().calcDesign(); + // do design of process + // operations.getSystemMechanicalDesign().setCompanySpecificDesignStandards("StatoilTR"); - // operations.runProcessDesignCalculation(); - // prosessdesign do: calculate flow rates of TEG, amine, calculates heat duty - // requirements, compressor power requirements, number of trays, packing height, - // numner of theoretical stages, - // operations.runMechanicalDesignCalculation(); - // calculates diameters of colums, wall thickness, weight, size of equipment, - // tray spacing - // operations.getSystemMechanicalDesign().runDesignCalculation(); + // operations.runProcessDesignCalculation(); + // prosessdesign do: calculate flow rates of TEG, amine, calculates heat duty + // requirements, compressor power requirements, number of trays, packing height, + // numner of theoretical stages, + // operations.runMechanicalDesignCalculation(); + // calculates diameters of colums, wall thickness, weight, size of equipment, + // tray spacing + // operations.getSystemMechanicalDesign().runDesignCalculation(); - // operations.getSystemMechanicalDesign().setDesign(); - // operations.run(); - // sep.getGasLoadFactor(); - // operations.calcDesign(); - // sep.getMechanicalDesign().calcDesign(); + // operations.getSystemMechanicalDesign().setDesign(); + // operations.run(); + // sep.getGasLoadFactor(); + // operations.calcDesign(); + // sep.getMechanicalDesign().calcDesign(); - // scrubber.getMechanicalDesign().setDesignStandard("ASME - Pressure Vessel - // Code"); - // scrubber.getMechanicalDesign().setDesignStandard("BS 5500 - Pressure - // Vessel"); - // System.out.println("vane top veight " + sep.getSeparatorSection("inlet - // vane").getMechanicalDesign().getTotalWeight()); - // System.out.println("gas vel " + sep.getGasSuperficialVelocity()); - // System.out.println("gas load factor oil " + sep.getGasLoadFactor()); - // System.out.println("gas load factor water " + scrubber.getGasLoadFactor(2)); - // System.out.println("derated gas load factor oil " + - // sep.getDeRatedGasLoadFactor()); - // System.out.println("derated gas load factor water " + - // scrubber.getDeRatedGasLoadFactor(2)); - // System.out.println("minimum liquid seal height " + - // sep.getSeparatorSection(0).getMinimumLiquidSealHeight()); - // sep.getMechanicalDesign().displayResults(); - } + // scrubber.getMechanicalDesign().setDesignStandard("ASME - Pressure Vessel + // Code"); + // scrubber.getMechanicalDesign().setDesignStandard("BS 5500 - Pressure + // Vessel"); + // System.out.println("vane top veight " + sep.getSeparatorSection("inlet + // vane").getMechanicalDesign().getTotalWeight()); + // System.out.println("gas vel " + sep.getGasSuperficialVelocity()); + // System.out.println("gas load factor oil " + sep.getGasLoadFactor()); + // System.out.println("gas load factor water " + scrubber.getGasLoadFactor(2)); + // System.out.println("derated gas load factor oil " + + // sep.getDeRatedGasLoadFactor()); + // System.out.println("derated gas load factor water " + + // scrubber.getDeRatedGasLoadFactor(2)); + // System.out.println("minimum liquid seal height " + + // sep.getSeparatorSection(0).getMinimumLiquidSealHeight()); + // sep.getMechanicalDesign().displayResults(); + } } diff --git a/src/test/java/neqsim/process/util/example/TestNeqsim.java b/src/test/java/neqsim/process/util/example/TestNeqsim.java index 398cda41c..fce29d608 100644 --- a/src/test/java/neqsim/process/util/example/TestNeqsim.java +++ b/src/test/java/neqsim/process/util/example/TestNeqsim.java @@ -4,6 +4,7 @@ import neqsim.process.equipment.stream.Stream; import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -23,6 +24,7 @@ public class TestNeqsim { * @param args the command line arguments */ @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { SystemInterface testFluid = new SystemSrkEos(298.15, 10.0); // SystemSrkCPAstatoil(298.1, // 10.9); //298.15 K diff --git a/src/test/java/neqsim/process/util/example/TestOnlineProcess.java b/src/test/java/neqsim/process/util/example/TestOnlineProcess.java index b70ce8a87..d63cab121 100644 --- a/src/test/java/neqsim/process/util/example/TestOnlineProcess.java +++ b/src/test/java/neqsim/process/util/example/TestOnlineProcess.java @@ -3,46 +3,52 @@ import neqsim.process.equipment.stream.Stream; import neqsim.process.equipment.valve.ThrottlingValve; import neqsim.process.measurementdevice.TemperatureTransmitter; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

TestOnlineProcess class.

+ *

+ * TestOnlineProcess class. + *

* * @author esol * @version $Id: $Id * @since 2.2.3 */ public class TestOnlineProcess { - /** - *

main.

- * - * @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 + 25.0), 10.00); - testSystem.addComponent("methane", 0.900); - testSystem.addComponent("ethane", 0.100); - testSystem.addComponent("n-heptane", 1.00); - testSystem.createDatabase(true); - testSystem.setMixingRule(2); - - Stream stream_1 = new Stream("Stream1", testSystem); - - TemperatureTransmitter temperatureTransmitter = new TemperatureTransmitter(stream_1); - temperatureTransmitter.setIsOnlineSignal(true, "Karsto", "21TI1117"); - - ThrottlingValve valve_1 = new ThrottlingValve("valve_1", stream_1); - valve_1.setOutletPressure(5.0); - - neqsim.process.processmodel.ProcessSystem operations = - new neqsim.process.processmodel.ProcessSystem(); - operations.add(stream_1); - operations.add(temperatureTransmitter); - operations.add(valve_1); - - operations.run(); - - operations.displayResult(); - operations.reportMeasuredValues(); - } + /** + *

+ * main. + *

+ * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + neqsim.thermo.system.SystemInterface testSystem = + new neqsim.thermo.system.SystemSrkEos((273.15 + 25.0), 10.00); + testSystem.addComponent("methane", 0.900); + testSystem.addComponent("ethane", 0.100); + testSystem.addComponent("n-heptane", 1.00); + testSystem.createDatabase(true); + testSystem.setMixingRule(2); + + Stream stream_1 = new Stream("Stream1", testSystem); + + TemperatureTransmitter temperatureTransmitter = new TemperatureTransmitter(stream_1); + temperatureTransmitter.setIsOnlineSignal(true, "Karsto", "21TI1117"); + + ThrottlingValve valve_1 = new ThrottlingValve("valve_1", stream_1); + valve_1.setOutletPressure(5.0); + + neqsim.process.processmodel.ProcessSystem operations = + new neqsim.process.processmodel.ProcessSystem(); + operations.add(stream_1); + operations.add(temperatureTransmitter); + operations.add(valve_1); + + operations.run(); + + operations.displayResult(); + operations.reportMeasuredValues(); + } } diff --git a/src/test/java/neqsim/process/util/example/TestProcess4.java b/src/test/java/neqsim/process/util/example/TestProcess4.java index c0f6bb7e4..ecf35eea2 100644 --- a/src/test/java/neqsim/process/util/example/TestProcess4.java +++ b/src/test/java/neqsim/process/util/example/TestProcess4.java @@ -2,58 +2,62 @@ import neqsim.process.equipment.separator.Separator; import neqsim.process.equipment.stream.Stream; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

TestProcess4 class.

+ *

+ * TestProcess4 class. + *

* * @author asmund * @version $Id: $Id * @since 2.2.3 */ public class TestProcess4 { - /** - * This method is just meant to test the thermo package. - * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String args[]) { - neqsim.thermo.system.SystemInterface testSystem = - new neqsim.thermo.system.SystemSrkCPAstatoil((273.15 + 28.0), 90.0); - testSystem.addComponent("methane", 79.034); - testSystem.addComponent("ethane", 7.102); - testSystem.addComponent("propane", 5.121); - testSystem.addComponent("CO2", 2.502); - testSystem.addComponent("nitrogen", 0.727); - // testSystem.addComponent("nC10", 2.502); - testSystem.addComponent("water", 51.0); - // testSystem.addComponent("TEG", 5.98); - testSystem.createDatabase(true); - testSystem.setMixingRule(10); - - testSystem.setMultiPhaseCheck(true); - - Stream stream_1 = new Stream("Stream1", testSystem); - - Separator separator = new Separator("Separator 1", stream_1); - - // ThrottlingValve valve_1 = new ThrottlingValve(separator.getGasOutStream()); - // valve_1.setOutletPressure(75.0 + ThermodynamicConstantsInterface.referencePressure); - // valve_1.setIsoThermal(true); - - // Heater heater = new Heater(valve_1.getOutStream()); - // heater.setOutTemperature(273.15 + 46); - - Stream liquidStream = new Stream("liquidStream", separator.getLiquidOutStream()); - - neqsim.process.processmodel.ProcessSystem operations = - new neqsim.process.processmodel.ProcessSystem(); - operations.add(stream_1); - operations.add(separator); - // operations.add(valve_1); - // operations.add(heater); - operations.add(liquidStream); - - operations.run(); - operations.displayResult(); - } + /** + * This method is just meant to test the thermo package. + * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + neqsim.thermo.system.SystemInterface testSystem = + new neqsim.thermo.system.SystemSrkCPAstatoil((273.15 + 28.0), 90.0); + testSystem.addComponent("methane", 79.034); + testSystem.addComponent("ethane", 7.102); + testSystem.addComponent("propane", 5.121); + testSystem.addComponent("CO2", 2.502); + testSystem.addComponent("nitrogen", 0.727); + // testSystem.addComponent("nC10", 2.502); + testSystem.addComponent("water", 51.0); + // testSystem.addComponent("TEG", 5.98); + testSystem.createDatabase(true); + testSystem.setMixingRule(10); + + testSystem.setMultiPhaseCheck(true); + + Stream stream_1 = new Stream("Stream1", testSystem); + + Separator separator = new Separator("Separator 1", stream_1); + + // ThrottlingValve valve_1 = new ThrottlingValve(separator.getGasOutStream()); + // valve_1.setOutletPressure(75.0 + ThermodynamicConstantsInterface.referencePressure); + // valve_1.setIsoThermal(true); + + // Heater heater = new Heater(valve_1.getOutStream()); + // heater.setOutTemperature(273.15 + 46); + + Stream liquidStream = new Stream("liquidStream", separator.getLiquidOutStream()); + + neqsim.process.processmodel.ProcessSystem operations = + new neqsim.process.processmodel.ProcessSystem(); + operations.add(stream_1); + operations.add(separator); + // operations.add(valve_1); + // operations.add(heater); + operations.add(liquidStream); + + operations.run(); + operations.displayResult(); + } } diff --git a/src/test/java/neqsim/process/util/example/TestSeparationTrain.java b/src/test/java/neqsim/process/util/example/TestSeparationTrain.java index fee88080a..df18e7aea 100644 --- a/src/test/java/neqsim/process/util/example/TestSeparationTrain.java +++ b/src/test/java/neqsim/process/util/example/TestSeparationTrain.java @@ -9,6 +9,7 @@ import neqsim.process.equipment.stream.Stream; import neqsim.process.equipment.util.Recycle; import neqsim.process.equipment.valve.ThrottlingValve; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -27,6 +28,7 @@ public class TestSeparationTrain { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { double inletPressure = 15.00; // bar double inletTemperatuure = 273.15 + 50.0; // K diff --git a/src/test/java/neqsim/process/util/example/TestSlugcatcher.java b/src/test/java/neqsim/process/util/example/TestSlugcatcher.java index 534fca263..cac4ea64b 100644 --- a/src/test/java/neqsim/process/util/example/TestSlugcatcher.java +++ b/src/test/java/neqsim/process/util/example/TestSlugcatcher.java @@ -10,6 +10,7 @@ import neqsim.process.equipment.stream.Stream; import neqsim.process.equipment.valve.ThrottlingValve; import neqsim.process.measurementdevice.VolumeFlowTransmitter; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -28,6 +29,7 @@ public class TestSlugcatcher { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { double reservoirTemperatureSnohvit = 273.15 + 10.0; // K double reservoirPressureSnohvit = 5.0; // bar diff --git a/src/test/java/neqsim/process/util/example/TestTransientFlow.java b/src/test/java/neqsim/process/util/example/TestTransientFlow.java index 1ab2c09d8..b0a55a62b 100644 --- a/src/test/java/neqsim/process/util/example/TestTransientFlow.java +++ b/src/test/java/neqsim/process/util/example/TestTransientFlow.java @@ -13,6 +13,7 @@ import neqsim.process.equipment.valve.ThrottlingValve; import neqsim.process.measurementdevice.LevelTransmitter; import neqsim.process.measurementdevice.PressureTransmitter; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -31,6 +32,7 @@ public class TestTransientFlow { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { neqsim.thermo.system.SystemInterface testSystem = new neqsim.thermo.system.SystemSrkEos((273.15 + 25.0), 10.00); diff --git a/src/test/java/neqsim/process/util/example/TestTransientFlow2.java b/src/test/java/neqsim/process/util/example/TestTransientFlow2.java index 981978cbe..020fab321 100644 --- a/src/test/java/neqsim/process/util/example/TestTransientFlow2.java +++ b/src/test/java/neqsim/process/util/example/TestTransientFlow2.java @@ -6,6 +6,7 @@ import neqsim.process.equipment.stream.Stream; import neqsim.process.equipment.valve.ThrottlingValve; import neqsim.process.measurementdevice.VolumeFlowTransmitter; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -24,6 +25,7 @@ public class TestTransientFlow2 { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { neqsim.thermo.system.SystemInterface testSystem = new neqsim.thermo.system.SystemSrkEos((273.15 + 25.0), 10.00); diff --git a/src/test/java/neqsim/process/util/example/WellStreamMixer.java b/src/test/java/neqsim/process/util/example/WellStreamMixer.java index 6c72be05e..d9e612e4d 100644 --- a/src/test/java/neqsim/process/util/example/WellStreamMixer.java +++ b/src/test/java/neqsim/process/util/example/WellStreamMixer.java @@ -4,6 +4,7 @@ import neqsim.process.equipment.mixer.StaticMixer; import neqsim.process.equipment.stream.Stream; import neqsim.thermo.system.SystemSrkEos; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -15,72 +16,73 @@ * @since 2.2.3 */ public class WellStreamMixer { - /** - *

- * main. - *

- * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String[] args) { - neqsim.thermo.system.SystemInterface testSystem = new SystemSrkEos(354.2, 120.0); + /** + *

+ * main. + *

+ * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String[] args) { + neqsim.thermo.system.SystemInterface testSystem = new SystemSrkEos(354.2, 120.0); - testSystem.addComponent("nitrogen", 1.0); - testSystem.addComponent("CO2", 1.42); - testSystem.addComponent("methane", 60.88); - testSystem.addComponent("ethane", 8.07); - testSystem.addComponent("propane", 3.54); - testSystem.addComponent("i-butane", 0.54); - testSystem.addComponent("n-butane", 0.2); - testSystem.addComponent("i-pentane", 0.21); - testSystem.addComponent("n-pentane", 0.19); - testSystem.addComponent("n-hexane", 0.28); - testSystem.addComponent("n-heptane", 5.0); - testSystem.addTBPfraction("C7_well1", 1.0, 100.0 / 1000.0, 0.8); - testSystem.addTBPfraction("C8_well1", 1.0, 120.0 / 1000.0, 0.81); - testSystem.addTBPfraction("C7_well2", 1.0, 110.0 / 1000.0, 0.8); - testSystem.addTBPfraction("C8_well2", 1.0, 122.0 / 1000.0, 0.81); - testSystem.createDatabase(true); - testSystem.setMixingRule(2); - testSystem.setMultiPhaseCheck(true); + testSystem.addComponent("nitrogen", 1.0); + testSystem.addComponent("CO2", 1.42); + testSystem.addComponent("methane", 60.88); + testSystem.addComponent("ethane", 8.07); + testSystem.addComponent("propane", 3.54); + testSystem.addComponent("i-butane", 0.54); + testSystem.addComponent("n-butane", 0.2); + testSystem.addComponent("i-pentane", 0.21); + testSystem.addComponent("n-pentane", 0.19); + testSystem.addComponent("n-hexane", 0.28); + testSystem.addComponent("n-heptane", 5.0); + testSystem.addTBPfraction("C7_well1", 1.0, 100.0 / 1000.0, 0.8); + testSystem.addTBPfraction("C8_well1", 1.0, 120.0 / 1000.0, 0.81); + testSystem.addTBPfraction("C7_well2", 1.0, 110.0 / 1000.0, 0.8); + testSystem.addTBPfraction("C8_well2", 1.0, 122.0 / 1000.0, 0.81); + testSystem.createDatabase(true); + testSystem.setMixingRule(2); + testSystem.setMultiPhaseCheck(true); - testSystem.setMolarComposition(new double[] {1.0, 1.42, 70.1, 8, 3.54, 0.54, 0.2, 0.21, - 0.19, 0.28, 5.0, 1.0, 1.0, 0, 0}); + testSystem.setMolarComposition( + new double[] {1.0, 1.42, 70.1, 8, 3.54, 0.54, 0.2, 0.21, 0.19, 0.28, 5.0, 1.0, 1.0, 0, 0}); - neqsim.thermo.system.SystemInterface testSystem2 = testSystem.clone(); - testSystem2.createDatabase(true); - testSystem2.setMixingRule(2); - testSystem2.setMultiPhaseCheck(true); - testSystem2.setMolarComposition(new double[] {1.0, 1.42, 70.1, 8, 3.54, 0.54, 0.2, 0.21, - 0.19, 0.28, 5.0, 0.0, 0.0, 1, 1}); + neqsim.thermo.system.SystemInterface testSystem2 = testSystem.clone(); + testSystem2.createDatabase(true); + testSystem2.setMixingRule(2); + testSystem2.setMultiPhaseCheck(true); + testSystem2.setMolarComposition( + new double[] {1.0, 1.42, 70.1, 8, 3.54, 0.54, 0.2, 0.21, 0.19, 0.28, 5.0, 0.0, 0.0, 1, 1}); - Stream wellStream_1 = new Stream("well stream", testSystem); - wellStream_1.setFlowRate(14.23, "MSm3/day"); - wellStream_1.setTemperature(40.0, "C"); - wellStream_1.setPressure(120.0, "bara"); + Stream wellStream_1 = new Stream("well stream", testSystem); + wellStream_1.setFlowRate(14.23, "MSm3/day"); + wellStream_1.setTemperature(40.0, "C"); + wellStream_1.setPressure(120.0, "bara"); - Stream wellStream_2 = new Stream("well stream2", testSystem2); - wellStream_2.setFlowRate(0.23, "MSm3/day"); - wellStream_2.setTemperature(40.0, "C"); - wellStream_2.setPressure(120.0, "bara"); + Stream wellStream_2 = new Stream("well stream2", testSystem2); + wellStream_2.setFlowRate(0.23, "MSm3/day"); + wellStream_2.setTemperature(40.0, "C"); + wellStream_2.setPressure(120.0, "bara"); - Mixer wellStramMixer = new StaticMixer("well mixer"); - wellStramMixer.addStream(wellStream_1); - wellStramMixer.addStream(wellStream_2); + Mixer wellStramMixer = new StaticMixer("well mixer"); + wellStramMixer.addStream(wellStream_1); + wellStramMixer.addStream(wellStream_2); - Stream mixerdStream = new Stream("mixed stream", wellStramMixer.getOutletStream()); + Stream mixerdStream = new Stream("mixed stream", wellStramMixer.getOutletStream()); - neqsim.process.processmodel.ProcessSystem operations = - new neqsim.process.processmodel.ProcessSystem(); - operations.add(wellStream_1); - operations.add(wellStream_2); - operations.add(wellStramMixer); - operations.add(mixerdStream); + neqsim.process.processmodel.ProcessSystem operations = + new neqsim.process.processmodel.ProcessSystem(); + operations.add(wellStream_1); + operations.add(wellStream_2); + operations.add(wellStramMixer); + operations.add(mixerdStream); - operations.run(); - operations.save("c:/temp/wellMixer1.neqsim"); - // wellStream_1.displayResult(); - // wellStream_2.displayResult(); - mixerdStream.displayResult(); - } + operations.run(); + operations.save("c:/temp/wellMixer1.neqsim"); + // wellStream_1.displayResult(); + // wellStream_2.displayResult(); + mixerdStream.displayResult(); + } } diff --git a/src/test/java/neqsim/process/util/example/compressorTest.java b/src/test/java/neqsim/process/util/example/compressorTest.java index a611f5da6..25c498d66 100644 --- a/src/test/java/neqsim/process/util/example/compressorTest.java +++ b/src/test/java/neqsim/process/util/example/compressorTest.java @@ -7,57 +7,61 @@ import neqsim.process.equipment.stream.Stream; import neqsim.process.equipment.stream.StreamInterface; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

compressorTest class.

+ *

+ * compressorTest class. + *

* * @author asmund * @version $Id: $Id * @since 2.2.3 */ public class compressorTest { - /** - * This method is just meant to test the thermo package. - * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String args[]) { - neqsim.thermo.system.SystemInterface testSystem = - new neqsim.thermo.system.SystemSrkEos((273.15 + 25.0), 20.00); - testSystem.addComponent("CO2", 1800.00); - testSystem.addComponent("water", 1200.0); - testSystem.createDatabase(true); - testSystem.setMixingRule(2); - ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); - testOps.TPflash(); - - Stream stream_1 = new Stream("Stream1", testSystem); - - MixerInterface mixer = new StaticMixer("Mixer 1"); - mixer.addStream(stream_1); - StreamInterface stream_3 = mixer.getOutletStream(); - stream_3.setName("stream3"); - - Separator separator = new Separator("Separator 1", stream_3); - StreamInterface stream_2 = separator.getGasOutStream(); - stream_2.setName("stream2"); - - Compressor comp1 = new Compressor("comp1", stream_2); - comp1.setOutletPressure(50.0); - - mixer.addStream(stream_2); - - neqsim.process.processmodel.ProcessSystem operations = - new neqsim.process.processmodel.ProcessSystem(); - operations.add(stream_1); - operations.add(stream_2); - operations.add(mixer); - operations.add(stream_3); - operations.add(separator); - operations.add(comp1); - - operations.run(); - - operations.displayResult(); - } + /** + * This method is just meant to test the thermo package. + * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + neqsim.thermo.system.SystemInterface testSystem = + new neqsim.thermo.system.SystemSrkEos((273.15 + 25.0), 20.00); + testSystem.addComponent("CO2", 1800.00); + testSystem.addComponent("water", 1200.0); + testSystem.createDatabase(true); + testSystem.setMixingRule(2); + ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); + testOps.TPflash(); + + Stream stream_1 = new Stream("Stream1", testSystem); + + MixerInterface mixer = new StaticMixer("Mixer 1"); + mixer.addStream(stream_1); + StreamInterface stream_3 = mixer.getOutletStream(); + stream_3.setName("stream3"); + + Separator separator = new Separator("Separator 1", stream_3); + StreamInterface stream_2 = separator.getGasOutStream(); + stream_2.setName("stream2"); + + Compressor comp1 = new Compressor("comp1", stream_2); + comp1.setOutletPressure(50.0); + + mixer.addStream(stream_2); + + neqsim.process.processmodel.ProcessSystem operations = + new neqsim.process.processmodel.ProcessSystem(); + operations.add(stream_1); + operations.add(stream_2); + operations.add(mixer); + operations.add(stream_3); + operations.add(separator); + operations.add(comp1); + + operations.run(); + + operations.displayResult(); + } } diff --git a/src/test/java/neqsim/process/util/example/compressorTest_1.java b/src/test/java/neqsim/process/util/example/compressorTest_1.java index 27ec72e16..371f1d57f 100644 --- a/src/test/java/neqsim/process/util/example/compressorTest_1.java +++ b/src/test/java/neqsim/process/util/example/compressorTest_1.java @@ -4,6 +4,7 @@ import org.apache.logging.log4j.Logger; import neqsim.process.equipment.compressor.Compressor; import neqsim.process.equipment.stream.Stream; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -22,6 +23,7 @@ public class compressorTest_1 { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { neqsim.thermo.system.SystemInterface testSystem = new neqsim.thermo.system.SystemSrkCPAstatoil((273.15 + 20.0), 10.00); diff --git a/src/test/java/neqsim/process/util/example/destillation1.java b/src/test/java/neqsim/process/util/example/destillation1.java index 066b38344..ee195ee42 100644 --- a/src/test/java/neqsim/process/util/example/destillation1.java +++ b/src/test/java/neqsim/process/util/example/destillation1.java @@ -5,6 +5,7 @@ import neqsim.process.equipment.distillation.Reboiler; import neqsim.process.equipment.stream.Stream; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -21,6 +22,7 @@ public class destillation1 { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { neqsim.thermo.system.SystemInterface testSystem = new neqsim.thermo.system.SystemSrkEos((273.15 + 63.0), 16.00); diff --git a/src/test/java/neqsim/process/util/example/destillation2.java b/src/test/java/neqsim/process/util/example/destillation2.java index fee00bb7b..106aab8bd 100644 --- a/src/test/java/neqsim/process/util/example/destillation2.java +++ b/src/test/java/neqsim/process/util/example/destillation2.java @@ -2,6 +2,7 @@ import neqsim.process.equipment.distillation.DistillationColumn; import neqsim.process.equipment.stream.Stream; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -18,6 +19,7 @@ public class destillation2 { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { neqsim.thermo.system.SystemInterface testSystem = new neqsim.thermo.system.SystemSrkCPAstatoil((273.15 + 30.0), 50.00); diff --git a/src/test/java/neqsim/process/util/example/expander1.java b/src/test/java/neqsim/process/util/example/expander1.java index cf7400e46..d7db7c945 100644 --- a/src/test/java/neqsim/process/util/example/expander1.java +++ b/src/test/java/neqsim/process/util/example/expander1.java @@ -1,6 +1,7 @@ package neqsim.process.util.example; import neqsim.process.equipment.stream.Stream; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -12,48 +13,48 @@ * @since 2.2.3 */ public class expander1 { - /** - * This method is just meant to test the thermo package. - * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String args[]) { - neqsim.thermo.system.SystemInterface testSystem = - new neqsim.thermo.system.SystemSrkEos((273.15 + 25.0), 120.00); - testSystem.addComponent("methane", 180.00); - testSystem.addComponent("ethane", 10.00); - testSystem.addComponent("propane", 1.00); - testSystem.addComponent("n-nonane", 1.00); - // testSystem.addComponent("water", 1.00); - testSystem.createDatabase(true); - testSystem.setMixingRule(2); - testSystem.setMultiPhaseCheck(true); - - Stream stream_1 = new Stream("Stream1", testSystem); - - // neqsim.processSimulation.processEquipment.expander.Expander expander = new - // neqsim.processSimulation.processEquipment.expander.Expander(stream_1); - neqsim.process.equipment.compressor.Compressor expander = - new neqsim.process.equipment.compressor.Compressor("expander", - stream_1); - - expander.setOutletPressure(80.0); - expander.setPolytropicEfficiency(0.9); - expander.setIsentropicEfficiency(0.9); - expander.setUsePolytropicCalc(true); - - neqsim.process.processmodel.ProcessSystem operations = - new neqsim.process.processmodel.ProcessSystem(); - operations.add(stream_1); - operations.add(expander); - - operations.run(); - - // expander.solveEfficiency(272.50); - operations.displayResult(); - - // compr.solvePolytropicEfficiency(compr.getOutStream().getTemperature() + - // 0.01); - // operations.displayResult(); - } + /** + * This method is just meant to test the thermo package. + * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + neqsim.thermo.system.SystemInterface testSystem = + new neqsim.thermo.system.SystemSrkEos((273.15 + 25.0), 120.00); + testSystem.addComponent("methane", 180.00); + testSystem.addComponent("ethane", 10.00); + testSystem.addComponent("propane", 1.00); + testSystem.addComponent("n-nonane", 1.00); + // testSystem.addComponent("water", 1.00); + testSystem.createDatabase(true); + testSystem.setMixingRule(2); + testSystem.setMultiPhaseCheck(true); + + Stream stream_1 = new Stream("Stream1", testSystem); + + // neqsim.processSimulation.processEquipment.expander.Expander expander = new + // neqsim.processSimulation.processEquipment.expander.Expander(stream_1); + neqsim.process.equipment.compressor.Compressor expander = + new neqsim.process.equipment.compressor.Compressor("expander", stream_1); + + expander.setOutletPressure(80.0); + expander.setPolytropicEfficiency(0.9); + expander.setIsentropicEfficiency(0.9); + expander.setUsePolytropicCalc(true); + + neqsim.process.processmodel.ProcessSystem operations = + new neqsim.process.processmodel.ProcessSystem(); + operations.add(stream_1); + operations.add(expander); + + operations.run(); + + // expander.solveEfficiency(272.50); + operations.displayResult(); + + // compr.solvePolytropicEfficiency(compr.getOutStream().getTemperature() + + // 0.01); + // operations.displayResult(); + } } diff --git a/src/test/java/neqsim/process/util/example/gasPipeline.java b/src/test/java/neqsim/process/util/example/gasPipeline.java index 9af1e4955..ca35121de 100644 --- a/src/test/java/neqsim/process/util/example/gasPipeline.java +++ b/src/test/java/neqsim/process/util/example/gasPipeline.java @@ -4,65 +4,69 @@ import neqsim.process.equipment.pipeline.AdiabaticTwoPhasePipe; import neqsim.process.equipment.pipeline.OnePhasePipeLine; import neqsim.process.equipment.stream.Stream; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

gasPipeline class.

+ *

+ * gasPipeline class. + *

* * @author asmund * @version $Id: $Id * @since 2.2.3 */ public class gasPipeline { - /** - * This method is just meant to test the thermo package. - * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String args[]) { - neqsim.thermo.system.SystemInterface testSystem = - new neqsim.thermo.system.SystemSrkEos((273.15 + 25.0), 200.00); - testSystem.addComponent("methane", 22000.00); - testSystem.addComponent("ethane", 12.0); - testSystem.createDatabase(true); - testSystem.setMixingRule(2); - testSystem.initPhysicalProperties(); - Stream stream_1 = new Stream("Stream1", testSystem); + /** + * This method is just meant to test the thermo package. + * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + neqsim.thermo.system.SystemInterface testSystem = + new neqsim.thermo.system.SystemSrkEos((273.15 + 25.0), 200.00); + testSystem.addComponent("methane", 22000.00); + testSystem.addComponent("ethane", 12.0); + testSystem.createDatabase(true); + testSystem.setMixingRule(2); + testSystem.initPhysicalProperties(); + Stream stream_1 = new Stream("Stream1", testSystem); - OnePhasePipeLine pipeline = new OnePhasePipeLine(stream_1); - double[] dima = {1.0, 1.0, 1.0}; - pipeline.setNumberOfLegs(dima.length - 1); - pipeline.setPipeDiameters(dima); - pipeline.setLegPositions(new double[] {0, 70000, 600000}); - pipeline.setHeightProfile(new double[] {0, 0, 0}); - pipeline.setPipeWallRoughness(new double[] {1e-5, 1e-5, 1e-5}); - pipeline.setOuterTemperatures(new double[] {277.0, 277.0, 277.0}); - pipeline.setPipeOuterHeatTransferCoefficients(new double[] {15.0, 15.0, 15.0}); - pipeline.setPipeWallHeatTransferCoefficients(new double[] {15.0, 15.0, 15.0}); - AdiabaticPipe simplePipeline = new AdiabaticPipe("simplePipeline", stream_1); - simplePipeline.setDiameter(10.2); - simplePipeline.setLength(100); - simplePipeline.setInletElevation(0.0); - simplePipeline.setOutletElevation(-100.0); + OnePhasePipeLine pipeline = new OnePhasePipeLine(stream_1); + double[] dima = {1.0, 1.0, 1.0}; + pipeline.setNumberOfLegs(dima.length - 1); + pipeline.setPipeDiameters(dima); + pipeline.setLegPositions(new double[] {0, 70000, 600000}); + pipeline.setHeightProfile(new double[] {0, 0, 0}); + pipeline.setPipeWallRoughness(new double[] {1e-5, 1e-5, 1e-5}); + pipeline.setOuterTemperatures(new double[] {277.0, 277.0, 277.0}); + pipeline.setPipeOuterHeatTransferCoefficients(new double[] {15.0, 15.0, 15.0}); + pipeline.setPipeWallHeatTransferCoefficients(new double[] {15.0, 15.0, 15.0}); + AdiabaticPipe simplePipeline = new AdiabaticPipe("simplePipeline", stream_1); + simplePipeline.setDiameter(10.2); + simplePipeline.setLength(100); + simplePipeline.setInletElevation(0.0); + simplePipeline.setOutletElevation(-100.0); - AdiabaticTwoPhasePipe simplePipeline2phase = - new AdiabaticTwoPhasePipe("simplePipeline2phase", stream_1); - simplePipeline2phase.setDiameter(10.2); - simplePipeline2phase.setLength(100); - simplePipeline2phase.setInletElevation(0.0); - simplePipeline2phase.setOutletElevation(-100.0); + AdiabaticTwoPhasePipe simplePipeline2phase = + new AdiabaticTwoPhasePipe("simplePipeline2phase", stream_1); + simplePipeline2phase.setDiameter(10.2); + simplePipeline2phase.setLength(100); + simplePipeline2phase.setInletElevation(0.0); + simplePipeline2phase.setOutletElevation(-100.0); - neqsim.process.processmodel.ProcessSystem operations = - new neqsim.process.processmodel.ProcessSystem(); - operations.add(stream_1); - operations.add(pipeline); - // operations.add(simplePipeline); - // operations.add(simplePipeline2phase); + neqsim.process.processmodel.ProcessSystem operations = + new neqsim.process.processmodel.ProcessSystem(); + operations.add(stream_1); + operations.add(pipeline); + // operations.add(simplePipeline); + // operations.add(simplePipeline2phase); - operations.run(); - //pipeline.getOutletStream().displayResult(); - // simplePipeline.getOutStream().displayResult(); - // simplePipeline2phase.getOutStream().displayResult(); + operations.run(); + // pipeline.getOutletStream().displayResult(); + // simplePipeline.getOutStream().displayResult(); + // simplePipeline2phase.getOutStream().displayResult(); - // .displayResult(); - } + // .displayResult(); + } } diff --git a/src/test/java/neqsim/process/util/example/multiThreadTest.java b/src/test/java/neqsim/process/util/example/multiThreadTest.java index 3b6d6c28a..bcf80e49e 100644 --- a/src/test/java/neqsim/process/util/example/multiThreadTest.java +++ b/src/test/java/neqsim/process/util/example/multiThreadTest.java @@ -11,6 +11,7 @@ import neqsim.process.equipment.stream.StreamInterface; import neqsim.process.equipment.util.Recycle; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -29,6 +30,7 @@ public class multiThreadTest { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { neqsim.thermo.system.SystemInterface testSystem = new neqsim.thermo.system.SystemSrkEos((273.15 + 25.0), 20.00); diff --git a/src/test/java/neqsim/process/util/example/oxygenRemovalWater.java b/src/test/java/neqsim/process/util/example/oxygenRemovalWater.java index 0a99de073..dc68436c2 100644 --- a/src/test/java/neqsim/process/util/example/oxygenRemovalWater.java +++ b/src/test/java/neqsim/process/util/example/oxygenRemovalWater.java @@ -6,62 +6,68 @@ import neqsim.process.equipment.stream.Stream; import neqsim.process.equipment.valve.ThrottlingValve; import neqsim.thermo.ThermodynamicConstantsInterface; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

oxygenRemovalWater class.

+ *

+ * oxygenRemovalWater class. + *

* * @author asmund * @version $Id: $Id * @since 2.2.3 */ public class oxygenRemovalWater { - /** - *

main.

- * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String[] args) { - neqsim.thermo.Fluid fluidCreator = new neqsim.thermo.Fluid(); - fluidCreator.setHasWater(true); - neqsim.thermo.system.SystemInterface fluid1 = fluidCreator.create("air").autoSelectModel(); - fluid1.setMultiPhaseCheck(true); - neqsim.thermo.system.SystemInterface fluid2 = fluidCreator.create("water"); - fluid1.setPressure(ThermodynamicConstantsInterface.referencePressure); - fluid1.setTemperature(273.15 + 10); - fluid1.setTotalFlowRate(1.0, "kg/hr"); - fluid2.setPressure(ThermodynamicConstantsInterface.referencePressure); - fluid2.setTemperature(273.15 + 10); - fluid2.setTotalFlowRate(3500.0, "kg/hr"); + /** + *

+ * main. + *

+ * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String[] args) { + neqsim.thermo.Fluid fluidCreator = new neqsim.thermo.Fluid(); + fluidCreator.setHasWater(true); + neqsim.thermo.system.SystemInterface fluid1 = fluidCreator.create("air").autoSelectModel(); + fluid1.setMultiPhaseCheck(true); + neqsim.thermo.system.SystemInterface fluid2 = fluidCreator.create("water"); + fluid1.setPressure(ThermodynamicConstantsInterface.referencePressure); + fluid1.setTemperature(273.15 + 10); + fluid1.setTotalFlowRate(1.0, "kg/hr"); + fluid2.setPressure(ThermodynamicConstantsInterface.referencePressure); + fluid2.setTemperature(273.15 + 10); + fluid2.setTotalFlowRate(3500.0, "kg/hr"); - Stream stream_air = new Stream("StreamAir", fluid1); - Stream stream_water = new Stream("StreamWater", fluid2); + Stream stream_air = new Stream("StreamAir", fluid1); + Stream stream_water = new Stream("StreamWater", fluid2); - Mixer mix = new Mixer("mixer"); - mix.addStream(stream_air); - // mix.addStream(stream_water); + Mixer mix = new Mixer("mixer"); + mix.addStream(stream_air); + // mix.addStream(stream_water); - Separator separator = new Separator("separator", mix.getOutletStream()); + Separator separator = new Separator("separator", mix.getOutletStream()); - Heater heater1 = new Heater("heater1", separator.getLiquidOutStream()); - heater1.setOutTemperature(273.15 + 20); + Heater heater1 = new Heater("heater1", separator.getLiquidOutStream()); + heater1.setOutTemperature(273.15 + 20); - ThrottlingValve LP_valve = new ThrottlingValve("LPventil", heater1.getOutletStream()); - LP_valve.setOutletPressure(30.0e-3); + ThrottlingValve LP_valve = new ThrottlingValve("LPventil", heater1.getOutletStream()); + LP_valve.setOutletPressure(30.0e-3); - neqsim.process.processmodel.ProcessSystem operations = - new neqsim.process.processmodel.ProcessSystem(); - operations.add(stream_air); - operations.add(stream_water); - operations.add(mix); - operations.add(separator); - operations.add(heater1); - operations.add(LP_valve); + neqsim.process.processmodel.ProcessSystem operations = + new neqsim.process.processmodel.ProcessSystem(); + operations.add(stream_air); + operations.add(stream_water); + operations.add(mix); + operations.add(separator); + operations.add(heater1); + operations.add(LP_valve); - operations.run(); - separator.getThermoSystem().display(); - LP_valve.getThermoSystem().display(); + operations.run(); + separator.getThermoSystem().display(); + LP_valve.getThermoSystem().display(); - double wtFracO2 = LP_valve.getThermoSystem().getPhase("aqueous").getWtFrac("oxygen") * 1e9; - System.out.println("oxygen ppb " + wtFracO2); - } + double wtFracO2 = LP_valve.getThermoSystem().getPhase("aqueous").getWtFrac("oxygen") * 1e9; + System.out.println("oxygen ppb " + wtFracO2); + } } diff --git a/src/test/java/neqsim/process/util/example/process1.java b/src/test/java/neqsim/process/util/example/process1.java index bab899f5e..4dc542357 100644 --- a/src/test/java/neqsim/process/util/example/process1.java +++ b/src/test/java/neqsim/process/util/example/process1.java @@ -2,6 +2,7 @@ import neqsim.process.equipment.stream.Stream; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -13,66 +14,66 @@ * @since 2.2.3 */ public class process1 { - /** - * This method is just meant to test the thermo package. - * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String args[]) { - neqsim.thermo.system.SystemInterface testSystem = - new neqsim.thermo.system.SystemSrkCPAstatoil((273.15 + 25.0), 50.00); - testSystem.addComponent("methane", 180.00); - testSystem.addComponent("ethane", 10.00); - testSystem.addComponent("propane", 1.00); - // testSystem.addComponent("n-nonane", 1.00); - // testSystem.addComponent("water", 1.00); - testSystem.createDatabase(true); - testSystem.setMultiPhaseCheck(true); - testSystem.setMixingRule(10); + /** + * This method is just meant to test the thermo package. + * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + neqsim.thermo.system.SystemInterface testSystem = + new neqsim.thermo.system.SystemSrkCPAstatoil((273.15 + 25.0), 50.00); + testSystem.addComponent("methane", 180.00); + testSystem.addComponent("ethane", 10.00); + testSystem.addComponent("propane", 1.00); + // testSystem.addComponent("n-nonane", 1.00); + // testSystem.addComponent("water", 1.00); + testSystem.createDatabase(true); + testSystem.setMultiPhaseCheck(true); + testSystem.setMixingRule(10); - testSystem.setPressure(20.0, "bara"); - testSystem.setTemperature(20.0, "C"); - testSystem.setTotalFlowRate(100.0, "Am3/hr"); + testSystem.setPressure(20.0, "bara"); + testSystem.setTemperature(20.0, "C"); + testSystem.setTotalFlowRate(100.0, "Am3/hr"); - testSystem.useVolumeCorrection(false); + testSystem.useVolumeCorrection(false); - ThermodynamicOperations ops = new ThermodynamicOperations(testSystem); - ops.TPflash(); - System.out.println("actual flow 1 " + testSystem.getFlowRate("m3/hr")); - double stdflowrate = testSystem.getFlowRate("Sm3/day"); - testSystem.setTotalFlowRate(stdflowrate, "Sm3/day"); - ops.TPflash(); + ThermodynamicOperations ops = new ThermodynamicOperations(testSystem); + ops.TPflash(); + System.out.println("actual flow 1 " + testSystem.getFlowRate("m3/hr")); + double stdflowrate = testSystem.getFlowRate("Sm3/day"); + testSystem.setTotalFlowRate(stdflowrate, "Sm3/day"); + ops.TPflash(); - double actFLowRate = testSystem.getFlowRate("m3/hr"); + double actFLowRate = testSystem.getFlowRate("m3/hr"); - System.out.println("actual flow 2 " + actFLowRate); + System.out.println("actual flow 2 " + actFLowRate); - Stream stream_1 = new Stream("Stream1", testSystem); + Stream stream_1 = new Stream("Stream1", testSystem); - neqsim.process.equipment.compressor.Compressor compr = - new neqsim.process.equipment.compressor.Compressor("compr", - stream_1); - compr.setOutletPressure(80.0); - compr.setOutTemperature(345.0); - compr.setUsePolytropicCalc(true); - // compr.setNumberOfCompressorCalcSteps(10); + neqsim.process.equipment.compressor.Compressor compr = + new neqsim.process.equipment.compressor.Compressor("compr", stream_1); + compr.setOutletPressure(80.0); + compr.setOutTemperature(345.0); + compr.setUsePolytropicCalc(true); + // compr.setNumberOfCompressorCalcSteps(10); - neqsim.process.processmodel.ProcessSystem operations = - new neqsim.process.processmodel.ProcessSystem(); - operations.add(stream_1); - operations.add(compr); + neqsim.process.processmodel.ProcessSystem operations = + new neqsim.process.processmodel.ProcessSystem(); + operations.add(stream_1); + operations.add(compr); - operations.run(); - compr.displayResult(); - System.out.println( - "polytropic head " + stream_1.getThermoSystem().getFlowRate("m3/hr") + " m3/hr"); - System.out.println("polytropic head " + compr.getPolytropicHead("kJ/kg") + " kJ/kg"); - System.out.println("polytropic efficiency " + compr.getPolytropicEfficiency()); + operations.run(); + compr.displayResult(); + System.out + .println("polytropic head " + stream_1.getThermoSystem().getFlowRate("m3/hr") + " m3/hr"); + System.out.println("polytropic head " + compr.getPolytropicHead("kJ/kg") + " kJ/kg"); + System.out.println("polytropic efficiency " + compr.getPolytropicEfficiency()); - // operations.displayResult(); + // operations.displayResult(); - // compr.solvePolytropicEfficiency(compr.getOutStream().getTemperature() + - // 0.01); - // operations.displayResult(); - } + // compr.solvePolytropicEfficiency(compr.getOutStream().getTemperature() + + // 0.01); + // operations.displayResult(); + } } diff --git a/src/test/java/neqsim/process/util/example/process2.java b/src/test/java/neqsim/process/util/example/process2.java index ccd869cdb..bc6e36f45 100644 --- a/src/test/java/neqsim/process/util/example/process2.java +++ b/src/test/java/neqsim/process/util/example/process2.java @@ -9,69 +9,73 @@ import neqsim.process.equipment.stream.Stream; import neqsim.process.equipment.stream.StreamInterface; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

process2 class.

+ *

+ * process2 class. + *

* * @author asmund * @version $Id: $Id * @since 2.2.3 */ public class process2 { - /** - * This method is just meant to test the thermo package. - * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String args[]) { - neqsim.thermo.system.SystemInterface testSystem = - new neqsim.thermo.system.SystemSrkEos((273.15 + 25.0), 20.00); - testSystem.addComponent("CO2", 1200.00); - testSystem.addComponent("water", 1200.0); - testSystem.createDatabase(true); - testSystem.setMixingRule(2); - ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); - testOps.TPflash(); + /** + * This method is just meant to test the thermo package. + * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + neqsim.thermo.system.SystemInterface testSystem = + new neqsim.thermo.system.SystemSrkEos((273.15 + 25.0), 20.00); + testSystem.addComponent("CO2", 1200.00); + testSystem.addComponent("water", 1200.0); + testSystem.createDatabase(true); + testSystem.setMixingRule(2); + ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); + testOps.TPflash(); - Stream stream_1 = new Stream("Stream1", testSystem); + Stream stream_1 = new Stream("Stream1", testSystem); - Heater heater = new Heater("heater", stream_1); - heater.setOutTemperature(310.0); + Heater heater = new Heater("heater", stream_1); + heater.setOutTemperature(310.0); - MixerInterface mixer = new StaticMixer("Mixer 1"); - mixer.addStream(heater.getOutletStream()); + MixerInterface mixer = new StaticMixer("Mixer 1"); + mixer.addStream(heater.getOutletStream()); - StreamInterface stream_3 = mixer.getOutletStream(); - stream_3.setName("stream3"); + StreamInterface stream_3 = mixer.getOutletStream(); + stream_3.setName("stream3"); - Separator separator = new Separator("Separator 1", stream_3); - Stream stream_2 = new Stream("stream2", separator.getGasOutStream()); + Separator separator = new Separator("Separator 1", stream_3); + Stream stream_2 = new Stream("stream2", separator.getGasOutStream()); - SplitterInterface splitter = new Splitter("splitter", stream_2, 2); - StreamInterface stream_5 = splitter.getSplitStream(0); - stream_5.setName("stream5"); + SplitterInterface splitter = new Splitter("splitter", stream_2, 2); + StreamInterface stream_5 = splitter.getSplitStream(0); + stream_5.setName("stream5"); - mixer.addStream(stream_5); + mixer.addStream(stream_5); - neqsim.process.processmodel.ProcessSystem operations = - new neqsim.process.processmodel.ProcessSystem(); - operations.add(stream_1); - operations.add(heater); - operations.add(mixer); - operations.add(stream_3); - operations.add(separator); - operations.add(stream_2); - operations.add(splitter); - operations.add(stream_5); + neqsim.process.processmodel.ProcessSystem operations = + new neqsim.process.processmodel.ProcessSystem(); + operations.add(stream_1); + operations.add(heater); + operations.add(mixer); + operations.add(stream_3); + operations.add(separator); + operations.add(stream_2); + operations.add(splitter); + operations.add(stream_5); - for (int i = 0; i < 3; i++) { - operations.run(); - } - // operations.displayResult(); + for (int i = 0; i < 3; i++) { + operations.run(); + } + // operations.displayResult(); - for (int i = 0; i < 3; i++) { - operations.run(); - } - operations.displayResult(); + for (int i = 0; i < 3; i++) { + operations.run(); } + operations.displayResult(); + } } diff --git a/src/test/java/neqsim/process/util/example/processCO2MDEA.java b/src/test/java/neqsim/process/util/example/processCO2MDEA.java index cc0dff2ee..3d735d8af 100644 --- a/src/test/java/neqsim/process/util/example/processCO2MDEA.java +++ b/src/test/java/neqsim/process/util/example/processCO2MDEA.java @@ -7,57 +7,61 @@ import neqsim.process.processmodel.ProcessSystem; import neqsim.thermo.system.SystemFurstElectrolyteEos; import neqsim.thermo.system.SystemInterface; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

processCO2MDEA class.

+ *

+ * processCO2MDEA class. + *

* * @author asmund * @version $Id: $Id * @since 2.2.3 */ public class processCO2MDEA { - /** - * This method is just meant to test the thermo package. - * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String args[]) { - SystemInterface testSystem = new SystemFurstElectrolyteEos(275.3, 10.01325); - - testSystem.addComponent("methane", 0.061152181, 0); - testSystem.addComponent("CO2", 0.061152181, 0); - testSystem.addComponent("water", 0.0862204876, 1); - testSystem.addComponent("MDEA", 0.008, 1); - - testSystem.chemicalReactionInit(); - testSystem.setMixingRule(4); - - Stream stream1 = new NeqStream("stream1", testSystem); - - Pipeline pipe = new TwoPhasePipeLine("pipe", stream1); - pipe.setOutputFileName("c:/tempNew3.nc"); - pipe.setInitialFlowPattern("annular"); - int numberOfLegs = 1, numberOfNodesInLeg = 10; - double[] legHeights = {0, 0}; - double[] legPositions = {0.0, 0.5}; - double[] pipeDiameters = {0.02507588, 0.02507588}; - double[] outerTemperature = {295.0, 295.0}; - double[] pipeWallRoughness = {1e-5, 1e-5}; - pipe.setNumberOfLegs(numberOfLegs); - pipe.setNumberOfNodesInLeg(numberOfNodesInLeg); - pipe.setLegPositions(legPositions); - pipe.setHeightProfile(legHeights); - pipe.setPipeDiameters(pipeDiameters); - pipe.setPipeWallRoughness(pipeWallRoughness); - pipe.setOuterTemperatures(outerTemperature); - pipe.setEquilibriumMassTransfer(false); - pipe.setEquilibriumHeatTransfer(true); - - ProcessSystem operations = new ProcessSystem(); - operations.add(stream1); - operations.add(pipe); - - operations.run(); - operations.displayResult(); - } + /** + * This method is just meant to test the thermo package. + * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + SystemInterface testSystem = new SystemFurstElectrolyteEos(275.3, 10.01325); + + testSystem.addComponent("methane", 0.061152181, 0); + testSystem.addComponent("CO2", 0.061152181, 0); + testSystem.addComponent("water", 0.0862204876, 1); + testSystem.addComponent("MDEA", 0.008, 1); + + testSystem.chemicalReactionInit(); + testSystem.setMixingRule(4); + + Stream stream1 = new NeqStream("stream1", testSystem); + + Pipeline pipe = new TwoPhasePipeLine("pipe", stream1); + pipe.setOutputFileName("c:/tempNew3.nc"); + pipe.setInitialFlowPattern("annular"); + int numberOfLegs = 1, numberOfNodesInLeg = 10; + double[] legHeights = {0, 0}; + double[] legPositions = {0.0, 0.5}; + double[] pipeDiameters = {0.02507588, 0.02507588}; + double[] outerTemperature = {295.0, 295.0}; + double[] pipeWallRoughness = {1e-5, 1e-5}; + pipe.setNumberOfLegs(numberOfLegs); + pipe.setNumberOfNodesInLeg(numberOfNodesInLeg); + pipe.setLegPositions(legPositions); + pipe.setHeightProfile(legHeights); + pipe.setPipeDiameters(pipeDiameters); + pipe.setPipeWallRoughness(pipeWallRoughness); + pipe.setOuterTemperatures(outerTemperature); + pipe.setEquilibriumMassTransfer(false); + pipe.setEquilibriumHeatTransfer(true); + + ProcessSystem operations = new ProcessSystem(); + operations.add(stream1); + operations.add(pipe); + + operations.run(); + operations.displayResult(); + } } diff --git a/src/test/java/neqsim/process/util/example/propaneCoolingCycle.java b/src/test/java/neqsim/process/util/example/propaneCoolingCycle.java index ed3da4766..fcf435cb7 100644 --- a/src/test/java/neqsim/process/util/example/propaneCoolingCycle.java +++ b/src/test/java/neqsim/process/util/example/propaneCoolingCycle.java @@ -6,6 +6,7 @@ import neqsim.process.equipment.stream.Stream; import neqsim.process.equipment.util.SetPoint; import neqsim.process.equipment.valve.ThrottlingValve; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -17,80 +18,81 @@ * @since 2.2.3 */ public class propaneCoolingCycle { - /** - *

- * main. - *

- * - * @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.SystemPrEos((273.15 + 30.0), 10.700); - testSystem.addComponent("propane", 4759.0, "kg/hr"); - testSystem.createDatabase(true); - - testSystem.setMixingRule(2); - - Stream stream_1 = new Stream("Stream1", testSystem); - stream_1.setSpecification("bubT"); - - ThrottlingValve JTvalve = new ThrottlingValve("JTvalve", stream_1); - JTvalve.setOutletPressure(1.11325); - - Cooler cooler = new Cooler("cooler", JTvalve.getOutletStream()); - // cooler.setPressureDrop(0.35); - cooler.setSpecification("out stream"); - - Stream stream_2 = new Stream("stream_2", cooler.getOutletStream()); - stream_2.setSpecification("dewP"); - // stream_2.setTemperature(-40.0, "C"); - - cooler.setOutletStream(stream_2); - - SetPoint setLPpressure = new SetPoint("set", JTvalve, "pressure", stream_2); - - Compressor compressor1 = new Compressor("compressor1", stream_2); - // compressor1.setIsentropicEfficiency(0.75); - // compressor1.setPower(180000); - compressor1.setSpecification("out stream"); - compressor1.setOutletPressure(stream_1.getPressure()); - - Heater heater = new Heater("heater", compressor1.getOutletStream()); - heater.setPressureDrop(0.07); - heater.setSpecification("out stream"); - heater.setOutletStream(stream_1); - - neqsim.process.processmodel.ProcessSystem operations = - new neqsim.process.processmodel.ProcessSystem(); - operations.add(stream_1); - - operations.add(JTvalve); - operations.add(cooler); - - operations.add(stream_2); - operations.add(setLPpressure); - - operations.add(compressor1); - operations.add(heater); - - operations.run(); - operations.run(); - stream_1.displayResult(); - JTvalve.displayResult(); - // compressor1.displayResult(); - // stream_2.displayResult(); - // operations.displayResult(); - cooler.run(); - - JTvalve.getOutletStream().displayResult(); - stream_2.displayResult(); - - System.out.println("compressor work" + compressor1.getEnergy() / 1.0e3 + " kW " - + " compressor temperature " + compressor1.getOutTemperature()); - // System.out.println("compressor isentropic ef " + - // compressor1.getIsentropicEfficiency()); - System.out.println("cooler duty " + cooler.getEnergyInput() / 1.0e3 + " kW"); - System.out.println("heater duty " + heater.getEnergyInput() / 1.0e3 + " kW"); - } + /** + *

+ * main. + *

+ * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + neqsim.thermo.system.SystemInterface testSystem = + new neqsim.thermo.system.SystemPrEos((273.15 + 30.0), 10.700); + testSystem.addComponent("propane", 4759.0, "kg/hr"); + testSystem.createDatabase(true); + + testSystem.setMixingRule(2); + + Stream stream_1 = new Stream("Stream1", testSystem); + stream_1.setSpecification("bubT"); + + ThrottlingValve JTvalve = new ThrottlingValve("JTvalve", stream_1); + JTvalve.setOutletPressure(1.11325); + + Cooler cooler = new Cooler("cooler", JTvalve.getOutletStream()); + // cooler.setPressureDrop(0.35); + cooler.setSpecification("out stream"); + + Stream stream_2 = new Stream("stream_2", cooler.getOutletStream()); + stream_2.setSpecification("dewP"); + // stream_2.setTemperature(-40.0, "C"); + + cooler.setOutletStream(stream_2); + + SetPoint setLPpressure = new SetPoint("set", JTvalve, "pressure", stream_2); + + Compressor compressor1 = new Compressor("compressor1", stream_2); + // compressor1.setIsentropicEfficiency(0.75); + // compressor1.setPower(180000); + compressor1.setSpecification("out stream"); + compressor1.setOutletPressure(stream_1.getPressure()); + + Heater heater = new Heater("heater", compressor1.getOutletStream()); + heater.setPressureDrop(0.07); + heater.setSpecification("out stream"); + heater.setOutletStream(stream_1); + + neqsim.process.processmodel.ProcessSystem operations = + new neqsim.process.processmodel.ProcessSystem(); + operations.add(stream_1); + + operations.add(JTvalve); + operations.add(cooler); + + operations.add(stream_2); + operations.add(setLPpressure); + + operations.add(compressor1); + operations.add(heater); + + operations.run(); + operations.run(); + stream_1.displayResult(); + JTvalve.displayResult(); + // compressor1.displayResult(); + // stream_2.displayResult(); + // operations.displayResult(); + cooler.run(); + + JTvalve.getOutletStream().displayResult(); + stream_2.displayResult(); + + System.out.println("compressor work" + compressor1.getEnergy() / 1.0e3 + " kW " + + " compressor temperature " + compressor1.getOutTemperature()); + // System.out.println("compressor isentropic ef " + + // compressor1.getIsentropicEfficiency()); + System.out.println("cooler duty " + cooler.getEnergyInput() / 1.0e3 + " kW"); + System.out.println("heater duty " + heater.getEnergyInput() / 1.0e3 + " kW"); + } } diff --git a/src/test/java/neqsim/process/util/example/propaneMultiStageCoolingCycle.java b/src/test/java/neqsim/process/util/example/propaneMultiStageCoolingCycle.java index 6aad038b9..bc7f497f6 100644 --- a/src/test/java/neqsim/process/util/example/propaneMultiStageCoolingCycle.java +++ b/src/test/java/neqsim/process/util/example/propaneMultiStageCoolingCycle.java @@ -5,6 +5,7 @@ import neqsim.process.equipment.stream.Stream; import neqsim.process.equipment.stream.StreamInterface; import neqsim.process.equipment.valve.ThrottlingValve; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -16,159 +17,160 @@ * @since 2.2.3 */ public class propaneMultiStageCoolingCycle { - /** - *

- * main. - *

- * - * @param args an array of {@link java.lang.String} objects + /** + *

+ * main. + *

+ * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + neqsim.thermo.system.SystemInterface testSystem = + new neqsim.thermo.system.SystemPrEos((273.15 + 30.0), 15.00); + testSystem.addComponent("propane", 261759.0, "kg/hr"); + testSystem.createDatabase(true); + testSystem.setMixingRule(2); + + neqsim.thermo.system.SystemInterface testSystemEthane = + new neqsim.thermo.system.SystemPrEos((273.15 - 40.0), 15.00); + testSystemEthane.addComponent("ethane", 130759.0, "kg/hr"); + testSystemEthane.createDatabase(true); + testSystemEthane.setMixingRule(2); + + Stream stream_Ethane = new Stream("Stream1", testSystemEthane); + // stream_Ethane.setSpecification("bubT"); + + // ThrottlingValve JTvalve1_et = new ThrottlingValve(stream_Ethane); + // JTvalve1_et.setOutletPressure(5.0); + + neqsim.thermo.system.SystemInterface testSystem2 = + new neqsim.thermo.system.SystemPrEos((273.15 + 30.0), 60.00); + testSystem2.addComponent("methane", 0.9); + testSystem2.addComponent("ethane", 0.08); + testSystem2.addComponent("propane", 0.1); + testSystem2.addComponent("n-butane", 0.01); + testSystem2.addComponent("n-hexane", 0.006); + testSystem2.createDatabase(true); + testSystem2.setMixingRule(2); + testSystem2.setTotalFlowRate(8.0, "MSm3/day"); + + StreamInterface naturalGasInletStream = new Stream("NG stream", testSystem2); + + Stream stream_1 = new Stream("Stream1", testSystem); + stream_1.setSpecification("bubT"); + + ThrottlingValve JTvalve1 = new ThrottlingValve("JTvalve1", stream_1); + JTvalve1.setOutletPressure(5.0); + + HeatExchanger heatEx1_et = new HeatExchanger("heatEx1_et", stream_Ethane); + heatEx1_et.setFeedStream(1, JTvalve1.getOutletStream()); + heatEx1_et.setSpecification("out stream"); + + Stream stream_Ethane_out = new Stream("stream_Ethane_out", heatEx1_et.getOutStream(0)); + stream_Ethane.setSpecification("bubT"); + heatEx1_et.setOutStream(0, stream_Ethane_out); + + ThrottlingValve JTvalve1_et = new ThrottlingValve("JTvalve1_et", stream_Ethane_out); + JTvalve1_et.setOutletPressure(2.5); + + HeatExchanger heatEx1 = new HeatExchanger("heatEx1", naturalGasInletStream); + heatEx1.setGuessOutTemperature(273.0 + 10.0); + heatEx1.setUAvalue(10000.0); + heatEx1.setFeedStream(1, heatEx1_et.getOutStream(1)); + + Stream coldMidGasFromPropaneCooler = + new Stream("coldMidGasFromPropaneCooler", heatEx1.getOutStream(0)); + + StreamInterface heatExPropaneOut = heatEx1.getOutStream(1); + + Separator sep1 = new Separator("sep1", heatExPropaneOut); + + ThrottlingValve JTvalve2 = new ThrottlingValve("JTvalve2", sep1.getLiquidOutStream()); + JTvalve2.setOutletPressure(1.5); + + HeatExchanger heatEx2 = new HeatExchanger("heatEx2", heatEx1.getOutStream(0)); + heatEx2.setFeedStream(1, JTvalve2.getOutletStream()); + heatEx2.setSpecification("out stream"); + + // Cooler cooler = new Cooler(heatEx2.getOutStream(1)); + // cooler.setSpecification("out stream"); + + Stream stream_2 = new Stream("stream_2", heatEx2.getOutStream(1)); + stream_2.setSpecification("dewP"); + stream_2.run(); + heatEx2.setOutStream(1, stream_2); + + Stream coldGasFromPropaneCooler = + new Stream("coldGasFromPropaneCooler", heatEx2.getOutStream(0)); + + HeatExchanger heatEx22 = new HeatExchanger("heatEx22", heatEx2.getOutStream(0)); + heatEx22.setFeedStream(1, JTvalve1_et.getOutletStream()); + heatEx22.setSpecification("out stream"); + + Stream stream_22 = new Stream("stream_22", heatEx22.getOutStream(1)); + stream_22.setSpecification("dewP"); + heatEx22.setOutStream(1, stream_22); + + Stream heatEx22stream = new Stream("heatEx22stream", heatEx22.getOutStream(0)); + + neqsim.process.processmodel.ProcessSystem operations = + new neqsim.process.processmodel.ProcessSystem(); + + operations.add(stream_Ethane); + operations.add(stream_1); + operations.add(naturalGasInletStream); + operations.add(JTvalve1); + operations.add(heatEx1_et); + operations.add(stream_Ethane_out); + operations.add(JTvalve1_et); + operations.add(heatEx1); + operations.add(coldMidGasFromPropaneCooler); + operations.add(heatExPropaneOut); + operations.add(sep1); + operations.add(JTvalve2); + operations.add(heatEx2); + // operations.add(cooler); + operations.add(stream_2); + operations.add(coldGasFromPropaneCooler); + operations.add(heatEx22); + operations.add(stream_22); + operations.add(heatEx22stream); + + operations.run(); + operations.run(); + + // heatEx1.run(); + + coldGasFromPropaneCooler.displayResult(); + heatEx22stream.getFluid().display(); + JTvalve2.getOutletStream().getFluid().display(); + stream_22.getFluid().display(); + + // JTvalve1.displayResult(); + // heatExPropaneOut.displayResult(); + + /* + * heatEx1.getOutStream(0).displayResult(); heatEx1.getInStream(1).displayResult(); + * heatEx1.getOutStream(1).displayResult(); System.out.println("heatex duty " + + * heatEx1.getDuty()); heatEx2.run(); heatEx2.getOutStream(0).displayResult(); + * heatEx2.getInStream(1).displayResult(); heatEx2.getOutStream(1).displayResult(); + * System.out.println("heatex duty " + heatEx2.getDuty()); */ - public static void main(String args[]) { - neqsim.thermo.system.SystemInterface testSystem = - new neqsim.thermo.system.SystemPrEos((273.15 + 30.0), 15.00); - testSystem.addComponent("propane", 261759.0, "kg/hr"); - testSystem.createDatabase(true); - testSystem.setMixingRule(2); - - neqsim.thermo.system.SystemInterface testSystemEthane = - new neqsim.thermo.system.SystemPrEos((273.15 - 40.0), 15.00); - testSystemEthane.addComponent("ethane", 130759.0, "kg/hr"); - testSystemEthane.createDatabase(true); - testSystemEthane.setMixingRule(2); - - Stream stream_Ethane = new Stream("Stream1", testSystemEthane); - // stream_Ethane.setSpecification("bubT"); - - // ThrottlingValve JTvalve1_et = new ThrottlingValve(stream_Ethane); - // JTvalve1_et.setOutletPressure(5.0); - - neqsim.thermo.system.SystemInterface testSystem2 = - new neqsim.thermo.system.SystemPrEos((273.15 + 30.0), 60.00); - testSystem2.addComponent("methane", 0.9); - testSystem2.addComponent("ethane", 0.08); - testSystem2.addComponent("propane", 0.1); - testSystem2.addComponent("n-butane", 0.01); - testSystem2.addComponent("n-hexane", 0.006); - testSystem2.createDatabase(true); - testSystem2.setMixingRule(2); - testSystem2.setTotalFlowRate(8.0, "MSm3/day"); - - StreamInterface naturalGasInletStream = new Stream("NG stream", testSystem2); - - Stream stream_1 = new Stream("Stream1", testSystem); - stream_1.setSpecification("bubT"); - - ThrottlingValve JTvalve1 = new ThrottlingValve("JTvalve1", stream_1); - JTvalve1.setOutletPressure(5.0); - - HeatExchanger heatEx1_et = new HeatExchanger("heatEx1_et", stream_Ethane); - heatEx1_et.setFeedStream(1, JTvalve1.getOutletStream()); - heatEx1_et.setSpecification("out stream"); - - Stream stream_Ethane_out = new Stream("stream_Ethane_out", heatEx1_et.getOutStream(0)); - stream_Ethane.setSpecification("bubT"); - heatEx1_et.setOutStream(0, stream_Ethane_out); - - ThrottlingValve JTvalve1_et = new ThrottlingValve("JTvalve1_et", stream_Ethane_out); - JTvalve1_et.setOutletPressure(2.5); - - HeatExchanger heatEx1 = new HeatExchanger("heatEx1", naturalGasInletStream); - heatEx1.setGuessOutTemperature(273.0 + 10.0); - heatEx1.setUAvalue(10000.0); - heatEx1.setFeedStream(1, heatEx1_et.getOutStream(1)); - - Stream coldMidGasFromPropaneCooler = - new Stream("coldMidGasFromPropaneCooler", heatEx1.getOutStream(0)); - - StreamInterface heatExPropaneOut = heatEx1.getOutStream(1); - - Separator sep1 = new Separator("sep1", heatExPropaneOut); - - ThrottlingValve JTvalve2 = new ThrottlingValve("JTvalve2", sep1.getLiquidOutStream()); - JTvalve2.setOutletPressure(1.5); - - HeatExchanger heatEx2 = new HeatExchanger("heatEx2", heatEx1.getOutStream(0)); - heatEx2.setFeedStream(1, JTvalve2.getOutletStream()); - heatEx2.setSpecification("out stream"); - - // Cooler cooler = new Cooler(heatEx2.getOutStream(1)); - // cooler.setSpecification("out stream"); - - Stream stream_2 = new Stream("stream_2", heatEx2.getOutStream(1)); - stream_2.setSpecification("dewP"); - stream_2.run(); - heatEx2.setOutStream(1, stream_2); - - Stream coldGasFromPropaneCooler = - new Stream("coldGasFromPropaneCooler", heatEx2.getOutStream(0)); - - HeatExchanger heatEx22 = new HeatExchanger("heatEx22", heatEx2.getOutStream(0)); - heatEx22.setFeedStream(1, JTvalve1_et.getOutletStream()); - heatEx22.setSpecification("out stream"); - - Stream stream_22 = new Stream("stream_22", heatEx22.getOutStream(1)); - stream_22.setSpecification("dewP"); - heatEx22.setOutStream(1, stream_22); - - Stream heatEx22stream = new Stream("heatEx22stream", heatEx22.getOutStream(0)); - - neqsim.process.processmodel.ProcessSystem operations = - new neqsim.process.processmodel.ProcessSystem(); - - operations.add(stream_Ethane); - operations.add(stream_1); - operations.add(naturalGasInletStream); - operations.add(JTvalve1); - operations.add(heatEx1_et); - operations.add(stream_Ethane_out); - operations.add(JTvalve1_et); - operations.add(heatEx1); - operations.add(coldMidGasFromPropaneCooler); - operations.add(heatExPropaneOut); - operations.add(sep1); - operations.add(JTvalve2); - operations.add(heatEx2); - // operations.add(cooler); - operations.add(stream_2); - operations.add(coldGasFromPropaneCooler); - operations.add(heatEx22); - operations.add(stream_22); - operations.add(heatEx22stream); - - operations.run(); - operations.run(); - - // heatEx1.run(); - - coldGasFromPropaneCooler.displayResult(); - heatEx22stream.getFluid().display(); - JTvalve2.getOutletStream().getFluid().display(); - stream_22.getFluid().display(); - - // JTvalve1.displayResult(); - // heatExPropaneOut.displayResult(); - - /* - * heatEx1.getOutStream(0).displayResult(); heatEx1.getInStream(1).displayResult(); - * heatEx1.getOutStream(1).displayResult(); System.out.println("heatex duty " + - * heatEx1.getDuty()); heatEx2.run(); heatEx2.getOutStream(0).displayResult(); - * heatEx2.getInStream(1).displayResult(); heatEx2.getOutStream(1).displayResult(); - * System.out.println("heatex duty " + heatEx2.getDuty()); - */ - // stream_3.displayResult(); - // compressor1.displayResult(); - // cooler3.displayResult(); - // JTvalve.displayResult(); - // compressor1.displayResult(); - // stream_2.displayResult(); - // operations.displayResult(); - // System.out.println("compressor work" + compressor1.getEnergy()/1.0e3 + " - // kW"); - // System.out.println("compressor isentropic ef " + - // compressor1.getIsentropicEfficiency()); - // System.out.println("cooler duty " + cooler.getEnergyInput()/1.0e3 + " kW"); - // System.out.println("cooler2 duty " + cooler2.getEnergyInput()/1.0e3 + " kW"); - // System.out.println("cooler3 duty " + cooler3.getEnergyInput()/1.0e3 + " kW"); - // System.out.println("heater duty " + heater.getEnergyInput()); - } + // stream_3.displayResult(); + // compressor1.displayResult(); + // cooler3.displayResult(); + // JTvalve.displayResult(); + // compressor1.displayResult(); + // stream_2.displayResult(); + // operations.displayResult(); + // System.out.println("compressor work" + compressor1.getEnergy()/1.0e3 + " + // kW"); + // System.out.println("compressor isentropic ef " + + // compressor1.getIsentropicEfficiency()); + // System.out.println("cooler duty " + cooler.getEnergyInput()/1.0e3 + " kW"); + // System.out.println("cooler2 duty " + cooler2.getEnergyInput()/1.0e3 + " kW"); + // System.out.println("cooler3 duty " + cooler3.getEnergyInput()/1.0e3 + " kW"); + // System.out.println("heater duty " + heater.getEnergyInput()); + } } diff --git a/src/test/java/neqsim/process/util/example/propaneTwoStageCoolingCycle.java b/src/test/java/neqsim/process/util/example/propaneTwoStageCoolingCycle.java index f214f2e94..d9a8962f8 100644 --- a/src/test/java/neqsim/process/util/example/propaneTwoStageCoolingCycle.java +++ b/src/test/java/neqsim/process/util/example/propaneTwoStageCoolingCycle.java @@ -8,127 +8,133 @@ import neqsim.process.equipment.stream.Stream; import neqsim.process.equipment.stream.StreamInterface; import neqsim.process.equipment.valve.ThrottlingValve; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

propaneTwoStageCoolingCycle class.

+ *

+ * propaneTwoStageCoolingCycle class. + *

* * @author esol * @version $Id: $Id * @since 2.2.3 */ public class propaneTwoStageCoolingCycle { - /** - *

main.

- * - * @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.SystemPrEos((273.15 + 30.0), 10.79); - // testSystem.addComponent("ethane", 10.0, "kg/hr"); - testSystem.addComponent("propane", 4759.0, "kg/hr"); - testSystem.createDatabase(true); - testSystem.setMixingRule(2); - - Stream stream_1 = new Stream("Stream1", testSystem); - stream_1.setSpecification("bubT"); - - ThrottlingValve JTvalve1 = new ThrottlingValve("JTvalve1", stream_1); - JTvalve1.setOutletPressure(3.0); - - Separator medPresSep = new Separator("medPresSep", JTvalve1.getOutletStream()); - - ThrottlingValve JTvalve2 = new ThrottlingValve("JTvalve2", medPresSep.getLiquidOutStream()); - JTvalve2.setOutletPressure(1.11325); - - StreamInterface lowHStream = new Stream("lowHStream", JTvalve2.getOutletStream()); - - Cooler cooler2 = new Cooler("cooler2", JTvalve2.getOutletStream()); - // cooler2.setPressureDrop(0.35); - cooler2.setSpecification("out stream"); - - Stream stream_3 = new Stream("stream_3", cooler2.getOutletStream()); - stream_3.setSpecification("dewP"); - // stream_3.setTemperature(-40.0, "C"); - cooler2.setOutletStream(stream_3); - - StreamInterface lowHStream2 = new Stream("lowHStream2", stream_3); - - Compressor compressor1 = new Compressor("compressor1", stream_3); - compressor1.setOutletPressure(JTvalve1.getOutletPressure()); - - Mixer propMixer = new Mixer("propMixer"); - propMixer.addStream(compressor1.getOutletStream()); - propMixer.addStream(medPresSep.getGasOutStream()); - - Compressor compressor2 = new Compressor("compressor2", propMixer.getOutletStream()); - compressor2.setOutletPressure(stream_1.getPressure()); - - Heater cooler3 = new Heater("Heater", compressor2.getOutletStream()); - cooler3.setSpecification("out stream"); - cooler3.setOutletStream(stream_1); - - neqsim.process.processmodel.ProcessSystem operations = - new neqsim.process.processmodel.ProcessSystem(); - operations.add(stream_1); - operations.add(JTvalve1); - operations.add(medPresSep); - operations.add(JTvalve2); - operations.add(lowHStream); - operations.add(cooler2); - operations.add(stream_3); - operations.add(lowHStream2); - operations.add(compressor1); - operations.add(propMixer); - operations.add(compressor2); - operations.add(cooler3); - - // operations.add(compressor1); - // operations.add(heater); - - operations.run(); - operations.run(); - ThrottlingValve JTvalve3 = new ThrottlingValve("JTvalve3", medPresSep.getLiquidOutStream()); - JTvalve3.setOutletPressure(2.03981146); - JTvalve3.run(); - JTvalve3.getOutletStream().displayResult(); - // JTvalve1.getOutStream().displayResult(); - // JTvalve2.getOutStream().displayResult(); - // medPresSep.displayResult(); - // stream_3.run(); - // stream_3.displayResult(); - // medPresSep.getLiquidOutStream().displayResult(); - // JTvalve2.getOutStream().displayResult(); - - // lowHStream.displayResult(); - // lowHStream2.displayResult(); - // medPresSep.displayResult(); - // medPresSep.getLiquidOutStream().displayResult(); - // stream_3.displayResult(); - // compressor1.displayResult(); - // propMixer.getOutStream().displayResult(); - // cooler2.getFluid().display(); - // cooler2.run(); - // cooler3.displayResult(); - // JTvalve.displayResult(); - // compressor1.displayResult(); - // stream_2.displayResult(); - // operations.displayResult(); - System.out.println("compressor1 work" + compressor1.getEnergy() / 1.0e3 + " kW"); - System.out.println("compressor2 work" + compressor2.getEnergy() / 1.0e3 + " kW"); - - // System.out.println("compressor isentropic ef " + - // compressor1.getIsentropicEfficiency()); - System.out.println("cooler2 mass flow " - + cooler2.getOutletStream().getFluid().getFlowRate("kg/hr") + " kg/hr"); - System.out.println("cooler3 mass flow " - + cooler3.getOutletStream().getFluid().getFlowRate("kg/hr") + " kg/hr"); - - System.out.println("delta enthalpy " + (stream_3.getFluid().getEnthalpy() - - JTvalve2.getOutletStream().getFluid().getEnthalpy())); - - System.out.println("cooler2 duty " + cooler2.getEnergyInput() / 1.0e3 + " kW"); - System.out.println("cooler3 duty " + cooler3.getEnergyInput() / 1.0e3 + " kW"); - // System.out.println("heater duty " + heater.getEnergyInput()); - } + /** + *

+ * main. + *

+ * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + neqsim.thermo.system.SystemInterface testSystem = + new neqsim.thermo.system.SystemPrEos((273.15 + 30.0), 10.79); + // testSystem.addComponent("ethane", 10.0, "kg/hr"); + testSystem.addComponent("propane", 4759.0, "kg/hr"); + testSystem.createDatabase(true); + testSystem.setMixingRule(2); + + Stream stream_1 = new Stream("Stream1", testSystem); + stream_1.setSpecification("bubT"); + + ThrottlingValve JTvalve1 = new ThrottlingValve("JTvalve1", stream_1); + JTvalve1.setOutletPressure(3.0); + + Separator medPresSep = new Separator("medPresSep", JTvalve1.getOutletStream()); + + ThrottlingValve JTvalve2 = new ThrottlingValve("JTvalve2", medPresSep.getLiquidOutStream()); + JTvalve2.setOutletPressure(1.11325); + + StreamInterface lowHStream = new Stream("lowHStream", JTvalve2.getOutletStream()); + + Cooler cooler2 = new Cooler("cooler2", JTvalve2.getOutletStream()); + // cooler2.setPressureDrop(0.35); + cooler2.setSpecification("out stream"); + + Stream stream_3 = new Stream("stream_3", cooler2.getOutletStream()); + stream_3.setSpecification("dewP"); + // stream_3.setTemperature(-40.0, "C"); + cooler2.setOutletStream(stream_3); + + StreamInterface lowHStream2 = new Stream("lowHStream2", stream_3); + + Compressor compressor1 = new Compressor("compressor1", stream_3); + compressor1.setOutletPressure(JTvalve1.getOutletPressure()); + + Mixer propMixer = new Mixer("propMixer"); + propMixer.addStream(compressor1.getOutletStream()); + propMixer.addStream(medPresSep.getGasOutStream()); + + Compressor compressor2 = new Compressor("compressor2", propMixer.getOutletStream()); + compressor2.setOutletPressure(stream_1.getPressure()); + + Heater cooler3 = new Heater("Heater", compressor2.getOutletStream()); + cooler3.setSpecification("out stream"); + cooler3.setOutletStream(stream_1); + + neqsim.process.processmodel.ProcessSystem operations = + new neqsim.process.processmodel.ProcessSystem(); + operations.add(stream_1); + operations.add(JTvalve1); + operations.add(medPresSep); + operations.add(JTvalve2); + operations.add(lowHStream); + operations.add(cooler2); + operations.add(stream_3); + operations.add(lowHStream2); + operations.add(compressor1); + operations.add(propMixer); + operations.add(compressor2); + operations.add(cooler3); + + // operations.add(compressor1); + // operations.add(heater); + + operations.run(); + operations.run(); + ThrottlingValve JTvalve3 = new ThrottlingValve("JTvalve3", medPresSep.getLiquidOutStream()); + JTvalve3.setOutletPressure(2.03981146); + JTvalve3.run(); + JTvalve3.getOutletStream().displayResult(); + // JTvalve1.getOutStream().displayResult(); + // JTvalve2.getOutStream().displayResult(); + // medPresSep.displayResult(); + // stream_3.run(); + // stream_3.displayResult(); + // medPresSep.getLiquidOutStream().displayResult(); + // JTvalve2.getOutStream().displayResult(); + + // lowHStream.displayResult(); + // lowHStream2.displayResult(); + // medPresSep.displayResult(); + // medPresSep.getLiquidOutStream().displayResult(); + // stream_3.displayResult(); + // compressor1.displayResult(); + // propMixer.getOutStream().displayResult(); + // cooler2.getFluid().display(); + // cooler2.run(); + // cooler3.displayResult(); + // JTvalve.displayResult(); + // compressor1.displayResult(); + // stream_2.displayResult(); + // operations.displayResult(); + System.out.println("compressor1 work" + compressor1.getEnergy() / 1.0e3 + " kW"); + System.out.println("compressor2 work" + compressor2.getEnergy() / 1.0e3 + " kW"); + + // System.out.println("compressor isentropic ef " + + // compressor1.getIsentropicEfficiency()); + System.out.println("cooler2 mass flow " + + cooler2.getOutletStream().getFluid().getFlowRate("kg/hr") + " kg/hr"); + System.out.println("cooler3 mass flow " + + cooler3.getOutletStream().getFluid().getFlowRate("kg/hr") + " kg/hr"); + + System.out.println("delta enthalpy " + (stream_3.getFluid().getEnthalpy() + - JTvalve2.getOutletStream().getFluid().getEnthalpy())); + + System.out.println("cooler2 duty " + cooler2.getEnergyInput() / 1.0e3 + " kW"); + System.out.println("cooler3 duty " + cooler3.getEnergyInput() / 1.0e3 + " kW"); + // System.out.println("heater duty " + heater.getEnergyInput()); + } } diff --git a/src/test/java/neqsim/process/util/example/shtokman.java b/src/test/java/neqsim/process/util/example/shtokman.java index bbb3cbd9d..f9a1575fb 100644 --- a/src/test/java/neqsim/process/util/example/shtokman.java +++ b/src/test/java/neqsim/process/util/example/shtokman.java @@ -3,6 +3,7 @@ import neqsim.process.equipment.separator.Separator; import neqsim.process.equipment.stream.Stream; import neqsim.process.equipment.stream.StreamInterface; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -19,6 +20,7 @@ public class shtokman { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { neqsim.thermo.system.SystemInterface testSystem = new neqsim.thermo.system.SystemSrkCPAs((273.15 + 35.0), 135.00); diff --git a/src/test/java/neqsim/process/util/example/shtokman_MEG.java b/src/test/java/neqsim/process/util/example/shtokman_MEG.java index 8df9870ee..560c6d2c3 100644 --- a/src/test/java/neqsim/process/util/example/shtokman_MEG.java +++ b/src/test/java/neqsim/process/util/example/shtokman_MEG.java @@ -6,6 +6,7 @@ import neqsim.process.equipment.stream.Stream; import neqsim.process.equipment.stream.StreamInterface; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -24,6 +25,7 @@ public class shtokman_MEG { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { neqsim.thermo.system.SystemInterface testSystem = new neqsim.thermo.system.SystemSrkCPAstatoil((273.15 + 42.0), 130.00); diff --git a/src/test/java/neqsim/process/util/example/simpleGasScrubber.java b/src/test/java/neqsim/process/util/example/simpleGasScrubber.java index 009530c56..71e1272db 100644 --- a/src/test/java/neqsim/process/util/example/simpleGasScrubber.java +++ b/src/test/java/neqsim/process/util/example/simpleGasScrubber.java @@ -3,6 +3,7 @@ import neqsim.process.equipment.separator.GasScrubberSimple; import neqsim.process.equipment.stream.Stream; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -19,6 +20,7 @@ public class simpleGasScrubber { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { neqsim.thermo.system.SystemInterface testSystem = new neqsim.thermo.system.SystemSrkEos((273.15 + 25.0), 20.00); diff --git a/src/test/java/neqsim/process/util/example/simpleTopSideProcess.java b/src/test/java/neqsim/process/util/example/simpleTopSideProcess.java index e38238411..6ecd451f9 100644 --- a/src/test/java/neqsim/process/util/example/simpleTopSideProcess.java +++ b/src/test/java/neqsim/process/util/example/simpleTopSideProcess.java @@ -7,87 +7,90 @@ import neqsim.process.equipment.separator.Separator; import neqsim.process.equipment.stream.Stream; import neqsim.process.equipment.valve.ThrottlingValve; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

simpleTopSideProcess class.

+ *

+ * simpleTopSideProcess class. + *

* * @author asmund * @version $Id: $Id * @since 2.2.3 */ public class simpleTopSideProcess { - /** - * This method is just meant to test the thermo package. - * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String args[]) { - neqsim.thermo.system.SystemInterface testSystem = - new neqsim.thermo.system.SystemSrkEos((273.15 + 50.0), 50.00); - testSystem.addComponent("methane", 900.00); - testSystem.addComponent("ethane", 200.00); - testSystem.addComponent("n-hexane", 200.0); - testSystem.addComponent("n-nonane", 200.0); - testSystem.addComponent("nC10", 20.0); - testSystem.addComponent("nC13", 10.0); - testSystem.createDatabase(true); - testSystem.setMixingRule(2); - Stream stream_1 = new Stream("Stream1", testSystem); - - Mixer mixerHP = new neqsim.process.equipment.mixer.StaticMixer("Mixer HP"); - mixerHP.addStream(stream_1); - - Separator separator = new Separator("Separator 1", mixerHP.getOutletStream()); - - ThrottlingValve LP_valve = new ThrottlingValve("LPventil", separator.getLiquidOutStream()); - LP_valve.setOutletPressure(5.0); - - Separator LPseparator = new Separator("Separator 1", LP_valve.getOutletStream()); - - Compressor LPcompressor = new Compressor("LPcompressor", LPseparator.getGasOutStream()); - LPcompressor.setOutletPressure(50.0); - - Heater heaterLP = new Heater("heaterLP", LPcompressor.getOutletStream()); - heaterLP.setOutTemperature(270.25); - - Stream stream_2 = new Stream("cooled gas", heaterLP.getOutletStream()); - - GasScrubberSimple gasScrubber = new GasScrubberSimple("Scrubber", stream_2); - - Stream stream_3 = new Stream("liq from scrubber gas", gasScrubber.getLiquidOutStream()); - - mixerHP.addStream(stream_3); - - Mixer mixer = - new neqsim.process.equipment.mixer.StaticMixer("Mixer export"); - mixer.addStream(separator.getGasOutStream()); - mixer.addStream(gasScrubber.getGasOutStream()); - - Compressor HPcompressor = new Compressor("HPcompressor", mixer.getOutletStream()); - HPcompressor.setOutletPressure(200.0); - - neqsim.process.processmodel.ProcessSystem operations = - new neqsim.process.processmodel.ProcessSystem(); - operations.add(stream_1); - operations.add(mixerHP); - operations.add(separator); - operations.add(LP_valve); - operations.add(LPseparator); - operations.add(LPcompressor); - operations.add(heaterLP); - operations.add(stream_2); - operations.add(gasScrubber); - operations.add(stream_3); - operations.add(mixer); - operations.add(HPcompressor); - - operations.run(); - operations.run(); - operations.run(); - operations.run(); - operations.run(); - operations.run(); - - operations.displayResult(); - } + /** + * This method is just meant to test the thermo package. + * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + neqsim.thermo.system.SystemInterface testSystem = + new neqsim.thermo.system.SystemSrkEos((273.15 + 50.0), 50.00); + testSystem.addComponent("methane", 900.00); + testSystem.addComponent("ethane", 200.00); + testSystem.addComponent("n-hexane", 200.0); + testSystem.addComponent("n-nonane", 200.0); + testSystem.addComponent("nC10", 20.0); + testSystem.addComponent("nC13", 10.0); + testSystem.createDatabase(true); + testSystem.setMixingRule(2); + Stream stream_1 = new Stream("Stream1", testSystem); + + Mixer mixerHP = new neqsim.process.equipment.mixer.StaticMixer("Mixer HP"); + mixerHP.addStream(stream_1); + + Separator separator = new Separator("Separator 1", mixerHP.getOutletStream()); + + ThrottlingValve LP_valve = new ThrottlingValve("LPventil", separator.getLiquidOutStream()); + LP_valve.setOutletPressure(5.0); + + Separator LPseparator = new Separator("Separator 1", LP_valve.getOutletStream()); + + Compressor LPcompressor = new Compressor("LPcompressor", LPseparator.getGasOutStream()); + LPcompressor.setOutletPressure(50.0); + + Heater heaterLP = new Heater("heaterLP", LPcompressor.getOutletStream()); + heaterLP.setOutTemperature(270.25); + + Stream stream_2 = new Stream("cooled gas", heaterLP.getOutletStream()); + + GasScrubberSimple gasScrubber = new GasScrubberSimple("Scrubber", stream_2); + + Stream stream_3 = new Stream("liq from scrubber gas", gasScrubber.getLiquidOutStream()); + + mixerHP.addStream(stream_3); + + Mixer mixer = new neqsim.process.equipment.mixer.StaticMixer("Mixer export"); + mixer.addStream(separator.getGasOutStream()); + mixer.addStream(gasScrubber.getGasOutStream()); + + Compressor HPcompressor = new Compressor("HPcompressor", mixer.getOutletStream()); + HPcompressor.setOutletPressure(200.0); + + neqsim.process.processmodel.ProcessSystem operations = + new neqsim.process.processmodel.ProcessSystem(); + operations.add(stream_1); + operations.add(mixerHP); + operations.add(separator); + operations.add(LP_valve); + operations.add(LPseparator); + operations.add(LPcompressor); + operations.add(heaterLP); + operations.add(stream_2); + operations.add(gasScrubber); + operations.add(stream_3); + operations.add(mixer); + operations.add(HPcompressor); + + operations.run(); + operations.run(); + operations.run(); + operations.run(); + operations.run(); + operations.run(); + + operations.displayResult(); + } } diff --git a/src/test/java/neqsim/process/util/example/simpleTopSideProcess2.java b/src/test/java/neqsim/process/util/example/simpleTopSideProcess2.java index 4caa2899b..16ab18fe8 100644 --- a/src/test/java/neqsim/process/util/example/simpleTopSideProcess2.java +++ b/src/test/java/neqsim/process/util/example/simpleTopSideProcess2.java @@ -6,6 +6,7 @@ import neqsim.process.equipment.separator.ThreePhaseSeparator; import neqsim.process.equipment.stream.Stream; import neqsim.process.equipment.util.Recycle; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -22,6 +23,7 @@ public class simpleTopSideProcess2 { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { neqsim.thermo.Fluid fluidCreator = new neqsim.thermo.Fluid(); fluidCreator.setHasWater(true); diff --git a/src/test/java/neqsim/process/util/example/testGasScrubber.java b/src/test/java/neqsim/process/util/example/testGasScrubber.java index bf53cbebb..930666cf6 100644 --- a/src/test/java/neqsim/process/util/example/testGasScrubber.java +++ b/src/test/java/neqsim/process/util/example/testGasScrubber.java @@ -6,6 +6,7 @@ import neqsim.process.equipment.separator.GasScrubberSimple; import neqsim.process.equipment.stream.Stream; import neqsim.process.equipment.stream.StreamInterface; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -26,6 +27,7 @@ public class testGasScrubber { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { neqsim.thermo.system.SystemInterface testSystem = new neqsim.thermo.system.SystemSrkEos((273.15 + 20.0), 66.00); diff --git a/src/test/java/neqsim/process/util/example/threePhaseSeparation.java b/src/test/java/neqsim/process/util/example/threePhaseSeparation.java index 8a39dd97d..7166fcac7 100644 --- a/src/test/java/neqsim/process/util/example/threePhaseSeparation.java +++ b/src/test/java/neqsim/process/util/example/threePhaseSeparation.java @@ -4,6 +4,7 @@ import neqsim.process.equipment.stream.Stream; import neqsim.process.equipment.util.MoleFractionControllerUtil; import neqsim.process.equipment.valve.ThrottlingValve; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -20,6 +21,7 @@ public class threePhaseSeparation { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { neqsim.thermo.system.SystemInterface system1 = new neqsim.thermo.system.SystemSrkCPAs((273.15 + 15.0), 80.00); diff --git a/src/test/java/neqsim/process/util/example/threePhaseSeparation_1.java b/src/test/java/neqsim/process/util/example/threePhaseSeparation_1.java index 8c4b3d544..43134c09b 100644 --- a/src/test/java/neqsim/process/util/example/threePhaseSeparation_1.java +++ b/src/test/java/neqsim/process/util/example/threePhaseSeparation_1.java @@ -3,66 +3,68 @@ import neqsim.process.equipment.separator.ThreePhaseSeparator; import neqsim.process.equipment.stream.Stream; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

threePhaseSeparation_1 class.

+ *

+ * threePhaseSeparation_1 class. + *

* * @author asmund * @version $Id: $Id * @since 2.2.3 */ public class threePhaseSeparation_1 { - /** - * This method is just meant to test the thermo package. - * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String args[]) { - neqsim.thermo.system.SystemInterface testSystem = new neqsim.thermo.system.SystemSrkCPAs((273.15 + 25.0), - 50.00); - testSystem.addComponent("methane", 10.00); - testSystem.addComponent("n-heptane", 1.0); - testSystem.addComponent("water", 1.0); - testSystem.createDatabase(true); - testSystem.setMixingRule(7); + /** + * This method is just meant to test the thermo package. + * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + neqsim.thermo.system.SystemInterface testSystem = + new neqsim.thermo.system.SystemSrkCPAs((273.15 + 25.0), 50.00); + testSystem.addComponent("methane", 10.00); + testSystem.addComponent("n-heptane", 1.0); + testSystem.addComponent("water", 1.0); + testSystem.createDatabase(true); + testSystem.setMixingRule(7); - Stream stream_1 = new Stream("Stream1", testSystem); + Stream stream_1 = new Stream("Stream1", testSystem); - ThreePhaseSeparator separator = new ThreePhaseSeparator("Separator", stream_1); - separator.setEntrainment(0.01, "feed", "mole", "oil", "gas"); - separator.setEntrainment(0.01, "feed", "mole", "gas", "oil"); - separator.setEntrainment(0.001, "feed", "mole", "aqueous", "gas"); - separator.setEntrainment(0.01, "feed", "mole", "oil", "aqueous"); - Stream stream_2 = new Stream("gas from separator", separator.getGasOutStream()); - Stream stream_3 = new Stream("oil from separator", separator.getOilOutStream()); - Stream stream_4 = new Stream("water from separator", separator.getWaterOutStream()); + ThreePhaseSeparator separator = new ThreePhaseSeparator("Separator", stream_1); + separator.setEntrainment(0.01, "feed", "mole", "oil", "gas"); + separator.setEntrainment(0.01, "feed", "mole", "gas", "oil"); + separator.setEntrainment(0.001, "feed", "mole", "aqueous", "gas"); + separator.setEntrainment(0.01, "feed", "mole", "oil", "aqueous"); + Stream stream_2 = new Stream("gas from separator", separator.getGasOutStream()); + Stream stream_3 = new Stream("oil from separator", separator.getOilOutStream()); + Stream stream_4 = new Stream("water from separator", separator.getWaterOutStream()); - neqsim.process.processmodel.ProcessSystem operations = - new neqsim.process.processmodel.ProcessSystem(); - operations.add(stream_1); - operations.add(separator); - operations.add(stream_2); - operations.add(stream_3); - operations.add(stream_4); + neqsim.process.processmodel.ProcessSystem operations = + new neqsim.process.processmodel.ProcessSystem(); + operations.add(stream_1); + operations.add(separator); + operations.add(stream_2); + operations.add(stream_3); + operations.add(stream_4); - operations.run(); - // stream_4.displayResult(); - // operations.displayResult(); + operations.run(); + // stream_4.displayResult(); + // operations.displayResult(); - stream_2.getThermoSystem().display(); - ThermodynamicOperations ops = new ThermodynamicOperations(stream_2.getThermoSystem()); - double volume = stream_2.getThermoSystem().getVolume(); - stream_2.getThermoSystem() - .setTemperature(stream_2.getThermoSystem().getTemperature() - 10.0); - ops.TVflash(volume); - stream_2.getThermoSystem().display(); + stream_2.getThermoSystem().display(); + ThermodynamicOperations ops = new ThermodynamicOperations(stream_2.getThermoSystem()); + double volume = stream_2.getThermoSystem().getVolume(); + stream_2.getThermoSystem().setTemperature(stream_2.getThermoSystem().getTemperature() - 10.0); + ops.TVflash(volume); + stream_2.getThermoSystem().display(); - stream_3.getThermoSystem().display(); - ThermodynamicOperations ops2 = new ThermodynamicOperations(stream_3.getThermoSystem()); - volume = stream_3.getThermoSystem().getVolume(); - stream_3.getThermoSystem() - .setTemperature(stream_3.getThermoSystem().getTemperature() - 10.0); - ops2.TVflash(volume); - stream_3.getThermoSystem().display(); - } + stream_3.getThermoSystem().display(); + ThermodynamicOperations ops2 = new ThermodynamicOperations(stream_3.getThermoSystem()); + volume = stream_3.getThermoSystem().getVolume(); + stream_3.getThermoSystem().setTemperature(stream_3.getThermoSystem().getTemperature() - 10.0); + ops2.TVflash(volume); + stream_3.getThermoSystem().display(); + } } diff --git a/src/test/java/neqsim/statistics/montecarlosimulation/util/example/TestLevenbergMarquardt_MonteCarlo.java b/src/test/java/neqsim/statistics/montecarlosimulation/util/example/TestLevenbergMarquardt_MonteCarlo.java index a6dbbc16d..4929bbe99 100644 --- a/src/test/java/neqsim/statistics/montecarlosimulation/util/example/TestLevenbergMarquardt_MonteCarlo.java +++ b/src/test/java/neqsim/statistics/montecarlosimulation/util/example/TestLevenbergMarquardt_MonteCarlo.java @@ -4,52 +4,58 @@ import neqsim.statistics.parameterfitting.SampleSet; import neqsim.statistics.parameterfitting.SampleValue; import neqsim.statistics.parameterfitting.nonlinearparameterfitting.LevenbergMarquardt; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

TestLevenbergMarquardt_MonteCarlo class.

+ *

+ * TestLevenbergMarquardt_MonteCarlo class. + *

* * @author Even Solbraa * @since 2.2.3 * @version $Id: $Id */ -public class TestLevenbergMarquardt_MonteCarlo extends neqsim.NeqSimTest{ - /** - *

main.

- * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String[] args) { - ArrayList sampleList = new ArrayList(); - - TestFunction function = new TestFunction(); - - double sample1[] = {0.1}; // temperature - double standardDeviation1[] = {0.1}; - SampleValue sample_01 = new SampleValue(0.5, 0.05, sample1, standardDeviation1); - sample_01.setFunction(function); - sampleList.add(sample_01); - - double sample2[] = {0.2}; // temperature - double standardDeviation2[] = {0.2}; - SampleValue sample_02 = new SampleValue(0.3, 0.03, sample2, standardDeviation2); - sample_02.setFunction(function); - sampleList.add(sample_02); - - double sample3[] = {0.3}; // temperature - double standardDeviation3[] = {0.3}; - SampleValue sample_03 = new SampleValue(0.1, 0.01, sample3, standardDeviation3); - sample_03.setFunction(function); - sampleList.add(sample_03); - - double guess[] = {0.311, 1.0}; - function.setInitialGuess(guess); - - LevenbergMarquardt optim = new LevenbergMarquardt(); - SampleSet sampleSet = new SampleSet(sampleList); - optim.setSampleSet(sampleSet); - - optim.solve(); - optim.runMonteCarloSimulation(); - optim.displayCurveFit(); - } +public class TestLevenbergMarquardt_MonteCarlo extends neqsim.NeqSimTest { + /** + *

+ * main. + *

+ * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String[] args) { + ArrayList sampleList = new ArrayList(); + + TestFunction function = new TestFunction(); + + double sample1[] = {0.1}; // temperature + double standardDeviation1[] = {0.1}; + SampleValue sample_01 = new SampleValue(0.5, 0.05, sample1, standardDeviation1); + sample_01.setFunction(function); + sampleList.add(sample_01); + + double sample2[] = {0.2}; // temperature + double standardDeviation2[] = {0.2}; + SampleValue sample_02 = new SampleValue(0.3, 0.03, sample2, standardDeviation2); + sample_02.setFunction(function); + sampleList.add(sample_02); + + double sample3[] = {0.3}; // temperature + double standardDeviation3[] = {0.3}; + SampleValue sample_03 = new SampleValue(0.1, 0.01, sample3, standardDeviation3); + sample_03.setFunction(function); + sampleList.add(sample_03); + + double guess[] = {0.311, 1.0}; + function.setInitialGuess(guess); + + LevenbergMarquardt optim = new LevenbergMarquardt(); + SampleSet sampleSet = new SampleSet(sampleList); + optim.setSampleSet(sampleSet); + + optim.solve(); + optim.runMonteCarloSimulation(); + optim.displayCurveFit(); + } } diff --git a/src/test/java/neqsim/statistics/parameterfitting/util/example/TestLevenbergMarquardt.java b/src/test/java/neqsim/statistics/parameterfitting/util/example/TestLevenbergMarquardt.java index b73bf86db..c3a185558 100644 --- a/src/test/java/neqsim/statistics/parameterfitting/util/example/TestLevenbergMarquardt.java +++ b/src/test/java/neqsim/statistics/parameterfitting/util/example/TestLevenbergMarquardt.java @@ -4,6 +4,7 @@ import neqsim.statistics.parameterfitting.SampleSet; import neqsim.statistics.parameterfitting.SampleValue; import neqsim.statistics.parameterfitting.nonlinearparameterfitting.LevenbergMarquardt; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -14,46 +15,47 @@ * @since 2.2.3 * @version $Id: $Id */ -public class TestLevenbergMarquardt extends neqsim.NeqSimTest{ - /** - *

- * main. - *

- * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String[] args) { - ArrayList sampleList = new ArrayList(); - - TestFunction function = new TestFunction(); - - double sample1[] = {0.1}; - double standardDeviation1[] = {0.1}; - SampleValue sample_01 = new SampleValue(0.5, 0.05, sample1, standardDeviation1); - sample_01.setFunction(function); - sampleList.add(sample_01); - - double sample2[] = {0.2}; - double standardDeviation2[] = {0.2}; - SampleValue sample_02 = new SampleValue(0.3, 0.03, sample2, standardDeviation2); - sample_02.setFunction(function); - sampleList.add(sample_02); - - double sample3[] = {0.3}; - double standardDeviation3[] = {0.3}; - SampleValue sample_03 = new SampleValue(0.1, 0.01, sample3, standardDeviation3); - sample_03.setFunction(function); - sampleList.add(sample_03); - - double guess[] = {0.311, 1.0}; - function.setInitialGuess(guess); - - LevenbergMarquardt optim = new LevenbergMarquardt(); - SampleSet sampleSet = new SampleSet(sampleList); - optim.setSampleSet(sampleSet); - - optim.solve(); - // optim.runMonteCarloSimulation(); - optim.displayCurveFit(); - } +public class TestLevenbergMarquardt extends neqsim.NeqSimTest { + /** + *

+ * main. + *

+ * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String[] args) { + ArrayList sampleList = new ArrayList(); + + TestFunction function = new TestFunction(); + + double sample1[] = {0.1}; + double standardDeviation1[] = {0.1}; + SampleValue sample_01 = new SampleValue(0.5, 0.05, sample1, standardDeviation1); + sample_01.setFunction(function); + sampleList.add(sample_01); + + double sample2[] = {0.2}; + double standardDeviation2[] = {0.2}; + SampleValue sample_02 = new SampleValue(0.3, 0.03, sample2, standardDeviation2); + sample_02.setFunction(function); + sampleList.add(sample_02); + + double sample3[] = {0.3}; + double standardDeviation3[] = {0.3}; + SampleValue sample_03 = new SampleValue(0.1, 0.01, sample3, standardDeviation3); + sample_03.setFunction(function); + sampleList.add(sample_03); + + double guess[] = {0.311, 1.0}; + function.setInitialGuess(guess); + + LevenbergMarquardt optim = new LevenbergMarquardt(); + SampleSet sampleSet = new SampleSet(sampleList); + optim.setSampleSet(sampleSet); + + optim.solve(); + // optim.runMonteCarloSimulation(); + optim.displayCurveFit(); + } } diff --git a/src/test/java/neqsim/thermo/util/example/ActivityCalc.java b/src/test/java/neqsim/thermo/util/example/ActivityCalc.java index 0b8cb73b3..7e02a2e30 100644 --- a/src/test/java/neqsim/thermo/util/example/ActivityCalc.java +++ b/src/test/java/neqsim/thermo/util/example/ActivityCalc.java @@ -10,6 +10,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPAstatoil; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -28,6 +29,7 @@ public class ActivityCalc { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkCPAstatoil(273.15 + 42, ThermodynamicConstantsInterface.referencePressure); diff --git a/src/test/java/neqsim/thermo/util/example/AmineFlash.java b/src/test/java/neqsim/thermo/util/example/AmineFlash.java index c02a49397..a5f319b1b 100644 --- a/src/test/java/neqsim/thermo/util/example/AmineFlash.java +++ b/src/test/java/neqsim/thermo/util/example/AmineFlash.java @@ -6,6 +6,7 @@ import neqsim.thermo.system.SystemFurstElectrolyteEos; import neqsim.thermo.system.SystemInterface; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -26,6 +27,7 @@ public class AmineFlash { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemFurstElectrolyteEos(273.15 + 50, ThermodynamicConstantsInterface.referencePressure); diff --git a/src/test/java/neqsim/thermo/util/example/BubbleFlash.java b/src/test/java/neqsim/thermo/util/example/BubbleFlash.java index 5cddded1d..b154771e4 100644 --- a/src/test/java/neqsim/thermo/util/example/BubbleFlash.java +++ b/src/test/java/neqsim/thermo/util/example/BubbleFlash.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPAstatoil; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class BubbleFlash { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkCPAstatoil(273.15 + 25.0, 1.0); // SystemInterface testSystem = new SystemSrkEos(288, 26.9); diff --git a/src/test/java/neqsim/thermo/util/example/BubbleFlashCPA.java b/src/test/java/neqsim/thermo/util/example/BubbleFlashCPA.java index d8cd6e1a7..6c3aa8644 100644 --- a/src/test/java/neqsim/thermo/util/example/BubbleFlashCPA.java +++ b/src/test/java/neqsim/thermo/util/example/BubbleFlashCPA.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPAstatoil; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class BubbleFlashCPA { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkCPAstatoil(273.15 - 36.6, 63.2); // SystemInterface testSystem = new SystemSrkEos(273.15- 50.6, 63.2); diff --git a/src/test/java/neqsim/thermo/util/example/CalcActivityFromPR.java b/src/test/java/neqsim/thermo/util/example/CalcActivityFromPR.java index 4695a82a8..246fecf03 100644 --- a/src/test/java/neqsim/thermo/util/example/CalcActivityFromPR.java +++ b/src/test/java/neqsim/thermo/util/example/CalcActivityFromPR.java @@ -2,30 +2,36 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemPCSAFT; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

CalcActivityFromPR class.

+ *

+ * CalcActivityFromPR class. + *

* * @author esol * @version $Id: $Id * @since 2.2.3 */ public class CalcActivityFromPR { - /** - *

main.

- * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String[] args) { - SystemInterface testSystem = new SystemPCSAFT(150.0, 10.0); - testSystem.addComponent("methane", 1.0); - testSystem.addComponent("n-hexane", 10.0001); - testSystem.setMixingRule(1); - testSystem.createDatabase(true); - testSystem.init(0); - testSystem.init(3); - // System.out.println("activity coefficient " + - // testSystem.getPhase(1).getActivityCoefficient(1,1)); - testSystem.display(); - } + /** + *

+ * main. + *

+ * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String[] args) { + SystemInterface testSystem = new SystemPCSAFT(150.0, 10.0); + testSystem.addComponent("methane", 1.0); + testSystem.addComponent("n-hexane", 10.0001); + testSystem.setMixingRule(1); + testSystem.createDatabase(true); + testSystem.init(0); + testSystem.init(3); + // System.out.println("activity coefficient " + + // testSystem.getPhase(1).getActivityCoefficient(1,1)); + testSystem.display(); + } } diff --git a/src/test/java/neqsim/thermo/util/example/ConsistencyTest.java b/src/test/java/neqsim/thermo/util/example/ConsistencyTest.java index 667fb001b..9a16d9bba 100644 --- a/src/test/java/neqsim/thermo/util/example/ConsistencyTest.java +++ b/src/test/java/neqsim/thermo/util/example/ConsistencyTest.java @@ -3,29 +3,33 @@ import neqsim.thermo.ThermodynamicModelTest; import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

ConsistencyTest class.

+ *

+ * ConsistencyTest class. + *

* * @author esol * @version $Id: $Id * @since 2.2.3 */ public class ConsistencyTest { - /** - * A easy implementation to test a thermodynamic model - * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String args[]) { - SystemInterface testSystem = new SystemSrkEos(310.0, 10); - testSystem.addComponent("methane", 10.0); - testSystem.addComponent("CO2", 10.0); + /** + * A easy implementation to test a thermodynamic model + * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + SystemInterface testSystem = new SystemSrkEos(310.0, 10); + testSystem.addComponent("methane", 10.0); + testSystem.addComponent("CO2", 10.0); - testSystem.setMixingRule(4); - testSystem.init(0); - testSystem.init(1); - ThermodynamicModelTest testModel = new ThermodynamicModelTest(testSystem); - testModel.runTest(); - } + testSystem.setMixingRule(4); + testSystem.init(0); + testSystem.init(1); + ThermodynamicModelTest testModel = new ThermodynamicModelTest(testSystem); + testModel.runTest(); + } } diff --git a/src/test/java/neqsim/thermo/util/example/CricondenbarTest.java b/src/test/java/neqsim/thermo/util/example/CricondenbarTest.java index f420cc94f..a7b84c61d 100644 --- a/src/test/java/neqsim/thermo/util/example/CricondenbarTest.java +++ b/src/test/java/neqsim/thermo/util/example/CricondenbarTest.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class CricondenbarTest { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { SystemInterface testSystem = new SystemSrkEos(249.02, 50.0); testSystem.addComponent("methane", 0.943); diff --git a/src/test/java/neqsim/thermo/util/example/DewPointCurve.java b/src/test/java/neqsim/thermo/util/example/DewPointCurve.java index 505f02285..7915e672d 100644 --- a/src/test/java/neqsim/thermo/util/example/DewPointCurve.java +++ b/src/test/java/neqsim/thermo/util/example/DewPointCurve.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemPrEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class DewPointCurve { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemPrEos(260.0, 5.0); // testSystem = new SystemCSPsrkEos(290,50.6); diff --git a/src/test/java/neqsim/thermo/util/example/FreezeMEGwater.java b/src/test/java/neqsim/thermo/util/example/FreezeMEGwater.java index c5bec1c0a..a294c3a6a 100644 --- a/src/test/java/neqsim/thermo/util/example/FreezeMEGwater.java +++ b/src/test/java/neqsim/thermo/util/example/FreezeMEGwater.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPAstatoil; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class FreezeMEGwater { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkCPAstatoil(273.15 + 10.0, 1.0); // SystemInterface testSystem = new SystemSrkCPAstatoil(273.15-23.0, 1.0); diff --git a/src/test/java/neqsim/thermo/util/example/FreezingPoint.java b/src/test/java/neqsim/thermo/util/example/FreezingPoint.java index c4408a321..44de79fb8 100644 --- a/src/test/java/neqsim/thermo/util/example/FreezingPoint.java +++ b/src/test/java/neqsim/thermo/util/example/FreezingPoint.java @@ -6,6 +6,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPAstatoil; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -26,6 +27,7 @@ public class FreezingPoint { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { // SystemInterface testSystem = new SystemSrkSchwartzentruberEos(260.15,19.00); SystemInterface testSystem = diff --git a/src/test/java/neqsim/thermo/util/example/H2Sdistribution.java b/src/test/java/neqsim/thermo/util/example/H2Sdistribution.java index cddb51ef0..c770fe086 100644 --- a/src/test/java/neqsim/thermo/util/example/H2Sdistribution.java +++ b/src/test/java/neqsim/thermo/util/example/H2Sdistribution.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemElectrolyteCPAstatoil; import neqsim.thermo.system.SystemInterface; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class H2Sdistribution { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemElectrolyteCPAstatoil(308.3, 32.8); testSystem.addComponent("H2S", 3100.0e-6); diff --git a/src/test/java/neqsim/thermo/util/example/HeatOfVaporization.java b/src/test/java/neqsim/thermo/util/example/HeatOfVaporization.java index 310570aa1..f003e090a 100644 --- a/src/test/java/neqsim/thermo/util/example/HeatOfVaporization.java +++ b/src/test/java/neqsim/thermo/util/example/HeatOfVaporization.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPAstatoil; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class HeatOfVaporization { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { SystemInterface testSystem = new SystemSrkCPAstatoil(288.15000000, 0.001); testSystem.addComponent("TEG", 1); diff --git a/src/test/java/neqsim/thermo/util/example/HenryConstantCalc.java b/src/test/java/neqsim/thermo/util/example/HenryConstantCalc.java index 2c72ea372..e8e5b7b5b 100644 --- a/src/test/java/neqsim/thermo/util/example/HenryConstantCalc.java +++ b/src/test/java/neqsim/thermo/util/example/HenryConstantCalc.java @@ -3,6 +3,7 @@ import neqsim.thermo.system.SystemElectrolyteCPA; import neqsim.thermo.system.SystemInterface; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -21,6 +22,7 @@ public class HenryConstantCalc { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemElectrolyteCPA(273.15 + 40.0, 10.0); ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); diff --git a/src/test/java/neqsim/thermo/util/example/HydrateFlash.java b/src/test/java/neqsim/thermo/util/example/HydrateFlash.java index a464a2f6f..abde54d3a 100644 --- a/src/test/java/neqsim/thermo/util/example/HydrateFlash.java +++ b/src/test/java/neqsim/thermo/util/example/HydrateFlash.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class HydrateFlash { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { // SystemInterface testSystem = new SystemSrkCPAstatoil(288.15, 10.450); SystemInterface testSystem = new SystemSrkEos(273.15 + 10.5, 51.0); diff --git a/src/test/java/neqsim/thermo/util/example/HydrateFlash2.java b/src/test/java/neqsim/thermo/util/example/HydrateFlash2.java index 1e33184d5..bbe71bef3 100644 --- a/src/test/java/neqsim/thermo/util/example/HydrateFlash2.java +++ b/src/test/java/neqsim/thermo/util/example/HydrateFlash2.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPAstatoil; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class HydrateFlash2 { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { SystemInterface testSystem = new SystemSrkCPAstatoil(273.15 + 10, 122.0); diff --git a/src/test/java/neqsim/thermo/util/example/LNGFlash.java b/src/test/java/neqsim/thermo/util/example/LNGFlash.java index 6573de04a..3d633f221 100644 --- a/src/test/java/neqsim/thermo/util/example/LNGFlash.java +++ b/src/test/java/neqsim/thermo/util/example/LNGFlash.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class LNGFlash { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkEos(20, 5.0); diff --git a/src/test/java/neqsim/thermo/util/example/LNGfilling.java b/src/test/java/neqsim/thermo/util/example/LNGfilling.java index 508cef52d..e7ee4553b 100644 --- a/src/test/java/neqsim/thermo/util/example/LNGfilling.java +++ b/src/test/java/neqsim/thermo/util/example/LNGfilling.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPAs; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class LNGfilling { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { // SystemInterface testSystem2 = // util.serialization.SerializationManager.open("c:/test.fluid"); diff --git a/src/test/java/neqsim/thermo/util/example/LNGfreezing.java b/src/test/java/neqsim/thermo/util/example/LNGfreezing.java index cfdbd5268..db8f3cf7d 100644 --- a/src/test/java/neqsim/thermo/util/example/LNGfreezing.java +++ b/src/test/java/neqsim/thermo/util/example/LNGfreezing.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class LNGfreezing { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkEos(273.15 - 152.8, 5); // SystemInterface testSystem = new SystemSrkTwuCoonEos(162, 59.7); diff --git a/src/test/java/neqsim/thermo/util/example/LNGfreezingTestSolid1.java b/src/test/java/neqsim/thermo/util/example/LNGfreezingTestSolid1.java index 23961a703..f0462aa11 100644 --- a/src/test/java/neqsim/thermo/util/example/LNGfreezingTestSolid1.java +++ b/src/test/java/neqsim/thermo/util/example/LNGfreezingTestSolid1.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class LNGfreezingTestSolid1 { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { // SystemInterface testSystem = new SystemUMRPRUMCEos(225.8488, 10.0); SystemInterface testSystem = new SystemSrkEos(245.0, 10.0); diff --git a/src/test/java/neqsim/thermo/util/example/ModelTest.java b/src/test/java/neqsim/thermo/util/example/ModelTest.java index 271aa832e..de6608a31 100644 --- a/src/test/java/neqsim/thermo/util/example/ModelTest.java +++ b/src/test/java/neqsim/thermo/util/example/ModelTest.java @@ -5,83 +5,89 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPA; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

ModelTest class.

+ *

+ * ModelTest class. + *

* * @author esol * @since 2.2.3 * @version $Id: $Id */ public class ModelTest { - static Logger logger = LogManager.getLogger(ModelTest.class); + static Logger logger = LogManager.getLogger(ModelTest.class); - /** - *

main.

- * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String args[]) { - // SystemInterface testSystem = new SystemFurstElectrolyteEos(280.15,10.00); + /** + *

+ * main. + *

+ * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + // SystemInterface testSystem = new SystemFurstElectrolyteEos(280.15,10.00); - //SystemInterface testSystem = new SystemSrkEos(500, 1.0); - //SystemInterface testSystem = new SystemSrkCPAstatoil(273+150, 1.0); - SystemInterface testSystem = new SystemSrkCPA(273+150, 70); - //SystemInterface testSystem = new SystemSrkCPAs(273+150, 1.0); - // SystemInterface testSystem = new SystemElectrolyteCPAstatoil(273.14 + 12, - // 61.0); - // SystemInterface testSystem = new SystemFurstElectrolyteEos(273.14 + 12, - // 61.0); - // SystemInterface testSystem = new SystemUMRPRUMCEos(300.0, 10.0); - // SystemInterface testSystem = new SystemSrkEos(298.15, - // ThermodynamicConstantsInterface.referencePressure); - ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); + // SystemInterface testSystem = new SystemSrkEos(500, 1.0); + // SystemInterface testSystem = new SystemSrkCPAstatoil(273+150, 1.0); + SystemInterface testSystem = new SystemSrkCPA(273 + 150, 70); + // SystemInterface testSystem = new SystemSrkCPAs(273+150, 1.0); + // SystemInterface testSystem = new SystemElectrolyteCPAstatoil(273.14 + 12, + // 61.0); + // SystemInterface testSystem = new SystemFurstElectrolyteEos(273.14 + 12, + // 61.0); + // SystemInterface testSystem = new SystemUMRPRUMCEos(300.0, 10.0); + // SystemInterface testSystem = new SystemSrkEos(298.15, + // ThermodynamicConstantsInterface.referencePressure); + ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); - //testSystem.addComponent("methane", 100); - //testSystem.addComponent("n-heptane", 1); - testSystem.addComponent("water", 50); - //testSystem.addComponent("methane", 10); - //testSystem.addComponent("ethane", 15); - testSystem.addComponent("TEG", 9); - testSystem.addComponent("MEG", 50); - // testSystem.addComponent("n-octane", 3.1); - // testSystem.addComponent("Na+", 0.1); - // testSystem.addComponent("Cl-", 0.1); - // testSystem.addComponent("MEG", 2.1); - testSystem.addComponent("methanol", 20); - // testSystem.addComponent("MEG", 5.3); - // testSystem.addComponent("MEG", 10.0); - // testSystem.addTBPfraction("C8", 10.1, 90.0 / 1000.0, 0.8); - //testSystem.addComponent("MEG", 10.5); - // testSystem.createDatabase(true); - // testSystem.useVolumeCorrection(true); - testSystem.setMixingRule(10); - // testSystem.setMixingRule("HV", "NRTL"); - // testSystem.setMixingRule("HV", "UNIFAC_UMRPRU"); - // testSystem.setMixingRule(9); - testSystem.init(0); - testOps.TPflash(); - testSystem.init(3); + // testSystem.addComponent("methane", 100); + // testSystem.addComponent("n-heptane", 1); + testSystem.addComponent("water", 50); + // testSystem.addComponent("methane", 10); + // testSystem.addComponent("ethane", 15); + testSystem.addComponent("TEG", 9); + testSystem.addComponent("MEG", 50); + // testSystem.addComponent("n-octane", 3.1); + // testSystem.addComponent("Na+", 0.1); + // testSystem.addComponent("Cl-", 0.1); + // testSystem.addComponent("MEG", 2.1); + testSystem.addComponent("methanol", 20); + // testSystem.addComponent("MEG", 5.3); + // testSystem.addComponent("MEG", 10.0); + // testSystem.addTBPfraction("C8", 10.1, 90.0 / 1000.0, 0.8); + // testSystem.addComponent("MEG", 10.5); + // testSystem.createDatabase(true); + // testSystem.useVolumeCorrection(true); + testSystem.setMixingRule(10); + // testSystem.setMixingRule("HV", "NRTL"); + // testSystem.setMixingRule("HV", "UNIFAC_UMRPRU"); + // testSystem.setMixingRule(9); + testSystem.init(0); + testOps.TPflash(); + testSystem.init(3); - neqsim.thermo.ThermodynamicModelTest testModel = - new neqsim.thermo.ThermodynamicModelTest(testSystem); - testModel.runTest(); - // testSystem.display(); + neqsim.thermo.ThermodynamicModelTest testModel = + new neqsim.thermo.ThermodynamicModelTest(testSystem); + testModel.runTest(); + // testSystem.display(); - testSystem.init(3); - double cp = testSystem.getPhase(1).getCp(); + testSystem.init(3); + double cp = testSystem.getPhase(1).getCp(); - testSystem.setTemperature(testSystem.getTemperature() + 0.001); - testSystem.init(3); - double ent1 = testSystem.getPhase(1).getEnthalpy(); + testSystem.setTemperature(testSystem.getTemperature() + 0.001); + testSystem.init(3); + double ent1 = testSystem.getPhase(1).getEnthalpy(); - testSystem.setTemperature(testSystem.getTemperature() - 0.002); - testSystem.init(3); - double ent2 = testSystem.getPhase(1).getEnthalpy(); - // testSystem.saveFluid(3217); + testSystem.setTemperature(testSystem.getTemperature() - 0.002); + testSystem.init(3); + double ent2 = testSystem.getPhase(1).getEnthalpy(); + // testSystem.saveFluid(3217); - double numCp = (ent1 - ent2) / 0.002; + double numCp = (ent1 - ent2) / 0.002; - logger.info("Cp " + cp + " numCp " + numCp); - } + logger.info("Cp " + cp + " numCp " + numCp); + } } diff --git a/src/test/java/neqsim/thermo/util/example/OsmoticCoefficient.java b/src/test/java/neqsim/thermo/util/example/OsmoticCoefficient.java index 22e559976..392ae3c82 100644 --- a/src/test/java/neqsim/thermo/util/example/OsmoticCoefficient.java +++ b/src/test/java/neqsim/thermo/util/example/OsmoticCoefficient.java @@ -3,6 +3,7 @@ import neqsim.thermo.ThermodynamicConstantsInterface; import neqsim.thermo.system.SystemElectrolyteCPAstatoil; import neqsim.thermo.system.SystemInterface; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -14,62 +15,63 @@ * @version $Id: $Id */ public class OsmoticCoefficient { - /** - *

- * main. - *

- * - * @param args an array of {@link java.lang.String} objects - */ - @SuppressWarnings("unused") - public static void main(String args[]) { - SystemInterface testSystem = - new SystemElectrolyteCPAstatoil(298.0, ThermodynamicConstantsInterface.referencePressure); - // SystemInterface testSystem = new SystemElectrolyteCPA(298.15,1.01325201325); - // SystemInterface testSystem = new - // SystemSrkCPAs(298.15,ThermodynamicConstantsInterface.referencePressure); - // SystemInterface testSystem = new - // SystemSrkSchwartzentruberEos(298.15,ThermodynamicConstantsInterface.referencePressure); + /** + *

+ * main. + *

+ * + * @param args an array of {@link java.lang.String} objects + */ + @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + SystemInterface testSystem = + new SystemElectrolyteCPAstatoil(298.0, ThermodynamicConstantsInterface.referencePressure); + // SystemInterface testSystem = new SystemElectrolyteCPA(298.15,1.01325201325); + // SystemInterface testSystem = new + // SystemSrkCPAs(298.15,ThermodynamicConstantsInterface.referencePressure); + // SystemInterface testSystem = new + // SystemSrkSchwartzentruberEos(298.15,ThermodynamicConstantsInterface.referencePressure); - // creates a 0.1 molar solution 0.0018 - testSystem.addComponent("methane", 10.0); - // testSystem.addComponent("CO2", 0.001); + // creates a 0.1 molar solution 0.0018 + testSystem.addComponent("methane", 10.0); + // testSystem.addComponent("CO2", 0.001); - testSystem.addComponent("water", 1000.0 / 18.02); + testSystem.addComponent("water", 1000.0 / 18.02); - testSystem.addComponent("Ca++", 2.0); - testSystem.addComponent("Cl-", 2.0 * 2); + testSystem.addComponent("Ca++", 2.0); + testSystem.addComponent("Cl-", 2.0 * 2); - testSystem.chemicalReactionInit(); - testSystem.createDatabase(true); - testSystem.setMixingRule(7); - testSystem.init(0); - testSystem.init(1); + testSystem.chemicalReactionInit(); + testSystem.createDatabase(true); + testSystem.setMixingRule(7); + testSystem.init(0); + testSystem.init(1); - // System.out.println("furst 1 " - // +((PhaseModifiedFurstElectrolyteEos)testSystem.getPhase(0)).reInitFurstParam(); - // // System.out.println("volume " + testSystem.getPhase(1).getMolarVolume()); - double osmCoef = testSystem.getPhase(1).getOsmoticCoefficientOfWater(); - // System.out.println("osmotic coefficient: " + osmCoef); + // System.out.println("furst 1 " + // +((PhaseModifiedFurstElectrolyteEos)testSystem.getPhase(0)).reInitFurstParam(); + // // System.out.println("volume " + testSystem.getPhase(1).getMolarVolume()); + double osmCoef = testSystem.getPhase(1).getOsmoticCoefficientOfWater(); + // System.out.println("osmotic coefficient: " + osmCoef); - // ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); - // try{ - // // testOps.TPflash(); - // // testOps.calcSaltSaturation("NaCl"); - // } catch(Exception ex){ - // } - testSystem.display(); + // ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); + // try{ + // // testOps.TPflash(); + // // testOps.calcSaltSaturation("NaCl"); + // } catch(Exception ex){ + // } + testSystem.display(); - // System.out.println("wt% water " + testSystem.getPhase(1).getWtFrac(0)*100); - // double meanact = testSystem.getPhase(1).getMeanIonicActivity(2,3); - // double meanact2 = testSystem.getPhase(1).getActivityCoefficient(3,1); - // // testSystem.getPhase(1).getActivityCoefficient(3); - // // testSystem.getPhase(1).getActivityCoefficient(3); - // System.out.println("mean ionic activity: " + meanact); - // System.out.println("Na+ ionic activity: " + meanact2); + // System.out.println("wt% water " + testSystem.getPhase(1).getWtFrac(0)*100); + // double meanact = testSystem.getPhase(1).getMeanIonicActivity(2,3); + // double meanact2 = testSystem.getPhase(1).getActivityCoefficient(3,1); + // // testSystem.getPhase(1).getActivityCoefficient(3); + // // testSystem.getPhase(1).getActivityCoefficient(3); + // System.out.println("mean ionic activity: " + meanact); + // System.out.println("Na+ ionic activity: " + meanact2); - // thermo.ThermodynamicModelTest testModel = new - // thermo.ThermodynamicModelTest(testSystem); - // testModel.runTest(); - } + // thermo.ThermodynamicModelTest testModel = new + // thermo.ThermodynamicModelTest(testSystem); + // testModel.runTest(); + } } diff --git a/src/test/java/neqsim/thermo/util/example/OsmoticCoefficient_1.java b/src/test/java/neqsim/thermo/util/example/OsmoticCoefficient_1.java index 41bb8c6cd..d4c14c5bd 100644 --- a/src/test/java/neqsim/thermo/util/example/OsmoticCoefficient_1.java +++ b/src/test/java/neqsim/thermo/util/example/OsmoticCoefficient_1.java @@ -4,6 +4,7 @@ import neqsim.thermo.system.SystemFurstElectrolyteEos; import neqsim.thermo.system.SystemInterface; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -23,6 +24,7 @@ public class OsmoticCoefficient_1 { * @param args an array of {@link java.lang.String} objects */ @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemFurstElectrolyteEos(298.15, ThermodynamicConstantsInterface.referencePressure); diff --git a/src/test/java/neqsim/thermo/util/example/PS_PH_flash.java b/src/test/java/neqsim/thermo/util/example/PS_PH_flash.java index b50393d40..d72248e6e 100644 --- a/src/test/java/neqsim/thermo/util/example/PS_PH_flash.java +++ b/src/test/java/neqsim/thermo/util/example/PS_PH_flash.java @@ -3,6 +3,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -22,6 +23,7 @@ public class PS_PH_flash { * @param args an array of {@link java.lang.String} objects */ @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { // SystemInterface testSystem = new SystemSrkMathiasCopeman(273.15 + 5, 80); SystemInterface testSystem = new SystemSrkEos(273.15 + 15.0, 100.0); diff --git a/src/test/java/neqsim/thermo/util/example/PhaseEnvelope.java b/src/test/java/neqsim/thermo/util/example/PhaseEnvelope.java index 546b1b353..ed2f78d68 100644 --- a/src/test/java/neqsim/thermo/util/example/PhaseEnvelope.java +++ b/src/test/java/neqsim/thermo/util/example/PhaseEnvelope.java @@ -7,6 +7,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemUMRPRUMCEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -28,6 +29,7 @@ public class PhaseEnvelope { * @param args an array of {@link java.lang.String} objects */ @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { // SystemInterface testSystem = new SystemUMRPRUEos(225.65, 1.00); // SystemInterface testSystem = new SystemPrEos1978(223.15,50.00); diff --git a/src/test/java/neqsim/thermo/util/example/PhaseEnvelope2.java b/src/test/java/neqsim/thermo/util/example/PhaseEnvelope2.java index aef4ba955..fe38d87af 100644 --- a/src/test/java/neqsim/thermo/util/example/PhaseEnvelope2.java +++ b/src/test/java/neqsim/thermo/util/example/PhaseEnvelope2.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class PhaseEnvelope2 { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { SystemInterface testSystem = new SystemSrkEos(280.0, 1.00); diff --git a/src/test/java/neqsim/thermo/util/example/PressureLoadingCurve.java b/src/test/java/neqsim/thermo/util/example/PressureLoadingCurve.java index fc8324bda..fd7e0eae9 100644 --- a/src/test/java/neqsim/thermo/util/example/PressureLoadingCurve.java +++ b/src/test/java/neqsim/thermo/util/example/PressureLoadingCurve.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemFurstElectrolyteEos; import neqsim.thermo.system.SystemInterface; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -24,6 +25,7 @@ public class PressureLoadingCurve { * @param args an array of {@link java.lang.String} objects */ @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { double[][] points; SystemInterface testSystem = new SystemFurstElectrolyteEos((273.15 + 75.0), 1.3); diff --git a/src/test/java/neqsim/thermo/util/example/ReactiveDesmukhMather.java b/src/test/java/neqsim/thermo/util/example/ReactiveDesmukhMather.java index f2e12e3a3..ec68898ff 100644 --- a/src/test/java/neqsim/thermo/util/example/ReactiveDesmukhMather.java +++ b/src/test/java/neqsim/thermo/util/example/ReactiveDesmukhMather.java @@ -3,6 +3,7 @@ import neqsim.thermo.system.SystemDesmukhMather; import neqsim.thermo.system.SystemInterface; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -21,6 +22,7 @@ public class ReactiveDesmukhMather { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemDesmukhMather(290.0, 5.1); diff --git a/src/test/java/neqsim/thermo/util/example/ReactiveKentEisenberg.java b/src/test/java/neqsim/thermo/util/example/ReactiveKentEisenberg.java index 7d1e34c6d..e1db338d4 100644 --- a/src/test/java/neqsim/thermo/util/example/ReactiveKentEisenberg.java +++ b/src/test/java/neqsim/thermo/util/example/ReactiveKentEisenberg.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemFurstElectrolyteEos; import neqsim.thermo.system.SystemInterface; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class ReactiveKentEisenberg { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { // SystemInterface testSystem = new SystemKentEisenberg(326.0, 1.1); SystemInterface testSystem = new SystemFurstElectrolyteEos(326.0, 0.1); diff --git a/src/test/java/neqsim/thermo/util/example/ReactiveTPflash.java b/src/test/java/neqsim/thermo/util/example/ReactiveTPflash.java index 9f288ead4..9886af4f8 100644 --- a/src/test/java/neqsim/thermo/util/example/ReactiveTPflash.java +++ b/src/test/java/neqsim/thermo/util/example/ReactiveTPflash.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemElectrolyteCPAstatoil; import neqsim.thermo.system.SystemInterface; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class ReactiveTPflash { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { // SystemInterface testSystem = new SystemFurstElectrolyteEosMod2004(423.2, // 24.4); diff --git a/src/test/java/neqsim/thermo/util/example/ReactiveTPflash2.java b/src/test/java/neqsim/thermo/util/example/ReactiveTPflash2.java index 370b06905..9c7cc86cf 100644 --- a/src/test/java/neqsim/thermo/util/example/ReactiveTPflash2.java +++ b/src/test/java/neqsim/thermo/util/example/ReactiveTPflash2.java @@ -12,6 +12,7 @@ import neqsim.thermo.system.SystemFurstElectrolyteEos; import neqsim.thermo.system.SystemInterface; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -32,6 +33,7 @@ public class ReactiveTPflash2 { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemFurstElectrolyteEos(373.15, 10.0); diff --git a/src/test/java/neqsim/thermo/util/example/ReadFluidData.java b/src/test/java/neqsim/thermo/util/example/ReadFluidData.java index baf7b8a91..7a0508f33 100644 --- a/src/test/java/neqsim/thermo/util/example/ReadFluidData.java +++ b/src/test/java/neqsim/thermo/util/example/ReadFluidData.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class ReadFluidData { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkEos(273.15 + 25.0, 1.8); // testSystem.addComponent("nitrogen", 12.681146444); diff --git a/src/test/java/neqsim/thermo/util/example/ReadFluidData2.java b/src/test/java/neqsim/thermo/util/example/ReadFluidData2.java index eec8b13fb..facc9da2a 100644 --- a/src/test/java/neqsim/thermo/util/example/ReadFluidData2.java +++ b/src/test/java/neqsim/thermo/util/example/ReadFluidData2.java @@ -7,6 +7,7 @@ import neqsim.process.equipment.stream.StreamInterface; import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -28,6 +29,7 @@ public class ReadFluidData2 { * @param args an array of {@link java.lang.String} objects */ @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkEos(273.15 + 30.0, 10.0); // testSystem.readObjectFromFile("C:/temp/neqsimfluids/-65919.68493879325.neqsim", diff --git a/src/test/java/neqsim/thermo/util/example/ScalePotentialCheck.java b/src/test/java/neqsim/thermo/util/example/ScalePotentialCheck.java index 2535b4e1e..d9ee90cb1 100644 --- a/src/test/java/neqsim/thermo/util/example/ScalePotentialCheck.java +++ b/src/test/java/neqsim/thermo/util/example/ScalePotentialCheck.java @@ -11,6 +11,7 @@ import neqsim.thermo.system.SystemElectrolyteCPAstatoil; import neqsim.thermo.system.SystemInterface; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -31,6 +32,7 @@ public class ScalePotentialCheck { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { // SystemInterface testSystem = new Ele(273.15+10.0,10.0); SystemInterface testSystem = new SystemElectrolyteCPAstatoil(273.15 + 25.0, 10.0); diff --git a/src/test/java/neqsim/thermo/util/example/SolidFlash.java b/src/test/java/neqsim/thermo/util/example/SolidFlash.java index de25b6446..d76b81859 100644 --- a/src/test/java/neqsim/thermo/util/example/SolidFlash.java +++ b/src/test/java/neqsim/thermo/util/example/SolidFlash.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPAstatoil; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class SolidFlash { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkCPAstatoil(269.671, 1.00); // SystemInterface testSystem = new SystemSrkTwuCoonEos(273.15 - 165, 1.0); diff --git a/src/test/java/neqsim/thermo/util/example/SulfureDeposition.java b/src/test/java/neqsim/thermo/util/example/SulfureDeposition.java index db9e0a3ff..03d87e2d1 100644 --- a/src/test/java/neqsim/thermo/util/example/SulfureDeposition.java +++ b/src/test/java/neqsim/thermo/util/example/SulfureDeposition.java @@ -6,6 +6,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -26,6 +27,7 @@ public class SulfureDeposition { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { // SystemInterface testSystem = new SystemSrkTwuCoonEos(220.15, 6.0); SystemInterface testSystem = new SystemSrkEos(273.15 + 65.0, 12.0); diff --git a/src/test/java/neqsim/thermo/util/example/TPMultiFlash.java b/src/test/java/neqsim/thermo/util/example/TPMultiFlash.java index 3944d8df8..92118392a 100644 --- a/src/test/java/neqsim/thermo/util/example/TPMultiFlash.java +++ b/src/test/java/neqsim/thermo/util/example/TPMultiFlash.java @@ -6,6 +6,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPAstatoil; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -27,6 +28,7 @@ public class TPMultiFlash { * @param args an array of {@link java.lang.String} objects */ @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { // SystemInterface testSystem = new SystemPrEos1978(273.15,100.0); // SystemInterface testSystem = new SystemSrkCPAstatoil(273.15,100.0); diff --git a/src/test/java/neqsim/thermo/util/example/TPflash.java b/src/test/java/neqsim/thermo/util/example/TPflash.java index c04a17115..20978c871 100644 --- a/src/test/java/neqsim/thermo/util/example/TPflash.java +++ b/src/test/java/neqsim/thermo/util/example/TPflash.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TPflash { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { SystemInterface testSystem = new SystemSrkEos(273.15 + 42.498, 19.2875); testSystem.getCharacterization().getLumpingModel().setNumberOfLumpedComponents(5); diff --git a/src/test/java/neqsim/thermo/util/example/TPflash2.java b/src/test/java/neqsim/thermo/util/example/TPflash2.java index 72f30c778..7c02c0882 100644 --- a/src/test/java/neqsim/thermo/util/example/TPflash2.java +++ b/src/test/java/neqsim/thermo/util/example/TPflash2.java @@ -6,6 +6,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPAstatoil; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -26,6 +27,7 @@ public class TPflash2 { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { SystemInterface testSystem = new SystemSrkCPAstatoil(273.15 + 80.0, ThermodynamicConstantsInterface.referencePressure); diff --git a/src/test/java/neqsim/thermo/util/example/TPflashCAPEOPEN.java b/src/test/java/neqsim/thermo/util/example/TPflashCAPEOPEN.java index 3360248db..c45e677e8 100644 --- a/src/test/java/neqsim/thermo/util/example/TPflashCAPEOPEN.java +++ b/src/test/java/neqsim/thermo/util/example/TPflashCAPEOPEN.java @@ -4,6 +4,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -15,53 +16,54 @@ * @since 2.2.3 */ public class TPflashCAPEOPEN { - /** - *

- * main. - *

- * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String[] args) { - SystemInterface testSystem = new SystemSrkEos(288.15 + 5, 15.01325); - // SystemInterface testSystem = new SystemSrkCPAstatoil(273.15 + 25.0, 88.8); - testSystem.addComponent("nitrogen", 1.681146444); - testSystem.addComponent("CO2", 2.185242497); - testSystem.addComponent("methane", 78.0590685); - testSystem.addComponent("ethane", 10.04443372); - testSystem.addComponent("propane", 5.588061435); - testSystem.addComponent("i-butane", 0.647553889); - testSystem.addComponent("n-butane", 1.386874239); - testSystem.addComponent("i-pentane", 0.288952839); - testSystem.addComponent("n-pentane", 1.446888586); - testSystem.addComponent("n-hexane", 1.446888586); - testSystem.addComponent("nC10", 1.446888586); - testSystem.addComponent("water", 10.35509484); - testSystem.addComponent("MEG", 0.083156844); + /** + *

+ * main. + *

+ * + * @param args an array of {@link java.lang.String} objects + */ + @ExcludeFromJacocoGeneratedReport + public static void main(String[] args) { + SystemInterface testSystem = new SystemSrkEos(288.15 + 5, 15.01325); + // SystemInterface testSystem = new SystemSrkCPAstatoil(273.15 + 25.0, 88.8); + testSystem.addComponent("nitrogen", 1.681146444); + testSystem.addComponent("CO2", 2.185242497); + testSystem.addComponent("methane", 78.0590685); + testSystem.addComponent("ethane", 10.04443372); + testSystem.addComponent("propane", 5.588061435); + testSystem.addComponent("i-butane", 0.647553889); + testSystem.addComponent("n-butane", 1.386874239); + testSystem.addComponent("i-pentane", 0.288952839); + testSystem.addComponent("n-pentane", 1.446888586); + testSystem.addComponent("n-hexane", 1.446888586); + testSystem.addComponent("nC10", 1.446888586); + testSystem.addComponent("water", 10.35509484); + testSystem.addComponent("MEG", 0.083156844); - testSystem.createDatabase(true); - testSystem.setMixingRule(2); - testSystem.setMultiPhaseCheck(true); + testSystem.createDatabase(true); + testSystem.setMixingRule(2); + testSystem.setMultiPhaseCheck(true); - ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); + ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); - testOps.TPflash(); - testSystem.display(); + testOps.TPflash(); + testSystem.display(); - testSystem.init(0); - testSystem.setNumberOfPhases(1); - testSystem.setMolarComposition( - new double[] {0.0, 0.01, 0.01, 7.2, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0}); - testSystem.init(0, 0); - testSystem.setPhaseType(0, PhaseType.GAS); - testSystem.init(3); - testSystem.initPhysicalProperties(); + testSystem.init(0); + testSystem.setNumberOfPhases(1); + testSystem.setMolarComposition( + new double[] {0.0, 0.01, 0.01, 7.2, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0}); + testSystem.init(0, 0); + testSystem.setPhaseType(0, PhaseType.GAS); + testSystem.init(3); + testSystem.initPhysicalProperties(); - testSystem.setMolarComposition( - new double[] {0.0, 0.01, 0.01, 7.2, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0}); - testSystem.init(0, 0); - testSystem.setPhaseType(0, PhaseType.LIQUID); - testSystem.init(3); - testSystem.initPhysicalProperties(); - } + testSystem.setMolarComposition( + new double[] {0.0, 0.01, 0.01, 7.2, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 0.0, 0.0}); + testSystem.init(0, 0); + testSystem.setPhaseType(0, PhaseType.LIQUID); + testSystem.init(3); + testSystem.initPhysicalProperties(); + } } diff --git a/src/test/java/neqsim/thermo/util/example/TPflashDehyd.java b/src/test/java/neqsim/thermo/util/example/TPflashDehyd.java index 66a173e16..01333f5ea 100644 --- a/src/test/java/neqsim/thermo/util/example/TPflashDehyd.java +++ b/src/test/java/neqsim/thermo/util/example/TPflashDehyd.java @@ -6,6 +6,7 @@ import neqsim.thermo.system.SystemSrkCPAstatoil; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -26,6 +27,7 @@ public class TPflashDehyd { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { // SystemInterface testSystem = new SystemSrkEos(288.15 + 5, 165.01325); SystemInterface testSystem2 = new SystemSrkEos(298, 10); // diff --git a/src/test/java/neqsim/thermo/util/example/TPflashGR.java b/src/test/java/neqsim/thermo/util/example/TPflashGR.java index 639b0cbde..100674a6a 100644 --- a/src/test/java/neqsim/thermo/util/example/TPflashGR.java +++ b/src/test/java/neqsim/thermo/util/example/TPflashGR.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -26,6 +27,7 @@ public class TPflashGR { * @param args an array of {@link java.lang.String} objects */ @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { // String[] components = new String[]{"water", "nitrogen", "CO2", "methane", // "ethane", "propane", "i-butane","n-butane","i-pentane", "n-pentane", diff --git a/src/test/java/neqsim/thermo/util/example/TPflashMembrane.java b/src/test/java/neqsim/thermo/util/example/TPflashMembrane.java index bb341bd6e..15e5aef14 100644 --- a/src/test/java/neqsim/thermo/util/example/TPflashMembrane.java +++ b/src/test/java/neqsim/thermo/util/example/TPflashMembrane.java @@ -7,6 +7,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -27,6 +28,7 @@ public class TPflashMembrane { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { // SystemInterface testSystem2 = // util.serialization.SerializationManager.open("c:/test.fluid"); diff --git a/src/test/java/neqsim/thermo/util/example/TPflashMethanolWaterPropane.java b/src/test/java/neqsim/thermo/util/example/TPflashMethanolWaterPropane.java index 9c7d51ea0..166c73677 100644 --- a/src/test/java/neqsim/thermo/util/example/TPflashMethanolWaterPropane.java +++ b/src/test/java/neqsim/thermo/util/example/TPflashMethanolWaterPropane.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPA; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TPflashMethanolWaterPropane { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkCPA(300, 10.01325); diff --git a/src/test/java/neqsim/thermo/util/example/TPflashTestPablo.java b/src/test/java/neqsim/thermo/util/example/TPflashTestPablo.java index 164a6d181..a56479d7b 100644 --- a/src/test/java/neqsim/thermo/util/example/TPflashTestPablo.java +++ b/src/test/java/neqsim/thermo/util/example/TPflashTestPablo.java @@ -3,6 +3,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPAstatoil; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -21,6 +22,7 @@ public class TPflashTestPablo { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { SystemInterface fluid = new SystemSrkCPAstatoil(273.15 + 35.0, 90.0); fluid.addComponent("water", 0.0078); diff --git a/src/test/java/neqsim/thermo/util/example/TVPexample.java b/src/test/java/neqsim/thermo/util/example/TVPexample.java index 1e330ac2e..e3a42567a 100644 --- a/src/test/java/neqsim/thermo/util/example/TVPexample.java +++ b/src/test/java/neqsim/thermo/util/example/TVPexample.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TVPexample { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { SystemInterface testSystem = new SystemSrkEos(275.15 + 37.7778, 1.0); ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); diff --git a/src/test/java/neqsim/thermo/util/example/TestCSPsrk.java b/src/test/java/neqsim/thermo/util/example/TestCSPsrk.java index e6137e629..3ff019577 100644 --- a/src/test/java/neqsim/thermo/util/example/TestCSPsrk.java +++ b/src/test/java/neqsim/thermo/util/example/TestCSPsrk.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemCSPsrkEos; import neqsim.thermo.system.SystemInterface; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TestCSPsrk { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemCSPsrkEos(158, 5.662); // SystemInterface testSystem = new SystemSrkEos(110.0, 1.262); diff --git a/src/test/java/neqsim/thermo/util/example/TestCharacterizationCPA.java b/src/test/java/neqsim/thermo/util/example/TestCharacterizationCPA.java index f1cad1349..e413a7bdb 100644 --- a/src/test/java/neqsim/thermo/util/example/TestCharacterizationCPA.java +++ b/src/test/java/neqsim/thermo/util/example/TestCharacterizationCPA.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPAstatoil; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TestCharacterizationCPA { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkCPAstatoil(273.15 + 20.0, 31.0); // SystemInterface testSystem = new SystemSrkSchwartzentruberEos(273.15+20.0, diff --git a/src/test/java/neqsim/thermo/util/example/TestCharacterizationCondensate.java b/src/test/java/neqsim/thermo/util/example/TestCharacterizationCondensate.java index c533e79d3..09380388f 100644 --- a/src/test/java/neqsim/thermo/util/example/TestCharacterizationCondensate.java +++ b/src/test/java/neqsim/thermo/util/example/TestCharacterizationCondensate.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TestCharacterizationCondensate { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkEos(273.15 + 25.0, 50.0); diff --git a/src/test/java/neqsim/thermo/util/example/TestCharacterizationCondensate1.java b/src/test/java/neqsim/thermo/util/example/TestCharacterizationCondensate1.java index 8b6650509..7bc5401bf 100644 --- a/src/test/java/neqsim/thermo/util/example/TestCharacterizationCondensate1.java +++ b/src/test/java/neqsim/thermo/util/example/TestCharacterizationCondensate1.java @@ -6,6 +6,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -26,6 +27,7 @@ public class TestCharacterizationCondensate1 { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkEos(273.15 + 30, 50); // SystemInterface testSystem = new SystemSrkCPAs(293.65, 79.3); diff --git a/src/test/java/neqsim/thermo/util/example/TestElectrolyteCPAstatoil.java b/src/test/java/neqsim/thermo/util/example/TestElectrolyteCPAstatoil.java index 38c6ce93d..460da57e5 100644 --- a/src/test/java/neqsim/thermo/util/example/TestElectrolyteCPAstatoil.java +++ b/src/test/java/neqsim/thermo/util/example/TestElectrolyteCPAstatoil.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemElectrolyteCPAstatoil; import neqsim.thermo.system.SystemInterface; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TestElectrolyteCPAstatoil { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { // SystemInterface testSystem = new SystemSrkCPAstatoil(273.15 + 4.0, 100); // SystemInterface testSystem = new SystemSrkCPAstatoil(273.15 + 10.0, 3.0); diff --git a/src/test/java/neqsim/thermo/util/example/TestFlash.java b/src/test/java/neqsim/thermo/util/example/TestFlash.java index ec6d53b8d..776cc1df4 100644 --- a/src/test/java/neqsim/thermo/util/example/TestFlash.java +++ b/src/test/java/neqsim/thermo/util/example/TestFlash.java @@ -8,6 +8,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -29,6 +30,7 @@ public class TestFlash { * @param args an array of {@link java.lang.String} objects */ @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { int phaseNumber; diff --git a/src/test/java/neqsim/thermo/util/example/TestFluidIssues.java b/src/test/java/neqsim/thermo/util/example/TestFluidIssues.java index bc35f09fe..7ab1512de 100644 --- a/src/test/java/neqsim/thermo/util/example/TestFluidIssues.java +++ b/src/test/java/neqsim/thermo/util/example/TestFluidIssues.java @@ -5,63 +5,67 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPAstatoil; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** - *

TestFluidIssues class.

+ *

+ * TestFluidIssues class. + *

* * @author asmund * @version $Id: $Id * @since 2.2.3 */ public class TestFluidIssues { - static Logger logger = LogManager.getLogger(TestFluidIssues.class); + static Logger logger = LogManager.getLogger(TestFluidIssues.class); - /** - * This method is just meant to test the thermo package. - * - * @param args an array of {@link java.lang.String} objects - */ + /** + * This method is just meant to test the thermo package. + * + * @param args an array of {@link java.lang.String} objects + */ - public static void main(String args[]) { - // SystemInterface testSystem = new SystemSrkEos(303.15, 10.01325); - SystemInterface testSystem = new SystemSrkCPAstatoil(303.15, 15.0); - // SystemInterface testSystem = new SystemSrkSchwartzentruberEos(298.15, - // ThermodynamicConstantsInterface.referencePressure); - ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); - testSystem.addComponent("methane", 100.0); - // testSystem.addComponent("water", 100.0); - // testSystem.addComponent("TEG", 100.0); - testSystem.createDatabase(true); - testSystem.setMixingRule(10); - logger.info("start benchmark TPflash......"); + @ExcludeFromJacocoGeneratedReport + public static void main(String args[]) { + // SystemInterface testSystem = new SystemSrkEos(303.15, 10.01325); + SystemInterface testSystem = new SystemSrkCPAstatoil(303.15, 15.0); + // SystemInterface testSystem = new SystemSrkSchwartzentruberEos(298.15, + // ThermodynamicConstantsInterface.referencePressure); + ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); + testSystem.addComponent("methane", 100.0); + // testSystem.addComponent("water", 100.0); + // testSystem.addComponent("TEG", 100.0); + testSystem.createDatabase(true); + testSystem.setMixingRule(10); + logger.info("start benchmark TPflash......"); - long time = System.currentTimeMillis(); - testOps.TPflash(); - for (int i = 0; i < 5; i++) { - testOps.TPflash(); - } - // Trying to see what happens if an extra component is added - testSystem.init(0); - testSystem.addComponent("water", 100.0); - testSystem.createDatabase(true); - testSystem.setMixingRule(10); - testOps.TPflash(); + long time = System.currentTimeMillis(); + testOps.TPflash(); + for (int i = 0; i < 5; i++) { + testOps.TPflash(); + } + // Trying to see what happens if an extra component is added + testSystem.init(0); + testSystem.addComponent("water", 100.0); + testSystem.createDatabase(true); + testSystem.setMixingRule(10); + testOps.TPflash(); - logger.info("Time taken for benchmark flash = " + (System.currentTimeMillis() - time)); - testOps.displayResult(); + logger.info("Time taken for benchmark flash = " + (System.currentTimeMillis() - time)); + testOps.displayResult(); - // time for 5000 flash calculations - // Results Dell Portable PIII 750 MHz - JDK 1.3.1: - // mixrule 1 (Classic - no interaction): 6.719 sec - // mixrule 2 (Classic): 6.029 sec ny PC 1.108 sec - // mixrule 4 (Huron-Vidal2): 17.545 sec - // mixrule 6 (Wong-Sandler): 12.859 sec + // time for 5000 flash calculations + // Results Dell Portable PIII 750 MHz - JDK 1.3.1: + // mixrule 1 (Classic - no interaction): 6.719 sec + // mixrule 2 (Classic): 6.029 sec ny PC 1.108 sec + // mixrule 4 (Huron-Vidal2): 17.545 sec + // mixrule 6 (Wong-Sandler): 12.859 sec - // // system: - // SystemSrkEos testSystem = new SystemSrkEos(303.15, 10.01325); - // ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); - // testSystem.addComponent("methane", 100.0); - // testSystem.addComponent("water", 100.0); - // testSystem.setMixingRule(1); - } + // // system: + // SystemSrkEos testSystem = new SystemSrkEos(303.15, 10.01325); + // ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); + // testSystem.addComponent("methane", 100.0); + // testSystem.addComponent("water", 100.0); + // testSystem.setMixingRule(1); + } } diff --git a/src/test/java/neqsim/thermo/util/example/TestGEHenry.java b/src/test/java/neqsim/thermo/util/example/TestGEHenry.java index 5ff68387e..d26da314c 100644 --- a/src/test/java/neqsim/thermo/util/example/TestGEHenry.java +++ b/src/test/java/neqsim/thermo/util/example/TestGEHenry.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemGEWilson; import neqsim.thermo.system.SystemInterface; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TestGEHenry { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemGEWilson(273.15 + 55.0, 1.301325); // SystemInterface testSystem = new SystemNRTL(273.15 + 55.0,1.301325); diff --git a/src/test/java/neqsim/thermo/util/example/TestGERG2004EOS.java b/src/test/java/neqsim/thermo/util/example/TestGERG2004EOS.java index d77469087..8e6d9fadb 100644 --- a/src/test/java/neqsim/thermo/util/example/TestGERG2004EOS.java +++ b/src/test/java/neqsim/thermo/util/example/TestGERG2004EOS.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemGERG2004Eos; import neqsim.thermo.system.SystemInterface; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TestGERG2004EOS { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemGERG2004Eos(29.74536 + 273.15, 90.66201); ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); diff --git a/src/test/java/neqsim/thermo/util/example/TestGERGwater.java b/src/test/java/neqsim/thermo/util/example/TestGERGwater.java index ec4271e5c..c431fcc2c 100644 --- a/src/test/java/neqsim/thermo/util/example/TestGERGwater.java +++ b/src/test/java/neqsim/thermo/util/example/TestGERGwater.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPAstatoil; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TestGERGwater { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { // SystemInterface testSystem = new SystemGERGwaterEos(273.15-20.0, 100.0); SystemInterface testSystem = new SystemSrkCPAstatoil(273.15 - 20.0, 100.0); diff --git a/src/test/java/neqsim/thermo/util/example/TestISO1982.java b/src/test/java/neqsim/thermo/util/example/TestISO1982.java index 824d34c25..cd105207e 100644 --- a/src/test/java/neqsim/thermo/util/example/TestISO1982.java +++ b/src/test/java/neqsim/thermo/util/example/TestISO1982.java @@ -11,6 +11,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -31,6 +32,7 @@ public class TestISO1982 { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkEos(290.15, 30.00); diff --git a/src/test/java/neqsim/thermo/util/example/TestMBWR32.java b/src/test/java/neqsim/thermo/util/example/TestMBWR32.java index 5b795464d..d7d3e5d39 100644 --- a/src/test/java/neqsim/thermo/util/example/TestMBWR32.java +++ b/src/test/java/neqsim/thermo/util/example/TestMBWR32.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemBWRSEos; import neqsim.thermo.system.SystemInterface; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TestMBWR32 { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemBWRSEos(298.15, 0.101); // SystemInterface testSystem = new SystemSrkEos(111.15, 5.01); diff --git a/src/test/java/neqsim/thermo/util/example/TestMEGFlash.java b/src/test/java/neqsim/thermo/util/example/TestMEGFlash.java index e862e8cae..8918b0094 100644 --- a/src/test/java/neqsim/thermo/util/example/TestMEGFlash.java +++ b/src/test/java/neqsim/thermo/util/example/TestMEGFlash.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPAs; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TestMEGFlash { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkCPAs(273.15 + 20, 10.0); diff --git a/src/test/java/neqsim/thermo/util/example/TestNeqSimBug.java b/src/test/java/neqsim/thermo/util/example/TestNeqSimBug.java index 0aed02a1a..97636b16f 100644 --- a/src/test/java/neqsim/thermo/util/example/TestNeqSimBug.java +++ b/src/test/java/neqsim/thermo/util/example/TestNeqSimBug.java @@ -4,6 +4,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -22,6 +23,7 @@ public class TestNeqSimBug { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { // double[] spec1 = {1.0}; // salt water Pressure // double[] spec2 = { -39678.555}; // salt water Enthalpy diff --git a/src/test/java/neqsim/thermo/util/example/TestPCSAFT.java b/src/test/java/neqsim/thermo/util/example/TestPCSAFT.java index 6ea16a7d8..70a767876 100644 --- a/src/test/java/neqsim/thermo/util/example/TestPCSAFT.java +++ b/src/test/java/neqsim/thermo/util/example/TestPCSAFT.java @@ -6,6 +6,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkCPAstatoil; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -27,6 +28,7 @@ public class TestPCSAFT { * @param args an array of {@link java.lang.String} objects */ @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { // SystemInterface testSystem = new SystemSrkEos(273.14, 50.00); // SystemInterface testSystem = new SystemGERG2004Eos(273.14-55, 75.00); diff --git a/src/test/java/neqsim/thermo/util/example/TestPCSAFT1.java b/src/test/java/neqsim/thermo/util/example/TestPCSAFT1.java index 5df778863..780da5ca6 100644 --- a/src/test/java/neqsim/thermo/util/example/TestPCSAFT1.java +++ b/src/test/java/neqsim/thermo/util/example/TestPCSAFT1.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TestPCSAFT1 { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { double pressure = 0.0; // String[] componentName = {"nitrogen", "CO2", "methane", "ethane", "propane", diff --git a/src/test/java/neqsim/thermo/util/example/TestPCSAFT1_1.java b/src/test/java/neqsim/thermo/util/example/TestPCSAFT1_1.java index f29524641..a38ad1e4d 100644 --- a/src/test/java/neqsim/thermo/util/example/TestPCSAFT1_1.java +++ b/src/test/java/neqsim/thermo/util/example/TestPCSAFT1_1.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TestPCSAFT1_1 { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { double pressure = 5.0; String[] componentName = {"methane", "ethane", "propane", "i-butane", "n-butane", "benzene"}; diff --git a/src/test/java/neqsim/thermo/util/example/TestPSRK.java b/src/test/java/neqsim/thermo/util/example/TestPSRK.java index 80d521db8..da64d06df 100644 --- a/src/test/java/neqsim/thermo/util/example/TestPSRK.java +++ b/src/test/java/neqsim/thermo/util/example/TestPSRK.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemPsrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TestPSRK { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { // SystemInterface testSystem = new SystemSrkEos(325.8, 10.0); // SystemInterface testSystem = new SystemCSPsrkEos(245.8, 70.0); diff --git a/src/test/java/neqsim/thermo/util/example/TestSRKWS.java b/src/test/java/neqsim/thermo/util/example/TestSRKWS.java index 6e62ef82b..81523d9fc 100644 --- a/src/test/java/neqsim/thermo/util/example/TestSRKWS.java +++ b/src/test/java/neqsim/thermo/util/example/TestSRKWS.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemPsrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TestSRKWS { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { // SystemInterface testSystem = new SystemSrkEos(245.8, 50.0); SystemInterface testSystem = new SystemPsrkEos(245.8, 50.0); diff --git a/src/test/java/neqsim/thermo/util/example/TestSurfaceTenison.java b/src/test/java/neqsim/thermo/util/example/TestSurfaceTenison.java index ca483d72f..ba4abb8b1 100644 --- a/src/test/java/neqsim/thermo/util/example/TestSurfaceTenison.java +++ b/src/test/java/neqsim/thermo/util/example/TestSurfaceTenison.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TestSurfaceTenison { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemSrkEos(310.95, 20.00); ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); diff --git a/src/test/java/neqsim/thermo/util/example/TestUMRPRU.java b/src/test/java/neqsim/thermo/util/example/TestUMRPRU.java index ccfe3171e..90fe9c094 100644 --- a/src/test/java/neqsim/thermo/util/example/TestUMRPRU.java +++ b/src/test/java/neqsim/thermo/util/example/TestUMRPRU.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemUMRPRUMCEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TestUMRPRU { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { // SystemInterface testSystem = new SystemSrkCPAstatoil(273.15 - 3.5, 33.0); // SystemInterface testSystem = new SystemUMRPRUMCEos(273.15 + 20.5, 70.0); @@ -100,8 +102,8 @@ public static void main(String args[]) { double numCp = (ent1 - ent2) / 0.002; - //System.out.println("Cp " + cp + " numCp " + numCp); - //System.out.println("entropy " + testSystem.getPhase(1).getEntropy()); + // System.out.println("Cp " + cp + " numCp " + numCp); + // System.out.println("entropy " + testSystem.getPhase(1).getEntropy()); // thermo.ThermodynamicModelTest testModel = new // thermo.ThermodynamicModelTest(testSystem); diff --git a/src/test/java/neqsim/thermo/util/example/TestUMRPRUMC.java b/src/test/java/neqsim/thermo/util/example/TestUMRPRUMC.java index 3baa4530f..2d20cd351 100644 --- a/src/test/java/neqsim/thermo/util/example/TestUMRPRUMC.java +++ b/src/test/java/neqsim/thermo/util/example/TestUMRPRUMC.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TestUMRPRUMC { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { // SystemInterface testSystem = new SystemUMRPRUMCEos(273.15 + 20, 10.0); SystemInterface testSystem = new SystemSrkEos(273.15 + 20, 15.0); diff --git a/src/test/java/neqsim/thermo/util/example/TestUNIFAC.java b/src/test/java/neqsim/thermo/util/example/TestUNIFAC.java index 291032d9f..e3611d05b 100644 --- a/src/test/java/neqsim/thermo/util/example/TestUNIFAC.java +++ b/src/test/java/neqsim/thermo/util/example/TestUNIFAC.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemPsrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TestUNIFAC { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemPsrkEos(273.15 + 120.0, 0.15); // SystemInterface testSystem = new SystemSrkSchwartzentruberEos(273.15 + 25.0, diff --git a/src/test/java/neqsim/thermo/util/example/TestUNIFAC_1.java b/src/test/java/neqsim/thermo/util/example/TestUNIFAC_1.java index fa59c2472..19cf09b65 100644 --- a/src/test/java/neqsim/thermo/util/example/TestUNIFAC_1.java +++ b/src/test/java/neqsim/thermo/util/example/TestUNIFAC_1.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemPsrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -26,6 +27,7 @@ public class TestUNIFAC_1 { * @param args an array of {@link java.lang.String} objects */ @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemPsrkEos(273.15 + 120.0, 0.15); SystemInterface testSystem2 = new SystemPsrkEos(273.15 + 120.0, 0.15); diff --git a/src/test/java/neqsim/thermo/util/example/TestUniSimsFlash.java b/src/test/java/neqsim/thermo/util/example/TestUniSimsFlash.java index 74523253f..0b5da376e 100644 --- a/src/test/java/neqsim/thermo/util/example/TestUniSimsFlash.java +++ b/src/test/java/neqsim/thermo/util/example/TestUniSimsFlash.java @@ -3,6 +3,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -21,6 +22,7 @@ public class TestUniSimsFlash { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { SystemInterface testSystem = new SystemSrkEos(288.15 + 5, 15.01325); // SystemInterface testSystem = new SystemSrkCPAstatoil(273.15 + 15.0, 25.0); diff --git a/src/test/java/neqsim/thermo/util/example/TestVHflash.java b/src/test/java/neqsim/thermo/util/example/TestVHflash.java index a49a27679..ea40e851d 100644 --- a/src/test/java/neqsim/thermo/util/example/TestVHflash.java +++ b/src/test/java/neqsim/thermo/util/example/TestVHflash.java @@ -6,6 +6,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -26,6 +27,7 @@ public class TestVHflash { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { double pressureInTank = ThermodynamicConstantsInterface.referencePressure; // Pa double temperatureInTank = 293.15; diff --git a/src/test/java/neqsim/thermo/util/example/TestmercuryTPflash.java b/src/test/java/neqsim/thermo/util/example/TestmercuryTPflash.java index 6d811da17..c738368c6 100644 --- a/src/test/java/neqsim/thermo/util/example/TestmercuryTPflash.java +++ b/src/test/java/neqsim/thermo/util/example/TestmercuryTPflash.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkTwuCoonStatoilEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class TestmercuryTPflash { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String[] args) { SystemInterface testSystem = new SystemSrkTwuCoonStatoilEos(273.15 - 172.0, 1.0); diff --git a/src/test/java/neqsim/thermo/util/example/WaxFlash.java b/src/test/java/neqsim/thermo/util/example/WaxFlash.java index d1cdb5ba3..4d494018f 100644 --- a/src/test/java/neqsim/thermo/util/example/WaxFlash.java +++ b/src/test/java/neqsim/thermo/util/example/WaxFlash.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemInterface; import neqsim.thermo.system.SystemSrkEos; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; import neqsim.util.database.NeqSimDataBase; /** @@ -27,6 +28,7 @@ public class WaxFlash { * @param args an array of {@link java.lang.String} objects */ @SuppressWarnings("unused") + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { NeqSimDataBase.setConnectionString( "jdbc:derby:C:/Users/esol/OneDrive - Equinor/temp/neqsimthermodatabase"); diff --git a/src/test/java/neqsim/thermo/util/example/longman/Problem280809LNGfreezing.java b/src/test/java/neqsim/thermo/util/example/longman/Problem280809LNGfreezing.java index 33bb197d9..8445fa170 100644 --- a/src/test/java/neqsim/thermo/util/example/longman/Problem280809LNGfreezing.java +++ b/src/test/java/neqsim/thermo/util/example/longman/Problem280809LNGfreezing.java @@ -5,6 +5,7 @@ import neqsim.thermo.system.SystemGERG2004Eos; import neqsim.thermo.system.SystemInterface; import neqsim.thermodynamicoperations.ThermodynamicOperations; +import neqsim.util.ExcludeFromJacocoGeneratedReport; /** *

@@ -25,6 +26,7 @@ public class Problem280809LNGfreezing { * * @param args an array of {@link java.lang.String} objects */ + @ExcludeFromJacocoGeneratedReport public static void main(String args[]) { SystemInterface testSystem = new SystemGERG2004Eos(170, 1); testSystem.addComponent("methane", 0.97);