Skip to content

Commit

Permalink
update model
Browse files Browse the repository at this point in the history
  • Loading branch information
EvenSol committed Dec 3, 2024
1 parent 0102020 commit 5f2883c
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions src/test/java/neqsim/process/processmodel/ProcessSystemTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -889,5 +889,51 @@ public void testRun_step() {
operations.add(leanTEGtoabs);
operations.add(recycleLeanTEG);
operations.run();
dryFeedGasMidgard.setFlowRate(11.1, "MSm3/day");
operations.run_step();
dryFeedGasMidgard.setFlowRate(12.3, "MSm3/day");
operations.run_step();
dryFeedGasMidgard.setFlowRate(13.5, "MSm3/day");
ProcessSystem ops2 = operations.copy();
operations.setRunInSteps(true);
operations.run();
operations.run();
operations.run();
operations.run();
operations.run();
operations.run();
ProcessSystem ops3 = operations.copy();
operations.run();
operations.run();
dryFeedGasMidgard.setFlowRate(10.0, "MSm3/day");
operations.run();
operations.run();
operations.run();
operations.run();
operations.run();
operations.run();
operations.run();
operations.run();
assertEquals(1.5322819175995646E-5, dehydratedGas.getFluid().getComponent("water").getx(),
1e-6);

operations.run();
operations.run();
operations.run();
operations.run();
assertEquals(1.5322819175995646E-5, dehydratedGas.getFluid().getComponent("water").getx(),
1e-6);

// run as time step as thread
Thread thread = operations.runAsThread();
Thread thread2 = ops2.runAsThread();
Thread thread3 = ops3.runAsThread();
try {
thread.join();
thread2.join();
thread3.join();
} catch (Exception e) {
e.printStackTrace();
}
}
}

0 comments on commit 5f2883c

Please sign in to comment.