From 0c45c495993ac5a600e4b151f4baaf9fc306628b Mon Sep 17 00:00:00 2001 From: Henrik Rusche Date: Fri, 14 Jan 2011 13:16:23 +0100 Subject: [PATCH 01/69] Enable turbulent walls for coupled patches --- .../regionCouple/regionCouplePolyPatch.C | 7 ++++++- .../regionCouple/regionCouplePolyPatch.H | 14 ++++++++++++-- .../polyPatches/derived/wall/wallPolyPatch.H | 5 +++++ .../polyMesh/polyPatches/polyPatch/polyPatch.H | 6 ++++++ .../fvMesh/fvPatches/fvPatch/fvPatch.H | 11 +++++++---- src/finiteVolume/fvMesh/wallDist/nearWallDist.C | 17 +++++++++++++++-- src/finiteVolume/fvMesh/wallDist/wallDist.C | 15 +++++++++++++-- src/finiteVolume/fvMesh/wallDist/wallDistData.C | 13 ++++++++++++- .../epsilonWallFunctionFvPatchScalarField.C | 4 +++- .../kqRWallFunctionFvPatchField.C | 6 +++++- 10 files changed, 84 insertions(+), 14 deletions(-) diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/regionCouple/regionCouplePolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/regionCouple/regionCouplePolyPatch.C index 94f649c66..f4b4b84cd 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/regionCouple/regionCouplePolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/regionCouple/regionCouplePolyPatch.C @@ -172,13 +172,15 @@ Foam::regionCouplePolyPatch::regionCouplePolyPatch const polyBoundaryMesh& bm, const word& shadowRegionName, const word& shadowPatchName, - const bool attached + const bool attached, + const bool attachedWalls ) : coupledPolyPatch(name, size, start, index, bm), shadowRegionName_(shadowRegionName), shadowPatchName_(shadowPatchName), attached_(attached), + attachedWalls_(attachedWalls), shadowIndex_(-1), patchToPatchPtr_(NULL), reconFaceCellCentresPtr_(NULL) @@ -198,6 +200,7 @@ Foam::regionCouplePolyPatch::regionCouplePolyPatch shadowRegionName_(dict.lookup("shadowRegion")), shadowPatchName_(dict.lookup("shadowPatch")), attached_(dict.lookup("attached")), + attachedWalls_(dict.lookup("attachedWalls")), shadowIndex_(-1), patchToPatchPtr_(NULL), reconFaceCellCentresPtr_(NULL) @@ -215,6 +218,7 @@ Foam::regionCouplePolyPatch::regionCouplePolyPatch shadowRegionName_(pp.shadowRegionName_), shadowPatchName_(pp.shadowPatchName_), attached_(pp.attached_), + attachedWalls_(pp.attachedWalls_), shadowIndex_(-1), patchToPatchPtr_(NULL), reconFaceCellCentresPtr_(NULL) @@ -235,6 +239,7 @@ Foam::regionCouplePolyPatch::regionCouplePolyPatch shadowRegionName_(pp.shadowRegionName_), shadowPatchName_(pp.shadowPatchName_), attached_(pp.attached_), + attachedWalls_(pp.attachedWalls_), shadowIndex_(-1), patchToPatchPtr_(NULL), reconFaceCellCentresPtr_(NULL) diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/regionCouple/regionCouplePolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/regionCouple/regionCouplePolyPatch.H index a4600f373..ed42b65fa 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/regionCouple/regionCouplePolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/constraint/regionCouple/regionCouplePolyPatch.H @@ -69,6 +69,9 @@ class regionCouplePolyPatch //- Are the regions attached mutable Switch attached_; + //- Are the region attached walls + mutable Switch attachedWalls_; + //- Shadow patch index. Delayed evaluation for construction mutable label shadowIndex_; @@ -85,7 +88,7 @@ class regionCouplePolyPatch //- Calculate interpolation void calcInterpolation() const; - + protected: // Protected Member functions @@ -139,7 +142,8 @@ public: const polyBoundaryMesh& bm, const word& shadowRegionName, const word& shadowPatchName, - const bool attached + const bool attached, + const bool attachedWall ); //- Construct from dictionary @@ -233,6 +237,12 @@ public: return attached_; } + //AJ: read from dictionary if coupled patch is also a wall + bool isWall() const + { + return attachedWalls_; + } + //- Attach regions void attach() const; diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/derived/wall/wallPolyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/derived/wall/wallPolyPatch.H index 68f469a8d..b7af899c2 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/derived/wall/wallPolyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/derived/wall/wallPolyPatch.H @@ -114,6 +114,11 @@ public: ); } + // Virtual function for wall handling of derived class + virtual bool isWall() const + { + return true; + } // Destructor diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H index 98b43c005..6230f0365 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H @@ -368,6 +368,12 @@ public: return false; } + // Virtual function for wall handling of all derived calsses + virtual bool isWall() const + { + return false; + } + //- Return true if the given type is a constraint type static bool constraintType(const word& pt); diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H index 15cfa54b9..72dcfcc4d 100644 --- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H @@ -170,6 +170,12 @@ public: return polyPatch_.coupled(); } + //- Return true if this patch is wall + bool isWall() const + { + return polyPatch_.isWall(); + } + //- Return true if the given type is a constraint type static bool constraintType(const word& pt); @@ -200,10 +206,7 @@ public: } template - const typename Field::subField patchSlice - ( - const Field& l - ) const + const typename Field::subField patchSlice(const Field& l) const { return typename Field::subField ( diff --git a/src/finiteVolume/fvMesh/wallDist/nearWallDist.C b/src/finiteVolume/fvMesh/wallDist/nearWallDist.C index 518bf72c5..b5540354a 100644 --- a/src/finiteVolume/fvMesh/wallDist/nearWallDist.C +++ b/src/finiteVolume/fvMesh/wallDist/nearWallDist.C @@ -36,8 +36,19 @@ void Foam::nearWallDist::doAll() { cellDistFuncs wallUtils(mesh_); + // AJ: make sure to pick up all patches that are specified as a wall + const polyBoundaryMesh& bMesh = wallUtils.mesh().boundaryMesh(); + labelHashSet wallPatchIDs(bMesh.size()); + forAll(bMesh, patchI) + { + if (bMesh[patchI].isWall()) + { + wallPatchIDs.insert(patchI); + } + } + // Get patch ids of walls - labelHashSet wallPatchIDs(wallUtils.getPatchIDs()); + // labelHashSet wallPatchIDs(wallUtils.getPatchIDs()); // Size neighbours array for maximum possible @@ -54,7 +65,9 @@ void Foam::nearWallDist::doAll() const fvPatch& patch = mesh_.boundary()[patchI]; - if (isA(patch)) + // AJ: Allow other patch types to be seen as a wall type + // if (isA(patch)) + if (patch.isWall()) { const polyPatch& pPatch = patch.patch(); diff --git a/src/finiteVolume/fvMesh/wallDist/wallDist.C b/src/finiteVolume/fvMesh/wallDist/wallDist.C index 7faf9d464..4279f03da 100644 --- a/src/finiteVolume/fvMesh/wallDist/wallDist.C +++ b/src/finiteVolume/fvMesh/wallDist/wallDist.C @@ -67,13 +67,24 @@ Foam::wallDist::~wallDist() // future (if only small topology change) void Foam::wallDist::correct() { + // AJ: make sure to pick up all patches that are specified as a wall + const polyBoundaryMesh& bMesh = cellDistFuncs::mesh().boundaryMesh(); + labelHashSet wallPatchIDs(bMesh.size()); + forAll(bMesh, patchI) + { + if (bMesh[patchI].isWall()) + { + wallPatchIDs.insert(patchI); + } + } + // Get patchids of walls - labelHashSet wallPatchIDs(getPatchIDs()); + // labelHashSet wallPatchIDs(getPatchIDs()); // Calculate distance starting from wallPatch faces. patchWave wave(cellDistFuncs::mesh(), wallPatchIDs, correctWalls_); - // Transfer cell values from wave into *this + // Transfer cell values from wave into *this transfer(wave.distance()); // Transfer values on patches into boundaryField of *this diff --git a/src/finiteVolume/fvMesh/wallDist/wallDistData.C b/src/finiteVolume/fvMesh/wallDist/wallDistData.C index 98aa64a08..e0a2f90a2 100644 --- a/src/finiteVolume/fvMesh/wallDist/wallDistData.C +++ b/src/finiteVolume/fvMesh/wallDist/wallDistData.C @@ -73,14 +73,25 @@ Foam::wallDistData::~wallDistData() template void Foam::wallDistData::correct() { + Info<< "wallDistData.correct() called" << endl; const polyMesh& mesh = cellDistFuncs::mesh(); // // Fill data on wall patches with initial values // + const polyBoundaryMesh& bMesh = mesh.boundaryMesh(); + labelHashSet wallPatchIDs(bMesh.size()); + forAll(bMesh, patchI) + { + if (bMesh[patchI].isWall()) + { + wallPatchIDs.insert(patchI); + } + } + // Get patchids of walls - labelHashSet wallPatchIDs(getPatchIDs()); + // labelHashSet wallPatchIDs(getPatchIDs()); // Collect pointers to data on patches UPtrList > patchData(mesh.boundaryMesh().size()); 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 c62b0999a..8aa6ebad6 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -44,7 +44,9 @@ namespace RASModels void epsilonWallFunctionFvPatchScalarField::checkType() { - if (!isA(patch())) + // AJ: Allow other patch types to be seen as wall type + // if (!isA(patch())) + if (!this->patch().isWall()) { FatalErrorIn("epsilonWallFunctionFvPatchScalarField::checkType()") << "Invalid wall function specification" << nl diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C index 98dfa140c..2cdb67f65 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C @@ -28,6 +28,8 @@ License #include "fvPatchFieldMapper.H" #include "addToRunTimeSelectionTable.H" #include "wallFvPatch.H" +#include "regionCoupleFvPatch.H" +#include "movingWallVelocityFvPatchVectorField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -43,7 +45,9 @@ namespace RASModels template void kqRWallFunctionFvPatchField::checkType() { - if (!isA(this->patch())) + // AJ: Allow other patch types to be seemovingWalln as wall type + // if (!isA(this->patch())) + if (!this->patch().isWall()) { FatalErrorIn("kqRWallFunctionFvPatchField::checkType()") << "Invalid wall function specification" << nl From 04f39480cb0ae8c77b52a10b86a5d505117257f8 Mon Sep 17 00:00:00 2001 From: Henrik Rusche Date: Fri, 14 Jan 2011 15:47:57 +0100 Subject: [PATCH 02/69] changed isA & isA almost everywhere --- .../postProcessing/wall/wallHeatFlux/wallHeatFlux.C | 3 +-- .../utilities/postProcessing/wall/yPlusLES/yPlusLES.C | 2 +- .../applyWallFunctionBoundaryConditions.C | 4 +--- src/finiteVolume/fvMesh/wallDist/nearWallDist.C | 3 --- src/finiteVolume/fvMesh/wallDist/nearWallDistNoSearch.C | 3 +-- src/finiteVolume/fvMesh/wallDist/reflectionVectors.C | 3 +-- .../cellPointWeightWallModified.C | 3 +-- src/lagrangian/dieselSpray/parcel/boundaryTreatment.H | 2 +- .../spraySubModels/wallModel/reflectParcel/reflectParcel.C | 3 +-- .../LocalInteraction/LocalInteraction.C | 2 +- .../StandardWallInteraction/StandardWallInteraction.C | 2 +- .../functionObjects/utilities/dsmcFields/dsmcFields.C | 2 +- .../alphaSgsJayatillekeWallFunctionFvPatchScalarField.C | 3 +-- .../alphaSgsWallFunctionFvPatchScalarField.C | 3 +-- .../compressible/LES/vanDriestDelta/vanDriestDelta.C | 3 +-- src/turbulenceModels/compressible/RAS/LRR/LRR.C | 5 ++--- .../compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C | 5 ++--- src/turbulenceModels/compressible/RAS/RASModel/RASModel.C | 3 +-- .../wallFunctions/backwardsCompatibilityWallFunctions.C | 6 +++--- .../backwardsCompatibilityWallFunctionsTemplates.C | 4 +--- .../epsilonWallFunctionFvPatchScalarField.C | 3 +-- .../kqRWallFunction/kqRWallFunctionFvPatchField.C | 2 +- .../mutWallFunction/mutWallFunctionFvPatchScalarField.C | 3 +-- .../mutkWallFunction/mutkWallFunctionFvPatchScalarField.C | 3 +-- .../omegaWallFunction/omegaWallFunctionFvPatchScalarField.C | 3 +-- .../incompressible/LES/vanDriestDelta/vanDriestDelta.C | 3 +-- src/turbulenceModels/incompressible/RAS/LRR/LRR.C | 5 ++--- .../RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C | 5 ++--- .../LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H | 6 +++--- .../LienLeschzinerLowReSetWallDissipation.H | 6 +++--- src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C | 3 +-- .../wallFunctions/backwardsCompatibilityWallFunctions.C | 4 ++-- .../backwardsCompatibilityWallFunctionsTemplates.C | 4 +--- .../epsilonWallFunctionFvPatchScalarField.C | 3 --- .../kqRWallFunction/kqRWallFunctionFvPatchField.C | 4 ---- .../nutWallFunction/nutWallFunctionFvPatchScalarField.C | 3 +-- .../nutkWallFunction/nutkWallFunctionFvPatchScalarField.C | 3 +-- .../omegaWallFunction/omegaWallFunctionFvPatchScalarField.C | 3 +-- .../incompressible/RAS/include/nonLinearWallFunctionsI.H | 6 +++--- .../incompressible/RAS/include/wallDissipationI.H | 2 +- .../incompressible/RAS/include/wallNonlinearViscosityI.H | 2 +- 41 files changed, 51 insertions(+), 89 deletions(-) diff --git a/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C b/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C index 8bcba3ecb..2de998dac 100644 --- a/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C +++ b/applications/utilities/postProcessing/wall/wallHeatFlux/wallHeatFlux.C @@ -35,7 +35,6 @@ Description #include "fvCFD.H" #include "hCombustionThermo.H" #include "RASModel.H" -#include "wallFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -64,7 +63,7 @@ int main(int argc, char *argv[]) Info<< "\nWall heat fluxes [W]" << endl; forAll(patchHeatFlux, patchi) { - if (isA(mesh.boundary()[patchi])) + if (mesh.boundary()[patchi].isWall()) { Info<< mesh.boundary()[patchi].name() << " " diff --git a/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C b/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C index 868ae7cef..2c2f1412c 100644 --- a/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C +++ b/applications/utilities/postProcessing/wall/yPlusLES/yPlusLES.C @@ -109,7 +109,7 @@ int main(int argc, char *argv[]) { const fvPatch& currPatch = patches[patchi]; - if (isA(currPatch)) + if (currPatch.isWall()) { yPlus.boundaryField()[patchi] = d[patchi] diff --git a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C b/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C index a71eaa4b0..cada9f588 100644 --- a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C +++ b/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C @@ -39,8 +39,6 @@ Description #include "volFields.H" #include "surfaceFields.H" -#include "wallPolyPatch.H" - #include "incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.H" #include "incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.H" #include "incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.H" @@ -203,7 +201,7 @@ void replaceBoundaryType dictionary& boundaryDict = dict.subDict("boundaryField"); forAll(bMesh, patchI) { - if (isA(bMesh[patchI])) + if (bMesh[patchI].isWall()) { word patchName = bMesh[patchI].name(); dictionary& oldPatch = boundaryDict.subDict(patchName); diff --git a/src/finiteVolume/fvMesh/wallDist/nearWallDist.C b/src/finiteVolume/fvMesh/wallDist/nearWallDist.C index b5540354a..b8cf63f05 100644 --- a/src/finiteVolume/fvMesh/wallDist/nearWallDist.C +++ b/src/finiteVolume/fvMesh/wallDist/nearWallDist.C @@ -27,7 +27,6 @@ License #include "nearWallDist.H" #include "fvMesh.H" #include "cellDistFuncs.H" -#include "wallFvPatch.H" #include "surfaceFields.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -65,8 +64,6 @@ void Foam::nearWallDist::doAll() const fvPatch& patch = mesh_.boundary()[patchI]; - // AJ: Allow other patch types to be seen as a wall type - // if (isA(patch)) if (patch.isWall()) { const polyPatch& pPatch = patch.patch(); diff --git a/src/finiteVolume/fvMesh/wallDist/nearWallDistNoSearch.C b/src/finiteVolume/fvMesh/wallDist/nearWallDistNoSearch.C index 5747eef3c..f2fa84f75 100644 --- a/src/finiteVolume/fvMesh/wallDist/nearWallDistNoSearch.C +++ b/src/finiteVolume/fvMesh/wallDist/nearWallDistNoSearch.C @@ -27,7 +27,6 @@ License #include "nearWallDistNoSearch.H" #include "fvMesh.H" #include "wallPoint.H" -#include "wallFvPatch.H" #include "surfaceFields.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -41,7 +40,7 @@ void Foam::nearWallDistNoSearch::doAll() { fvPatchScalarField& ypatch = operator[](patchI); - if (isA(patches[patchI])) + if (patches[patchI].isWall()) { const unallocLabelList& faceCells = patches[patchI].faceCells(); diff --git a/src/finiteVolume/fvMesh/wallDist/reflectionVectors.C b/src/finiteVolume/fvMesh/wallDist/reflectionVectors.C index e80f821fb..8b1a31946 100644 --- a/src/finiteVolume/fvMesh/wallDist/reflectionVectors.C +++ b/src/finiteVolume/fvMesh/wallDist/reflectionVectors.C @@ -25,7 +25,6 @@ License \*---------------------------------------------------------------------------*/ #include "reflectionVectors.H" -#include "wallFvPatch.H" #include "surfaceFields.H" // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -60,7 +59,7 @@ void Foam::reflectionVectors::correct() forAll(patches, patchi) { // find the nearest face for every cell - if (isA(patches[patchi])) + if (patches[patchi].isWall()) { n_.boundaryField()[patchi] = mesh.Sf().boundaryField()[patchi] diff --git a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C index 22c074b09..251711695 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C +++ b/src/finiteVolume/interpolation/interpolation/interpolationCellPointWallModified/cellPointWeightWallModified/cellPointWeightWallModified.C @@ -25,7 +25,6 @@ License \*---------------------------------------------------------------------------*/ #include "cellPointWeightWallModified.H" -#include "wallPolyPatch.H" #include "polyMesh.H" #include "polyBoundaryMesh.H" @@ -51,7 +50,7 @@ Foam::cellPointWeightWallModified::cellPointWeightWallModified label patchI = bm.whichPatch(faceIndex); if (patchI != -1) { - if (isA(bm[patchI])) + if (bm[patchI].isWall()) { // Apply cell centre value wall faces weights_[0] = 0.0; diff --git a/src/lagrangian/dieselSpray/parcel/boundaryTreatment.H b/src/lagrangian/dieselSpray/parcel/boundaryTreatment.H index b8702112f..9e1e51d24 100644 --- a/src/lagrangian/dieselSpray/parcel/boundaryTreatment.H +++ b/src/lagrangian/dieselSpray/parcel/boundaryTreatment.H @@ -1,4 +1,4 @@ -if (isA(pbMesh[patch(face())])) +if (pbMesh[patch(face())].isWall()) { keepParcel = sDB.wall().wallTreatment(*this, face()); diff --git a/src/lagrangian/dieselSpray/spraySubModels/wallModel/reflectParcel/reflectParcel.C b/src/lagrangian/dieselSpray/spraySubModels/wallModel/reflectParcel/reflectParcel.C index d30544374..c880a9a96 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/wallModel/reflectParcel/reflectParcel.C +++ b/src/lagrangian/dieselSpray/spraySubModels/wallModel/reflectParcel/reflectParcel.C @@ -26,7 +26,6 @@ License #include "reflectParcel.H" #include "addToRunTimeSelectionTable.H" -#include "wallPolyPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -82,7 +81,7 @@ bool reflectParcel::wallTreatment const polyMesh& mesh = spray_.mesh(); - if (isA(mesh_.boundaryMesh()[patchi])) + if (mesh_.boundaryMesh()[patchi].isWall()) { // wallNormal defined to point outwards of domain vector Sf = mesh_.Sf().boundaryField()[patchi][facei]; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C index d0d7c87aa..6874cf0b5 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/LocalInteraction/LocalInteraction.C @@ -81,7 +81,7 @@ Foam::LocalInteraction::LocalInteraction { if ( - isA(bMesh[patchI]) + bMesh[patchI].isWall() && applyToPatch(bMesh[patchI].index()) < 0 ) { diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C index ccbbe5bc3..c74990ba2 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/StandardWallInteraction/StandardWallInteraction.C @@ -102,7 +102,7 @@ bool Foam::StandardWallInteraction::correct vector& U ) const { - if (isA(pp)) + if (pp.isWall()) { switch (interactionType_) { diff --git a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C index 3166856af..fdc48e59a 100644 --- a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C +++ b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C @@ -220,7 +220,7 @@ void Foam::dsmcFields::write() { const polyPatch& patch = mesh.boundaryMesh()[i]; - if (isA(patch)) + if (patch.isWall()) { p.boundaryField()[i] = fDMean.boundaryField()[i] diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C index 8f7c6856a..b833ad996 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsJayatillekeWallFunction/alphaSgsJayatillekeWallFunctionFvPatchScalarField.C @@ -29,7 +29,6 @@ License #include "fvPatchFieldMapper.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -50,7 +49,7 @@ label alphaSgsJayatillekeWallFunctionFvPatchScalarField::maxIters_ = 10; void alphaSgsJayatillekeWallFunctionFvPatchScalarField::checkType() { - if (!isA(patch())) + if (!patch().isWall()) { FatalErrorIn ( diff --git a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.C index b57c6e280..23d648e49 100644 --- a/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/LES/derivedFvPatchFields/wallFunctions/alphaSgsWallFunctions/alphaSgsWallFunction/alphaSgsWallFunctionFvPatchScalarField.C @@ -29,7 +29,6 @@ License #include "fvPatchFieldMapper.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,7 +43,7 @@ namespace LESModels void alphaSgsWallFunctionFvPatchScalarField::checkType() { - if (!isA(patch())) + if (!patch().isWall()) { FatalErrorIn ( diff --git a/src/turbulenceModels/compressible/LES/vanDriestDelta/vanDriestDelta.C b/src/turbulenceModels/compressible/LES/vanDriestDelta/vanDriestDelta.C index 367631381..39f8a20d9 100644 --- a/src/turbulenceModels/compressible/LES/vanDriestDelta/vanDriestDelta.C +++ b/src/turbulenceModels/compressible/LES/vanDriestDelta/vanDriestDelta.C @@ -26,7 +26,6 @@ License #include "vanDriestDelta.H" #include "LESModel.H" -#include "wallFvPatch.H" #include "wallDistData.H" #include "wallPointYPlus.H" #include "addToRunTimeSelectionTable.H" @@ -71,7 +70,7 @@ void vanDriestDelta::calcDelta() const fvPatchList& patches = mesh_.boundary(); forAll(patches, patchi) { - if (isA(patches[patchi])) + if (patches[patchi].isWall()) { const fvPatchVectorField& Uw = U.boundaryField()[patchi]; const scalarField& rhow = rho.boundaryField()[patchi]; diff --git a/src/turbulenceModels/compressible/RAS/LRR/LRR.C b/src/turbulenceModels/compressible/RAS/LRR/LRR.C index e524d9214..afaaa18e2 100644 --- a/src/turbulenceModels/compressible/RAS/LRR/LRR.C +++ b/src/turbulenceModels/compressible/RAS/LRR/LRR.C @@ -26,7 +26,6 @@ License #include "LRR.H" #include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" #include "backwardsCompatibilityWallFunctions.H" @@ -370,7 +369,7 @@ void LRR::correct() { const fvPatch& curPatch = patches[patchi]; - if (isA(curPatch)) + if (curPatch.isWall()) { forAll(curPatch, facei) { @@ -432,7 +431,7 @@ void LRR::correct() { const fvPatch& curPatch = patches[patchi]; - if (isA(curPatch)) + if (curPatch.isWall()) { symmTensorField& Rw = R_.boundaryField()[patchi]; diff --git a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C index 61cc2d626..b5076d8eb 100644 --- a/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ b/src/turbulenceModels/compressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C @@ -26,7 +26,6 @@ License #include "LaunderGibsonRSTM.H" #include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" #include "backwardsCompatibilityWallFunctions.H" @@ -408,7 +407,7 @@ void LaunderGibsonRSTM::correct() { const fvPatch& curPatch = patches[patchi]; - if (isA(curPatch)) + if (curPatch.isWall()) { forAll(curPatch, facei) { @@ -478,7 +477,7 @@ void LaunderGibsonRSTM::correct() { const fvPatch& curPatch = patches[patchi]; - if (isA(curPatch)) + if (curPatch.isWall()) { symmTensorField& Rw = R_.boundaryField()[patchi]; diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C index 346b2ea7f..d72f0c54a 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C @@ -25,7 +25,6 @@ License \*---------------------------------------------------------------------------*/ #include "RASModel.H" -#include "wallFvPatch.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -174,7 +173,7 @@ tmp RASModel::yPlus(const label patchNo, const scalar Cmu) const tmp tYp(new scalarField(curPatch.size())); scalarField& Yp = tYp(); - if (isA(curPatch)) + if (curPatch.isWall()) { Yp = pow(Cmu, 0.25) *y_[patchNo] diff --git a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C index 40fcb14a1..234d45228 100644 --- a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C +++ b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C @@ -74,7 +74,7 @@ tmp autoCreateAlphat forAll(bm, patchI) { - if (isA(bm[patchI])) + if (bm[patchI].isWall()) { alphatBoundaryTypes[patchI] = RASModels::alphatWallFunctionFvPatchScalarField::typeName; @@ -144,7 +144,7 @@ tmp autoCreateMut forAll(bm, patchI) { - if (isA(bm[patchI])) + if (bm[patchI].isWall()) { mutBoundaryTypes[patchI] = RASModels::mutWallFunctionFvPatchScalarField::typeName; @@ -214,7 +214,7 @@ tmp autoCreateLowReMut forAll(bm, patchI) { - if (isA(bm[patchI])) + if (bm[patchI].isWall()) { mutBoundaryTypes[patchI] = RASModels::mutLowReWallFunctionFvPatchScalarField::typeName; diff --git a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C index 16ae23e37..a99f4e50a 100644 --- a/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C +++ b/src/turbulenceModels/compressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C @@ -28,8 +28,6 @@ License #include "Time.H" #include "OSspecific.H" -#include "wallFvPatch.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -111,7 +109,7 @@ autoCreateWallFunctionField forAll(newPatchFields, patchI) { - if (isA(mesh.boundary()[patchI])) + if (mesh.boundary()[patchI].isWall()) { newPatchFields.set ( 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 d4176e8d8..30d89c26c 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -29,7 +29,6 @@ License #include "fvPatchFieldMapper.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,7 +43,7 @@ namespace RASModels void epsilonWallFunctionFvPatchScalarField::checkType() { - if (!isA(patch())) + if (!patch().isWall()) { FatalErrorIn("epsilonWallFunctionFvPatchScalarField::checkType()") << "Invalid wall function specification" << nl diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C index 8acc00069..3ccf6b253 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C @@ -43,7 +43,7 @@ namespace RASModels template void kqRWallFunctionFvPatchField::checkType() { - if (!isA(this->patch())) + if (!this->patch().isWall()) { FatalErrorIn("kqRWallFunctionFvPatchField::checkType()") << "Invalid wall function specification" << nl 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 7e50dede2..9202d287b 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutWallFunction/mutWallFunctionFvPatchScalarField.C @@ -28,7 +28,6 @@ License #include "RASModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" -#include "wallFvPatch.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,7 +43,7 @@ namespace RASModels void mutWallFunctionFvPatchScalarField::checkType() { - if (!isA(patch())) + if (!patch().isWall()) { FatalErrorIn("mutWallFunctionFvPatchScalarField::checkType()") << "Invalid wall function specification" << nl diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C index 00a00b4ce..7ed2e48d5 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutkWallFunction/mutkWallFunctionFvPatchScalarField.C @@ -28,7 +28,6 @@ License #include "RASModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" -#include "wallFvPatch.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,7 +43,7 @@ namespace RASModels void mutkWallFunctionFvPatchScalarField::checkType() { - if (!isA(patch())) + if (!patch().isWall()) { FatalErrorIn("mutkWallFunctionFvPatchScalarField::checkType()") << "Invalid wall function specification" << nl 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 44998e87b..59a9b5c9c 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -29,7 +29,6 @@ License #include "fvPatchFieldMapper.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,7 +43,7 @@ namespace RASModels void omegaWallFunctionFvPatchScalarField::checkType() { - if (!isA(patch())) + if (!patch().isWall()) { FatalErrorIn("omegaWallFunctionFvPatchScalarField::checkType()") << "Invalid wall function specification" << nl diff --git a/src/turbulenceModels/incompressible/LES/vanDriestDelta/vanDriestDelta.C b/src/turbulenceModels/incompressible/LES/vanDriestDelta/vanDriestDelta.C index 5fce20d58..a31d4afca 100644 --- a/src/turbulenceModels/incompressible/LES/vanDriestDelta/vanDriestDelta.C +++ b/src/turbulenceModels/incompressible/LES/vanDriestDelta/vanDriestDelta.C @@ -26,7 +26,6 @@ License #include "vanDriestDelta.H" #include "LESModel.H" -#include "wallFvPatch.H" #include "wallDistData.H" #include "wallPointYPlus.H" #include "addToRunTimeSelectionTable.H" @@ -70,7 +69,7 @@ void vanDriestDelta::calcDelta() const fvPatchList& patches = mesh_.boundary(); forAll(patches, patchi) { - if (isA(patches[patchi])) + if (patches[patchi].isWall()) { const fvPatchVectorField& Uw = U.boundaryField()[patchi]; const scalarField& nuw = nu.boundaryField()[patchi]; diff --git a/src/turbulenceModels/incompressible/RAS/LRR/LRR.C b/src/turbulenceModels/incompressible/RAS/LRR/LRR.C index c89704675..4f437efd6 100644 --- a/src/turbulenceModels/incompressible/RAS/LRR/LRR.C +++ b/src/turbulenceModels/incompressible/RAS/LRR/LRR.C @@ -26,7 +26,6 @@ License #include "LRR.H" #include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" #include "backwardsCompatibilityWallFunctions.H" @@ -331,7 +330,7 @@ void LRR::correct() { const fvPatch& curPatch = patches[patchi]; - if (isA(curPatch)) + if (curPatch.isWall()) { forAll(curPatch, facei) { @@ -390,7 +389,7 @@ void LRR::correct() { const fvPatch& curPatch = patches[patchi]; - if (isA(curPatch)) + if (curPatch.isWall()) { symmTensorField& Rw = R_.boundaryField()[patchi]; diff --git a/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C index 94a037f50..754bd03cd 100644 --- a/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C +++ b/src/turbulenceModels/incompressible/RAS/LaunderGibsonRSTM/LaunderGibsonRSTM.C @@ -26,7 +26,6 @@ License #include "LaunderGibsonRSTM.H" #include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" #include "backwardsCompatibilityWallFunctions.H" @@ -372,7 +371,7 @@ void LaunderGibsonRSTM::correct() { const fvPatch& curPatch = patches[patchi]; - if (isA(curPatch)) + if (curPatch.isWall()) { forAll(curPatch, facei) { @@ -440,7 +439,7 @@ void LaunderGibsonRSTM::correct() { const fvPatch& curPatch = patches[patchi]; - if (isA(curPatch)) + if (curPatch.isWall()) { symmTensorField& Rw = R_.boundaryField()[patchi]; diff --git a/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H b/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H index a150d52b9..f067f8d0d 100644 --- a/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H +++ b/src/turbulenceModels/incompressible/RAS/LienCubicKELowRe/LienCubicKELowReSetWallDissipation.H @@ -14,7 +14,7 @@ { const fvPatch& curPatch = patches[patchi]; - if (isA(curPatch)) + if (curPatch.isWall()) { forAll(curPatch, facei) { @@ -29,7 +29,7 @@ { const fvPatch& curPatch = patches[patchi]; - if (isA(curPatch)) + if (curPatch.isWall()) { forAll(curPatch, facei) { @@ -58,7 +58,7 @@ { const fvPatch& curPatch = patches[patchi]; - if (isA(curPatch)) + if (curPatch.isWall()) { forAll(curPatch, facei) { diff --git a/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H b/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H index 54ef9356c..12c3a25b6 100644 --- a/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H +++ b/src/turbulenceModels/incompressible/RAS/LienLeschzinerLowRe/LienLeschzinerLowReSetWallDissipation.H @@ -14,7 +14,7 @@ { const fvPatch& curPatch = patches[patchi]; - if (isA(curPatch)) + if (curPatch.isWall()) { forAll(curPatch, facei) { @@ -29,7 +29,7 @@ { const fvPatch& curPatch = patches[patchi]; - if (isA(curPatch)) + if (curPatch.isWall()) { forAll(curPatch, facei) { @@ -58,7 +58,7 @@ { const fvPatch& curPatch = patches[patchi]; - if (isA(curPatch)) + if (curPatch.isWall()) { forAll(curPatch, facei) { diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C index 89fd02d87..ae0a49d87 100644 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C @@ -25,7 +25,6 @@ License \*---------------------------------------------------------------------------*/ #include "RASModel.H" -#include "wallFvPatch.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -169,7 +168,7 @@ tmp RASModel::yPlus(const label patchNo, const scalar Cmu) const tmp tYp(new scalarField(curPatch.size())); scalarField& Yp = tYp(); - if (isA(curPatch)) + if (curPatch.isWall()) { Yp = pow(Cmu, 0.25) *y_[patchNo] diff --git a/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C b/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C index 14241079a..b0e3796fa 100644 --- a/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C +++ b/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctions.C @@ -73,7 +73,7 @@ tmp autoCreateNut forAll(bm, patchI) { - if (isA(bm[patchI])) + if (bm[patchI].isWall()) { nutBoundaryTypes[patchI] = RASModels::nutWallFunctionFvPatchScalarField::typeName; @@ -143,7 +143,7 @@ tmp autoCreateLowReNut forAll(bm, patchI) { - if (isA(bm[patchI])) + if (bm[patchI].isWall()) { nutBoundaryTypes[patchI] = RASModels::nutLowReWallFunctionFvPatchScalarField::typeName; diff --git a/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C b/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C index cc88c36a5..9aea64307 100644 --- a/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C +++ b/src/turbulenceModels/incompressible/RAS/backwardsCompatibility/wallFunctions/backwardsCompatibilityWallFunctionsTemplates.C @@ -28,8 +28,6 @@ License #include "Time.H" #include "OSspecific.H" -#include "wallFvPatch.H" - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -111,7 +109,7 @@ autoCreateWallFunctionField forAll(newPatchFields, patchI) { - if (isA(mesh.boundary()[patchI])) + if (mesh.boundary()[patchI].isWall()) { newPatchFields.set ( 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 8aa6ebad6..1c871babc 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -29,7 +29,6 @@ License #include "fvPatchFieldMapper.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,8 +43,6 @@ namespace RASModels void epsilonWallFunctionFvPatchScalarField::checkType() { - // AJ: Allow other patch types to be seen as wall type - // if (!isA(patch())) if (!this->patch().isWall()) { FatalErrorIn("epsilonWallFunctionFvPatchScalarField::checkType()") diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C index 2cdb67f65..24b0b1dfa 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/kqRWallFunctions/kqRWallFunction/kqRWallFunctionFvPatchField.C @@ -28,8 +28,6 @@ License #include "fvPatchFieldMapper.H" #include "addToRunTimeSelectionTable.H" #include "wallFvPatch.H" -#include "regionCoupleFvPatch.H" -#include "movingWallVelocityFvPatchVectorField.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -45,8 +43,6 @@ namespace RASModels template void kqRWallFunctionFvPatchField::checkType() { - // AJ: Allow other patch types to be seemovingWalln as wall type - // if (!isA(this->patch())) if (!this->patch().isWall()) { FatalErrorIn("kqRWallFunctionFvPatchField::checkType()") 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 9cfc4936e..d4679f27e 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutWallFunction/nutWallFunctionFvPatchScalarField.C @@ -28,7 +28,6 @@ License #include "RASModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" -#include "wallFvPatch.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,7 +43,7 @@ namespace RASModels void nutWallFunctionFvPatchScalarField::checkType() { - if (!isA(patch())) + if (!patch().isWall()) { FatalErrorIn("nutWallFunctionFvPatchScalarField::checkType()") << "Invalid wall function specification" << nl diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C index b32823a51..b86604162 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/nutWallFunctions/nutkWallFunction/nutkWallFunctionFvPatchScalarField.C @@ -28,7 +28,6 @@ License #include "RASModel.H" #include "fvPatchFieldMapper.H" #include "volFields.H" -#include "wallFvPatch.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,7 +43,7 @@ namespace RASModels void nutkWallFunctionFvPatchScalarField::checkType() { - if (!isA(patch())) + if (!patch().isWall()) { FatalErrorIn("nutkWallFunctionFvPatchScalarField::checkType()") << "Invalid wall function specification" << nl 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 c07f7b835..10d4a27d9 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -29,7 +29,6 @@ License #include "fvPatchFieldMapper.H" #include "volFields.H" #include "addToRunTimeSelectionTable.H" -#include "wallFvPatch.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -44,7 +43,7 @@ namespace RASModels void omegaWallFunctionFvPatchScalarField::checkType() { - if (!isA(patch())) + if (!patch().isWall()) { FatalErrorIn("omegaWallFunctionFvPatchScalarField::checkType()") << "Invalid wall function specification" << nl diff --git a/src/turbulenceModels/incompressible/RAS/include/nonLinearWallFunctionsI.H b/src/turbulenceModels/incompressible/RAS/include/nonLinearWallFunctionsI.H index c5d7427b4..6794bee76 100644 --- a/src/turbulenceModels/incompressible/RAS/include/nonLinearWallFunctionsI.H +++ b/src/turbulenceModels/incompressible/RAS/include/nonLinearWallFunctionsI.H @@ -43,7 +43,7 @@ Description { const fvPatch& curPatch = patches[patchi]; - if (isA(curPatch)) + if (curPatch.isWall()) { forAll(curPatch, facei) { @@ -61,7 +61,7 @@ Description { const fvPatch& curPatch = patches[patchi]; - if (isA(curPatch)) + if (curPatch.isWall()) { #include "checkPatchFieldTypes.H" @@ -112,7 +112,7 @@ Description { const fvPatch& curPatch = patches[patchi]; - if (isA(curPatch)) + if (curPatch.isWall()) { forAll(curPatch, facei) { diff --git a/src/turbulenceModels/incompressible/RAS/include/wallDissipationI.H b/src/turbulenceModels/incompressible/RAS/include/wallDissipationI.H index edd2e6519..96c8f6503 100644 --- a/src/turbulenceModels/incompressible/RAS/include/wallDissipationI.H +++ b/src/turbulenceModels/incompressible/RAS/include/wallDissipationI.H @@ -37,7 +37,7 @@ Description { const fvPatch& p = patches[patchi]; - if (isA(p)) + if (p.isWall()) { epsEqn().setValues ( diff --git a/src/turbulenceModels/incompressible/RAS/include/wallNonlinearViscosityI.H b/src/turbulenceModels/incompressible/RAS/include/wallNonlinearViscosityI.H index 7e8534650..b7eaa490b 100644 --- a/src/turbulenceModels/incompressible/RAS/include/wallNonlinearViscosityI.H +++ b/src/turbulenceModels/incompressible/RAS/include/wallNonlinearViscosityI.H @@ -39,7 +39,7 @@ Description { const fvPatch& curPatch = patches[patchi]; - if (isA(curPatch)) + if (curPatch.isWall()) { const scalarField& nuw = nu().boundaryField()[patchi]; scalarField& nutw = nut_.boundaryField()[patchi]; From 0fdba7060d3f4095405ababbadfe2d12e18350f6 Mon Sep 17 00:00:00 2001 From: Henrik Rusche Date: Thu, 20 Jan 2011 13:18:22 +0100 Subject: [PATCH 03/69] fixing missing includes --- .../compressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.C | 1 + .../incompressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.C | 1 + 2 files changed, 2 insertions(+) diff --git a/src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.C b/src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.C index cbe1077f0..cc71b2bf2 100644 --- a/src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.C +++ b/src/turbulenceModels/compressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.C @@ -26,6 +26,7 @@ License #include "kOmegaSST_LowRe.H" #include "addToRunTimeSelectionTable.H" +#include "wallFvPatch.H" #include "backwardsCompatibilityWallFunctions.H" diff --git a/src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.C b/src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.C index 37b8562de..f97051ab8 100644 --- a/src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.C +++ b/src/turbulenceModels/incompressible/RAS/kOmegaSST_LowRe/kOmegaSST_LowRe.C @@ -26,6 +26,7 @@ License #include "kOmegaSST_LowRe.H" #include "addToRunTimeSelectionTable.H" +#include "wallFvPatch.H" #include "backwardsCompatibilityWallFunctions.H" From 53103a815dd2611202ff7f531aef4fd085d51d1a Mon Sep 17 00:00:00 2001 From: Henrik Rusche Date: Wed, 26 Jan 2011 20:18:05 +0100 Subject: [PATCH 04/69] sync P1 model with vanilla --- .../radiation/radiationModel/P1/P1.C | 20 +++++++++++++++++++ .../radiation/radiationModel/P1/P1.H | 3 +++ 2 files changed, 23 insertions(+) diff --git a/src/thermophysicalModels/radiation/radiationModel/P1/P1.C b/src/thermophysicalModels/radiation/radiationModel/P1/P1.C index cec6eca56..28260716a 100644 --- a/src/thermophysicalModels/radiation/radiationModel/P1/P1.C +++ b/src/thermophysicalModels/radiation/radiationModel/P1/P1.C @@ -68,6 +68,19 @@ Foam::radiation::P1::P1(const volScalarField& T) ), mesh_ ), + Qr_ + ( + IOobject + ( + "Qr", + mesh_.time().timeName(), + mesh_, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh_, + dimensionedScalar("Qr", dimMass/pow3(dimTime), 0.0) + ), a_ ( IOobject @@ -162,6 +175,13 @@ void Foam::radiation::P1::calculate() == - 4.0*(e_*radiation::sigmaSB*pow4(T_) + E_) ); + + // Calculate radiative heat flux on boundaries. + forAll(mesh_.boundaryMesh(), patchI) + { + Qr_.boundaryField()[patchI] = + -gamma.boundaryField()[patchI]*G_.boundaryField()[patchI].snGrad(); + } } diff --git a/src/thermophysicalModels/radiation/radiationModel/P1/P1.H b/src/thermophysicalModels/radiation/radiationModel/P1/P1.H index 46b9398a3..6fc6ae8cd 100644 --- a/src/thermophysicalModels/radiation/radiationModel/P1/P1.H +++ b/src/thermophysicalModels/radiation/radiationModel/P1/P1.H @@ -64,6 +64,9 @@ class P1 //- Incident radiation / [W/m2] volScalarField G_; + //- Total radiative heat flux [W/m2] + volScalarField Qr_; + //- Absorption coefficient volScalarField a_; From 09be3b4206d5c7224fdf24e509fd2ffaf3bc76db Mon Sep 17 00:00:00 2001 From: Henrik Rusche Date: Wed, 26 Jan 2011 20:18:05 +0100 Subject: [PATCH 05/69] sync P1 model with vanilla --- .../radiation/radiationModel/P1/P1.C | 20 +++++++++++++++++++ .../radiation/radiationModel/P1/P1.H | 3 +++ 2 files changed, 23 insertions(+) diff --git a/src/thermophysicalModels/radiation/radiationModel/P1/P1.C b/src/thermophysicalModels/radiation/radiationModel/P1/P1.C index cec6eca56..28260716a 100644 --- a/src/thermophysicalModels/radiation/radiationModel/P1/P1.C +++ b/src/thermophysicalModels/radiation/radiationModel/P1/P1.C @@ -68,6 +68,19 @@ Foam::radiation::P1::P1(const volScalarField& T) ), mesh_ ), + Qr_ + ( + IOobject + ( + "Qr", + mesh_.time().timeName(), + mesh_, + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + mesh_, + dimensionedScalar("Qr", dimMass/pow3(dimTime), 0.0) + ), a_ ( IOobject @@ -162,6 +175,13 @@ void Foam::radiation::P1::calculate() == - 4.0*(e_*radiation::sigmaSB*pow4(T_) + E_) ); + + // Calculate radiative heat flux on boundaries. + forAll(mesh_.boundaryMesh(), patchI) + { + Qr_.boundaryField()[patchI] = + -gamma.boundaryField()[patchI]*G_.boundaryField()[patchI].snGrad(); + } } diff --git a/src/thermophysicalModels/radiation/radiationModel/P1/P1.H b/src/thermophysicalModels/radiation/radiationModel/P1/P1.H index 46b9398a3..6fc6ae8cd 100644 --- a/src/thermophysicalModels/radiation/radiationModel/P1/P1.H +++ b/src/thermophysicalModels/radiation/radiationModel/P1/P1.H @@ -64,6 +64,9 @@ class P1 //- Incident radiation / [W/m2] volScalarField G_; + //- Total radiative heat flux [W/m2] + volScalarField Qr_; + //- Absorption coefficient volScalarField a_; From bf50124638a6650fedfa5faebeeb6eb76d390662 Mon Sep 17 00:00:00 2001 From: Hrvoje Jasak Date: Sun, 27 Feb 2011 02:17:43 +0000 Subject: [PATCH 06/69] Updates for topological changes in parallel --- .../basic/potentialFoam/potentialFoam.C | 62 +++++++++++++++++++ .../icoDyMEngineFoam/icoDyMEngineFoam.C | 1 + .../sonicTurbDyMEngineFoam.C | 3 +- .../turbDyMEngineFoam/turbDyMEngineFoam.C | 1 + .../incompressible/icoDyMFoam/icoDyMFoam.C | 1 + .../icoDyMSimpleFoam/icoDyMSimpleFoam.C | 1 + .../pimpleDyMFoam/pimpleDyMFoam.C | 5 +- .../compressibleInterDyMFoam.C | 19 +++--- .../multiphase/interDyMFoam/interDyMFoam.C | 17 ++--- 9 files changed, 83 insertions(+), 27 deletions(-) diff --git a/applications/solvers/basic/potentialFoam/potentialFoam.C b/applications/solvers/basic/potentialFoam/potentialFoam.C index 136b8542a..b0ce69423 100644 --- a/applications/solvers/basic/potentialFoam/potentialFoam.C +++ b/applications/solvers/basic/potentialFoam/potentialFoam.C @@ -113,6 +113,68 @@ int main(int argc, char *argv[]) if (args.optionFound("writep")) { + // Find reference patch + label refPatch = -1; + scalar maxMagU = 0; + + // Go through all velocity patches and find the one that fixes + // velocity to the largest value + + forAll (U.boundaryField(), patchI) + { + const fvPatchVectorField& Upatch = U.boundaryField()[patchI]; + + if (Upatch.fixesValue()) + { + // Calculate mean velocity + scalar u = sum(mag(Upatch)); + label patchSize = Upatch.size(); + + reduce(u, sumOp()); + reduce(patchSize, sumOp