diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index 226d6ab39d..2513312e2e 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -96,11 +96,6 @@ void epsilonWallFunctionFvPatchScalarField::setMaster() void epsilonWallFunctionFvPatchScalarField::createAveragingWeights() { - if (initialised_) - { - return; - } - const volScalarField& epsilon = static_cast(this->dimensionedInternalField()); @@ -108,6 +103,11 @@ void epsilonWallFunctionFvPatchScalarField::createAveragingWeights() const fvMesh& mesh = epsilon.mesh(); + if (initialised_ && !mesh.changing()) + { + return; + } + volScalarField weights ( IOobject diff --git a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index 375d4c6c44..c8f8b93fc6 100644 --- a/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/TurbulenceModels/turbulenceModels/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -98,11 +98,6 @@ void omegaWallFunctionFvPatchScalarField::setMaster() void omegaWallFunctionFvPatchScalarField::createAveragingWeights() { - if (initialised_) - { - return; - } - const volScalarField& omega = static_cast(this->dimensionedInternalField()); @@ -110,6 +105,11 @@ void omegaWallFunctionFvPatchScalarField::createAveragingWeights() const fvMesh& mesh = omega.mesh(); + if (initialised_ && !mesh.changing()) + { + return; + } + volScalarField weights ( IOobject diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index b0899d12f6..1bf17b6fad 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -98,11 +98,6 @@ void epsilonWallFunctionFvPatchScalarField::setMaster() void epsilonWallFunctionFvPatchScalarField::createAveragingWeights() { - if (initialised_) - { - return; - } - const volScalarField& epsilon = static_cast(this->dimensionedInternalField()); @@ -110,6 +105,11 @@ void epsilonWallFunctionFvPatchScalarField::createAveragingWeights() const fvMesh& mesh = epsilon.mesh(); + if (initialised_ && !mesh.changing()) + { + return; + } + volScalarField weights ( IOobject diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index 4fa243302b..89d4782aa3 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -100,11 +100,6 @@ void omegaWallFunctionFvPatchScalarField::setMaster() void omegaWallFunctionFvPatchScalarField::createAveragingWeights() { - if (initialised_) - { - return; - } - const volScalarField& omega = static_cast(this->dimensionedInternalField()); @@ -112,6 +107,11 @@ void omegaWallFunctionFvPatchScalarField::createAveragingWeights() const fvMesh& mesh = omega.mesh(); + if (initialised_ && !mesh.changing()) + { + return; + } + volScalarField weights ( IOobject diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index 9a8841f784..2437271e26 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -98,11 +98,6 @@ void epsilonWallFunctionFvPatchScalarField::setMaster() void epsilonWallFunctionFvPatchScalarField::createAveragingWeights() { - if (initialised_) - { - return; - } - const volScalarField& epsilon = static_cast(this->dimensionedInternalField()); @@ -110,6 +105,11 @@ void epsilonWallFunctionFvPatchScalarField::createAveragingWeights() const fvMesh& mesh = epsilon.mesh(); + if (initialised_ && !mesh.changing()) + { + return; + } + volScalarField weights ( IOobject diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index 066f03a0b7..ebc195ece6 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -100,11 +100,6 @@ void omegaWallFunctionFvPatchScalarField::setMaster() void omegaWallFunctionFvPatchScalarField::createAveragingWeights() { - if (initialised_) - { - return; - } - const volScalarField& omega = static_cast(this->dimensionedInternalField()); @@ -112,6 +107,11 @@ void omegaWallFunctionFvPatchScalarField::createAveragingWeights() const fvMesh& mesh = omega.mesh(); + if (initialised_ && !mesh.changing()) + { + return; + } + volScalarField weights ( IOobject