diff --git a/src/main/java/neqsim/PVTsimulation/simulation/ConstantVolumeDepletion.java b/src/main/java/neqsim/PVTsimulation/simulation/ConstantVolumeDepletion.java index c8c7c4af42..fd4ba27150 100644 --- a/src/main/java/neqsim/PVTsimulation/simulation/ConstantVolumeDepletion.java +++ b/src/main/java/neqsim/PVTsimulation/simulation/ConstantVolumeDepletion.java @@ -113,7 +113,9 @@ public void runCalc() { double volumeCorrection = 0.0; cummulativeMolePercDepleted = new double[pressures.length]; double totalNumberOfMoles = getThermoSystem().getTotalNumberOfMoles(); - getThermoSystem().setTemperature(temperature, temperatureUnit); + if (!Double.isNaN(temperature)) { + getThermoSystem().setTemperature(temperature, temperatureUnit); + } for (int i = 0; i < pressures.length; i++) { getThermoSystem().setPressure(pressures[i]);