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 c640523293..49980bde53 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutRoughWallFunction/nutRoughWallFunctionFvPatchScalarField.C @@ -170,7 +170,7 @@ tmp nutRoughWallFunctionFvPatchScalarField::calcNut() const const scalar Cmu25 = pow(Cmu_, 0.25); - tmp tnutw(scalarField(patch().size(), 0.0)); + tmp tnutw(new scalarField(patch().size(), 0.0)); scalarField& nutw = tnutw(); forAll(nutw, faceI) 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 62ab4dc93d..7359e6f081 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardRoughWallFunction/nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField.C @@ -130,9 +130,7 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::calcNut() const // The flow velocity at the adjacent cell centre scalarField magUp = mag(Uw.patchInternalField() - Uw); - scalarField magFaceGradU = mag(Uw.snGrad()); - - tmp tnutw(scalarField(patch().size(), 0.0)); + tmp tnutw(new scalarField(patch().size(), 0.0)); scalarField& nutw = tnutw(); if (roughnessHeight_ > 0.0) @@ -262,22 +260,11 @@ nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::yPlus() const { notImplemented ( - "nutSpalartAllmarasWallFunctionFvPatchScalarField::yPlus() const" + "nutSpalartAllmarasStandardRoughWallFunctionFvPatchScalarField::yPlus()" + "const" ); return tmp(NULL); -/* - const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalarField& y = rasModel.y()[patch().index()]; - - const volScalarField& kw = db().lookupObject(kName_); - const scalarField& kwc = - kw.boundaryField()[patch.index()].patchInternalField() - const scalarField& nuw = - patch().lookupPatchField(nuName_); - - return pow(Cmu_, 0.25)*y*sqrt(kwc)/nuw; -*/ } 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 f4522b2c01..aef85e9b38 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasStandardWallFunction/nutSpalartAllmarasStandardWallFunctionFvPatchScalarField.C @@ -150,22 +150,11 @@ nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::yPlus() const { notImplemented ( - "nutSpalartAllmarasWallFunctionFvPatchScalarField::yPlus() const" + "nutSpalartAllmarasStandardWallFunctionFvPatchScalarField::yPlus() " + "const" ); return tmp(NULL); -/* - const RASModel& rasModel = db().lookupObject("RASProperties"); - const scalarField& y = rasModel.y()[patch().index()]; - - const volScalarField& kw = db().lookupObject(kName_); - const scalarField& kwc = - kw.boundaryField()[patch.index()].patchInternalField() - const scalarField& nuw = - patch().lookupPatchField(nuName_); - - return pow(Cmu_, 0.25)*y*sqrt(kwc)/nuw; -*/ } 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 cc3eb61c0d..80aa3e3199 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutSpalartAllmarasWallFunction/nutSpalartAllmarasWallFunctionFvPatchScalarField.C @@ -82,7 +82,7 @@ tmp nutSpalartAllmarasWallFunctionFvPatchScalarField::calcUTau + 1/E_*(fkUu - 1.0/6.0*kUu*sqr(kUu)); scalar df = - 1.0*y[facei]/nuw[facei] + y[facei]/nuw[facei] + magUpara/sqr(ut) + 1/E_*kUu*fkUu/ut;