diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C
index cf78541322a57a59a8ba8ae60b695f021d6c1d6e..36a3b819dedf03dc605fc46c85caf7c8bc9a8366 100644
--- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C
+++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C
@@ -157,8 +157,6 @@ void mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::evaluate
         patch().lookupPatchField<volScalarField, scalar>(muName_);
     scalarField& mutw = *this;
 
-    scalarField magFaceGradU = mag(U.snGrad());
-
     if (roughnessHeight_ > 0.0)
     {
         // Rough Walls.
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C
index 4c8d457affbfbeb8cb6744b1e6409ae844434c76..35193acaf3e59ad7b609f74f30bc58c74f00f6a4 100644
--- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C
@@ -132,8 +132,6 @@ void nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::evaluate
         patch().lookupPatchField<volScalarField, scalar>(nuName_);
     scalarField& nutw = *this;
 
-    scalarField magFaceGradU = mag(U.snGrad());
-
     forAll(nutw, facei)
     {
         scalar magUpara = magUp[facei];