diff --git a/src/main/java/neqsim/thermo/phase/PhaseEos.java b/src/main/java/neqsim/thermo/phase/PhaseEos.java index e6ca571ed..6c2f3f8ab 100644 --- a/src/main/java/neqsim/thermo/phase/PhaseEos.java +++ b/src/main/java/neqsim/thermo/phase/PhaseEos.java @@ -352,8 +352,8 @@ public double molarVolume(double pressure, double temperature, double A, double BonVold = 100; } if (BonV < 0) { - // BonV = Math.abs(BonV); - BonV = BonVold / 2.0; + BonV = BonVold / 2; + BonVold = 10; } error = Math.abs((BonV - BonVold) / BonVold); diff --git a/src/test/java/neqsim/thermodynamicoperations/flashops/TPFlashTest.java b/src/test/java/neqsim/thermodynamicoperations/flashops/TPFlashTest.java index d83c32e98..8e2ad523e 100644 --- a/src/test/java/neqsim/thermodynamicoperations/flashops/TPFlashTest.java +++ b/src/test/java/neqsim/thermodynamicoperations/flashops/TPFlashTest.java @@ -96,8 +96,9 @@ void testRun5() { testOps = new ThermodynamicOperations(testSystem5); testOps.TPflash(); testSystem5.initProperties(); + testSystem5.prettyPrint(); double beta = testSystem5.getBeta(); - assertEquals(6.272876522701802E-7, beta, 1e-5); + assertEquals(0.999999372713993, beta, 1e-9); } @Test