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 a826fdf5e3..fff165e15e 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -26,10 +26,11 @@ License #include "omegaWallFunctionFvPatchScalarField.H" #include "compressible/turbulenceModel/turbulenceModel.H" #include "fvPatchFieldMapper.H" +#include "fvMatrix.H" #include "volFields.H" -#include "addToRunTimeSelectionTable.H" -#include "mutWallFunctionFvPatchScalarField.H" #include "wallFvPatch.H" +#include "mutWallFunctionFvPatchScalarField.H" +#include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -63,6 +64,198 @@ void omegaWallFunctionFvPatchScalarField::writeLocalEntries(Ostream& os) const } +void omegaWallFunctionFvPatchScalarField::setMaster() +{ + if (master_ != -1) + { + return; + } + + const volScalarField& omega = + static_cast(this->dimensionedInternalField()); + + const volScalarField::GeometricBoundaryField& bf = omega.boundaryField(); + + label master = -1; + forAll(bf, patchI) + { + if (isA(bf[patchI])) + { + omegaWallFunctionFvPatchScalarField& epf = omegaPatch(patchI); + + if (master == -1) + { + master = patchI; + } + + epf.master() = master; + } + } +} + + +void omegaWallFunctionFvPatchScalarField::createAveragingWeights() +{ + if (initialised_) + { + return; + } + + const volScalarField& omega = + static_cast(this->dimensionedInternalField()); + + const volScalarField::GeometricBoundaryField& bf = omega.boundaryField(); + + const fvMesh& mesh = omega.mesh(); + + volScalarField weights + ( + IOobject + ( + "weights", + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE, + false // do not register + ), + mesh, + dimensionedScalar("zero", dimless, 0.0) + ); + + DynamicList