From 0b681597c4cccff1d0d0f93133a139dcc20e97bc Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Fri, 7 Jan 2022 10:20:52 +0000 Subject: [PATCH] basicSpecieMixture: Corrected test for zero total mass-fraction Resolves bug-report https://bugs.openfoam.org/view.php?id=3775 --- .../mixtures/basicSpecieMixture/basicSpecieMixture.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/thermophysicalModels/reactionThermo/mixtures/basicSpecieMixture/basicSpecieMixture.C b/src/thermophysicalModels/reactionThermo/mixtures/basicSpecieMixture/basicSpecieMixture.C index 23d0afd825..39c194e7ce 100644 --- a/src/thermophysicalModels/reactionThermo/mixtures/basicSpecieMixture/basicSpecieMixture.C +++ b/src/thermophysicalModels/reactionThermo/mixtures/basicSpecieMixture/basicSpecieMixture.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org - \\ / A nd | Copyright (C) 2014-2021 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2014-2022 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -200,7 +200,7 @@ void Foam::basicSpecieMixture::correctMassFractions() Yt += Y_[i]; } - if (mag(max(Yt).value()) < rootVSmall) + if (mag(min(Yt).value()) < rootVSmall) { FatalErrorInFunction << "Sum of mass fractions is zero for species " << species()