diff --git a/src/test/java/neqsim/processSimulation/processEquipment/distillation/DistillationColumnTest.java b/src/test/java/neqsim/processSimulation/processEquipment/distillation/DistillationColumnTest.java index 0e6d35337d..0e2701be34 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/distillation/DistillationColumnTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/distillation/DistillationColumnTest.java @@ -67,8 +67,7 @@ public void DistillationColumnTest() throws Exception { gasToReboilerStream.setPressure(1.12, "bara"); gasToReboilerStream.run(); - DistillationColumn column = new DistillationColumn(1, true, true); - column.setName("TEG regeneration column"); + DistillationColumn column = new DistillationColumn("TEG regeneration column", 1, true, true); column.addFeedStream(richTEGStream, 1); column.getReboiler().setOutTemperature(273.15 + 202); column.getCondenser().setOutTemperature(273.15 + 88.165861); @@ -143,8 +142,7 @@ public void deethanizerTest() throws Exception { // gasToDeethanizerStream.getFluid().prettyPrint(); - DistillationColumn column = new DistillationColumn(5, true, false); - column.setName("Deethanizer"); + DistillationColumn column = new DistillationColumn("Deethanizer", 5, true, false); column.addFeedStream(gasToDeethanizerStream, 5); column.getReboiler().setOutTemperature(105.0 + 273.15); column.setTopPressure(30.0); @@ -189,8 +187,7 @@ public void debutanizerTest() throws Exception { // gasToDebutanizerStream.getFluid().prettyPrint(); - DistillationColumn column = new DistillationColumn(1, true, true); - column.setName("Deethanizer"); + DistillationColumn column = new DistillationColumn("Deethanizer", 1, true, true); column.addFeedStream(gasToDebutanizerStream, 1); ((Condenser) column.getCondenser()).setRefluxRatio(0.1); ((Condenser) column.getCondenser()).setTotalCondenser(true); diff --git a/src/test/java/neqsim/processSimulation/processEquipment/heatExchanger/HeaterTest.java b/src/test/java/neqsim/processSimulation/processEquipment/heatExchanger/HeaterTest.java index e1f70a8795..50301cfc5b 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/heatExchanger/HeaterTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/heatExchanger/HeaterTest.java @@ -23,8 +23,7 @@ public void setUpBeforeClass() throws Exception { testSystem = new SystemSrkEos(298.0, 10.0); testSystem.addComponent("methane", 100.0); processOps = new ProcessSystem(); - Stream inletStream = new Stream("inletStream", testSystem); - inletStream.setName("inlet stream"); + Stream inletStream = new Stream("inlet stream", testSystem); inletStream.setPressure(pressure_inlet, "bara"); inletStream.setTemperature(temperature_inlet, "C"); inletStream.setFlowRate(gasFlowRate, "MSm3/day"); diff --git a/src/test/java/neqsim/processSimulation/processEquipment/manifold/ManifoldTest.java b/src/test/java/neqsim/processSimulation/processEquipment/manifold/ManifoldTest.java index 7266b0b2f3..280b09e56b 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/manifold/ManifoldTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/manifold/ManifoldTest.java @@ -17,15 +17,13 @@ void testRun() { SystemSrkEos testSystem2 = testSystem.clone(); testSystem2.setMolarComposition(new double[] {0.1, 0.4, 0.4}); - Stream inletStream = new Stream("inletStream", testSystem); - inletStream.setName("inlet stream"); + Stream inletStream = new Stream("inlet stream", testSystem); inletStream.setPressure(10.0, "bara"); inletStream.setTemperature(20.0, "C"); inletStream.setFlowRate(3.0, "MSm3/day"); inletStream.run(); - Stream inletStream2 = new Stream("inletStream", testSystem2); - inletStream2.setName("inlet stream"); + Stream inletStream2 = new Stream("inlet stream", testSystem2); inletStream2.setPressure(10.0, "bara"); inletStream2.setTemperature(20.0, "C"); inletStream2.setFlowRate(2.0, "MSm3/day"); @@ -55,14 +53,12 @@ void testRun2() { ProcessSystem processOps = new ProcessSystem(); - Stream inletStream = new Stream("inletStream", testSystem); - inletStream.setName("inlet stream"); + Stream inletStream = new Stream("inlet stream", testSystem); inletStream.setPressure(10.0, "bara"); inletStream.setTemperature(20.0, "C"); inletStream.setFlowRate(3.0, "MSm3/day"); - Stream inletStream2 = new Stream("inletStream", testSystem2); - inletStream2.setName("inlet stream"); + Stream inletStream2 = new Stream("inlet stream", testSystem2); inletStream2.setPressure(10.0, "bara"); inletStream2.setTemperature(20.0, "C"); inletStream2.setFlowRate(2.0, "MSm3/day"); diff --git a/src/test/java/neqsim/processSimulation/processEquipment/pipeline/BeggsAndBrillsPipeTest.java b/src/test/java/neqsim/processSimulation/processEquipment/pipeline/BeggsAndBrillsPipeTest.java index 487be85b13..c25a6c86d3 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/pipeline/BeggsAndBrillsPipeTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/pipeline/BeggsAndBrillsPipeTest.java @@ -68,7 +68,7 @@ public void testPipeLineBeggsAndBrills() { Stream stream_1 = new Stream("Stream1", testSystem); stream_1.setFlowRate(massFlowRate, "kg/hr"); - PipeBeggsAndBrills pipe = new PipeBeggsAndBrills(stream_1); + PipeBeggsAndBrills pipe = new PipeBeggsAndBrills("pipe1", stream_1); pipe.setPipeWallRoughness(5e-6); pipe.setLength(10.0); pipe.setAngle(0); @@ -166,7 +166,7 @@ public void testPipeLineBeggsAndBrills3() { Stream stream_1 = new Stream("Stream1", testSystem); stream_1.setFlowRate(massFlowRate, "kg/hr"); - PipeBeggsAndBrills pipe = new PipeBeggsAndBrills(stream_1); + PipeBeggsAndBrills pipe = new PipeBeggsAndBrills("pipe1", stream_1); pipe.setPipeWallRoughness(0); pipe.setLength(410.0); pipe.setElevation(300); @@ -229,7 +229,7 @@ public void testPipeLineBeggsAndBrills4() { Stream stream_1 = new Stream("Stream1", testSystem); stream_1.setFlowRate(massFlowRate, "kg/hr"); - PipeBeggsAndBrills pipe = new PipeBeggsAndBrills(stream_1); + PipeBeggsAndBrills pipe = new PipeBeggsAndBrills("pipe1", stream_1); pipe.setPipeWallRoughness(0); pipe.setLength(1500.0); pipe.setElevation(-1000); @@ -284,7 +284,7 @@ public void testPipeLineBeggsAndBrills4() { Stream stream_2 = new Stream("Stream1", testSystem2); stream_2.setFlowRate(massFlowRate, "kg/hr"); - PipeBeggsAndBrills pipe2 = new PipeBeggsAndBrills(stream_2); + PipeBeggsAndBrills pipe2 = new PipeBeggsAndBrills("pipe2", stream_2); pipe2.setPipeWallRoughness(0); pipe2.setLength(1500.0); pipe2.setElevation(-1000); @@ -323,7 +323,7 @@ public void testPipeLineBeggsAndBrills4() { Stream stream_3 = new Stream("Stream1", testSystem3); stream_3.setFlowRate(massFlowRate, "kg/hr"); - PipeBeggsAndBrills pipe3 = new PipeBeggsAndBrills(stream_3); + PipeBeggsAndBrills pipe3 = new PipeBeggsAndBrills("pipe3", stream_3); pipe3.setPipeWallRoughness(0); pipe3.setLength(10000.0); pipe3.setElevation(1500); diff --git a/src/test/java/neqsim/processSimulation/processEquipment/reservoir/WellFlowTest.java b/src/test/java/neqsim/processSimulation/processEquipment/reservoir/WellFlowTest.java index 417876a81e..531aabcb8f 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/reservoir/WellFlowTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/reservoir/WellFlowTest.java @@ -70,7 +70,7 @@ void testRunTransientRes2() { wellflow.setWellProductionIndex(producxtionIndex); neqsim.processSimulation.processEquipment.pipeline.PipeBeggsAndBrills pipe = - new neqsim.processSimulation.processEquipment.pipeline.PipeBeggsAndBrills( + new neqsim.processSimulation.processEquipment.pipeline.PipeBeggsAndBrills("pipe", wellflow.getOutletStream()); pipe.setPipeWallRoughness(5e-6); pipe.setLength(170.0); @@ -85,7 +85,7 @@ void testRunTransientRes2() { compressor.setCompressionRatio(2.0); neqsim.processSimulation.processEquipment.heatExchanger.Cooler intercooler = - new neqsim.processSimulation.processEquipment.heatExchanger.Cooler( + new neqsim.processSimulation.processEquipment.heatExchanger.Cooler("cooler", compressor.getOutletStream()); intercooler.setOutTemperature(25.0, "C"); @@ -103,7 +103,7 @@ void testRunTransientRes2() { cooler1.setOutTemperature(30.0, "C"); neqsim.processSimulation.processEquipment.pipeline.PipeBeggsAndBrills pipeline = - new neqsim.processSimulation.processEquipment.pipeline.PipeBeggsAndBrills( + new neqsim.processSimulation.processEquipment.pipeline.PipeBeggsAndBrills("pipeline", cooler1.getOutletStream()); pipeline.setPipeWallRoughness(50e-6); pipeline.setLength(50 * 1e3); @@ -161,13 +161,13 @@ void testRunTransient() { wellflow.setInletStream(producedGasStream); wellflow.setWellProductionIndex(10.000100751427403E-3); - PipeBeggsAndBrills pipe = new PipeBeggsAndBrills(wellflow.getOutletStream()); + PipeBeggsAndBrills pipe = new PipeBeggsAndBrills("pipe", wellflow.getOutletStream()); pipe.setPipeWallRoughness(5e-6); pipe.setLength(300.0); pipe.setElevation(300); pipe.setDiameter(0.625); - PipeBeggsAndBrills pipeline = new PipeBeggsAndBrills(pipe.getOutletStream()); + PipeBeggsAndBrills pipeline = new PipeBeggsAndBrills("pipeline", pipe.getOutletStream()); pipeline.setPipeWallRoughness(5e-6); pipeline.setLength(60000.0); pipeline.setElevation(200); diff --git a/src/test/java/neqsim/processSimulation/processEquipment/splitter/ComponentSplitterTest.java b/src/test/java/neqsim/processSimulation/processEquipment/splitter/ComponentSplitterTest.java index 478e7dff8c..3e1250d194 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/splitter/ComponentSplitterTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/splitter/ComponentSplitterTest.java @@ -30,8 +30,7 @@ public void setUpBeforeClass() throws Exception { testSystem.addComponent("ethane", 10.0); testSystem.addComponent("propane", 10.0); processOps = new ProcessSystem(); - Stream inletStream = new Stream("inletStream", testSystem); - inletStream.setName("inlet stream"); + Stream inletStream = new Stream("inlet stream", testSystem); inletStream.setPressure(pressure_inlet, "bara"); inletStream.setTemperature(temperature_inlet, "C"); inletStream.setFlowRate(gasFlowRate, "MSm3/day"); @@ -55,8 +54,7 @@ public void configSplitter() { testSystem.addComponent("ethane", 10.0); testSystem.addComponent("propane", 10.0); processOps = new ProcessSystem(); - Stream inletStream = new Stream("inletStream", testSystem); - inletStream.setName("inlet stream"); + Stream inletStream = new Stream("inlet stream", testSystem); inletStream.setPressure(pressure_inlet, "bara"); inletStream.setTemperature(temperature_inlet, "C"); inletStream.setFlowRate(gasFlowRate, "MSm3/day"); @@ -87,8 +85,7 @@ public void testRunSplitter() { testSystem.addComponent("ethane", 10.0); testSystem.addComponent("propane", 10.0); processOps = new ProcessSystem(); - Stream inletStream = new Stream("inletStream", testSystem); - inletStream.setName("inlet stream"); + Stream inletStream = new Stream("inlet stream", testSystem); inletStream.setPressure(pressure_inlet, "bara"); inletStream.setTemperature(temperature_inlet, "C"); inletStream.setFlowRate(gasFlowRate, "MSm3/day"); @@ -133,8 +130,7 @@ public void testRunSplitter2() { processOps = new ProcessSystem(); - Stream inletStream = new Stream("inletStream", testSystem); - inletStream.setName("inlet stream"); + Stream inletStream = new Stream("inlet stream", testSystem); inletStream.setPressure(55.0, "bara"); inletStream.setTemperature(25.0, "C"); inletStream.setFlowRate(5.0, "MSm3/day"); diff --git a/src/test/java/neqsim/processSimulation/processEquipment/stream/StreamTest.java b/src/test/java/neqsim/processSimulation/processEquipment/stream/StreamTest.java index 2ee7739da9..eb96556c53 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/stream/StreamTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/stream/StreamTest.java @@ -27,8 +27,7 @@ public void setUpBeforeClass() throws Exception { testSystem = new SystemSrkEos(298.0, 10.0); testSystem.addComponent("methane", 100.0); processOps = new ProcessSystem(); - Stream inletStream = new Stream("inletStream", testSystem); - inletStream.setName("inlet stream"); + Stream inletStream = new Stream("inlet stream", testSystem); inletStream.setPressure(pressure_inlet, "bara"); inletStream.setTemperature(temperature_inlet, "C"); inletStream.setFlowRate(gasFlowRate, "MSm3/day"); diff --git a/src/test/java/neqsim/processSimulation/processEquipment/stream/VirtualStreamTest.java b/src/test/java/neqsim/processSimulation/processEquipment/stream/VirtualStreamTest.java index 50dcf7b64d..7ced411bb8 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/stream/VirtualStreamTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/stream/VirtualStreamTest.java @@ -24,8 +24,7 @@ public void setUpBeforeClass() throws Exception { testSystem.addComponent("methane", 100.0); testSystem.addComponent("ethane", 100.0); processOps = new ProcessSystem(); - inletStream = new Stream("inletStream", testSystem); - inletStream.setName("inlet stream"); + inletStream = new Stream("inlet stream", testSystem); inletStream.setPressure(pressure_inlet, "bara"); inletStream.setTemperature(temperature_inlet, "C"); inletStream.setFlowRate(gasFlowRate, "MSm3/day"); diff --git a/src/test/java/neqsim/processSimulation/processEquipment/util/AdjusterTest.java b/src/test/java/neqsim/processSimulation/processEquipment/util/AdjusterTest.java index ea5983556d..24b28732a7 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/util/AdjusterTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/util/AdjusterTest.java @@ -13,13 +13,14 @@ void testRun() { fluid1.setMixingRule("classic"); neqsim.processSimulation.processEquipment.stream.Stream stream1 = - new neqsim.processSimulation.processEquipment.stream.Stream(fluid1.clone()); + new neqsim.processSimulation.processEquipment.stream.Stream("light oil", fluid1.clone()); stream1.setFlowRate(1.5, "MSm3/day"); stream1.setPressure(bottomholepressure, "bara"); stream1.setTemperature(75.0, "C"); neqsim.processSimulation.processEquipment.pipeline.PipeBeggsAndBrills flowline1 = - new neqsim.processSimulation.processEquipment.pipeline.PipeBeggsAndBrills(stream1); + new neqsim.processSimulation.processEquipment.pipeline.PipeBeggsAndBrills("flowline", + stream1); flowline1.setDiameter(0.25); flowline1.setPipeWallRoughness(15e-6); flowline1.setLength(1200); @@ -54,13 +55,14 @@ void testRun2() { fluid1.setMixingRule("classic"); neqsim.processSimulation.processEquipment.stream.Stream stream1 = - new neqsim.processSimulation.processEquipment.stream.Stream(fluid1.clone()); + new neqsim.processSimulation.processEquipment.stream.Stream("light oil", fluid1.clone()); stream1.setFlowRate(4.0, "MSm3/day"); stream1.setPressure(170, "bara"); stream1.setTemperature(75.0, "C"); neqsim.processSimulation.processEquipment.pipeline.PipeBeggsAndBrills flowline1 = - new neqsim.processSimulation.processEquipment.pipeline.PipeBeggsAndBrills(stream1); + new neqsim.processSimulation.processEquipment.pipeline.PipeBeggsAndBrills("flowline", + stream1); flowline1.setDiameter(0.25); flowline1.setPipeWallRoughness(15e-6); flowline1.setLength(1200); diff --git a/src/test/java/neqsim/processSimulation/processEquipment/util/FlowSetterTest.java b/src/test/java/neqsim/processSimulation/processEquipment/util/FlowSetterTest.java index 51f5388b63..2bc0053b74 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/util/FlowSetterTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/util/FlowSetterTest.java @@ -85,7 +85,7 @@ void testProcessWithFlowSetter() { StreamInterface feedStream = flowset.getOutletStream(); - ThreePhaseSeparator separator = new ThreePhaseSeparator(feedStream); + ThreePhaseSeparator separator = new ThreePhaseSeparator("sep", feedStream); StreamInterface gasFromSepStream = separator.getGasOutStream(); diff --git a/src/test/java/neqsim/processSimulation/processEquipment/util/PressureDropTest.java b/src/test/java/neqsim/processSimulation/processEquipment/util/PressureDropTest.java index 6f19ee62a1..4c2b6450a2 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/util/PressureDropTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/util/PressureDropTest.java @@ -16,8 +16,7 @@ void testRun() { neqsim.thermo.system.SystemInterface testSystem = new SystemSrkEos(298.0, 100.0); testSystem.addComponent("methane", 100.0); - Stream inletStream = new Stream("inletStream", testSystem); - inletStream.setName("inlet stream"); + Stream inletStream = new Stream("inlet stream", testSystem); inletStream.setPressure(pressure_inlet, "bara"); inletStream.setTemperature(temperature_inlet, "C"); inletStream.setFlowRate(gasFlowRate, "MSm3/day"); diff --git a/src/test/java/neqsim/processSimulation/processEquipment/util/StreamSaturatorUtilTest.java b/src/test/java/neqsim/processSimulation/processEquipment/util/StreamSaturatorUtilTest.java index 0d8ec34ce3..52b0df150e 100644 --- a/src/test/java/neqsim/processSimulation/processEquipment/util/StreamSaturatorUtilTest.java +++ b/src/test/java/neqsim/processSimulation/processEquipment/util/StreamSaturatorUtilTest.java @@ -21,8 +21,7 @@ void testRun() { testSystem.addComponent("methane", 100.0); testSystem.addComponent("water", 1.0); - Stream inletStream = new Stream("inletStream", testSystem); - inletStream.setName("inlet stream"); + Stream inletStream = new Stream("inlet stream", testSystem); inletStream.setPressure(pressure_inlet, "bara"); inletStream.setTemperature(temperature_inlet, "C"); inletStream.setFlowRate(gasFlowRate, "MSm3/day"); @@ -67,8 +66,7 @@ void testNeedRecalculation() { testSystem.addComponent("methane", 100.0); testSystem.addComponent("water", 1.0); - Stream inletStream = new Stream("inletStream", testSystem); - inletStream.setName("inlet stream"); + Stream inletStream = new Stream("inlet stream", testSystem); inletStream.setPressure(pressure_inlet, "bara"); inletStream.setTemperature(temperature_inlet, "C"); inletStream.setFlowRate(gasFlowRate, "MSm3/day"); diff --git a/src/test/java/neqsim/processSimulation/processSystem/GlycolModulesTest.java b/src/test/java/neqsim/processSimulation/processSystem/GlycolModulesTest.java index d5223d0bfd..04e690204c 100644 --- a/src/test/java/neqsim/processSimulation/processSystem/GlycolModulesTest.java +++ b/src/test/java/neqsim/processSimulation/processSystem/GlycolModulesTest.java @@ -89,16 +89,16 @@ public void runProcessTEG() throws InterruptedException { dryFeedGasSmøbukk.setTemperature(32.48975904520211, "C"); dryFeedGasSmøbukk.setPressure(40.1205259689988, "bara"); - StreamSaturatorUtil saturatedFeedGasSmøbukk = new StreamSaturatorUtil(dryFeedGasSmøbukk); - saturatedFeedGasSmøbukk.setName("water saturator Smøbukk"); + StreamSaturatorUtil saturatedFeedGasSmøbukk = + new StreamSaturatorUtil("water saturator Smøbukk", dryFeedGasSmøbukk); saturatedFeedGasSmøbukk.setApprachToSaturation(0.93); - Stream waterSaturatedFeedGasSmøbukk = new Stream(saturatedFeedGasSmøbukk.getOutStream()); - waterSaturatedFeedGasSmøbukk.setName("water saturated feed gas Smøbukk"); + Stream waterSaturatedFeedGasSmøbukk = + new Stream("water saturated feed gas Smøbukk", saturatedFeedGasSmøbukk.getOutStream()); HydrateEquilibriumTemperatureAnalyser hydrateTAnalyserSmøbukk = - new HydrateEquilibriumTemperatureAnalyser(waterSaturatedFeedGasSmøbukk); - hydrateTAnalyserSmøbukk.setName("hydrate temperature analyser Smøbukk"); + new HydrateEquilibriumTemperatureAnalyser("hydrate temperature analyser Smøbukk", + waterSaturatedFeedGasSmøbukk); Splitter SmøbukkSplit = new Splitter("Smøbukk Splitter", waterSaturatedFeedGasSmøbukk); double[] splitSmøbukk = {0.9999999999, 1e-10}; @@ -109,15 +109,15 @@ public void runProcessTEG() throws InterruptedException { dryFeedGasMidgard.setTemperature(8.617179027757128, "C"); dryFeedGasMidgard.setPressure(41.78261426145009, "bara"); - StreamSaturatorUtil saturatedFeedGasMidgard = new StreamSaturatorUtil(dryFeedGasMidgard); - saturatedFeedGasMidgard.setName("water saturator Midgard"); + StreamSaturatorUtil saturatedFeedGasMidgard = + new StreamSaturatorUtil("water saturator Midgard", dryFeedGasMidgard); - Stream waterSaturatedFeedGasMidgard = new Stream(saturatedFeedGasMidgard.getOutStream()); - waterSaturatedFeedGasMidgard.setName("water saturated feed gas Midgard"); + Stream waterSaturatedFeedGasMidgard = + new Stream("water saturated feed gas Midgard", saturatedFeedGasMidgard.getOutStream()); HydrateEquilibriumTemperatureAnalyser hydrateTAnalyserMidgard = - new HydrateEquilibriumTemperatureAnalyser(waterSaturatedFeedGasMidgard); - hydrateTAnalyserMidgard.setName("hydrate temperature analyser Midgard"); + new HydrateEquilibriumTemperatureAnalyser("hydrate temperature analyser Midgard", + waterSaturatedFeedGasMidgard); Splitter MidgardSplit = new Splitter("Midgard Splitter", waterSaturatedFeedGasMidgard); double[] splitMidgard = {0.11245704038738272, 0.8875429596126173}; @@ -135,14 +135,13 @@ public void runProcessTEG() throws InterruptedException { new Stream("feed to TEG absorber", feedTPsetterToAbsorber.getOutletStream()); HydrateEquilibriumTemperatureAnalyser hydrateTAnalyser2 = - new HydrateEquilibriumTemperatureAnalyser(feedToAbsorber); - hydrateTAnalyser2.setName("hydrate temperature gas to absorber"); + new HydrateEquilibriumTemperatureAnalyser("hydrate temperature gas to absorber", + feedToAbsorber); WaterDewPointAnalyser waterDewPointAnalyserToAbsorber = - new WaterDewPointAnalyser(feedToAbsorber); + new WaterDewPointAnalyser("water dew point gas to absorber", feedToAbsorber); waterDewPointAnalyserToAbsorber.setMethod("multiphase"); waterDewPointAnalyserToAbsorber.setReferencePressure(39.67967207899729); - waterDewPointAnalyserToAbsorber.setName("water dew point gas to absorber"); neqsim.thermo.system.SystemInterface feedTEG = (neqsim.thermo.system.SystemInterface) feedGas.clone(); @@ -161,31 +160,24 @@ public void runProcessTEG() throws InterruptedException { absorber.setStageEfficiency(1); absorber.setInternalDiameter(3.65); - Stream dehydratedGas = new Stream(absorber.getGasOutStream()); - dehydratedGas.setName("dry gas from absorber"); - - Stream richTEG = new Stream(absorber.getLiquidOutStream()); - richTEG.setName("rich TEG from absorber"); + Stream dehydratedGas = new Stream("dry gas from absorber", absorber.getGasOutStream()); + Stream richTEG = new Stream("rich TEG from absorber", absorber.getLiquidOutStream()); HydrateEquilibriumTemperatureAnalyser waterDewPointAnalyser = - new HydrateEquilibriumTemperatureAnalyser(dehydratedGas); + new HydrateEquilibriumTemperatureAnalyser("hydrate dew point analyser", dehydratedGas); waterDewPointAnalyser.setReferencePressure(70.0); - waterDewPointAnalyser.setName("hydrate dew point analyser"); - WaterDewPointAnalyser waterDewPointAnalyser2 = new WaterDewPointAnalyser(dehydratedGas); + WaterDewPointAnalyser waterDewPointAnalyser2 = + new WaterDewPointAnalyser("water dew point analyser", dehydratedGas); waterDewPointAnalyser2.setReferencePressure(70.0); - waterDewPointAnalyser2.setName("water dew point analyser"); - Heater condHeat = new Heater(richTEG); - condHeat.setName("Condenser heat exchanger"); + Heater condHeat = new Heater("Condenser heat exchanger", richTEG); ThrottlingValve glycol_flash_valve = - new ThrottlingValve("Flash valve", condHeat.getOutStream()); - glycol_flash_valve.setName("Rich TEG HP flash valve"); + new ThrottlingValve("Rich TEG HP flash valve", condHeat.getOutStream()); glycol_flash_valve.setOutletPressure(7.513533287063168); - Heater heatEx2 = new Heater(glycol_flash_valve.getOutStream()); - heatEx2.setName("rich TEG heat exchanger 1"); + Heater heatEx2 = new Heater("rich TEG heat exchanger 1", glycol_flash_valve.getOutStream()); heatEx2.setOutTemperature(273.15 + 90); neqsim.thermo.system.SystemInterface feedWater = @@ -198,27 +190,22 @@ public void runProcessTEG() throws InterruptedException { waterFeed.setTemperature(90, "C"); waterFeed.setPressure(7.513533287063168, "bara"); - Separator flashSep = new Separator(heatEx2.getOutStream()); - flashSep.setName("degasing separator"); + Separator flashSep = new Separator("degasing separator", heatEx2.getOutStream()); flashSep.setInternalDiameter(1.2); - Stream flashGas = new Stream(flashSep.getGasOutStream()); - flashGas.setName("gas from degasing separator"); + Stream flashGas = new Stream("gas from degasing separator", flashSep.getGasOutStream()); - Stream flashLiquid = new Stream(flashSep.getLiquidOutStream()); - flashLiquid.setName("liquid from degasing separator"); + Stream flashLiquid = + new Stream("liquid from degasing separator", flashSep.getLiquidOutStream()); - Filter filter = new Filter(flashLiquid); - filter.setName("TEG fine filter"); + Filter filter = new Filter("TEG fine filter", flashLiquid); filter.setDeltaP(0.0, "bara"); - Heater heatEx = new Heater(filter.getOutStream()); - heatEx.setName("lean/rich TEG heat-exchanger"); + Heater heatEx = new Heater("lean/rich TEG heat-exchanger", filter.getOutStream()); heatEx.setOutTemperature(273.15 + 105.0); ThrottlingValve glycol_flash_valve2 = - new ThrottlingValve("LP flash valve", heatEx.getOutStream()); - glycol_flash_valve2.setName("Rich TEG LP flash valve"); + new ThrottlingValve("Rich TEG LP flash valve", heatEx.getOutStream()); glycol_flash_valve2.setOutletPressure(1.1714901511485545); neqsim.thermo.system.SystemInterface stripGas = @@ -232,8 +219,7 @@ public void runProcessTEG() throws InterruptedException { Stream gasToReboiler = (Stream) (strippingGas).clone(); gasToReboiler.setName("gas to reboiler"); - DistillationColumn column = new DistillationColumn(2, true, true); - column.setName("TEG regeneration column"); + DistillationColumn column = new DistillationColumn("TEG regeneration column", 2, true, true); column.addFeedStream(glycol_flash_valve2.getOutStream(), 1); column.getReboiler().setOutTemperature(273.15 + 201.86991706268591); column.getCondenser().setOutTemperature(273.15 + 112.80145109927442); @@ -242,15 +228,12 @@ public void runProcessTEG() throws InterruptedException { column.setBottomPressure(1.1714901511485545); column.setInternalDiameter(0.56); - Heater coolerRegenGas = new Heater(column.getGasOutStream()); - coolerRegenGas.setName("regen gas cooler"); + Heater coolerRegenGas = new Heater("regen gas cooler", column.getGasOutStream()); coolerRegenGas.setOutTemperature(273.15 + 17.685590621935702); - Separator sepregenGas = new Separator(coolerRegenGas.getOutStream()); - sepregenGas.setName("regen gas separator"); + Separator sepregenGas = new Separator("regen gas separator", coolerRegenGas.getOutStream()); - Stream gasToFlare = new Stream(sepregenGas.getGasOutStream()); - gasToFlare.setName("gas to flare"); + Stream gasToFlare = new Stream("gas to flare", sepregenGas.getGasOutStream()); Splitter splitterGasToFlare = new Splitter("splitter GasToFlare", gasToFlare); splitterGasToFlare.setSplitNumber(2); @@ -261,8 +244,7 @@ public void runProcessTEG() throws InterruptedException { strippingFlareGasTPsetter.setOutPressure(1.1714901511485545, "bara"); strippingFlareGasTPsetter.setOutTemperature(185.4402968739743, "C"); - Stream liquidToTrreatment = new Stream(sepregenGas.getLiquidOutStream()); - liquidToTrreatment.setName("water to treatment"); + Stream liquidToTreatment = new Stream("water to treatment", sepregenGas.getLiquidOutStream()); WaterStripperColumn stripper = new WaterStripperColumn("TEG stripper"); stripper.addSolventInStream(column.getLiquidOutStream()); @@ -296,28 +278,25 @@ public void runProcessTEG() throws InterruptedException { makeupCalculator.addInputVariable(dehydratedGas); makeupCalculator.addInputVariable(flashGas); makeupCalculator.addInputVariable(gasToFlare); - makeupCalculator.addInputVariable(liquidToTrreatment); + makeupCalculator.addInputVariable(liquidToTreatment); makeupCalculator.setOutputVariable(makeupTEG); StaticMixer makeupMixer = new StaticMixer("makeup mixer"); makeupMixer.addStream(stripper.getLiquidOutStream()); makeupMixer.addStream(makeupTEG); - Pump hotLeanTEGPump = new Pump(makeupMixer.getOutStream()); - hotLeanTEGPump.setName("lean TEG LP pump"); + Pump hotLeanTEGPump = new Pump("lean TEG LP pump", makeupMixer.getOutStream()); hotLeanTEGPump.setOutletPressure(39.67967207899729); hotLeanTEGPump.setIsentropicEfficiency(0.9); - Heater coolerhOTteg3 = new Heater(hotLeanTEGPump.getOutStream()); - coolerhOTteg3.setName("lean TEG cooler"); + Heater coolerhOTteg3 = new Heater("lean TEG cooler", hotLeanTEGPump.getOutStream()); coolerhOTteg3.setOutTemperature(273.15 + 35.009563114341454); condHeat.setEnergyStream(column.getCondenser().getEnergyStream()); - Stream leanTEGtoabs = new Stream(coolerhOTteg3.getOutStream()); - leanTEGtoabs.setName("lean TEG to absorber"); + Stream leanTEGtoabs = new Stream("lean TEG to absorber", coolerhOTteg3.getOutStream()); - Recycle resycleLeanTEG = new Recycle("lean TEG resycle"); + Recycle resycleLeanTEG = new Recycle("lean TEG recycle"); resycleLeanTEG.addStream(leanTEGtoabs); resycleLeanTEG.setOutletStream(TEGFeed); resycleLeanTEG.setPriority(200); @@ -376,7 +355,7 @@ public void runProcessTEG() throws InterruptedException { neqsim.processSimulation.processSystem.ProcessSystem operations4 = new neqsim.processSimulation.processSystem.ProcessSystem(); - operations4.add(liquidToTrreatment); + operations4.add(liquidToTreatment); operations4.add(makeupTEG); operations4.add(makeupCalculator); operations4.add(makeupMixer); diff --git a/src/test/java/neqsim/processSimulation/processSystem/GlycolRigTest.java b/src/test/java/neqsim/processSimulation/processSystem/GlycolRigTest.java index ad79656910..36e759ae6f 100644 --- a/src/test/java/neqsim/processSimulation/processSystem/GlycolRigTest.java +++ b/src/test/java/neqsim/processSimulation/processSystem/GlycolRigTest.java @@ -51,14 +51,12 @@ public void runTEGProcessTest() { Stream gasToReboiler = strippingGas.clone(); gasToReboiler.setName("gas to reboiler"); - Stream TEGtoRegenerator = new Stream("feedTEG", feedTEG); - TEGtoRegenerator.setName("TEG to regenerator"); + Stream TEGtoRegenerator = new Stream("\"TEG to regenerator\"", feedTEG); TEGtoRegenerator.setFlowRate(400.0, "kg/hr"); TEGtoRegenerator.setTemperature(145.0, "C"); TEGtoRegenerator.setPressure(0.2, "barg"); - DistillationColumn column = new DistillationColumn(1, true, true); - column.setName("TEG regeneration column"); + DistillationColumn column = new DistillationColumn("TEG regeneration column", 1, true, true); column.addFeedStream(TEGtoRegenerator, 1); column.getReboiler().setOutTemperature(273.15 + 209.0); column.getCondenser().setOutTemperature(273.15 + 104.0); @@ -189,14 +187,12 @@ public void runDistillationProcessTest() { feed.addComponent("n-hexane", 0.6); feed.setMixingRule("classic"); - Stream feedToRegenerator = new Stream("feed", feed); - feedToRegenerator.setName("feed to regenerator"); + Stream feedToRegenerator = new Stream("feed to regenerator", feed); feedToRegenerator.setFlowRate(400.0, "kg/hr"); feedToRegenerator.setTemperature(20.0, "C"); feedToRegenerator.setPressure(2.01325, "barg"); - DistillationColumn column = new DistillationColumn(1, true, true); - column.setName("distillation column"); + DistillationColumn column = new DistillationColumn("distillation column", 1, true, true); column.addFeedStream(feedToRegenerator, 1); column.getReboiler().setOutTemperature(273.15 + 70.0); column.getCondenser().setOutTemperature(273.15 - 10.0); @@ -238,14 +234,12 @@ public void runDistillationProcessTest2() { feed.addComponent("n-hexane", 0.6); feed.setMixingRule("classic"); - Stream feedToRegenerator = new Stream("feed", feed); - feedToRegenerator.setName("feed to regenerator"); + Stream feedToRegenerator = new Stream("feed to regenerator", feed); feedToRegenerator.setFlowRate(400.0, "kg/hr"); feedToRegenerator.setTemperature(80.0, "C"); feedToRegenerator.setPressure(5.0, "barg"); - DistillationColumn column = new DistillationColumn(1, true, true); - column.setName("distillation column"); + DistillationColumn column = new DistillationColumn("distillation column", 1, true, true); column.addFeedStream(feedToRegenerator, 1); column.getReboiler().setOutTemperature(273.15 + 100.0); column.getCondenser().setOutTemperature(273.15 + 50.0); @@ -287,20 +281,17 @@ public void runDistillationProcessTest3() { feed2.addComponent("n-hexane", 0.01); feed2.setMixingRule("classic"); - Stream feedToRegenerator = new Stream("feed", feed); - feedToRegenerator.setName("feed to regenerator"); + Stream feedToRegenerator = new Stream("feed to regenerator", feed); feedToRegenerator.setFlowRate(400.0, "kg/hr"); feedToRegenerator.setTemperature(40.0, "C"); feedToRegenerator.setPressure(2.0, "barg"); - Stream feedToRegenerator2 = new Stream("feed2", feed2); - feedToRegenerator2.setName("feed2 to regenerator"); + Stream feedToRegenerator2 = new Stream("feed2 to regenerator", feed2); feedToRegenerator2.setFlowRate(400.0, "kg/hr"); feedToRegenerator2.setTemperature(80.0, "C"); feedToRegenerator2.setPressure(2.0, "barg"); - DistillationColumn column = new DistillationColumn(2, false, false); - column.setName("distillation column"); + DistillationColumn column = new DistillationColumn("distillation column", 2, false, false); column.addFeedStream(feedToRegenerator2, 0); column.addFeedStream(feedToRegenerator, 1); diff --git a/src/test/java/neqsim/processSimulation/processSystem/MLA_bug_test.java b/src/test/java/neqsim/processSimulation/processSystem/MLA_bug_test.java index fe9e1179f1..85929d44c3 100644 --- a/src/test/java/neqsim/processSimulation/processSystem/MLA_bug_test.java +++ b/src/test/java/neqsim/processSimulation/processSystem/MLA_bug_test.java @@ -57,47 +57,42 @@ public void runProcessTEG() throws InterruptedException { coolingMedium.setMixingRule(10); coolingMedium.setMultiPhaseCheck(false); - StreamInterface coolingWater1 = new Stream(coolingMedium); - coolingWater1.setName("cooling water 1"); + StreamInterface coolingWater1 = new Stream("cooling water 1", coolingMedium); coolingWater1.setFlowRate(30000.0, "kg/hr"); coolingWater1.setTemperature(18.0, "C"); coolingWater1.setPressure(7.5, "bara"); p.add(coolingWater1); - StreamInterface coolingWater2 = new Stream(coolingMedium.clone()); - coolingWater2.setName("cooling water 2"); + StreamInterface coolingWater2 = new Stream("cooling water 2", coolingMedium.clone()); coolingWater2.setFlowRate(3500.0, "kg/hr"); coolingWater2.setTemperature(18.0, "C"); coolingWater2.setPressure(7.5, "bara"); p.add(coolingWater2); - StreamInterface dryFeedGas = new Stream(feedGas); - dryFeedGas.setName("dry feed gas"); + StreamInterface dryFeedGas = new Stream("dry feed gas", feedGas); dryFeedGas.setFlowRate(4.65, "MSm3/day"); dryFeedGas.setTemperature(25.0, "C"); dryFeedGas.setPressure(70.0, "bara"); p.add(dryFeedGas); - StreamSaturatorUtil saturatedFeedGas = new StreamSaturatorUtil(dryFeedGas); - saturatedFeedGas.setName("water saturator"); + StreamSaturatorUtil saturatedFeedGas = new StreamSaturatorUtil("water saturator", dryFeedGas); p.add(saturatedFeedGas); - StreamInterface waterSaturatedFeedGas = new Stream(saturatedFeedGas.getOutStream()); - waterSaturatedFeedGas.setName("water saturated feed gas"); + StreamInterface waterSaturatedFeedGas = + new Stream("water saturated feed gas", saturatedFeedGas.getOutStream()); p.add(waterSaturatedFeedGas); 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.0, 0.03, 0.97}); - Heater feedTPsetterToAbsorber = new Heater(waterSaturatedFeedGas); - feedTPsetterToAbsorber.setName("TP of gas to absorber"); + Heater feedTPsetterToAbsorber = new Heater("TP of gas to absorber", waterSaturatedFeedGas); feedTPsetterToAbsorber.setOutPressure(85.0, "bara"); feedTPsetterToAbsorber.setOutTemperature(35.0, "C"); p.add(feedTPsetterToAbsorber); - StreamInterface feedToAbsorber = new Stream(feedTPsetterToAbsorber.getOutStream()); - feedToAbsorber.setName("feed to TEG absorber"); + StreamInterface feedToAbsorber = + new Stream("feed to TEG absorber", feedTPsetterToAbsorber.getOutStream()); p.add(feedToAbsorber); WaterDewPointAnalyser waterDewPointAnalyserToAbsorber = @@ -107,8 +102,7 @@ public void runProcessTEG() throws InterruptedException { waterDewPointAnalyserToAbsorber.setName("water dew point gas to absorber"); p.add(waterDewPointAnalyserToAbsorber); - StreamInterface TEGFeed = new Stream(feedTEG); - TEGFeed.setName("lean TEG to absorber"); + StreamInterface TEGFeed = new Stream("lean TEG to absorber", feedTEG); TEGFeed.setFlowRate(5500.0, "kg/hr"); TEGFeed.setTemperature(48.5, "C"); TEGFeed.setPressure(85.0, "bara"); @@ -129,27 +123,25 @@ public void runProcessTEG() throws InterruptedException { absorberSetWater.setWaterInDryGas(30e-6); p.add(absorberSetWater); - StreamInterface dehydratedGasSetWater = new Stream(absorberSetWater.getGasOutStream()); - dehydratedGasSetWater.setName("dry gas from absorber set water"); + StreamInterface dehydratedGasSetWater = + new Stream("dry gas from absorber set water", absorberSetWater.getGasOutStream()); p.add(dehydratedGasSetWater); - Heater coolerDehydGas = new Heater(dehydratedGasSetWater); - coolerDehydGas.setName("coolerDehydGas"); + Heater coolerDehydGas = new Heater("coolerDehydGas", dehydratedGasSetWater); coolerDehydGas.setOutTemperature(273.15 + 10.0); p.add(coolerDehydGas); - Separator sepDehydratedGasSetWater = new Separator(coolerDehydGas.getOutStream()); - sepDehydratedGasSetWater.setName("dehyd gas separator"); + Separator sepDehydratedGasSetWater = + new Separator("dehyd gas separator", coolerDehydGas.getOutStream()); p.add(sepDehydratedGasSetWater); - Heater pipelineSetTP = new Heater(sepDehydratedGasSetWater.getGasOutStream()); - pipelineSetTP.setName("pipelineSetTP"); + Heater pipelineSetTP = new Heater("pipelineSetTP", sepDehydratedGasSetWater.getGasOutStream()); pipelineSetTP.setOutPressure(168.0, "bara"); pipelineSetTP.setOutTemperature(4.0, "C"); p.add(pipelineSetTP); - StreamInterface pipelineSetTPStream = new Stream(pipelineSetTP.getOutStream()); - pipelineSetTPStream.setName("pipelineSetTP stream"); + StreamInterface pipelineSetTPStream = + new Stream("pipelineSetTP stream", pipelineSetTP.getOutStream()); p.add(pipelineSetTPStream); WaterDewPointAnalyser waterDewPointAnalyser3 = new WaterDewPointAnalyser(dehydratedGasSetWater); @@ -157,12 +149,10 @@ public void runProcessTEG() throws InterruptedException { waterDewPointAnalyser3.setName("water dew point analyser3"); p.add(waterDewPointAnalyser3); - StreamInterface dehydratedGas = new Stream(absorber.getGasOutStream()); - dehydratedGas.setName("dry gas from absorber"); + StreamInterface dehydratedGas = new Stream("dry gas from absorber", absorber.getGasOutStream()); p.add(dehydratedGas); - StreamInterface richTEG = new Stream(absorber.getLiquidOutStream()); - richTEG.setName("rich TEG from absorber"); + StreamInterface richTEG = new Stream("rich TEG from absorber", absorber.getLiquidOutStream()); p.add(richTEG); WaterDewPointAnalyser waterDewPointAnalyser2 = new WaterDewPointAnalyser(dehydratedGas); @@ -175,49 +165,46 @@ public void runProcessTEG() throws InterruptedException { glycol_flash_valve.setOutletPressure(4.8); p.add(glycol_flash_valve); - Heater richGLycolHeaterCondenser = new Heater(glycol_flash_valve.getOutStream()); - richGLycolHeaterCondenser.setName("rich TEG preheater"); + Heater richGLycolHeaterCondenser = + new Heater("rich TEG preheater", glycol_flash_valve.getOutStream()); p.add(richGLycolHeaterCondenser); - HeatExchanger heatEx2 = new HeatExchanger(richGLycolHeaterCondenser.getOutStream()); - heatEx2.setName("rich TEG heat exchanger 1"); + HeatExchanger heatEx2 = + new HeatExchanger("rich TEG heat exchanger 1", richGLycolHeaterCondenser.getOutStream()); heatEx2.setGuessOutTemperature(273.15 + 62.0); heatEx2.setUAvalue(2224.0); p.add(heatEx2); - Separator flashSep = new Separator(heatEx2.getOutStream(0)); - flashSep.setName("degasing separator"); + Separator flashSep = new Separator("degasing separator", heatEx2.getOutStream(0)); flashSep.setInternalDiameter(1.2); p.add(flashSep); - StreamInterface flashGas = new Stream(flashSep.getGasOutStream()); - flashGas.setName("gas from degasing separator"); + StreamInterface flashGas = + new Stream("gas from degasing separator", flashSep.getGasOutStream()); p.add(flashGas); - StreamInterface flashLiquid = new Stream(flashSep.getLiquidOutStream()); - flashLiquid.setName("liquid from degasing separator"); + StreamInterface flashLiquid = + new Stream("liquid from degasing separator", flashSep.getLiquidOutStream()); p.add(flashLiquid); - Filter fineFilter = new Filter(flashLiquid); - fineFilter.setName("TEG fine filter"); + Filter fineFilter = new Filter("TEG fine filter", flashLiquid); fineFilter.setDeltaP(0.0, "bara"); p.add(fineFilter); - HeatExchanger heatEx = new HeatExchanger(fineFilter.getOutStream()); - heatEx.setName("lean/rich TEG heat-exchanger"); + HeatExchanger heatEx = + new HeatExchanger("lean/rich TEG heat-exchanger", fineFilter.getOutStream()); heatEx.setGuessOutTemperature(273.15 + 130.0); heatEx.setUAvalue(8316.0); p.add(heatEx); - ThrottlingValve glycol_flash_valve2 = new ThrottlingValve(heatEx.getOutStream(0)); - glycol_flash_valve2.setName("Rich TEG LP flash valve"); + ThrottlingValve glycol_flash_valve2 = + new ThrottlingValve("Rich TEG LP flash valve", heatEx.getOutStream(0)); glycol_flash_valve2.setOutletPressure(1.2); p.add(glycol_flash_valve2); SystemInterface stripGas = feedGas.clone(); - StreamInterface strippingGas = new Stream(stripGas); - strippingGas.setName("stripGas"); + StreamInterface strippingGas = new Stream("stripGas", stripGas); strippingGas.setFlowRate(180.0, "Sm3/hr"); strippingGas.setTemperature(78.3, "C"); strippingGas.setPressure(1.2, "bara"); @@ -227,8 +214,7 @@ public void runProcessTEG() throws InterruptedException { gasToReboiler.setName("gas to reboiler"); p.add(gasToReboiler); - DistillationColumn column = new DistillationColumn(1, true, true); - column.setName("TEG regeneration column"); + DistillationColumn column = new DistillationColumn("TEG regeneration column", 1, true, true); column.addFeedStream(glycol_flash_valve2.getOutStream(), 1); column.getReboiler().setOutTemperature(273.15 + 197.5); column.getCondenser().setOutTemperature(273.15 + 80.0); @@ -238,29 +224,26 @@ public void runProcessTEG() throws InterruptedException { column.setInternalDiameter(0.56); p.add(column); - Heater coolerRegenGas = new Heater(column.getGasOutStream()); - coolerRegenGas.setName("regen gas cooler"); + Heater coolerRegenGas = new Heater("regen gas cooler", column.getGasOutStream()); coolerRegenGas.setOutTemperature(273.15 + 47.0); p.add(coolerRegenGas); - HeatExchanger overheadCondHX = new HeatExchanger(column.getGasOutStream()); - overheadCondHX.setName("overhead condenser heat-exchanger"); + HeatExchanger overheadCondHX = + new HeatExchanger("overhead condenser heat-exchanger", column.getGasOutStream()); overheadCondHX.setGuessOutTemperature(273.15 + 50.0); overheadCondHX.setUAvalue(3247.0); overheadCondHX.setFeedStream(1, coolingWater1); p.add(overheadCondHX); - Separator sepregenGas = new Separator(coolerRegenGas.getOutStream()); - sepregenGas.setName("regen gas separator"); + Separator sepregenGas = new Separator("regen gas separator", coolerRegenGas.getOutStream()); p.add(sepregenGas); - StreamInterface gasToFlare = new Stream(sepregenGas.getGasOutStream()); - gasToFlare.setName("gas to flare"); + StreamInterface gasToFlare = new Stream("gas to flare", sepregenGas.getGasOutStream()); p.add(gasToFlare); - StreamInterface liquidToTrreatment = new Stream(sepregenGas.getLiquidOutStream()); - liquidToTrreatment.setName("water to treatment"); - p.add(liquidToTrreatment); + StreamInterface liquidToTreatment = + new Stream("water to treatment", sepregenGas.getLiquidOutStream()); + p.add(liquidToTreatment); WaterStripperColumn stripper = new WaterStripperColumn("TEG stripper"); stripper.addSolventInStream(column.getLiquidOutStream()); @@ -276,47 +259,42 @@ public void runProcessTEG() throws InterruptedException { heatEx.setFeedStream(1, stripper.getLiquidOutStream()); - Heater bufferTank = new Heater(heatEx.getOutStream(1)); - bufferTank.setName("TEG buffer tank"); + Heater bufferTank = new Heater("TEG buffer tank", heatEx.getOutStream(1)); bufferTank.setOutTemperature(273.15 + 90.5); p.add(bufferTank); - Pump hotLeanTEGPump = new Pump(bufferTank.getOutStream()); - hotLeanTEGPump.setName("lean TEG LP pump"); + Pump hotLeanTEGPump = new Pump("lean TEG LP pump", bufferTank.getOutStream()); hotLeanTEGPump.setOutletPressure(3.0); hotLeanTEGPump.setIsentropicEfficiency(0.75); p.add(hotLeanTEGPump); heatEx2.setFeedStream(1, hotLeanTEGPump.getOutStream()); - Heater coolerhOTteg3 = new Heater(heatEx2.getOutStream(1)); - coolerhOTteg3.setName("lean TEG cooler"); + Heater coolerhOTteg3 = new Heater("lean TEG cooler", heatEx2.getOutStream(1)); coolerhOTteg3.setOutTemperature(273.15 + 48.5); p.add(coolerhOTteg3); - HeatExchanger coolerhOTteg3HX = new HeatExchanger(heatEx2.getOutStream(1)); - coolerhOTteg3HX.setName("lean TEG heat-exchanger 3"); + HeatExchanger coolerhOTteg3HX = + new HeatExchanger("lean TEG heat-exchanger 3", heatEx2.getOutStream(1)); coolerhOTteg3HX.setGuessOutTemperature(273.15 + 40.0); coolerhOTteg3HX.setUAvalue(7819.0); coolerhOTteg3HX.setFeedStream(1, coolingWater2); p.add(coolerhOTteg3HX); - Pump hotLeanTEGPump2 = new Pump(coolerhOTteg3.getOutStream()); - hotLeanTEGPump2.setName("lean TEG HP pump"); + Pump hotLeanTEGPump2 = new Pump("lean TEG HP pump", coolerhOTteg3.getOutStream()); hotLeanTEGPump2.setOutletPressure(85.0); hotLeanTEGPump2.setIsentropicEfficiency(0.75); p.add(hotLeanTEGPump2); - StreamInterface leanTEGtoabs = new Stream(hotLeanTEGPump2.getOutStream()); - leanTEGtoabs.setName("lean TEG to absorber"); + StreamInterface leanTEGtoabs = + new Stream("lean TEG to absorber", hotLeanTEGPump2.getOutStream()); p.add(leanTEGtoabs); SystemInterface pureTEG = feedGas.clone(); pureTEG.setMolarComposition( new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0}); - Stream makeupTEG = new Stream(pureTEG); - makeupTEG.setName("makeup TEG"); + Stream makeupTEG = new Stream("makeup TEG", pureTEG); makeupTEG.setFlowRate(1e-6, "kg/hr"); makeupTEG.setTemperature(48.5, "C"); makeupTEG.setPressure(85.0, "bara"); @@ -326,7 +304,7 @@ public void runProcessTEG() throws InterruptedException { makeupCalculator.addInputVariable(dehydratedGas); makeupCalculator.addInputVariable(flashGas); makeupCalculator.addInputVariable(gasToFlare); - makeupCalculator.addInputVariable(liquidToTrreatment); + makeupCalculator.addInputVariable(liquidToTreatment); makeupCalculator.setOutputVariable(makeupTEG); p.add(makeupCalculator); diff --git a/src/test/java/neqsim/processSimulation/processSystem/ProcessSystemRunTransientTest.java b/src/test/java/neqsim/processSimulation/processSystem/ProcessSystemRunTransientTest.java index dff273bf4b..bd2181cd9b 100644 --- a/src/test/java/neqsim/processSimulation/processSystem/ProcessSystemRunTransientTest.java +++ b/src/test/java/neqsim/processSimulation/processSystem/ProcessSystemRunTransientTest.java @@ -170,8 +170,8 @@ public void testDynamicCalculation2() { valve3.setCalculateSteadyState(false); valve3.setMinimumValveOpening(1.0); - LevelTransmitter separatorLevelTransmitter = new LevelTransmitter(separator1); - separatorLevelTransmitter.setName("separatorLevelTransmitter1"); + LevelTransmitter separatorLevelTransmitter = + new LevelTransmitter("separatorLevelTransmitter1", separator1); separatorLevelTransmitter.setMaximumValue(0.8); separatorLevelTransmitter.setMinimumValue(0.2); diff --git a/src/test/java/neqsim/processSimulation/processSystem/ProcessSystemSerializationTest.java b/src/test/java/neqsim/processSimulation/processSystem/ProcessSystemSerializationTest.java index dbf625cf4c..6cb6fa51cf 100644 --- a/src/test/java/neqsim/processSimulation/processSystem/ProcessSystemSerializationTest.java +++ b/src/test/java/neqsim/processSimulation/processSystem/ProcessSystemSerializationTest.java @@ -55,8 +55,8 @@ public void runTEGProcessTest2() { new Stream("water saturated feed gas Smorbukk", saturatedFeedGasSmorbukk.getOutletStream()); HydrateEquilibriumTemperatureAnalyser hydrateTAnalyserSmorbukk = - new HydrateEquilibriumTemperatureAnalyser(waterSaturatedFeedGasSmorbukk); - hydrateTAnalyserSmorbukk.setName("hydrate temperature analyser Smorbukk"); + new HydrateEquilibriumTemperatureAnalyser("hydrate temperature analyser Smorbukk", + waterSaturatedFeedGasSmorbukk); Splitter SmorbukkSplit = new Splitter("Smorbukk Splitter", waterSaturatedFeedGasSmorbukk); double[] splitSmorbukk = {1.0 - 1e-10, 1e-10}; @@ -74,8 +74,8 @@ public void runTEGProcessTest2() { new Stream("water saturated feed gas Midgard", saturatedFeedGasMidgard.getOutletStream()); HydrateEquilibriumTemperatureAnalyser hydrateTAnalyserMidgard = - new HydrateEquilibriumTemperatureAnalyser(waterSaturatedFeedGasMidgard); - hydrateTAnalyserMidgard.setName("hydrate temperature analyser Midgard"); + new HydrateEquilibriumTemperatureAnalyser("hydrate temperature analyser Midgard", + waterSaturatedFeedGasMidgard); Splitter MidgardSplit = new Splitter("Midgard Splitter", waterSaturatedFeedGasMidgard); double[] splitMidgard = {1e-10, 1 - 1e-10}; @@ -93,14 +93,13 @@ public void runTEGProcessTest2() { new Stream("feed to TEG absorber", feedTPsetterToAbsorber.getOutletStream()); HydrateEquilibriumTemperatureAnalyser hydrateTAnalyser2 = - new HydrateEquilibriumTemperatureAnalyser(feedToAbsorber); - hydrateTAnalyser2.setName("hydrate temperature gas to absorber"); + new HydrateEquilibriumTemperatureAnalyser("hydrate temperature gas to absorber", + feedToAbsorber); WaterDewPointAnalyser waterDewPointAnalyserToAbsorber = - new WaterDewPointAnalyser(feedToAbsorber); + new WaterDewPointAnalyser("water dew point gas to absorber", feedToAbsorber); waterDewPointAnalyserToAbsorber.setMethod("multiphase"); waterDewPointAnalyserToAbsorber.setReferencePressure(40.0); - waterDewPointAnalyserToAbsorber.setName("water dew point gas to absorber"); neqsim.thermo.system.SystemInterface feedTEG = (neqsim.thermo.system.SystemInterface) feedGas.clone(); @@ -124,13 +123,12 @@ public void runTEGProcessTest2() { Stream richTEG = new Stream("rich TEG from absorber", absorber.getLiquidOutStream()); HydrateEquilibriumTemperatureAnalyser waterDewPointAnalyser = - new HydrateEquilibriumTemperatureAnalyser(dehydratedGas); + new HydrateEquilibriumTemperatureAnalyser("hydrate dew point analyser", dehydratedGas); waterDewPointAnalyser.setReferencePressure(70.0); - waterDewPointAnalyser.setName("hydrate dew point analyser"); - WaterDewPointAnalyser waterDewPointAnalyser2 = new WaterDewPointAnalyser(dehydratedGas); + WaterDewPointAnalyser waterDewPointAnalyser2 = + new WaterDewPointAnalyser("water dew point analyser", dehydratedGas); waterDewPointAnalyser2.setReferencePressure(70.0); - waterDewPointAnalyser2.setName("water dew point analyser"); Heater condHeat = new Heater("Condenser heat exchanger", richTEG); @@ -181,8 +179,7 @@ public void runTEGProcessTest2() { // column ThrottlingValve glycol_flash_valve2 = - new ThrottlingValve("LP flash valve", heatEx.getOutStream(0)); - glycol_flash_valve2.setName("Rich TEG LP flash valve"); + new ThrottlingValve("Rich TEG LP flash valve", heatEx.getOutStream(0)); glycol_flash_valve2.setOutletPressure(feedPressureGLycol); neqsim.thermo.system.SystemInterface stripGas = @@ -198,8 +195,7 @@ public void runTEGProcessTest2() { Stream gasToReboiler = (Stream) strippingGas.clone(); gasToReboiler.setName("gas to reboiler"); - DistillationColumn column = new DistillationColumn(1, true, true); - column.setName("TEG regeneration column"); + DistillationColumn column = new DistillationColumn("TEG regeneration column", 1, true, true); column.addFeedStream(glycol_flash_valve2.getOutletStream(), 1); column.getReboiler().setOutTemperature(273.15 + 202.0); column.getCondenser().setOutTemperature(273.15 + 89.0); diff --git a/src/test/java/neqsim/processSimulation/processSystem/ProcessSystemTest.java b/src/test/java/neqsim/processSimulation/processSystem/ProcessSystemTest.java index 98e08a09d6..3d0cffcfd1 100644 --- a/src/test/java/neqsim/processSimulation/processSystem/ProcessSystemTest.java +++ b/src/test/java/neqsim/processSimulation/processSystem/ProcessSystemTest.java @@ -116,11 +116,10 @@ public void testRemoveUnit() { } @Test - @SuppressWarnings("deprecation") public void testAddUnitsWithNoName() { - Separator sep = new Separator(); + Separator sep = new Separator("Separator"); p.add(sep); - sep = new Separator(); + sep = new Separator("Separator"); p.add(sep); Assertions.assertEquals(2, p.size()); p.removeUnit("Separator2"); @@ -284,8 +283,8 @@ public void runTEGProcessTest2() { new Stream("water saturated feed gas Smorbukk", saturatedFeedGasSmorbukk.getOutletStream()); HydrateEquilibriumTemperatureAnalyser hydrateTAnalyserSmorbukk = - new HydrateEquilibriumTemperatureAnalyser(waterSaturatedFeedGasSmorbukk); - hydrateTAnalyserSmorbukk.setName("hydrate temperature analyser Smorbukk"); + new HydrateEquilibriumTemperatureAnalyser("hydrate temperature analyser Smorbukk", + waterSaturatedFeedGasSmorbukk); Splitter SmorbukkSplit = new Splitter("Smorbukk Splitter", waterSaturatedFeedGasSmorbukk); double[] splitSmorbukk = {1.0 - 1e-10, 1e-10}; @@ -303,8 +302,8 @@ public void runTEGProcessTest2() { new Stream("water saturated feed gas Midgard", saturatedFeedGasMidgard.getOutletStream()); HydrateEquilibriumTemperatureAnalyser hydrateTAnalyserMidgard = - new HydrateEquilibriumTemperatureAnalyser(waterSaturatedFeedGasMidgard); - hydrateTAnalyserMidgard.setName("hydrate temperature analyser Midgard"); + new HydrateEquilibriumTemperatureAnalyser("hydrate temperature analyser Midgard", + waterSaturatedFeedGasMidgard); Splitter MidgardSplit = new Splitter("Midgard Splitter", waterSaturatedFeedGasMidgard); double[] splitMidgard = {1e-10, 1 - 1e-10}; @@ -322,14 +321,13 @@ public void runTEGProcessTest2() { new Stream("feed to TEG absorber", feedTPsetterToAbsorber.getOutletStream()); HydrateEquilibriumTemperatureAnalyser hydrateTAnalyser2 = - new HydrateEquilibriumTemperatureAnalyser(feedToAbsorber); - hydrateTAnalyser2.setName("hydrate temperature gas to absorber"); + new HydrateEquilibriumTemperatureAnalyser("hydrate temperature gas to absorber", + feedToAbsorber); WaterDewPointAnalyser waterDewPointAnalyserToAbsorber = - new WaterDewPointAnalyser(feedToAbsorber); + new WaterDewPointAnalyser("water dew point gas to absorber", feedToAbsorber); waterDewPointAnalyserToAbsorber.setMethod("multiphase"); waterDewPointAnalyserToAbsorber.setReferencePressure(40.0); - waterDewPointAnalyserToAbsorber.setName("water dew point gas to absorber"); neqsim.thermo.system.SystemInterface feedTEG = (neqsim.thermo.system.SystemInterface) feedGas.clone(); @@ -353,13 +351,12 @@ public void runTEGProcessTest2() { Stream richTEG = new Stream("rich TEG from absorber", absorber.getLiquidOutStream()); HydrateEquilibriumTemperatureAnalyser waterDewPointAnalyser = - new HydrateEquilibriumTemperatureAnalyser(dehydratedGas); + new HydrateEquilibriumTemperatureAnalyser("hydrate dew point analyser", dehydratedGas); waterDewPointAnalyser.setReferencePressure(70.0); - waterDewPointAnalyser.setName("hydrate dew point analyser"); - WaterDewPointAnalyser waterDewPointAnalyser2 = new WaterDewPointAnalyser(dehydratedGas); + WaterDewPointAnalyser waterDewPointAnalyser2 = + new WaterDewPointAnalyser("water dew point analyser", dehydratedGas); waterDewPointAnalyser2.setReferencePressure(70.0); - waterDewPointAnalyser2.setName("water dew point analyser"); Heater condHeat = new Heater("Condenser heat exchanger", richTEG); @@ -410,8 +407,7 @@ public void runTEGProcessTest2() { // column ThrottlingValve glycol_flash_valve2 = - new ThrottlingValve("LP flash valve", heatEx.getOutStream(0)); - glycol_flash_valve2.setName("Rich TEG LP flash valve"); + new ThrottlingValve("Rich TEG LP flash valve", heatEx.getOutStream(0)); glycol_flash_valve2.setOutletPressure(feedPressureGLycol); neqsim.thermo.system.SystemInterface stripGas = @@ -427,8 +423,7 @@ public void runTEGProcessTest2() { Stream gasToReboiler = (Stream) strippingGas.clone(); gasToReboiler.setName("gas to reboiler"); - DistillationColumn column = new DistillationColumn(1, true, true); - column.setName("TEG regeneration column"); + DistillationColumn column = new DistillationColumn("TEG regeneration column", 1, true, true); column.addFeedStream(glycol_flash_valve2.getOutletStream(), 1); column.getReboiler().setOutTemperature(273.15 + 202.0); column.getCondenser().setOutTemperature(273.15 + 89.0); @@ -606,8 +601,8 @@ public void testRun_step() { new Stream("water saturated feed gas Smorbukk", saturatedFeedGasSmorbukk.getOutletStream()); HydrateEquilibriumTemperatureAnalyser hydrateTAnalyserSmorbukk = - new HydrateEquilibriumTemperatureAnalyser(waterSaturatedFeedGasSmorbukk); - hydrateTAnalyserSmorbukk.setName("hydrate temperature analyser Smorbukk"); + new HydrateEquilibriumTemperatureAnalyser("hydrate temperature analyser Smorbukk", + waterSaturatedFeedGasSmorbukk); Splitter SmorbukkSplit = new Splitter("Smorbukk Splitter", waterSaturatedFeedGasSmorbukk); double[] splitSmorbukk = {1.0 - 1e-10, 1e-10}; @@ -625,8 +620,8 @@ public void testRun_step() { new Stream("water saturated feed gas Midgard", saturatedFeedGasMidgard.getOutletStream()); HydrateEquilibriumTemperatureAnalyser hydrateTAnalyserMidgard = - new HydrateEquilibriumTemperatureAnalyser(waterSaturatedFeedGasMidgard); - hydrateTAnalyserMidgard.setName("hydrate temperature analyser Midgard"); + new HydrateEquilibriumTemperatureAnalyser("hydrate temperature analyser Midgard", + waterSaturatedFeedGasMidgard); Splitter MidgardSplit = new Splitter("Midgard Splitter", waterSaturatedFeedGasMidgard); double[] splitMidgard = {1e-10, 1 - 1e-10}; @@ -644,14 +639,13 @@ public void testRun_step() { new Stream("feed to TEG absorber", feedTPsetterToAbsorber.getOutletStream()); HydrateEquilibriumTemperatureAnalyser hydrateTAnalyser2 = - new HydrateEquilibriumTemperatureAnalyser(feedToAbsorber); - hydrateTAnalyser2.setName("hydrate temperature gas to absorber"); + new HydrateEquilibriumTemperatureAnalyser("hydrate temperature gas to absorber", + feedToAbsorber); WaterDewPointAnalyser waterDewPointAnalyserToAbsorber = - new WaterDewPointAnalyser(feedToAbsorber); + new WaterDewPointAnalyser("water dew point gas to absorber", feedToAbsorber); waterDewPointAnalyserToAbsorber.setMethod("multiphase"); waterDewPointAnalyserToAbsorber.setReferencePressure(40.0); - waterDewPointAnalyserToAbsorber.setName("water dew point gas to absorber"); neqsim.thermo.system.SystemInterface feedTEG = (neqsim.thermo.system.SystemInterface) feedGas.clone(); @@ -675,13 +669,12 @@ public void testRun_step() { Stream richTEG = new Stream("rich TEG from absorber", absorber.getLiquidOutStream()); HydrateEquilibriumTemperatureAnalyser waterDewPointAnalyser = - new HydrateEquilibriumTemperatureAnalyser(dehydratedGas); + new HydrateEquilibriumTemperatureAnalyser("hydrate dew point analyser", dehydratedGas); waterDewPointAnalyser.setReferencePressure(70.0); - waterDewPointAnalyser.setName("hydrate dew point analyser"); - WaterDewPointAnalyser waterDewPointAnalyser2 = new WaterDewPointAnalyser(dehydratedGas); + WaterDewPointAnalyser waterDewPointAnalyser2 = + new WaterDewPointAnalyser("water dew point analyser", dehydratedGas); waterDewPointAnalyser2.setReferencePressure(70.0); - waterDewPointAnalyser2.setName("water dew point analyser"); Heater condHeat = new Heater("Condenser heat exchanger", richTEG); @@ -732,8 +725,7 @@ public void testRun_step() { // column ThrottlingValve glycol_flash_valve2 = - new ThrottlingValve("LP flash valve", heatEx.getOutStream(0)); - glycol_flash_valve2.setName("Rich TEG LP flash valve"); + new ThrottlingValve("Rich TEG LP flash valve", heatEx.getOutStream(0)); glycol_flash_valve2.setOutletPressure(feedPressureGLycol); neqsim.thermo.system.SystemInterface stripGas = @@ -749,8 +741,7 @@ public void testRun_step() { Stream gasToReboiler = (Stream) strippingGas.clone(); gasToReboiler.setName("gas to reboiler"); - DistillationColumn column = new DistillationColumn(1, true, true); - column.setName("TEG regeneration column"); + DistillationColumn column = new DistillationColumn("TEG regeneration column", 1, true, true); column.addFeedStream(glycol_flash_valve2.getOutletStream(), 1); column.getReboiler().setOutTemperature(273.15 + 202.0); column.getCondenser().setOutTemperature(273.15 + 89.0); diff --git a/src/test/java/neqsim/processSimulation/processSystem/ReferenceProcessTest.java b/src/test/java/neqsim/processSimulation/processSystem/ReferenceProcessTest.java index db0fec8ebc..41fa3104fa 100644 --- a/src/test/java/neqsim/processSimulation/processSystem/ReferenceProcessTest.java +++ b/src/test/java/neqsim/processSimulation/processSystem/ReferenceProcessTest.java @@ -34,57 +34,50 @@ public void testProcess() { thermoSystem.addPlusFraction("C31_C38", 1.0, 471.0 / 1000.0, 0.90); thermoSystem.addPlusFraction("C38_C80", 1.0, 662.0 / 1000.0, 0.92); thermoSystem.setMixingRule("classic"); - // thermoSystem.setMultiPhaseCheck(true); + // thermoSystem.setMultiPhaseCheck(true); thermoSystem.setMolarComposition(new double[] {0.005269, 0.039189, 0.700553, 0.091154, 0.050908, 0.007751, 0.014665, 0.004249, 0.004878, 0.004541, 0.007189, 0.006904, 0.004355, 0.007658, 0.003861, 0.003301, 0.002624, 0.001857, 0.001320, 0.001426, 0.001164, 0.000916}); neqsim.processSimulation.processEquipment.stream.Stream wellStream = - new neqsim.processSimulation.processEquipment.stream.Stream(thermoSystem); - wellStream.setName("well stream"); + new neqsim.processSimulation.processEquipment.stream.Stream("well stream", thermoSystem); wellStream.setTemperature(70.0, "C"); wellStream.setPressure(90.0, "bara"); neqsim.processSimulation.processEquipment.separator.ThreePhaseSeparator firstStageSeparator = - new neqsim.processSimulation.processEquipment.separator.ThreePhaseSeparator(wellStream); - firstStageSeparator.setName("1st stage separator"); + new neqsim.processSimulation.processEquipment.separator.ThreePhaseSeparator( + "1st stage separator", wellStream); neqsim.processSimulation.processEquipment.heatExchanger.Heater oilHeaterSecondStage = new neqsim.processSimulation.processEquipment.heatExchanger.Heater( - firstStageSeparator.getOilOutStream()); - oilHeaterSecondStage.setName("oil heater second stage"); + "oil heater second stage", firstStageSeparator.getOilOutStream()); oilHeaterSecondStage.setOutPressure(30.0); oilHeaterSecondStage.setOutTemperature(68.0, "C"); neqsim.processSimulation.processEquipment.separator.ThreePhaseSeparator secondStageSeparator = new neqsim.processSimulation.processEquipment.separator.ThreePhaseSeparator( - oilHeaterSecondStage.getOutStream()); - secondStageSeparator.setName("2nd stage separator"); + "2nd stage separator", oilHeaterSecondStage.getOutStream()); neqsim.processSimulation.processEquipment.heatExchanger.Heater oilHeaterThirdStage = - new neqsim.processSimulation.processEquipment.heatExchanger.Heater( + new neqsim.processSimulation.processEquipment.heatExchanger.Heater("oil heater third stage", secondStageSeparator.getOilOutStream()); - oilHeaterThirdStage.setName("oil heater third stage"); oilHeaterThirdStage.setOutPressure(2.8); oilHeaterThirdStage.setOutTemperature(70.0, "C"); neqsim.processSimulation.processEquipment.separator.ThreePhaseSeparator thirdStageSeparator = new neqsim.processSimulation.processEquipment.separator.ThreePhaseSeparator( - oilHeaterThirdStage.getOutStream()); - thirdStageSeparator.setName("3rd stage separator"); + "3rd stage separator", oilHeaterThirdStage.getOutStream()); neqsim.processSimulation.processEquipment.heatExchanger.Heater oilHeaterStandardStage = new neqsim.processSimulation.processEquipment.heatExchanger.Heater( - thirdStageSeparator.getOilOutStream()); - oilHeaterStandardStage.setName("oil heater standard stage"); + "oil heater standard stage", thirdStageSeparator.getOilOutStream()); oilHeaterStandardStage.setOutPressure(1.01325); oilHeaterStandardStage.setOutTemperature(15.0, "C"); neqsim.processSimulation.processEquipment.separator.ThreePhaseSeparator standardStageSeparator = new neqsim.processSimulation.processEquipment.separator.ThreePhaseSeparator( - oilHeaterStandardStage.getOutStream()); - standardStageSeparator.setName("standard stage separator"); + "standard stage separator", oilHeaterStandardStage.getOutStream()); neqsim.processSimulation.processEquipment.mixer.Mixer gasMixer = new neqsim.processSimulation.processEquipment.mixer.Mixer("gas mixer"); diff --git a/src/test/java/neqsim/processSimulation/util/example/OnshoreMEGprocess.java b/src/test/java/neqsim/processSimulation/util/example/OnshoreMEGprocess.java index 89b4c0b187..8b8b1d17c9 100644 --- a/src/test/java/neqsim/processSimulation/util/example/OnshoreMEGprocess.java +++ b/src/test/java/neqsim/processSimulation/util/example/OnshoreMEGprocess.java @@ -28,282 +28,270 @@ * @since 2.2.3 */ public class OnshoreMEGprocess { - /** - *

- * main. - *

- * - * @param args an array of {@link java.lang.String} objects - */ - 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", 0.4); - feedGas.addComponent("CO2", 0.00042); - feedGas.addComponent("methane", 99.0); - feedGas.addComponent("ethane", 0.07); - feedGas.addComponent("propane", 0.054); - feedGas.addComponent("i-butane", 0.0054); - feedGas.addComponent("n-butane", 0.0084); - feedGas.addComponent("water", 0.0); - feedGas.addComponent("MEG", 0); - feedGas.createDatabase(true); - feedGas.setMixingRule(10); - feedGas.setMultiPhaseCheck(true); - - Stream dryFeedGas = new Stream("feed gas", feedGas); - dryFeedGas.setFlowRate(10.5, "MSm3/day"); - dryFeedGas.setTemperature(6.0, "C"); - dryFeedGas.setPressure(53.0, "bara"); - - StreamSaturatorUtil saturatedFeedGas = - new StreamSaturatorUtil("water saturator", dryFeedGas); - - Stream waterSaturatedFeedGas = - new Stream("water saturated feed gas", saturatedFeedGas.getOutletStream()); - - Compressor inletCompressor = - new Compressor("Compressor 1 - first stage", waterSaturatedFeedGas); - inletCompressor.setOutletPressure(70.0, "bara"); - - Cooler interstageGasCooler = - new Cooler("Compressor 1 - interstage cooler", inletCompressor.getOutletStream()); - interstageGasCooler.setOutTemperature(40.0, "C"); - - Compressor inletCompressor2ndstage = - new Compressor("Compressor 1 - second stage", interstageGasCooler.getOutletStream()); - inletCompressor2ndstage.setOutletPressure(105.0, "bara"); - - neqsim.thermo.system.SystemInterface feedMEG = feedGas.clone(); - feedMEG.setMolarComposition(new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.4, 0.6}); - - Stream MEGFeed = new Stream("lean MEG to header", feedMEG); - MEGFeed.setFlowRate(1000.0, "kg/hr"); - MEGFeed.setTemperature(20.0, "C"); - MEGFeed.setPressure(105.0, "bara"); + /** + *

+ * main. + *

+ * + * @param args an array of {@link java.lang.String} objects + */ + 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", 0.4); + feedGas.addComponent("CO2", 0.00042); + feedGas.addComponent("methane", 99.0); + feedGas.addComponent("ethane", 0.07); + feedGas.addComponent("propane", 0.054); + feedGas.addComponent("i-butane", 0.0054); + feedGas.addComponent("n-butane", 0.0084); + feedGas.addComponent("water", 0.0); + feedGas.addComponent("MEG", 0); + feedGas.createDatabase(true); + feedGas.setMixingRule(10); + feedGas.setMultiPhaseCheck(true); - Splitter MEGsplitter1 = new Splitter("lean MEG header", MEGFeed); - MEGsplitter1.setSplitFactors(new double[] {0.01, 0.94, 0.05}); + Stream dryFeedGas = new Stream("feed gas", feedGas); + dryFeedGas.setFlowRate(10.5, "MSm3/day"); + dryFeedGas.setTemperature(6.0, "C"); + dryFeedGas.setPressure(53.0, "bara"); + + StreamSaturatorUtil saturatedFeedGas = new StreamSaturatorUtil("water saturator", dryFeedGas); - StaticMixer MEGmixer1 = new StaticMixer("MEG mixer 1"); - MEGmixer1.addStream(inletCompressor2ndstage.getOutletStream()); - MEGmixer1.addStream(MEGsplitter1.getSplitStream(0)); + Stream waterSaturatedFeedGas = + new Stream("water saturated feed gas", saturatedFeedGas.getOutletStream()); - Cooler inletGasCooler = new Cooler("dehydration cooler", MEGmixer1.getOutletStream()); - inletGasCooler.setOutTemperature(10.0, "C"); + Compressor inletCompressor = + new Compressor("Compressor 1 - first stage", waterSaturatedFeedGas); + inletCompressor.setOutletPressure(70.0, "bara"); - StaticMixer MEGmixer2 = new StaticMixer("MEG mixer 2"); - MEGmixer2.addStream(inletGasCooler.getOutletStream()); - MEGmixer2.addStream(MEGsplitter1.getSplitStream(1)); + Cooler interstageGasCooler = + new Cooler("Compressor 1 - interstage cooler", inletCompressor.getOutletStream()); + interstageGasCooler.setOutTemperature(40.0, "C"); - HeatExchanger heatEx = - new HeatExchanger("gas-gas heat exchanger", MEGmixer2.getOutletStream()); - heatEx.setGuessOutTemperature(273.15 - 10.0); - heatEx.setUAvalue(30000.0); - - StaticMixer MEGmixer3 = new StaticMixer("MEG mixer 3"); - MEGmixer3.addStream(heatEx.getOutStream(0)); - MEGmixer3.addStream(MEGsplitter1.getSplitStream(2)); - - ThrottlingValve presRedValveLT = - new ThrottlingValve("JT valve", MEGmixer3.getOutletStream()); - presRedValveLT.setOutletPressure(92.0); + Compressor inletCompressor2ndstage = + new Compressor("Compressor 1 - second stage", interstageGasCooler.getOutletStream()); + inletCompressor2ndstage.setOutletPressure(105.0, "bara"); - ThreePhaseSeparator mpseparator = - new ThreePhaseSeparator("low temperature scrubber", presRedValveLT.getOutletStream()); - - Stream coldGasFromSep = new Stream("gas from cold scrubber", mpseparator.getGasOutStream()); - - heatEx.setFeedStream(1, coldGasFromSep); - - Stream heatedGasFromLPSep = - new Stream("heated gas from cold scrubber", heatEx.getOutStream(1)); + neqsim.thermo.system.SystemInterface feedMEG = feedGas.clone(); + feedMEG.setMolarComposition(new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.4, 0.6}); - Stream richMEGstream = new Stream("rich cold MEG stream", mpseparator.getWaterOutStream()); - - Heater richMEGstreamHeater = new Heater("rich MEG pre-heater", richMEGstream); - richMEGstreamHeater.setOutTemperature(15.0, "C"); - - Heater richMEGstreamHeater2 = - new Heater("column condenser HX", richMEGstreamHeater.getOutletStream()); - // richMEGstreamHeater2.setOutTemperature(22.0, "C"); - - ThrottlingValve presRedValve3 = - new ThrottlingValve("valve to flash drum", richMEGstreamHeater2.getOutletStream()); - presRedValve3.setOutletPressure(3.9); - - Separator flashDrumSep = - new Separator("rich MEG flash drum", presRedValve3.getOutletStream()); - - Stream flashGasStream = new Stream("gas from flash drum", flashDrumSep.getGasOutStream()); - - Stream flashLiquidStream = - new Stream("rich TEG from flash drum", flashDrumSep.getLiquidOutStream()); - - HeatExchanger columnPreHeater = - new HeatExchanger("MEG/MEG heat exchanger", flashLiquidStream); - columnPreHeater.setGuessOutTemperature(273.15 + 120.0); - columnPreHeater.setUAvalue(500.0); - - ThrottlingValve presRedValve4 = - new ThrottlingValve("valve to regenerator", columnPreHeater.getOutStream(0)); - presRedValve4.setOutletPressure(1.23); - - DistillationColumn column = new DistillationColumn(2, true, true); - column.setName("MEG regeneration column"); - column.addFeedStream(presRedValve4.getOutletStream(), 0); - column.getReboiler().setOutTemperature(273.15 + 135.0); - column.getCondenser().setOutTemperature(273.15 + 105.0); - column.setTopPressure(1.0); - column.setBottomPressure(1.23); - - Cooler coolerRegenGas = - new Cooler("regeneration overhead gas cooler", column.getGasOutStream()); - coolerRegenGas.setOutTemperature(273.15 + 20.0); - - Separator sepregenGas = - new Separator("overhead condenser scrubber", coolerRegenGas.getOutletStream()); - - Stream gasToFlare = - new Stream("gas to flare from regenerator", sepregenGas.getGasOutStream()); - - Stream waterToSea = - new Stream("condensed water from regenerator", sepregenGas.getLiquidOutStream()); - - Cooler bufferTank = new Cooler("MEG buffer tank", column.getLiquidOutStream()); - bufferTank.setOutTemperature(273.15 + 130.0); - - Pump hotLeanMEGPump = new Pump("hot lean MEG pump", bufferTank.getOutletStream()); - hotLeanMEGPump.setOutletPressure(105.0); - hotLeanMEGPump.setIsentropicEfficiency(0.75); - - Stream streamHotPump = - new Stream("stream from hot lean MEG pump", hotLeanMEGPump.getOutletStream()); - - columnPreHeater.setFeedStream(1, streamHotPump); - - Cooler coolerHotMEG2 = new Cooler("lean MEG cooler", columnPreHeater.getOutStream(1)); - coolerHotMEG2.setOutTemperature(273.15 + 20.0); - - Stream leanMEGtoMixer = - new Stream("lean MEG to makeup mixer", coolerHotMEG2.getOutletStream()); - - neqsim.thermo.system.SystemInterface pureMEG = feedGas.clone(); - pureMEG.setMolarComposition(new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0}); - - Stream makeupMEG = new Stream("makeup MEG", pureMEG); - makeupMEG.setFlowRate(1e-6, "kg/hr"); - makeupMEG.setTemperature(20.0, "C"); - makeupMEG.setPressure(105.0, "bara"); - - Calculator makeupCalculator = new Calculator("MEG makeup calculator"); - makeupCalculator.addInputVariable(coldGasFromSep); - makeupCalculator.addInputVariable(waterToSea); - makeupCalculator.addInputVariable(gasToFlare); - makeupCalculator.addInputVariable(flashGasStream); - makeupCalculator.setOutputVariable(makeupMEG); - - StaticMixer makeupMixer = new StaticMixer("MEG makeup mixer"); - makeupMixer.addStream(leanMEGtoMixer); - makeupMixer.addStream(makeupMEG); - - Stream streamToResycle = new Stream("streamToResycle", makeupMixer.getOutletStream()); - - Recycle resycleLeanMEG = new Recycle("lean MEG resycle"); - resycleLeanMEG.addStream(streamToResycle); - resycleLeanMEG.setOutletStream(MEGFeed); - // resycleLeanMEG.setPriority(200); - resycleLeanMEG.setDownstreamProperty("flow rate"); - - richMEGstreamHeater2.setEnergyStream(column.getCondenser().getEnergyStream()); - - neqsim.processSimulation.processSystem.ProcessSystem operations = - new neqsim.processSimulation.processSystem.ProcessSystem(); - operations.add(dryFeedGas); - operations.add(saturatedFeedGas); - operations.add(waterSaturatedFeedGas); - operations.add(inletCompressor); - operations.add(interstageGasCooler); - operations.add(inletCompressor2ndstage); - operations.add(MEGFeed); - operations.add(MEGsplitter1); - operations.add(MEGmixer1); - operations.add(inletGasCooler); - operations.add(MEGmixer2); - operations.add(heatEx); - operations.add(MEGmixer3); - operations.add(presRedValveLT); - operations.add(mpseparator); - operations.add(coldGasFromSep); - operations.add(heatedGasFromLPSep); - operations.add(richMEGstream); - operations.add(richMEGstreamHeater); - operations.add(richMEGstreamHeater2); - operations.add(presRedValve3); - operations.add(flashDrumSep); - operations.add(flashGasStream); - operations.add(flashLiquidStream); - operations.add(columnPreHeater); - operations.add(presRedValve4); - operations.add(column); - operations.add(coolerRegenGas); - operations.add(sepregenGas); - operations.add(gasToFlare); - operations.add(waterToSea); - operations.add(bufferTank); - operations.add(hotLeanMEGPump); - operations.add(streamHotPump); - operations.add(columnPreHeater); - operations.add(coolerHotMEG2); - operations.add(leanMEGtoMixer); - operations.add(makeupCalculator); - operations.add(makeupMEG); - operations.add(makeupMixer); - operations.add(streamToResycle); - operations.add(resycleLeanMEG); - - // operations = ProcessSystem.open("c:/temp/onshoreMEGprocess.neqsim"); - operations.run(); - System.out.println("MEG flow rate " + resycleLeanMEG.getFluid().getFlowRate("kg/hr")); - - // presRedValve4.displayResult(); - // System.out.println( - // "temperature after cross cooler " +heatEx.getOutStream(0).getTemperature("C")); - - System.out.println("Heat ex 2 duty " + richMEGstreamHeater2.getDuty() / 1.0e3 + " kW"); - System.out.println("Heat ex 2 duty2 " + richMEGstreamHeater2.getDuty() / 1.0e3 + " kW"); - - System.out.println("MEG flow rate " + richMEGstream.getFluid().getFlowRate("kg/hr")); - System.out.println("MEG feed to column rate " - + presRedValve4.getOutletStream().getFluid().getFlowRate("kg/hr")); - - System.out.println("MEG flow rate " + resycleLeanMEG.getFluid().getFlowRate("kg/hr")); - System.out.println( - "Reboiler duty [kW] " + ((Reboiler) column.getReboiler()).getDuty() / 1.0e3); - System.out.println( - "Condenser duty [kW] " + ((Condenser) column.getCondenser()).getDuty() / 1.0e3); - System.out.println( - "wt% lean MEG " + MEGFeed.getFluid().getPhase("aqueous").getWtFrac("MEG") * 100.0); - // System.out.println("heat ex out temperature " + - // heatEx.getOutStream(0).getTemperature("C")); - System.out.println("cold gas temperature " + coldGasFromSep.getTemperature("C")); - System.out.println("column glycol pre heater temperature " - + columnPreHeater.getOutStream(0).getTemperature("C")); - System.out.println("column glycol pre heater temperature " - + columnPreHeater.getOutStream(1).getTemperature("C")); - - // presRedValve4.getOutStream().displayResult(); - gasToFlare.displayResult(); - waterToSea.displayResult(); - System.out.println("lean MEG wt% " - + column.getLiquidOutStream().getFluid().getPhase("aqueous").getWtFrac("MEG") - * 100.0); - System.out.println("hydrate temperature 1 " - + (inletGasCooler.getOutletStream().getHydrateEquilibriumTemperature() - 273.15) - + " wt% MEG " - + inletGasCooler.getOutletStream().getFluid().getPhase("aqueous").getWtFrac("MEG") - * 100.0); - - operations.save("c:/temp/MEGdehydrationProcess.neqsim"); - } + Stream MEGFeed = new Stream("lean MEG to header", feedMEG); + MEGFeed.setFlowRate(1000.0, "kg/hr"); + MEGFeed.setTemperature(20.0, "C"); + MEGFeed.setPressure(105.0, "bara"); + + Splitter MEGsplitter1 = new Splitter("lean MEG header", MEGFeed); + MEGsplitter1.setSplitFactors(new double[] {0.01, 0.94, 0.05}); + + StaticMixer MEGmixer1 = new StaticMixer("MEG mixer 1"); + MEGmixer1.addStream(inletCompressor2ndstage.getOutletStream()); + MEGmixer1.addStream(MEGsplitter1.getSplitStream(0)); + + Cooler inletGasCooler = new Cooler("dehydration cooler", MEGmixer1.getOutletStream()); + inletGasCooler.setOutTemperature(10.0, "C"); + + StaticMixer MEGmixer2 = new StaticMixer("MEG mixer 2"); + MEGmixer2.addStream(inletGasCooler.getOutletStream()); + MEGmixer2.addStream(MEGsplitter1.getSplitStream(1)); + + HeatExchanger heatEx = new HeatExchanger("gas-gas heat exchanger", MEGmixer2.getOutletStream()); + heatEx.setGuessOutTemperature(273.15 - 10.0); + heatEx.setUAvalue(30000.0); + + StaticMixer MEGmixer3 = new StaticMixer("MEG mixer 3"); + MEGmixer3.addStream(heatEx.getOutStream(0)); + MEGmixer3.addStream(MEGsplitter1.getSplitStream(2)); + + ThrottlingValve presRedValveLT = new ThrottlingValve("JT valve", MEGmixer3.getOutletStream()); + presRedValveLT.setOutletPressure(92.0); + + ThreePhaseSeparator mpseparator = + new ThreePhaseSeparator("low temperature scrubber", presRedValveLT.getOutletStream()); + + Stream coldGasFromSep = new Stream("gas from cold scrubber", mpseparator.getGasOutStream()); + + heatEx.setFeedStream(1, coldGasFromSep); + + Stream heatedGasFromLPSep = new Stream("heated gas from cold scrubber", heatEx.getOutStream(1)); + + Stream richMEGstream = new Stream("rich cold MEG stream", mpseparator.getWaterOutStream()); + + Heater richMEGstreamHeater = new Heater("rich MEG pre-heater", richMEGstream); + richMEGstreamHeater.setOutTemperature(15.0, "C"); + + Heater richMEGstreamHeater2 = + new Heater("column condenser HX", richMEGstreamHeater.getOutletStream()); + // richMEGstreamHeater2.setOutTemperature(22.0, "C"); + + ThrottlingValve presRedValve3 = + new ThrottlingValve("valve to flash drum", richMEGstreamHeater2.getOutletStream()); + presRedValve3.setOutletPressure(3.9); + + Separator flashDrumSep = new Separator("rich MEG flash drum", presRedValve3.getOutletStream()); + + Stream flashGasStream = new Stream("gas from flash drum", flashDrumSep.getGasOutStream()); + + Stream flashLiquidStream = + new Stream("rich TEG from flash drum", flashDrumSep.getLiquidOutStream()); + + HeatExchanger columnPreHeater = new HeatExchanger("MEG/MEG heat exchanger", flashLiquidStream); + columnPreHeater.setGuessOutTemperature(273.15 + 120.0); + columnPreHeater.setUAvalue(500.0); + + ThrottlingValve presRedValve4 = + new ThrottlingValve("valve to regenerator", columnPreHeater.getOutStream(0)); + presRedValve4.setOutletPressure(1.23); + + DistillationColumn column = new DistillationColumn("MEG regeneration column", 2, true, true); + column.addFeedStream(presRedValve4.getOutletStream(), 0); + column.getReboiler().setOutTemperature(273.15 + 135.0); + column.getCondenser().setOutTemperature(273.15 + 105.0); + column.setTopPressure(1.0); + column.setBottomPressure(1.23); + + Cooler coolerRegenGas = + new Cooler("regeneration overhead gas cooler", column.getGasOutStream()); + coolerRegenGas.setOutTemperature(273.15 + 20.0); + + Separator sepregenGas = + new Separator("overhead condenser scrubber", coolerRegenGas.getOutletStream()); + + Stream gasToFlare = new Stream("gas to flare from regenerator", sepregenGas.getGasOutStream()); + + Stream waterToSea = + new Stream("condensed water from regenerator", sepregenGas.getLiquidOutStream()); + + Cooler bufferTank = new Cooler("MEG buffer tank", column.getLiquidOutStream()); + bufferTank.setOutTemperature(273.15 + 130.0); + + Pump hotLeanMEGPump = new Pump("hot lean MEG pump", bufferTank.getOutletStream()); + hotLeanMEGPump.setOutletPressure(105.0); + hotLeanMEGPump.setIsentropicEfficiency(0.75); + + Stream streamHotPump = + new Stream("stream from hot lean MEG pump", hotLeanMEGPump.getOutletStream()); + + columnPreHeater.setFeedStream(1, streamHotPump); + + Cooler coolerHotMEG2 = new Cooler("lean MEG cooler", columnPreHeater.getOutStream(1)); + coolerHotMEG2.setOutTemperature(273.15 + 20.0); + + Stream leanMEGtoMixer = new Stream("lean MEG to makeup mixer", coolerHotMEG2.getOutletStream()); + + neqsim.thermo.system.SystemInterface pureMEG = feedGas.clone(); + pureMEG.setMolarComposition(new double[] {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0}); + + Stream makeupMEG = new Stream("makeup MEG", pureMEG); + makeupMEG.setFlowRate(1e-6, "kg/hr"); + makeupMEG.setTemperature(20.0, "C"); + makeupMEG.setPressure(105.0, "bara"); + + Calculator makeupCalculator = new Calculator("MEG makeup calculator"); + makeupCalculator.addInputVariable(coldGasFromSep); + makeupCalculator.addInputVariable(waterToSea); + makeupCalculator.addInputVariable(gasToFlare); + makeupCalculator.addInputVariable(flashGasStream); + makeupCalculator.setOutputVariable(makeupMEG); + + StaticMixer makeupMixer = new StaticMixer("MEG makeup mixer"); + makeupMixer.addStream(leanMEGtoMixer); + makeupMixer.addStream(makeupMEG); + + Stream streamToResycle = new Stream("streamToResycle", makeupMixer.getOutletStream()); + + Recycle resycleLeanMEG = new Recycle("lean MEG resycle"); + resycleLeanMEG.addStream(streamToResycle); + resycleLeanMEG.setOutletStream(MEGFeed); + // resycleLeanMEG.setPriority(200); + resycleLeanMEG.setDownstreamProperty("flow rate"); + + richMEGstreamHeater2.setEnergyStream(column.getCondenser().getEnergyStream()); + + neqsim.processSimulation.processSystem.ProcessSystem operations = + new neqsim.processSimulation.processSystem.ProcessSystem(); + operations.add(dryFeedGas); + operations.add(saturatedFeedGas); + operations.add(waterSaturatedFeedGas); + operations.add(inletCompressor); + operations.add(interstageGasCooler); + operations.add(inletCompressor2ndstage); + operations.add(MEGFeed); + operations.add(MEGsplitter1); + operations.add(MEGmixer1); + operations.add(inletGasCooler); + operations.add(MEGmixer2); + operations.add(heatEx); + operations.add(MEGmixer3); + operations.add(presRedValveLT); + operations.add(mpseparator); + operations.add(coldGasFromSep); + operations.add(heatedGasFromLPSep); + operations.add(richMEGstream); + operations.add(richMEGstreamHeater); + operations.add(richMEGstreamHeater2); + operations.add(presRedValve3); + operations.add(flashDrumSep); + operations.add(flashGasStream); + operations.add(flashLiquidStream); + operations.add(columnPreHeater); + operations.add(presRedValve4); + operations.add(column); + operations.add(coolerRegenGas); + operations.add(sepregenGas); + operations.add(gasToFlare); + operations.add(waterToSea); + operations.add(bufferTank); + operations.add(hotLeanMEGPump); + operations.add(streamHotPump); + operations.add(columnPreHeater); + operations.add(coolerHotMEG2); + operations.add(leanMEGtoMixer); + operations.add(makeupCalculator); + operations.add(makeupMEG); + operations.add(makeupMixer); + operations.add(streamToResycle); + operations.add(resycleLeanMEG); + + // operations = ProcessSystem.open("c:/temp/onshoreMEGprocess.neqsim"); + operations.run(); + System.out.println("MEG flow rate " + resycleLeanMEG.getFluid().getFlowRate("kg/hr")); + + // presRedValve4.displayResult(); + // System.out.println( + // "temperature after cross cooler " +heatEx.getOutStream(0).getTemperature("C")); + + System.out.println("Heat ex 2 duty " + richMEGstreamHeater2.getDuty() / 1.0e3 + " kW"); + System.out.println("Heat ex 2 duty2 " + richMEGstreamHeater2.getDuty() / 1.0e3 + " kW"); + + System.out.println("MEG flow rate " + richMEGstream.getFluid().getFlowRate("kg/hr")); + System.out.println("MEG feed to column rate " + + presRedValve4.getOutletStream().getFluid().getFlowRate("kg/hr")); + + System.out.println("MEG flow rate " + resycleLeanMEG.getFluid().getFlowRate("kg/hr")); + System.out.println("Reboiler duty [kW] " + ((Reboiler) column.getReboiler()).getDuty() / 1.0e3); + System.out + .println("Condenser duty [kW] " + ((Condenser) column.getCondenser()).getDuty() / 1.0e3); + System.out.println( + "wt% lean MEG " + MEGFeed.getFluid().getPhase("aqueous").getWtFrac("MEG") * 100.0); + // System.out.println("heat ex out temperature " + + // heatEx.getOutStream(0).getTemperature("C")); + System.out.println("cold gas temperature " + coldGasFromSep.getTemperature("C")); + System.out.println("column glycol pre heater temperature " + + columnPreHeater.getOutStream(0).getTemperature("C")); + System.out.println("column glycol pre heater temperature " + + columnPreHeater.getOutStream(1).getTemperature("C")); + + // presRedValve4.getOutStream().displayResult(); + gasToFlare.displayResult(); + waterToSea.displayResult(); + System.out.println("lean MEG wt% " + + column.getLiquidOutStream().getFluid().getPhase("aqueous").getWtFrac("MEG") * 100.0); + System.out.println("hydrate temperature 1 " + + (inletGasCooler.getOutletStream().getHydrateEquilibriumTemperature() - 273.15) + + " wt% MEG " + + inletGasCooler.getOutletStream().getFluid().getPhase("aqueous").getWtFrac("MEG") * 100.0); + + operations.save("c:/temp/MEGdehydrationProcess.neqsim"); + } } diff --git a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillation3.java b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillation3.java index 410031f184..c5fdc94cf4 100644 --- a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillation3.java +++ b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillation3.java @@ -117,8 +117,7 @@ public static void main(String[] args) { Stream gasToReboiler = strippingGas.clone(); gasToReboiler.setName("gas to reboiler"); - DistillationColumn column = new DistillationColumn(1, true, true); - column.setName("TEG regeneration column"); + DistillationColumn column = new DistillationColumn("TEG regeneration column", 1, true, true); column.addFeedStream(richGLycolHeater2.getOutletStream(), 0); column.getReboiler().setOutTemperature(273.15 + 206.6); column.getCondenser().setOutTemperature(273.15 + 101.0); diff --git a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationAaHa.java b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationAaHa.java index c5693ce806..e7fc1b7db4 100644 --- a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationAaHa.java +++ b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationAaHa.java @@ -151,8 +151,7 @@ public static neqsim.processSimulation.processSystem.ProcessSystem getProcess() Stream gasToReboiler = strippingGas.clone(); gasToReboiler.setName("gas to reboiler"); - DistillationColumn column = new DistillationColumn(1, true, true); - column.setName("TEG regeneration column"); + DistillationColumn column = new DistillationColumn("TEG regeneration column", 1, true, true); column.addFeedStream(glycol_flash_valve2.getOutletStream(), 0); column.getReboiler().setOutTemperature(273.15 + 201.0); column.getCondenser().setOutTemperature(273.15 + 92.0); diff --git a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationGFA.java b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationGFA.java index a38b44c6c9..9e646de605 100644 --- a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationGFA.java +++ b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationGFA.java @@ -271,8 +271,7 @@ public neqsim.processSimulation.processSystem.ProcessSystem getProcess() { Stream gasToReboiler = strippingGas.clone(); gasToReboiler.setName("gas to reboiler"); - DistillationColumn column = new DistillationColumn(3, true, true); - column.setName("TEG regeneration column"); + DistillationColumn column = new DistillationColumn("TEG regeneration column", 3, true, true); column.addFeedStream(glycol_flash_valve2.getOutletStream(), 1); column.getReboiler().setOutTemperature(273.15 + reboilerTemperature); column.getCondenser().setOutTemperature(273.15 + condenserTemperature); diff --git a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationJS.java b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationJS.java index a65e432416..2e94a831e2 100644 --- a/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationJS.java +++ b/src/test/java/neqsim/processSimulation/util/example/TEGdehydrationProcessDistillationJS.java @@ -277,8 +277,7 @@ public neqsim.processSimulation.processSystem.ProcessSystem getProcess() { Stream gasToReboiler = strippingGas.clone(); gasToReboiler.setName("gas to reboiler"); - DistillationColumn column = new DistillationColumn(1, true, true); - column.setName("TEG regeneration column"); + DistillationColumn column = new DistillationColumn("TEG regeneration column", 1, true, true); column.addFeedStream(glycol_flash_valve2.getOutletStream(), 0); column.getReboiler().setOutTemperature(273.15 + reboilerTemperature); column.getCondenser().setOutTemperature(273.15 + condenserTemperature); diff --git a/src/test/java/neqsim/processSimulation/util/example/destillation1.java b/src/test/java/neqsim/processSimulation/util/example/destillation1.java index 6edfddf53e..43a7080f71 100644 --- a/src/test/java/neqsim/processSimulation/util/example/destillation1.java +++ b/src/test/java/neqsim/processSimulation/util/example/destillation1.java @@ -42,7 +42,7 @@ public static void main(String args[]) { Stream stream_1 = new Stream("Stream1", testSystem); - DistillationColumn column = new DistillationColumn(9, true, true); + DistillationColumn column = new DistillationColumn("distColumn", 9, true, true); column.addFeedStream(stream_1, 4); ((Reboiler) column.getReboiler()).setRefluxRatio(3.7); ((Condenser) column.getCondenser()).setRefluxRatio(10.7); diff --git a/src/test/java/neqsim/processSimulation/util/example/destillation2.java b/src/test/java/neqsim/processSimulation/util/example/destillation2.java index e388b5029b..f07879acf3 100644 --- a/src/test/java/neqsim/processSimulation/util/example/destillation2.java +++ b/src/test/java/neqsim/processSimulation/util/example/destillation2.java @@ -13,47 +13,47 @@ * @since 2.2.3 */ public class destillation2 { - /** - * 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 + 30.0), 50.00); - testSystem.addComponent("methane", 1.00); - testSystem.addComponent("water", 100e-6); - testSystem.addComponent("TEG", 0.0); - - testSystem.setMixingRule(10); - testSystem.setMultiPhaseCheck(true); - testSystem.init(0); - - Stream feedGas = new Stream("feedGas", testSystem); - feedGas.setFlowRate(5.0, "MSm3/day"); - feedGas.setTemperature(30.0, "C"); - feedGas.setPressure(50.0, "bara"); - - neqsim.thermo.system.SystemInterface TEGliq2 = testSystem.clone(); - TEGliq2.setMolarComposition(new double[] {0.0, 0.001, 1.0}); - - Stream TEGliq = new Stream("TEG liq", TEGliq2); - TEGliq.setFlowRate(5000.0, "kg/hr"); - TEGliq.setTemperature(30.0, "C"); - TEGliq.setPressure(50.0, "bara"); - - DistillationColumn column = new DistillationColumn(3, false, false); - column.addFeedStream(feedGas, 0); - column.getTray(2).addStream(TEGliq); - - neqsim.processSimulation.processSystem.ProcessSystem operations = - new neqsim.processSimulation.processSystem.ProcessSystem(); - operations.add(feedGas); - operations.add(TEGliq); - operations.add(column); - operations.run(); - - column.getGasOutStream().displayResult(); - column.getLiquidOutStream().displayResult(); - } + /** + * 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 + 30.0), 50.00); + testSystem.addComponent("methane", 1.00); + testSystem.addComponent("water", 100e-6); + testSystem.addComponent("TEG", 0.0); + + testSystem.setMixingRule(10); + testSystem.setMultiPhaseCheck(true); + testSystem.init(0); + + Stream feedGas = new Stream("feedGas", testSystem); + feedGas.setFlowRate(5.0, "MSm3/day"); + feedGas.setTemperature(30.0, "C"); + feedGas.setPressure(50.0, "bara"); + + neqsim.thermo.system.SystemInterface TEGliq2 = testSystem.clone(); + TEGliq2.setMolarComposition(new double[] {0.0, 0.001, 1.0}); + + Stream TEGliq = new Stream("TEG liq", TEGliq2); + TEGliq.setFlowRate(5000.0, "kg/hr"); + TEGliq.setTemperature(30.0, "C"); + TEGliq.setPressure(50.0, "bara"); + + DistillationColumn column = new DistillationColumn("distColumn", 3, false, false); + column.addFeedStream(feedGas, 0); + column.getTray(2).addStream(TEGliq); + + neqsim.processSimulation.processSystem.ProcessSystem operations = + new neqsim.processSimulation.processSystem.ProcessSystem(); + operations.add(feedGas); + operations.add(TEGliq); + operations.add(column); + operations.run(); + + column.getGasOutStream().displayResult(); + column.getLiquidOutStream().displayResult(); + } } diff --git a/src/test/java/neqsim/processSimulation/util/monitor/SeparatorResponseTest.java b/src/test/java/neqsim/processSimulation/util/monitor/SeparatorResponseTest.java index 2bed73840c..c1d8c1c808 100644 --- a/src/test/java/neqsim/processSimulation/util/monitor/SeparatorResponseTest.java +++ b/src/test/java/neqsim/processSimulation/util/monitor/SeparatorResponseTest.java @@ -24,8 +24,7 @@ void testWrite() { ProcessSystem processOps = new ProcessSystem(); - Stream inletStream = new Stream("inletStream", testSystem); - inletStream.setName("feed stream"); + Stream inletStream = new Stream("feed stream", testSystem); inletStream.setPressure(10.0, "bara"); inletStream.setTemperature(20.0, "C"); inletStream.setFlowRate(290.0, "kg/hr"); diff --git a/src/test/java/neqsim/processSimulation/util/report/ReportTest.java b/src/test/java/neqsim/processSimulation/util/report/ReportTest.java index da176a1998..ce3ee81ea1 100644 --- a/src/test/java/neqsim/processSimulation/util/report/ReportTest.java +++ b/src/test/java/neqsim/processSimulation/util/report/ReportTest.java @@ -20,8 +20,7 @@ void testWrite() { ProcessSystem processOps = new ProcessSystem(); - Stream inletStream = new Stream("inletStream", testSystem); - inletStream.setName("feed stream"); + Stream inletStream = new Stream("feed stream", testSystem); inletStream.setPressure(10.0, "bara"); inletStream.setTemperature(20.0, "C"); inletStream.setFlowRate(100.0, "kg/hr");