diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C
index 4fe171f2fd06bcf1bb5f4b3e8e8e696eb5d62be6..ed4acb4da05ae4f21a0e521e5f029459c0ec5f2b 100644
--- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C
+++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutRoughWallFunction/mutRoughWallFunctionFvPatchScalarField.C
@@ -67,8 +67,7 @@ scalar mutRoughWallFunctionFvPatchScalarField::fnRough
 
 // * * * * * * * * * * * * * * * * Constructors  * * * * * * * * * * * * * * //
 
-mutRoughWallFunctionFvPatchScalarField::
-mutRoughWallFunctionFvPatchScalarField
+mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField
 (
     const fvPatch& p,
     const DimensionedField<scalar, volMesh>& iF
@@ -80,8 +79,7 @@ mutRoughWallFunctionFvPatchScalarField
 {}
 
 
-mutRoughWallFunctionFvPatchScalarField::
-mutRoughWallFunctionFvPatchScalarField
+mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField
 (
     const mutRoughWallFunctionFvPatchScalarField& ptf,
     const fvPatch& p,
@@ -95,8 +93,7 @@ mutRoughWallFunctionFvPatchScalarField
 {}
 
 
-mutRoughWallFunctionFvPatchScalarField::
-mutRoughWallFunctionFvPatchScalarField
+mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField
 (
     const fvPatch& p,
     const DimensionedField<scalar, volMesh>& iF,
@@ -109,8 +106,7 @@ mutRoughWallFunctionFvPatchScalarField
 {}
 
 
-mutRoughWallFunctionFvPatchScalarField::
-mutRoughWallFunctionFvPatchScalarField
+mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField
 (
     const mutRoughWallFunctionFvPatchScalarField& rwfpsf
 )
@@ -121,8 +117,7 @@ mutRoughWallFunctionFvPatchScalarField
 {}
 
 
-mutRoughWallFunctionFvPatchScalarField::
-mutRoughWallFunctionFvPatchScalarField
+mutRoughWallFunctionFvPatchScalarField::mutRoughWallFunctionFvPatchScalarField
 (
     const mutRoughWallFunctionFvPatchScalarField& rwfpsf,
     const DimensionedField<scalar, volMesh>& iF
@@ -221,6 +216,7 @@ tmp<scalarField> mutRoughWallFunctionFvPatchScalarField::calcMut() const
 void mutRoughWallFunctionFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchField<scalar>::write(os);
+    writeLocalEntries(os);
     Cs_.writeEntry("Cs", os);
     Ks_.writeEntry("Ks", os);
     writeEntry("value", os);
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 351f4ca80d20e2573f841617fcd93bab531341c9..c1876610959d0d2b96cd9fa1036ba8ce836ea133 100644
--- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C
+++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardRoughWallFunction/mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C
@@ -48,6 +48,7 @@ mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus
     const label patchI = patch().index();
 
     const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
+    const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_);
     const scalarField& y = rasModel.y()[patchI];
     const scalarField& muw = rasModel.mu().boundaryField()[patchI];
     const fvPatchScalarField& rho = rasModel.rho().boundaryField()[patchI];
@@ -122,7 +123,7 @@ mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcYPlus
                     scalar denom = 1.0 + log(E_*yp) - G - yPlusGPrime;
                     if (mag(denom) > VSMALL)
                     {
-                        yp = kappaRe + yp*(1 - yPlusGPrime))/denom;
+                        yp = (kappaRe + yp*(1 - yPlusGPrime))/denom;
                     }
 
                 } while
@@ -298,8 +299,7 @@ void mutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::write
 ) const
 {
     fixedValueFvPatchScalarField::write(os);
-    os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
-    os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
+    writeLocalEntries(os);
     os.writeKeyword("roughnessHeight")
         << roughnessHeight_ << token::END_STATEMENT << nl;
     os.writeKeyword("roughnessConstant")
diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C
index 493cf1598d4598ba7e7247e65b370860b41ef93c..052b22664b42d1f92358729e2b8cbde466c1ae41 100644
--- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C
+++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasStandardWallFunction/mutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C
@@ -42,7 +42,7 @@ namespace RASModels
 // * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
 
 tmp<scalarField>
-nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcYPlus
+mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcYPlus
 (
     const scalarField& magUp
 ) const
@@ -60,7 +60,7 @@ nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcYPlus
 
     forAll(yPlus, faceI)
     {
-        scalar kappaRe = kappa_*magUp[facei]*y[faceI]/(muw[faceI]/rhow[faceI]);
+        scalar kappaRe = kappa_*magUp[faceI]*y[faceI]/(muw[faceI]/rhow[faceI]);
 
         scalar yp = yPlusLam;
         scalar ryPlusLam = 1.0/yp;
@@ -75,11 +75,10 @@ nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcYPlus
 
         } while (mag(ryPlusLam*(yp - yPlusLast)) > 0.01 && ++iter < 10);
 
-        yPlus[facei] = max(0.0, yp);
+        yPlus[faceI] = max(0.0, yp);
     }
 
     return tyPlus;
