TestTransientFlow2 class.
+ *+ * TestTransientFlow2 class. + *
* * @author ESOL * @version $Id: $Id * @since 2.2.3 */ public class TestTransientFlow2 { - /** - *main.
- * - * @param args an array of {@link java.lang.String} objects - */ - public static void main(String args[]) { - neqsim.thermo.system.SystemInterface testSystem = - new neqsim.thermo.system.SystemSrkEos((273.15 + 25.0), 10.00); - testSystem.addComponent("methane", 0.900); - testSystem.addComponent("ethane", 0.100); - testSystem.addComponent("n-heptane", 1.00); - testSystem.createDatabase(true); - testSystem.setMixingRule(2); + /** + *+ * main. + *
+ * + * @param args an array of {@link java.lang.String} objects + */ + public static void main(String args[]) { + neqsim.thermo.system.SystemInterface testSystem = + new neqsim.thermo.system.SystemSrkEos((273.15 + 25.0), 10.00); + testSystem.addComponent("methane", 0.900); + testSystem.addComponent("ethane", 0.100); + testSystem.addComponent("n-heptane", 1.00); + testSystem.createDatabase(true); + testSystem.setMixingRule(2); - Stream stream_1 = new Stream("Stream1", testSystem); - ThrottlingValve valve_1 = new ThrottlingValve("valve_1", stream_1); - valve_1.setOutletPressure(5.0); - valve_1.setPercentValveOpening(50); + Stream stream_1 = new Stream("Stream1", testSystem); + ThrottlingValve valve_1 = new ThrottlingValve("valve_1", stream_1); + valve_1.setOutletPressure(5.0); + valve_1.setPercentValveOpening(50); - Separator separator_1 = new Separator("separator_1"); - separator_1.addStream(valve_1.getOutletStream()); + Separator separator_1 = new Separator("separator_1"); + separator_1.addStream(valve_1.getOutletStream()); - ThrottlingValve valve_2 = new ThrottlingValve("valve_2", separator_1.getLiquidOutStream()); - valve_2.setOutletPressure(1.0); - valve_2.setPercentValveOpening(50); - // valve_2.setCv(10.0); + ThrottlingValve valve_2 = new ThrottlingValve("valve_2", separator_1.getLiquidOutStream()); + valve_2.setOutletPressure(1.0); + valve_2.setPercentValveOpening(50); + // valve_2.setCv(10.0); - ThrottlingValve valve_3 = new ThrottlingValve("valve_3", separator_1.getGasOutStream()); - valve_3.setOutletPressure(1.0); - valve_3.setPercentValveOpening(50); + ThrottlingValve valve_3 = new ThrottlingValve("valve_3", separator_1.getGasOutStream()); + valve_3.setOutletPressure(1.0); + valve_3.setPercentValveOpening(50); - VolumeFlowTransmitter flowTransmitter = new VolumeFlowTransmitter(stream_1); - flowTransmitter.setUnit("m^3/hr"); - flowTransmitter.setMaximumValue(10.0); - flowTransmitter.setMinimumValue(1.0); + VolumeFlowTransmitter flowTransmitter = new VolumeFlowTransmitter(stream_1); + flowTransmitter.setUnit("m^3/hr"); + flowTransmitter.setMaximumValue(10.0); + flowTransmitter.setMinimumValue(1.0); - ControllerDeviceInterface flowController = new ControllerDeviceBaseClass(); - flowController.setTransmitter(flowTransmitter); - flowController.setReverseActing(true); - flowController.setControllerSetPoint(1.0); - flowController.setControllerParameters(0.7, 300.0, 0.0); + ControllerDeviceInterface flowController = new ControllerDeviceBaseClass(); + flowController.setTransmitter(flowTransmitter); + flowController.setReverseActing(true); + flowController.setControllerSetPoint(1.0); + flowController.setControllerParameters(0.7, 300.0, 0.0); - neqsim.processSimulation.processSystem.ProcessSystem operations = - new neqsim.processSimulation.processSystem.ProcessSystem(); - operations.add(stream_1); - operations.add(valve_1); - operations.add(separator_1); - operations.add(valve_2); - operations.add(valve_3); + neqsim.processSimulation.processSystem.ProcessSystem operations = + new neqsim.processSimulation.processSystem.ProcessSystem(); + operations.add(stream_1); + operations.add(valve_1); + operations.add(separator_1); + operations.add(valve_2); + operations.add(valve_3); - operations.add(flowTransmitter); - valve_1.setController(flowController); + operations.add(flowTransmitter); + valve_1.setController(flowController); - operations.run(); - operations.displayResult(); - valve_2.setPercentValveOpening(0.1); - valve_3.setPercentValveOpening(0.1); - // transient behaviour - operations.setTimeStep(5.0); - for (int i = 0; i < 460; i++) { - System.out.println("volume flow " + flowTransmitter.getMeasuredValue() - + " valve opening " + valve_1.getPercentValveOpening() + " pressure " - + separator_1.getGasOutStream().getPressure()); - operations.runTransient(); - } + operations.run(); + operations.displayResult(); + valve_2.setPercentValveOpening(0.1); + valve_3.setPercentValveOpening(0.1); + // transient behaviour + operations.setTimeStep(5.0); + for (int i = 0; i < 460; i++) { + // System.out.println("volume flow " + flowTransmitter.getMeasuredValue() + // + " valve opening " + valve_1.getPercentValveOpening() + " pressure " + // + separator_1.getGasOutStream().getPressure()); + operations.runTransient(); + } - operations.displayResult(); - System.out.println("volume flow " + flowTransmitter.getMeasuredValue() + " valve opening " - + valve_1.getPercentValveOpening()); + operations.displayResult(); + // System.out.println("volume flow " + flowTransmitter.getMeasuredValue() + " valve opening " + // + valve_1.getPercentValveOpening()); - // operations.displayResult(); - } + // operations.displayResult(); + } } diff --git a/src/test/java/neqsim/thermo/system/SystemUMRCPAEoStest.java b/src/test/java/neqsim/thermo/system/SystemUMRCPAEoStest.java index fd0d106f26..14c83345c3 100644 --- a/src/test/java/neqsim/thermo/system/SystemUMRCPAEoStest.java +++ b/src/test/java/neqsim/thermo/system/SystemUMRCPAEoStest.java @@ -93,24 +93,24 @@ public void testCompressibility() { testOps.TPflash(); testSystem.init(3); testSystem.init(3); - System.out.println("molar volume gas+oil is " + testSystem.getMolarVolume()); - System.out.println("molar volume gas is " + testSystem.getPhase(0).getMolarVolume()); - System.out.println("fugacity of gas phase " + testSystem.getPhase(0).getFugacity(0)); - System.out.println("residual enthalpy of gas phase is " + testSystem.getPhase(0).getHresTP()); - System.out.println( - "isochoric heat capacity of gas phase is " + testSystem.getPhase(0).getCv("J/mol")); - System.out - .println("isobaric heat capacity of gas phase is " + testSystem.getPhase(0).getCp("J/mol")); - System.out - .println("internal energy of gas phase is " + testSystem.getPhase(0).getInternalEnergy()); - System.out.println("molar volume liquid is " + testSystem.getPhase(1).getMolarVolume()); - System.out.println("fugacity of gas phase " + testSystem.getPhase(1).getFugacity(0)); - System.out.println("enthalpy of gas phase is " + testSystem.getPhase(1).getEnthalpy("J/mol")); - System.out.println( - "isochoric heat capacity of gas phase is " + testSystem.getPhase(1).getCv("J/mol")); - // ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); - // testOps.TPflash(); - + /* + * System.out.println("molar volume gas+oil is " + testSystem.getMolarVolume()); + * System.out.println("molar volume gas is " + testSystem.getPhase(0).getMolarVolume()); + * System.out.println("fugacity of gas phase " + testSystem.getPhase(0).getFugacity(0)); + * System.out.println("residual enthalpy of gas phase is " + + * testSystem.getPhase(0).getHresTP()); System.out.println( + * "isochoric heat capacity of gas phase is " + testSystem.getPhase(0).getCv("J/mol")); + * System.out .println("isobaric heat capacity of gas phase is " + + * testSystem.getPhase(0).getCp("J/mol")); System.out + * .println("internal energy of gas phase is " + testSystem.getPhase(0).getInternalEnergy()); + * System.out.println("molar volume liquid is " + testSystem.getPhase(1).getMolarVolume()); + * System.out.println("fugacity of gas phase " + testSystem.getPhase(1).getFugacity(0)); + * System.out.println("enthalpy of gas phase is " + + * testSystem.getPhase(1).getEnthalpy("J/mol")); System.out.println( + * "isochoric heat capacity of gas phase is " + testSystem.getPhase(1).getCv("J/mol")); // + * ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); // + * testOps.TPflash(); + */ // testSystem.initProperties(); // assertEquals(0.9711401538454589, testSystem.getPhase(0).getZ(), 0.001); } @@ -222,8 +222,8 @@ public void checkPhaseEnvelope() throws Exception { ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); try { testOps.calcPTphaseEnvelope(); - System.out.println("Cricondenbar " + (testOps.get("cricondenbar")[0] - 273.15) + " " - + testOps.get("cricondenbar")[1]); + // System.out.println("Cricondenbar " + (testOps.get("cricondenbar")[0] - 273.15) + " " + // + testOps.get("cricondenbar")[1]); } catch (Exception ex) { assertTrue(false); throw new Exception(ex); diff --git a/src/test/java/neqsim/thermo/util/example/H2Sdistribution.java b/src/test/java/neqsim/thermo/util/example/H2Sdistribution.java index 40f68e1c39..6dc20ca7c4 100644 --- a/src/test/java/neqsim/thermo/util/example/H2Sdistribution.java +++ b/src/test/java/neqsim/thermo/util/example/H2Sdistribution.java @@ -51,6 +51,6 @@ public static void main(String args[]) { } catch (Exception ex) { } testSystem.display(); - System.out.println("pH " + testSystem.getPhase("aqueous").getpH()); + // System.out.println("pH " + testSystem.getPhase("aqueous").getpH()); } } diff --git a/src/test/java/neqsim/thermo/util/example/ReactiveTPflash.java b/src/test/java/neqsim/thermo/util/example/ReactiveTPflash.java index 1ce0df6d96..2fc07cb1e8 100644 --- a/src/test/java/neqsim/thermo/util/example/ReactiveTPflash.java +++ b/src/test/java/neqsim/thermo/util/example/ReactiveTPflash.java @@ -67,7 +67,7 @@ public static void main(String args[]) { } catch (Exception ex) { } testSystem.display(); - System.out.println("pH " + testSystem.getPhase(1).getpH()); + // System.out.println("pH " + testSystem.getPhase(1).getpH()); logger.info("pH " + testSystem.getPhase(1).getpH()); logger.info( "activity coefficiet water " + testSystem.getPhase("aqueous").getActivityCoefficient(2)); diff --git a/src/test/java/neqsim/thermo/util/example/TestCharacterizationCondensate1.java b/src/test/java/neqsim/thermo/util/example/TestCharacterizationCondensate1.java index f0d7e8d780..3b15f51a6e 100644 --- a/src/test/java/neqsim/thermo/util/example/TestCharacterizationCondensate1.java +++ b/src/test/java/neqsim/thermo/util/example/TestCharacterizationCondensate1.java @@ -51,18 +51,18 @@ public static void main(String args[]) { */ testSystem.addTBPfraction("C7", 5, 100.0 / 1000.0, 0.72); testSystem.addPlusFraction("C8", 50, 230.0 / 1000.0, 0.84); - //testSystem.addPlusFraction("C8", 34, 200.0 / 1000.0, 0.82); + // testSystem.addPlusFraction("C8", 34, 200.0 / 1000.0, 0.82); testSystem.getCharacterization().getLumpingModel().setNumberOfLumpedComponents(12); testSystem.getCharacterization().characterisePlusFraction(); /* * testSystem.getInterphaseProperties().setInterfacialTensionModel(0); */ - System.out.println("number of components " + testSystem.getNumberOfComponents()); + // System.out.println("number of components " + testSystem.getNumberOfComponents()); testSystem.useVolumeCorrection(true); testSystem.createDatabase(true); testSystem.setMixingRule(2); testSystem.setMultiPhaseCheck(true); - System.out.println("number of components " + testSystem.getNumberOfComponents()); + // System.out.println("number of components " + testSystem.getNumberOfComponents()); ThermodynamicOperations testOps = new ThermodynamicOperations(testSystem); try { diff --git a/src/test/java/neqsim/thermo/util/example/TestUMRPRU.java b/src/test/java/neqsim/thermo/util/example/TestUMRPRU.java index 6aa5f0bc31..8b052a110d 100644 --- a/src/test/java/neqsim/thermo/util/example/TestUMRPRU.java +++ b/src/test/java/neqsim/thermo/util/example/TestUMRPRU.java @@ -100,8 +100,8 @@ public static void main(String args[]) { double numCp = (ent1 - ent2) / 0.002; - System.out.println("Cp " + cp + " numCp " + numCp); - System.out.println("entropy " + testSystem.getPhase(1).getEntropy()); + //System.out.println("Cp " + cp + " numCp " + numCp); + //System.out.println("entropy " + testSystem.getPhase(1).getEntropy()); // thermo.ThermodynamicModelTest testModel = new // thermo.ThermodynamicModelTest(testSystem); diff --git a/src/test/java/neqsim/thermodynamicOperations/ThermodynamicOperationsTest.java b/src/test/java/neqsim/thermodynamicOperations/ThermodynamicOperationsTest.java index 2e00d9f227..020abcbd2f 100644 --- a/src/test/java/neqsim/thermodynamicOperations/ThermodynamicOperationsTest.java +++ b/src/test/java/neqsim/thermodynamicOperations/ThermodynamicOperationsTest.java @@ -410,7 +410,7 @@ void testpropertyFlashRegressions() throws IOException { ArrayList