From 212c388382277365a23017fae1dcde9fdb1364bc Mon Sep 17 00:00:00 2001 From: Even Solbraa <41290109+EvenSol@users.noreply.github.com> Date: Mon, 27 May 2024 08:35:00 +0200 Subject: [PATCH] update (#1021) --- .../PVTsimulation/simulation/ConstantVolumeDepletion.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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]);