From 0575911f947d2ab2bb31e315361728d0b712ceb6 Mon Sep 17 00:00:00 2001 From: Henry Weller Date: Thu, 18 Jun 2015 11:45:40 +0100 Subject: [PATCH] LimitedScheme/LimitFuncs: Make the limiter function for symmTensor consistent with tensor Use the trace as the limiter function for both symmTensor and tensor to bound the normal stresses rather than the shear stresses. Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1751 --- .../limitedSchemes/LimitedScheme/LimitFuncs.C | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitFuncs.C b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitFuncs.C index 85200d1e0..e4f0d4db5 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitFuncs.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/LimitedScheme/LimitFuncs.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2015 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -55,6 +55,16 @@ inline tmp magSqr::operator() } +template<> +inline tmp magSqr::operator() +( + const volSymmTensorField& phi +) const +{ + return Foam::tr(phi); +} + + template<> inline tmp magSqr::operator() (