-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add ref process test * added test * update * modified multiphase separator flash * update * update test * update test * remove output characterization test
- Loading branch information
Showing
4 changed files
with
145 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
125 changes: 125 additions & 0 deletions
125
src/test/java/neqsim/processSimulation/processSystem/ReferenceProcessTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
package neqsim.processSimulation.processSystem; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
import org.junit.jupiter.api.Test; | ||
import neqsim.thermo.system.SystemInterface; | ||
import neqsim.thermo.system.SystemSrkEos; | ||
|
||
public class ReferenceProcessTest extends neqsim.NeqSimTest { | ||
|
||
@Test | ||
public void testProcess() { | ||
SystemInterface thermoSystem = new SystemSrkEos(298.0, 10.0); | ||
thermoSystem.addComponent("nitrogen", 51.0); | ||
thermoSystem.addComponent("CO2", 51.0); | ||
thermoSystem.addComponent("methane", 51.0); | ||
thermoSystem.addComponent("ethane", 51.0); | ||
thermoSystem.addComponent("propane", 51.0); | ||
thermoSystem.addComponent("i-butane", 51.0); | ||
thermoSystem.addComponent("n-butane", 51.0); | ||
thermoSystem.addComponent("iC5", 51.0); | ||
thermoSystem.addComponent("nC5", 1.0); | ||
|
||
thermoSystem.addTBPfraction("C6", 1.0, 86.0 / 1000.0, 0.66); | ||
thermoSystem.addTBPfraction("C7", 1.0, 91.0 / 1000.0, 0.74); | ||
thermoSystem.addTBPfraction("C8", 1.0, 103.0 / 1000.0, 0.77); | ||
thermoSystem.addTBPfraction("C9", 1.0, 117.0 / 1000.0, 0.79); | ||
thermoSystem.addPlusFraction("C10_C12", 1.0, 145.0 / 1000.0, 0.80); | ||
thermoSystem.addPlusFraction("C13_C14", 1.0, 181.0 / 1000.0, 0.8279); | ||
thermoSystem.addPlusFraction("C15_C16", 1.0, 212.0 / 1000.0, 0.837); | ||
thermoSystem.addPlusFraction("C17_C19", 1.0, 248.0 / 1000.0, 0.849); | ||
thermoSystem.addPlusFraction("C20_C22", 1.0, 289.0 / 1000.0, 0.863); | ||
thermoSystem.addPlusFraction("C23_C25", 1.0, 330.0 / 1000.0, 0.875); | ||
thermoSystem.addPlusFraction("C26_C30", 1.0, 387.0 / 1000.0, 0.88); | ||
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.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"); | ||
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"); | ||
|
||
neqsim.processSimulation.processEquipment.heatExchanger.Heater oilHeaterSecondStage = | ||
new neqsim.processSimulation.processEquipment.heatExchanger.Heater( | ||
firstStageSeparator.getOilOutStream()); | ||
oilHeaterSecondStage.setName("oil heater second stage"); | ||
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"); | ||
|
||
neqsim.processSimulation.processEquipment.heatExchanger.Heater oilHeaterThirdStage = | ||
new neqsim.processSimulation.processEquipment.heatExchanger.Heater( | ||
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"); | ||
|
||
neqsim.processSimulation.processEquipment.heatExchanger.Heater oilHeaterStandardStage = | ||
new neqsim.processSimulation.processEquipment.heatExchanger.Heater( | ||
thirdStageSeparator.getOilOutStream()); | ||
oilHeaterStandardStage.setName("oil heater standard stage"); | ||
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"); | ||
|
||
neqsim.processSimulation.processEquipment.mixer.Mixer gasMixer = | ||
new neqsim.processSimulation.processEquipment.mixer.Mixer("gas mixer"); | ||
gasMixer.addStream(firstStageSeparator.getGasOutStream()); | ||
gasMixer.addStream(secondStageSeparator.getGasOutStream()); | ||
gasMixer.addStream(thirdStageSeparator.getGasOutStream()); | ||
gasMixer.addStream(standardStageSeparator.getGasOutStream()); | ||
|
||
neqsim.processSimulation.processEquipment.stream.Stream exportoil = | ||
new neqsim.processSimulation.processEquipment.stream.Stream("export oil", | ||
standardStageSeparator.getOilOutStream()); | ||
neqsim.processSimulation.processEquipment.stream.Stream exportgas = | ||
new neqsim.processSimulation.processEquipment.stream.Stream("export gas", | ||
gasMixer.getOutStream()); | ||
|
||
neqsim.processSimulation.processSystem.ProcessSystem oilprocess = | ||
new neqsim.processSimulation.processSystem.ProcessSystem(); | ||
oilprocess.add(wellStream); | ||
oilprocess.add(firstStageSeparator); | ||
oilprocess.add(oilHeaterSecondStage); | ||
oilprocess.add(secondStageSeparator); | ||
oilprocess.add(oilHeaterThirdStage); | ||
oilprocess.add(thirdStageSeparator); | ||
oilprocess.add(oilHeaterStandardStage); | ||
oilprocess.add(standardStageSeparator); | ||
oilprocess.add(gasMixer); | ||
oilprocess.add(exportoil); | ||
oilprocess.add(exportgas); | ||
|
||
oilprocess.run(); | ||
|
||
assertEquals(28.74349, gasMixer.getOutStream().getTemperature("C"), 0.01); | ||
assertEquals(2278.2594247, exportgas.getFlowRate("Sm3/hr") / exportoil.getFlowRate("idSm3/hr"), | ||
0.01); | ||
|
||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters