From 30947d15717ad74f6e278ae02fe0fac294ef4f99 Mon Sep 17 00:00:00 2001 From: Henry Date: Sun, 18 May 2014 21:19:58 +0100 Subject: [PATCH] wallFunctions: Handle moving meshes --- .../epsilonWallFunctionFvPatchScalarField.C | 10 +++++----- .../omegaWallFunctionFvPatchScalarField.C | 10 +++++----- .../epsilonWallFunctionFvPatchScalarField.C | 10 +++++----- .../omegaWallFunctionFvPatchScalarField.C | 10 +++++----- .../epsilonWallFunctionFvPatchScalarField.C | 10 +++++----- .../omegaWallFunctionFvPatchScalarField.C | 10 +++++----- 6 files changed, 30 insertions(+), 30 deletions(-) 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 226d6ab3..2513312e 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 375d4c6c..c8f8b93f 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 b0899d12..1bf17b6f 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 4fa24330..89d4782a 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 9a8841f7..2437271e 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 066f03a0..ebc195ec 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