-
 }
 
 
@@ -151,10 +150,8 @@ mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcMut() const
 
     const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
     const scalar yPlusLam = rasModel.yPlusLam(kappa_, E_);
-    const scalarField& y = rasModel.y()[patchI];
     const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI];
     const scalarField magUp = mag(Uw.patchInternalField() - Uw);
-    const fvPatchScalarField& rhow = rasModel.rho().boundaryField()[patchI];
     const fvPatchScalarField& muw = rasModel.mu().boundaryField()[patchI];
 
     tmp<scalarField> tyPlus = calcYPlus(magUp);
@@ -165,10 +162,10 @@ mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::calcMut() const
 
     forAll(yPlus, faceI)
     {
-        if (yPlus[facei] > yPlusLam)
+        if (yPlus[faceI] > yPlusLam)
         {
             mutw[faceI] =
-                muw[faceI]*(yPlus[facei]*kappa_/log(E_*yPlus[facei]) - 1.0);
+                muw[faceI]*(yPlus[faceI]*kappa_/log(E_*yPlus[faceI]) - 1.0);
         }
     }
 
@@ -194,8 +191,7 @@ void mutSpalartAllmarasStandardWallFunctionFvPatchScalarField::write
 ) const
 {
     fvPatchField<scalar>::write(os);
-    os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
-    os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
+    writeLocalEntries(os);
     writeEntry("value", os);
 }
 
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 c8454c4c7fc7bf25f806010352a85d70181a8024..23874146ea1b65f91386026e2892e6a83c9e0190 100644
--- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.C
+++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutSpalartAllmarasWallFunction/mutSpalartAllmarasWallFunctionFvPatchScalarField.C
@@ -39,7 +39,7 @@ namespace compressible
 namespace RASModels
 {
 
-// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
+// * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
 
 tmp<scalarField> mutSpalartAllmarasWallFunctionFvPatchScalarField::calcUTau
 (
@@ -173,11 +173,8 @@ mutSpalartAllmarasWallFunctionFvPatchScalarField::calcMut() const
 
     const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
     const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI];
-
     const scalarField magGradU = mag(Uw.snGrad());
-
     const scalarField& rhow = rasModel.rho().boundaryField()[patchI];
-
     const scalarField& muw = rasModel.mu().boundaryField()[patchI];
 
     return max(0.0, rhow*sqr(calcUTau(magGradU))/magGradU - muw);
@@ -191,11 +188,8 @@ mutSpalartAllmarasWallFunctionFvPatchScalarField::yPlus() const
 
     const RASModel& rasModel = db().lookupObject<RASModel>("RASProperties");
     const scalarField& y = rasModel.y()[patchI];
-
     const fvPatchVectorField& Uw = rasModel.U().boundaryField()[patchI];
-
     const scalarField& rhow = rasModel.rho().boundaryField()[patchI];
-
     const scalarField& muw = rasModel.mu().boundaryField()[patchI];
 
     return y*calcUTau(mag(Uw.snGrad()))/(muw/rhow);
@@ -208,8 +202,7 @@ void mutSpalartAllmarasWallFunctionFvPatchScalarField::write
 ) const
 {
     fvPatchField<scalar>::write(os);
-    os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
-    os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
+    writeLocalEntries(os);
     writeEntry("value", os);
 }
 
diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C
index e7cdea1dea2b76f6f75565ddf6d3c5b1568fa810..dcd52cc4e1b5b54ba500334d068f7f815ccc9165 100644
--- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C
+++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C
@@ -189,10 +189,16 @@ tmp<scalarField> mutWallFunctionFvPatchScalarField::yPlus() const
 void mutWallFunctionFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchField<scalar>::write(os);
+    writeLocalEntries(os);
+    writeEntry("value", os);
+}
+
+
+void mutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
+{
     os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
     os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
     os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
-    writeEntry("value", os);
 }
 
 
diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H
index 962790c510161bf978d1368bd70a3ed057fd6c84..3945c345e9452db2a50337ca096fe25c7e2a2f35 100644
--- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H
+++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.H
@@ -79,6 +79,9 @@ protected:
         //- Calculate the turbulence viscosity
         virtual tmp<scalarField> calcMut() const;
 
+        //- Write local wall function variables
+        virtual void writeLocalEntries(Ostream&) const;
+
 
 public:
 
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C
index 49980bde5360ad2bc615fa5a92324a6e53bc61c6..e26e652a1aa66bfe497c47b4d661181659fc71c4 100644
--- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C
@@ -223,9 +223,7 @@ tmp<scalarField> nutRoughWallFunctionFvPatchScalarField::calcNut() const
 void nutRoughWallFunctionFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchField<scalar>::write(os);
