From 494ffcff89907959d2123c7a60b38bdb8edc8398 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Fri, 10 May 2019 14:27:58 +0100 Subject: [PATCH] Porting: single precision requires casting in max --- .../mutSpalartAllmarasWallFunctionFvPatchScalarField.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.C index 319e9174d..0b2ff734b 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.C @@ -53,9 +53,9 @@ mutSpalartAllmarasWallFunctionFvPatchScalarField::calcMut() const const scalarField& rhow = turbModel.rho().boundaryField()[patchI]; const scalarField& muw = turbModel.mu().boundaryField()[patchI]; - return max + return Foam::max ( - 0.0, + scalar(0), rhow*sqr(calcUTau(magGradU))/(magGradU + ROOTVSMALL) - muw ); }