From 4b4ed060959b0d4ae1333f8d2e1e65ccb898de92 Mon Sep 17 00:00:00 2001 From: Vegard Gjeldvik Jervell Date: Thu, 15 Feb 2024 16:53:45 +0100 Subject: [PATCH] Fixed: A runtime error was inappropriately raised when attempting to use Fokin correlations for omega(l, r) with l == 2, r == 3. This error triggered an inappropriate runtime error when computing properties with Enskog approximaiton order >= 3. --- cpp/MieKinGas.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/MieKinGas.cpp b/cpp/MieKinGas.cpp index e34dd7d..117d6f9 100644 --- a/cpp/MieKinGas.cpp +++ b/cpp/MieKinGas.cpp @@ -52,7 +52,7 @@ double MieKinGas::omega_recursive_factor(int i, int j, int l, int r, double T_st // Given in Fokin, Popov and Kalashnikov, High Temperature, Vol. 37, No. 1 (1999) // See also: Hirchfelder, Curtiss & Bird, Molecular Theory of Gases and Liquids. // For reduced integrals : omega(l, r + 1) / omega(l, r) = 1 + (d omega(l, r) / d lnT^*) / (r + 2) - if ((l > 1) || (r > 2)) throw std::runtime_error("No recursive factor available!"); + if ((l > 2) || (r > 3)) {throw std::runtime_error("No recursive factor available!");} double dlnomega_dlnT = - (2 / lr[i][j]); double a_m; for (int n = 2; n < 7; n++){