-    os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
-    os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
-    os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
+    writeLocalEntries(os);
     Cs_.writeEntry("Cs", os);
     Ks_.writeEntry("Ks", os);
     writeEntry("value", os);
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C
index f44da462b9c5a0c9a42a45ddf94f96089e5d5b64..e2de2dae71e66b405f17e27aba5404ae6f076a80 100644
--- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C
@@ -294,15 +294,15 @@ void nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::write
     Ostream& os
 ) const
 {
-    fixedValueFvPatchScalarField::write(os);
-    os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
-    os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
+    fvPatchField<scalar>::write(os);
+    writeLocalEntries(os);
     os.writeKeyword("roughnessHeight")
         << roughnessHeight_ << token::END_STATEMENT << nl;
     os.writeKeyword("roughnessConstant")
         << roughnessConstant_ << token::END_STATEMENT << nl;
     os.writeKeyword("roughnessFudgeFactor")
         << roughnessFudgeFactor_ << token::END_STATEMENT << nl;
+    writeEntry("value", os);
 }
 
 
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 450c857a7561362e7976ec5e7e1af3a4f4b6053d..7bea1742fb8e66a6c552e30330a77e6fe48e824e 100644
--- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C
@@ -189,9 +189,9 @@ void nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::write
     Ostream& os
 ) const
 {
-    fixedValueFvPatchScalarField::write(os);
-    os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
-    os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
+    fvPatchField<scalar>::write(os);
+    writeLocalEntries(os);
+    writeEntry("value", os);
 }
 
 
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.C
index ff02c3043b3d67b37ab99eb6e4214ab5000f4c54..99187abb64279d758ebf32bd09db3303ed82d89a 100644
--- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.C
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.C
@@ -51,8 +51,7 @@ tmp<scalarField> nutSpalartAllmarasWallFunctionFvPatchScalarField::calcUTau
 
     const fvPatchVectorField& Uw =
         rasModel.U().boundaryField()[patch().index()];
-
-    scalarField magUp = mag(Uw.patchInternalField() - Uw);
+    const scalarField magUp = mag(Uw.patchInternalField() - Uw);
 
     const scalarField& nuw = rasModel.nu().boundaryField()[patch().index()];
     const scalarField& nutw = *this;
@@ -193,9 +192,9 @@ void nutSpalartAllmarasWallFunctionFvPatchScalarField::write
     Ostream& os
 ) const
 {
-    fixedValueFvPatchScalarField::write(os);
-    os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
-    os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
+    fvPatchField<scalar>::write(os);
+    writeLocalEntries(os);
+    writeEntry("value", os);
 }
 
 
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C
index 7a975c7326876af8dd6b82dc9a500a52482b1413..0fdefb2b51431dbf3116acf394e0e8c94db94b1d 100644
--- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C
@@ -40,7 +40,7 @@ namespace incompressible
 namespace RASModels
 {
 
-// * * * * * * * * * * * * * Private Member Functions  * * * * * * * * * * * //
+// * * * * * * * * * * * * Protected Member Functions  * * * * * * * * * * * //
 
 void nutWallFunctionFvPatchScalarField::checkType()
 {
@@ -158,7 +158,6 @@ tmp<scalarField> nutWallFunctionFvPatchScalarField::calcNut() const
 
     const scalar Cmu25 = pow(Cmu_, 0.25);
 
-
     tmp<scalarField> tnutw(new scalarField(patch().size(), 0.0));
     scalarField& nutw = tnutw();
 
@@ -197,10 +196,16 @@ tmp<scalarField> nutWallFunctionFvPatchScalarField::yPlus() const
 void nutWallFunctionFvPatchScalarField::write(Ostream& os) const
 {
     fvPatchField<scalar>::write(os);
+    writeLocalEntries(os);
+    writeEntry("value", os);
+}
+
+
+void nutWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const
+{
     os.writeKeyword("Cmu") << Cmu_ << token::END_STATEMENT << nl;
     os.writeKeyword("kappa") << kappa_ << token::END_STATEMENT << nl;
     os.writeKeyword("E") << E_ << token::END_STATEMENT << nl;
-    writeEntry("value", os);
 }
 
 
diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H
index d37d63f53b27455cd27e0938de5da25ffb3df8d0..cb68c36f1f285a5ec4e9467d2078ca7350ce0bb4 100644
--- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H
+++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H
@@ -79,6 +79,9 @@ protected:
         //- Calculate the turbulence viscosity
         virtual tmp<scalarField> calcNut() const;
 
+        //- Write local wall function variables
+        virtual void writeLocalEntries(Ostream&) const;
+
 
 public: