Skip to content

Commit

Permalink
Fix t pflashbug (#419)
Browse files Browse the repository at this point in the history
* first test

* Update TPFlashTest.java

* fix bug with flash of fluid

fix bug with flash of fluid with low flow rates
  • Loading branch information
EvenSol authored May 27, 2022
1 parent c450349 commit 22c938c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ public void TPflash() {
double minimumFlowRate = 1e-50;
if (flowRate < 1e-3) {
system.setTotalNumberOfMoles(1.0);
system.init(1);
}
operation = new neqsim.thermodynamicOperations.flashOps.TPflash(system,
system.doSolidPhaseCheck());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,13 @@ void testRun5() {
testSystem5.setMultiPhaseCheck(true);
testSystem5.setPressure(90.03461693, "bara");
testSystem5.setTemperature(293.15, "K");
testSystem5.setTotalFlowRate(4.925e-05, "kg/sec");
testSystem5.setTotalFlowRate(4.925e-07, "kg/sec");
testOps = new ThermodynamicOperations(testSystem5);
testOps.TPflash();
testSystem5.initProperties();
double beta = testSystem5.getBeta();
assertEquals(0.9999993727123112, beta, 1e-5);
assertEquals(6.272876522701802E-7, beta, 1e-5);


}
}

0 comments on commit 22c938c

Please sign in to comment.