diff --git a/src/main/java/neqsim/PVTsimulation/simulation/ConstantVolumeDepletion.java b/src/main/java/neqsim/PVTsimulation/simulation/ConstantVolumeDepletion.java index fd4ba27150..ddd8419898 100644 --- a/src/main/java/neqsim/PVTsimulation/simulation/ConstantVolumeDepletion.java +++ b/src/main/java/neqsim/PVTsimulation/simulation/ConstantVolumeDepletion.java @@ -168,6 +168,7 @@ public void runCalc() { logger.debug(e.getMessage()); } } + getThermoSystem().init(0); for (int j = 0; j < getThermoSystem().getPhase(0).getNumberOfComponents(); j++) { try { getThermoSystem().addComponent(j, -change[j]); diff --git a/src/test/java/neqsim/PVTsimulation/simulation/ConstantVolumeDepletionTest.java b/src/test/java/neqsim/PVTsimulation/simulation/ConstantVolumeDepletionTest.java index 8bf4519742..767d95f903 100644 --- a/src/test/java/neqsim/PVTsimulation/simulation/ConstantVolumeDepletionTest.java +++ b/src/test/java/neqsim/PVTsimulation/simulation/ConstantVolumeDepletionTest.java @@ -60,7 +60,8 @@ void testRunEclipseInput() { ConstantVolumeDepletion CVDsim = new ConstantVolumeDepletion(fluid1); CVDsim.setTemperature(90.0, "C"); - CVDsim.setPressures(new double[] {220., 185.94064077, 151.88128153, 117.8219223}); + CVDsim.setPressures( + new double[] {200.0, 154.0, 139.0, 127.0, 117.0, 108.0, 91.0, 82.0, 62.0, 38.0}); CVDsim.runCalc(); CVDsim.getThermoSystem().initPhysicalProperties("density"); double gasdens = CVDsim.getThermoSystem().getPhase("gas").getDensity("kg/m3"); @@ -68,7 +69,7 @@ void testRunEclipseInput() { SystemInterface gasFluid = CVDsim.getThermoSystem().phaseToSystem("gas"); gasFluid.initPhysicalProperties("density"); - // gasFluid.prettyPrint(); + assertEquals(gasdens, gasFluid.getDensity("kg/m3"), 0.01); SystemInterface oilFluid = CVDsim.getThermoSystem().phaseToSystem("oil");