From 03c63bf7a50a4c966bc97d186910e5a9862f313c Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Mon, 24 Jul 2017 10:35:00 +0100 Subject: [PATCH] MULES: Improve handling of very small geometries --- .../fvMatrices/solvers/MULES/CMULESTemplates.C | 10 +++++----- .../fvMatrices/solvers/MULES/MULESTemplates.C | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/finiteVolume/fvMatrices/solvers/MULES/CMULESTemplates.C b/src/finiteVolume/fvMatrices/solvers/MULES/CMULESTemplates.C index 41fc3b119..3f634f896 100644 --- a/src/finiteVolume/fvMatrices/solvers/MULES/CMULESTemplates.C +++ b/src/finiteVolume/fvMatrices/solvers/MULES/CMULESTemplates.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2013-2016 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013-2017 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -202,8 +202,8 @@ void Foam::MULES::limiterCorr scalarField psiMaxn(psiIf.size(), psiMin); scalarField psiMinn(psiIf.size(), psiMax); - scalarField sumPhip(psiIf.size(), VSMALL); - scalarField mSumPhim(psiIf.size(), VSMALL); + scalarField sumPhip(psiIf.size(), 0.0); + scalarField mSumPhim(psiIf.size(), 0.0); forAll(phiCorrIf, facei) { @@ -361,7 +361,7 @@ void Foam::MULES::limiterCorr max(min ( (sumlPhip[celli] + psiMaxn[celli]) - /(mSumPhim[celli] - SMALL), + /(mSumPhim[celli] + ROOTVSMALL), 1.0), 0.0 ); @@ -369,7 +369,7 @@ void Foam::MULES::limiterCorr max(min ( (mSumlPhim[celli] + psiMinn[celli]) - /(sumPhip[celli] + SMALL), + /(sumPhip[celli] + ROOTVSMALL), 1.0), 0.0 ); } diff --git a/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C b/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C index 3272d81d9..85966f8c4 100644 --- a/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C +++ b/src/finiteVolume/fvMatrices/solvers/MULES/MULESTemplates.C @@ -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 @@ -236,8 +236,8 @@ void Foam::MULES::limiter scalarField sumPhiBD(psiIf.size(), 0.0); - scalarField sumPhip(psiIf.size(), VSMALL); - scalarField mSumPhim(psiIf.size(), VSMALL); + scalarField sumPhip(psiIf.size(), 0.0); + scalarField mSumPhim(psiIf.size(), 0.0); forAll(phiCorrIf, facei) { @@ -428,7 +428,7 @@ void Foam::MULES::limiter max(min ( (sumlPhip[celli] + psiMaxn[celli]) - /(mSumPhim[celli] - SMALL), + /(mSumPhim[celli] + ROOTVSMALL), 1.0), 0.0 ); @@ -436,7 +436,7 @@ void Foam::MULES::limiter max(min ( (mSumlPhim[celli] + psiMinn[celli]) - /(sumPhip[celli] + SMALL), + /(sumPhip[celli] + ROOTVSMALL), 1.0), 0.0 ); }