diff --git a/src/thermophysicalModels/specie/thermo/thermo/thermoI.H b/src/thermophysicalModels/specie/thermo/thermo/thermoI.H index 44197fd18f7e6a526cae47d8b591250b32819ec2..669d7e7a2178db15915e4ec3e9eb4b0b4a8a9603 100644 --- a/src/thermophysicalModels/specie/thermo/thermo/thermoI.H +++ b/src/thermophysicalModels/specie/thermo/thermo/thermoI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -49,6 +49,13 @@ inline Foam::scalar Foam::species::thermo<Thermo, Type>::T scalar (thermo<Thermo, Type>::*limit)(const scalar) const ) const { + if (T0 < 0) + { + FatalErrorInFunction + << "Negative initial temperature T0: " << T0 + << abort(FatalError); + } + scalar Test = T0; scalar Tnew = T0; scalar Ttol = T0*tol_; @@ -64,7 +71,7 @@ inline Foam::scalar Foam::species::thermo<Thermo, Type>::T if (iter++ > maxIter_) { FatalErrorInFunction - << "Maximum number of iterations exceeded" + << "Maximum number of iterations exceeded: " << maxIter_ << abort(FatalError); }