From f4ac5f8748e03f0cc43d26470bb8d046ad1dab0d Mon Sep 17 00:00:00 2001 From: Will Bainbridge Date: Thu, 22 Sep 2022 10:05:41 +0100 Subject: [PATCH] AMIInterpolation, cyclicAMI: Removed AMIInterpolation and cyclicAMI have been superseded by patchToPatch and nonConformalCoupled, respectively. The motivation behind this change is explained in the following article: https://cfd.direct/openfoam/free-software/non-conformal-coupling/ Information about how to convert a case which uses cyclicAMI to nonConformalCoupled can be found here: https://cfd.direct/openfoam/free-software/using-non-conformal-coupling/ --- .../MomentumTransferPhaseSystem.C | 6 +- .../MovingPhaseModel/MovingPhaseModel.C | 13 - .../test/patchToPatch/Test-patchToPatch.C | 8 - .../conformalVoronoiMeshZones.C | 7 +- .../manipulation/checkMesh/checkGeometry.C | 107 -- .../manipulation/checkMesh/checkGeometry.H | 12 - .../mesh/manipulation/moveMesh/moveMesh.C | 19 - .../preProcessing/mapFields/mapLagrangian.C | 1 + .../mapFieldsPar/mapLagrangian.C | 1 + .../viewFactorsGen/searchingEngine.H | 7 +- .../viewFactorsGen/viewFactorsGen.C | 1 - bin/tools/foamLog.db | 3 - etc/caseDicts/setConstraintTypes | 17 +- etc/config.sh/bash_completion | 2 +- etc/templates/closedVolumeRotating/README | 6 +- .../system/createBafflesDict-AMI | 45 - etc/templates/inflowOutflowRotating/README | 6 +- .../system/createBafflesDict-AMI | 45 - src/finiteVolume/Make/files | 6 - .../FvFaceCellWave/FvFaceCellWave.C | 204 +-- .../FvFaceCellWave/FvFaceCellWave.H | 6 - .../cyclicAMI/cyclicAMIFvPatchField.C | 256 ---- .../cyclicAMI/cyclicAMIFvPatchField.H | 219 --- .../cyclicAMI/cyclicAMIFvPatchFields.C | 43 - .../cyclicAMI/cyclicAMIFvPatchFields.H | 49 - .../cyclicAMI/cyclicAMIFvPatchFieldsFwd.H | 50 - .../jumpCyclicAMI/jumpCyclicAMIFvPatchField.C | 190 --- .../jumpCyclicAMI/jumpCyclicAMIFvPatchField.H | 177 --- .../jumpCyclicAMIFvPatchFields.C | 87 -- .../jumpCyclicAMIFvPatchFields.H | 49 - .../jumpCyclicAMIFvPatchFieldsFwd.H | 50 - .../fixedJumpAMI/fixedJumpAMIFvPatchField.C | 186 --- .../fixedJumpAMI/fixedJumpAMIFvPatchField.H | 191 --- .../fixedJumpAMI/fixedJumpAMIFvPatchFields.C | 43 - .../fixedJumpAMI/fixedJumpAMIFvPatchFields.H | 49 - .../fixedJumpAMIFvPatchFieldsFwd.H | 50 - .../uniformJumpAMIFvPatchField.C | 125 -- .../uniformJumpAMIFvPatchField.H | 178 --- .../uniformJumpAMIFvPatchFields.C | 43 - .../uniformJumpAMIFvPatchFields.H | 49 - .../uniformJumpAMIFvPatchFieldsFwd.H | 50 - .../cyclicAMI/cyclicAMIFvsPatchField.C | 142 -- .../cyclicAMI/cyclicAMIFvsPatchField.H | 147 -- .../cyclicAMI/cyclicAMIFvsPatchFields.C | 43 - .../cyclicAMI/cyclicAMIFvsPatchFields.H | 49 - .../cyclicAMI/cyclicAMIFvsPatchFieldsFwd.H | 50 - .../ddtSchemes/ddtScheme/ddtScheme.C | 11 +- .../localEulerDdtScheme/localEulerDdtScheme.C | 8 +- src/finiteVolume/fvMesh/fvMeshGeometry.C | 1 - .../constraint/cyclicAMI/cyclicAMIFvPatch.C | 191 --- .../constraint/cyclicAMI/cyclicAMIFvPatch.H | 211 --- .../cylindrical/cylindricalFunctionObject.H | 4 +- .../field/nearWallFields/findCellParticle.C | 13 - .../field/nearWallFields/findCellParticle.H | 9 - .../field/nearWallFields/nearWallFields.C | 1 + .../field/streamlines/streamlines.C | 1 + .../field/streamlines/streamlinesParticle.C | 16 - .../field/streamlines/streamlinesParticle.H | 10 - src/lagrangian/basic/Cloud/Cloud.C | 29 - src/lagrangian/basic/Cloud/Cloud.H | 3 - src/lagrangian/basic/Cloud/CloudIO.C | 2 - src/lagrangian/basic/particle/particle.C | 1 + src/lagrangian/basic/particle/particle.H | 11 - .../basic/particle/particleTemplates.C | 121 -- .../clouds/Templates/SprayCloud/SprayCloud.H | 1 + .../FacePostProcessing/FacePostProcessing.C | 3 +- .../ParticleCollector/ParticleCollector.C | 1 + .../PatchPostProcessing/PatchPostProcessing.C | 3 +- .../patchInteractionDataList.C | 3 +- .../meshRefinement/meshRefinement.C | 7 +- .../trackedParticle/trackedParticle.C | 13 - .../trackedParticle/trackedParticle.H | 9 - .../AMIInterpolation/AMIInterpolation.C | 1195 ----------------- .../AMIInterpolation/AMIInterpolation.H | 574 -------- .../AMIInterpolation/AMIInterpolationI.H | 128 -- .../AMIInterpolationParallelOps.C | 474 ------- .../AMIInterpolationTemplates.C | 336 ----- .../AMIMethod/AMIMethod/AMIMethod.C | 360 ----- .../AMIMethod/AMIMethod/AMIMethod.H | 261 ---- .../AMIMethod/AMIMethod/AMIMethodI.H | 32 - .../AMIMethod/AMIMethod/AMIMethodNew.C | 75 -- .../AMIMethod/directAMI/directAMI.C | 328 ----- .../AMIMethod/directAMI/directAMI.H | 148 -- .../faceAreaWeightAMI/faceAreaWeightAMI.C | 583 -------- .../faceAreaWeightAMI/faceAreaWeightAMI.H | 184 --- .../AMIMethod/mapNearestAMI/mapNearestAMI.C | 342 ----- .../AMIMethod/mapNearestAMI/mapNearestAMI.H | 152 --- .../partialFaceAreaWeightAMI.C | 160 --- .../partialFaceAreaWeightAMI.H | 135 -- .../sweptFaceAreaWeightAMI.C | 596 -------- .../sweptFaceAreaWeightAMI.H | 264 ---- .../cyclicAMIGAMGInterfaceField.C | 147 -- .../cyclicAMIGAMGInterfaceField.H | 152 --- .../cyclicAMIGAMGInterface.C | 209 --- .../cyclicAMIGAMGInterface.H | 177 --- .../faceAreaIntersect/faceAreaIntersect.C | 399 ------ .../faceAreaIntersect/faceAreaIntersect.H | 192 --- .../faceAreaIntersect/faceAreaIntersectI.H | 96 -- .../cyclicAMILduInterface.C | 42 - .../cyclicAMILduInterface.H | 103 -- .../cyclicAMILduInterfaceField.C | 72 - .../cyclicAMILduInterfaceField.H | 125 -- .../cyclicAMIPointPatch/cyclicAMIPointPatch.C | 111 -- .../cyclicAMIPointPatch/cyclicAMIPointPatch.H | 148 -- .../cyclicAMIPointPatchField.C | 121 -- .../cyclicAMIPointPatchField.H | 202 --- .../cyclicAMIPointPatchFields.C | 43 - .../cyclicAMIPointPatchFields.H | 49 - .../cyclicAMIPolyPatch/cyclicAMIPolyPatch.C | 720 ---------- .../cyclicAMIPolyPatch/cyclicAMIPolyPatch.H | 349 ----- .../cyclicAMIPolyPatch/cyclicAMIPolyPatchI.H | 41 - .../cyclicAMIPolyPatchTemplates.C | 79 -- src/meshTools/Make/files | 25 - .../algorithms/FaceCellWave/FaceCellWave.C | 222 --- .../algorithms/FaceCellWave/FaceCellWave.H | 7 - src/meshTools/regionSplit/regionSplit.C | 3 +- .../structuredRenumber/OppositeFaceCellWave.C | 7 +- .../structuredRenumber/structuredRenumber.C | 3 +- .../sampledSet/sampledSetParticle.C | 12 - .../sampledSet/sampledSetParticle.H | 9 - src/thermophysicalModels/basic/Make/files | 4 +- .../basic/basicThermo/basicThermo.C | 16 - .../energyJumpAMIFvPatchScalarField.C | 141 -- .../energyJumpAMIFvPatchScalarField.H | 138 -- .../energyJumpFvPatchScalarField.C | 2 +- .../energyJumpFvPatchScalarField.H | 2 +- .../nonConformalChannel/0/U | 47 - .../nonConformalChannel/0/p | 47 - .../nonConformalChannel/Allclean | 7 - .../nonConformalChannel/Allrun | 46 - .../constant/momentumTransport | 19 - .../constant/physicalProperties | 21 - .../system/blockMeshDict.AMI | 44 - .../system/blockMeshDict.boundary | 34 - .../system/blockMeshDict.internal | 47 - .../system/blockMeshDict.nonConformalCyclic | 44 - .../nonConformalChannel/system/controlDict | 60 - .../nonConformalChannel/system/fvSchemes | 50 - .../nonConformalChannel/system/fvSolution | 56 - 139 files changed, 42 insertions(+), 14745 deletions(-) delete mode 100644 etc/templates/closedVolumeRotating/system/createBafflesDict-AMI delete mode 100644 etc/templates/inflowOutflowRotating/system/createBafflesDict-AMI delete mode 100644 src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.C delete mode 100644 src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchField.H delete mode 100644 src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchFields.C delete mode 100644 src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchFields.H delete mode 100644 src/finiteVolume/fields/fvPatchFields/constraint/cyclicAMI/cyclicAMIFvPatchFieldsFwd.H delete mode 100644 src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.C delete mode 100644 src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchField.H delete mode 100644 src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchFields.C delete mode 100644 src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchFields.H delete mode 100644 src/finiteVolume/fields/fvPatchFields/constraint/jumpCyclicAMI/jumpCyclicAMIFvPatchFieldsFwd.H delete mode 100644 src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.C delete mode 100644 src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchField.H delete mode 100644 src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchFields.C delete mode 100644 src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchFields.H delete mode 100644 src/finiteVolume/fields/fvPatchFields/derived/fixedJumpAMI/fixedJumpAMIFvPatchFieldsFwd.H delete mode 100644 src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.C delete mode 100644 src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchField.H delete mode 100644 src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchFields.C delete mode 100644 src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchFields.H delete mode 100644 src/finiteVolume/fields/fvPatchFields/derived/uniformJumpAMI/uniformJumpAMIFvPatchFieldsFwd.H delete mode 100644 src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.C delete mode 100644 src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchField.H delete mode 100644 src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchFields.C delete mode 100644 src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchFields.H delete mode 100644 src/finiteVolume/fields/fvsPatchFields/constraint/cyclicAMI/cyclicAMIFvsPatchFieldsFwd.H delete mode 100644 src/finiteVolume/fvMesh/fvPatches/constraint/cyclicAMI/cyclicAMIFvPatch.C delete mode 100644 src/finiteVolume/fvMesh/fvPatches/constraint/cyclicAMI/cyclicAMIFvPatch.H delete mode 100644 src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C delete mode 100644 src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.H delete mode 100644 src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationI.H delete mode 100644 src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationParallelOps.C delete mode 100644 src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolationTemplates.C delete mode 100644 src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.C delete mode 100644 src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethod.H delete mode 100644 src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethodI.H delete mode 100644 src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/AMIMethod/AMIMethodNew.C delete mode 100644 src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.C delete mode 100644 src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/directAMI/directAMI.H delete mode 100644 src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.C delete mode 100644 src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/faceAreaWeightAMI/faceAreaWeightAMI.H delete mode 100644 src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.C delete mode 100644 src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/mapNearestAMI/mapNearestAMI.H delete mode 100644 src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/partialFaceAreaWeightAMI/partialFaceAreaWeightAMI.C delete mode 100644 src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/partialFaceAreaWeightAMI/partialFaceAreaWeightAMI.H delete mode 100644 src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/sweptFaceAreaWeightAMI/sweptFaceAreaWeightAMI.C delete mode 100644 src/meshTools/AMIInterpolation/AMIInterpolation/AMIMethod/sweptFaceAreaWeightAMI/sweptFaceAreaWeightAMI.H delete mode 100644 src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicAMIGAMGInterfaceField/cyclicAMIGAMGInterfaceField.C delete mode 100644 src/meshTools/AMIInterpolation/GAMG/interfaceFields/cyclicAMIGAMGInterfaceField/cyclicAMIGAMGInterfaceField.H delete mode 100644 src/meshTools/AMIInterpolation/GAMG/interfaces/cyclicAMIGAMGInterface/cyclicAMIGAMGInterface.C delete mode 100644 src/meshTools/AMIInterpolation/GAMG/interfaces/cyclicAMIGAMGInterface/cyclicAMIGAMGInterface.H delete mode 100644 src/meshTools/AMIInterpolation/faceAreaIntersect/faceAreaIntersect.C delete mode 100644 src/meshTools/AMIInterpolation/faceAreaIntersect/faceAreaIntersect.H delete mode 100644 src/meshTools/AMIInterpolation/faceAreaIntersect/faceAreaIntersectI.H delete mode 100644 src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMILduInterfaceField/cyclicAMILduInterface.C delete mode 100644 src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMILduInterfaceField/cyclicAMILduInterface.H delete mode 100644 src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMILduInterfaceField/cyclicAMILduInterfaceField.C delete mode 100644 src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMILduInterfaceField/cyclicAMILduInterfaceField.H delete mode 100644 src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatch/cyclicAMIPointPatch.C delete mode 100644 src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatch/cyclicAMIPointPatch.H delete mode 100644 src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.C delete mode 100644 src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchField.H delete mode 100644 src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchFields.C delete mode 100644 src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatchField/cyclicAMIPointPatchFields.H delete mode 100644 src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C delete mode 100644 src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.H delete mode 100644 src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatchI.H delete mode 100644 src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatchTemplates.C delete mode 100644 src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.C delete mode 100644 src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/energyJumpAMI/energyJumpAMIFvPatchScalarField.H rename src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/{energyJump => }/energyJumpFvPatchScalarField.C (98%) rename src/thermophysicalModels/basic/derivedFvPatchFields/energyJump/{energyJump => }/energyJumpFvPatchScalarField.H (98%) delete mode 100644 tutorials/modules/incompressibleFluid/nonConformalChannel/0/U delete mode 100644 tutorials/modules/incompressibleFluid/nonConformalChannel/0/p delete mode 100755 tutorials/modules/incompressibleFluid/nonConformalChannel/Allclean delete mode 100755 tutorials/modules/incompressibleFluid/nonConformalChannel/Allrun delete mode 100644 tutorials/modules/incompressibleFluid/nonConformalChannel/constant/momentumTransport delete mode 100644 tutorials/modules/incompressibleFluid/nonConformalChannel/constant/physicalProperties delete mode 100644 tutorials/modules/incompressibleFluid/nonConformalChannel/system/blockMeshDict.AMI delete mode 100644 tutorials/modules/incompressibleFluid/nonConformalChannel/system/blockMeshDict.boundary delete mode 100644 tutorials/modules/incompressibleFluid/nonConformalChannel/system/blockMeshDict.internal delete mode 100644 tutorials/modules/incompressibleFluid/nonConformalChannel/system/blockMeshDict.nonConformalCyclic delete mode 100644 tutorials/modules/incompressibleFluid/nonConformalChannel/system/controlDict delete mode 100644 tutorials/modules/incompressibleFluid/nonConformalChannel/system/fvSchemes delete mode 100644 tutorials/modules/incompressibleFluid/nonConformalChannel/system/fvSolution diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C index fc132ac403..aac4b6c85d 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/PhaseSystems/MomentumTransferPhaseSystem/MomentumTransferPhaseSystem.C @@ -1082,11 +1082,7 @@ Foam::MomentumTransferPhaseSystem::ddtCorrByAs forAll(this->mesh_.boundary(), patchi) { // Set ddtPhiCorr to 0 on non-coupled boundaries - if - ( - !this->mesh_.boundary()[patchi].coupled() - || isA(this->mesh_.boundary()[patchi]) - ) + if (!this->mesh_.boundary()[patchi].coupled()) { phiCorrCoeffBf[patchi] = 0; } diff --git a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C index 210180e6cf..1dd3c262d0 100644 --- a/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C +++ b/applications/solvers/multiphase/multiphaseEulerFoam/phaseSystems/phaseModel/MovingPhaseModel/MovingPhaseModel.C @@ -300,19 +300,6 @@ void Foam::MovingPhaseModel::correctUf() /mesh.magSf() - (n & Uf_()) ); - - surfaceVectorField::Boundary& UfBf = Uf_.ref().boundaryFieldRef(); - const volVectorField::Boundary& UBf = U_.boundaryField(); - - forAll(mesh.boundary(), patchi) - { - // Remove the flux correction on AMI patches to compensate for - // AMI non-conservation error - if (isA(mesh.boundary()[patchi])) - { - UfBf[patchi] = UBf[patchi]; - } - } } } diff --git a/applications/test/patchToPatch/Test-patchToPatch.C b/applications/test/patchToPatch/Test-patchToPatch.C index a25f9930fb..3708c2a910 100644 --- a/applications/test/patchToPatch/Test-patchToPatch.C +++ b/applications/test/patchToPatch/Test-patchToPatch.C @@ -24,7 +24,6 @@ License \*---------------------------------------------------------------------------*/ #include "argList.H" -#include "AMIInterpolation.H" #include "cpuTime.H" #include "patchToPatch.H" #include "polyMesh.H" @@ -51,13 +50,6 @@ int main(int argc, char *argv[]) cpuTime time; - /* - AMIInterpolation(srcPatch, tgtPatch, faceAreaIntersect::tmMesh); - - Info<< nl << "AMI" << ": Completed in " - << time.cpuTimeIncrement() << " s" << nl << endl; - */ - patchToPatch::New(method, false)->update ( srcPatch, diff --git a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C index 09496f36a7..b2c21f5d62 100644 --- a/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C +++ b/applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshZones.C @@ -84,13 +84,10 @@ void Foam::conformalVoronoiMesh::selectSeparatedCoupledFaces forAll(patches, patchi) { - // Check all coupled. Avoid using .coupled() so we also pick up AMI. if (isA(patches[patchi])) { - const coupledPolyPatch& cpp = refCast - ( - patches[patchi] - ); + const coupledPolyPatch& cpp = + refCast(patches[patchi]); if (cpp.transform().transformsPosition()) { diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C index 08d6a28e2d..91a92da072 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.C @@ -13,7 +13,6 @@ #include "setWriter.H" #include "checkTools.H" -#include "cyclicAMIPolyPatch.H" #include "Time.H" // Find wedge with opposite orientation. Note: does not actually check that @@ -479,107 +478,6 @@ bool Foam::checkCoupledPoints } -void Foam::writeAMIWeightsSum -( - const polyMesh& mesh, - const primitivePatch& patch, - const scalarField& wghtSum, - const fileName& file -) -{ - // Collect geometry - labelList pointToGlobal; - labelList uniqueMeshPointLabels; - autoPtr globalPoints; - autoPtr globalFaces; - faceList mergedFaces; - pointField mergedPoints; - Foam::PatchTools::gatherAndMerge - ( - mesh, - patch.localFaces(), - patch.meshPoints(), - patch.meshPointMap(), - - pointToGlobal, - uniqueMeshPointLabels, - globalPoints, - globalFaces, - - mergedFaces, - mergedPoints - ); - - // Collect field - scalarField mergedWeights; - globalFaces().gather - ( - UPstream::worldComm, - labelList(UPstream::procID(UPstream::worldComm)), - wghtSum, - mergedWeights - ); - - // Write the surface - if (Pstream::master()) - { - vtkSurfaceWriter - ( - mesh.time().writeFormat(), - mesh.time().writeCompression() - ).write - ( - file.path(), - "weightsSum_" + file.name(), - mergedPoints, - mergedFaces, - false, - "weightsSum", - mergedWeights - ); - } -} - - -void Foam::writeAMIWeightsSums(const polyMesh& mesh) -{ - const polyBoundaryMesh& pbm = mesh.boundaryMesh(); - - const word tmName(mesh.time().timeName()); - - forAll(pbm, patchi) - { - if (isA(pbm[patchi])) - { - const cyclicAMIPolyPatch& cpp = - refCast(pbm[patchi]); - - if (cpp.owner()) - { - Info<< "Calculating AMI weights between owner patch: " - << cpp.name() << " and neighbour patch: " - << cpp.nbrPatch().name() << endl; - - writeAMIWeightsSum - ( - mesh, - cpp, - cpp.weightsSum(), - fileName("postProcessing") / "src_" + tmName - ); - writeAMIWeightsSum - ( - mesh, - cpp.nbrPatch(), - cpp.nbrWeightsSum(), - fileName("postProcessing") / "tgt_" + tmName - ); - } - } - } -} - - Foam::label Foam::checkGeometry ( const polyMesh& mesh, @@ -1044,10 +942,5 @@ Foam::label Foam::checkGeometry } } - if (allGeometry) - { - writeAMIWeightsSums(mesh); - } - return noFailedChecks; } diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.H b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.H index 21c7234f94..d9b75fb389 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.H +++ b/applications/utilities/mesh/manipulation/checkMesh/checkGeometry.H @@ -23,18 +23,6 @@ namespace Foam //- Check 0th vertex on coupled faces bool checkCoupledPoints(const polyMesh&, const bool report, labelHashSet*); - //- Write out the weights-sums on all the AMI patches - void writeAMIWeightsSums(const polyMesh&); - - //- Write out the weights-sum on the given AMI patch - void writeAMIWeightsSum - ( - const polyMesh&, - const primitivePatch&, - const scalarField&, - const fileName& - ); - label checkGeometry ( const polyMesh& mesh, diff --git a/applications/utilities/mesh/manipulation/moveMesh/moveMesh.C b/applications/utilities/mesh/manipulation/moveMesh/moveMesh.C index cbd3e514f5..98e5183173 100644 --- a/applications/utilities/mesh/manipulation/moveMesh/moveMesh.C +++ b/applications/utilities/mesh/manipulation/moveMesh/moveMesh.C @@ -37,7 +37,6 @@ Description #include "fvMesh.H" #include "pimpleControl.H" #include "vtkSurfaceWriter.H" -#include "cyclicAMIPolyPatch.H" #include "PatchTools.H" #include "checkGeometry.H" @@ -48,12 +47,6 @@ using namespace Foam; int main(int argc, char *argv[]) { #include "addRegionOption.H" - argList::addBoolOption - ( - "checkAMI", - "check AMI weights" - ); - #include "setRootCase.H" #include "createTime.H" @@ -84,13 +77,6 @@ int main(int argc, char *argv[]) ) ); - const bool checkAMI = args.optionFound("checkAMI"); - - if (checkAMI) - { - Info<< "Writing VTK files with weights of AMI patches." << nl << endl; - } - pimpleControl pimple(mesh); while (runTime.run()) @@ -113,11 +99,6 @@ int main(int argc, char *argv[]) mesh.checkMesh(true); - if (checkAMI) - { - writeAMIWeightsSums(mesh); - } - runTime.write(); Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s" diff --git a/applications/utilities/preProcessing/mapFields/mapLagrangian.C b/applications/utilities/preProcessing/mapFields/mapLagrangian.C index 82ca57a055..2153e72e1d 100644 --- a/applications/utilities/preProcessing/mapFields/mapLagrangian.C +++ b/applications/utilities/preProcessing/mapFields/mapLagrangian.C @@ -26,6 +26,7 @@ License #include "MapLagrangianFields.H" #include "passiveParticleCloud.H" #include "meshSearch.H" +#include "OSspecific.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/preProcessing/mapFieldsPar/mapLagrangian.C b/applications/utilities/preProcessing/mapFieldsPar/mapLagrangian.C index 586dabe268..bf6ba4e4e9 100644 --- a/applications/utilities/preProcessing/mapFieldsPar/mapLagrangian.C +++ b/applications/utilities/preProcessing/mapFieldsPar/mapLagrangian.C @@ -26,6 +26,7 @@ License #include "MapLagrangianFields.H" #include "passiveParticleCloud.H" #include "meshSearch.H" +#include "OSspecific.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/preProcessing/viewFactorsGen/searchingEngine.H b/applications/utilities/preProcessing/viewFactorsGen/searchingEngine.H index 3fcde4f5b7..16f42983aa 100644 --- a/applications/utilities/preProcessing/viewFactorsGen/searchingEngine.H +++ b/applications/utilities/preProcessing/viewFactorsGen/searchingEngine.H @@ -27,12 +27,7 @@ labelHashSet includePatches; forAll(patches, patchi) { const polyPatch& pp = patches[patchi]; - if - ( - !pp.coupled() - && !isA(pp) - && !isA(pp) - ) + if (!pp.coupled() && !isA(pp)) { includePatches.insert(patchi); } diff --git a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C index 7415b6e466..8b7ec9c743 100644 --- a/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C +++ b/applications/utilities/preProcessing/viewFactorsGen/viewFactorsGen.C @@ -44,7 +44,6 @@ Description #include "surfaceFields.H" #include "fixedValueFvPatchFields.H" #include "distributedTriSurfaceMesh.H" -#include "cyclicAMIPolyPatch.H" #include "symmetryPolyPatch.H" #include "symmetryPlanePolyPatch.H" #include "wedgePolyPatch.H" diff --git a/bin/tools/foamLog.db b/bin/tools/foamLog.db index ada9023ee0..c001ab37ec 100644 --- a/bin/tools/foamLog.db +++ b/bin/tools/foamLog.db @@ -51,6 +51,3 @@ epsAvg/bounding epsilon,/average: #- gamma bounding alpha1Min/Min\(alpha1\) =/Min(alpha1) = alpha1Max/Max\(alpha1\) =/Max(alpha1) = - -# AMI -AMIMin/AMI: Patch source sum/average = diff --git a/etc/caseDicts/setConstraintTypes b/etc/caseDicts/setConstraintTypes index dc0483c001..6d8690c77c 100644 --- a/etc/caseDicts/setConstraintTypes +++ b/etc/caseDicts/setConstraintTypes @@ -11,11 +11,6 @@ cyclic type cyclic; } -cyclicAMI -{ - type cyclicAMI; -} - cyclicSlip { type cyclicSlip; @@ -32,12 +27,6 @@ nonConformalError type nonConformalError; } -nonConformalProcessorCyclic -{ - type nonConformalProcessorCyclic; - value $internalField; -} - empty { type empty; @@ -55,6 +44,12 @@ processorCyclic value $internalField; } +nonConformalProcessorCyclic +{ + type nonConformalProcessorCyclic; + value $internalField; +} + symmetryPlane { type symmetryPlane; diff --git a/etc/config.sh/bash_completion b/etc/config.sh/bash_completion index 7727a58d1b..165d93a07c 100644 --- a/etc/config.sh/bash_completion +++ b/etc/config.sh/bash_completion @@ -2231,7 +2231,7 @@ _moveMesh_ () local line=${COMP_LINE} local used=$(echo "$line" | grep -oE "\-[a-zA-Z]+ ") - opts="-case -checkAMI -doc -fileHandler -help -hostRoots -libs -noFunctionObjects -parallel -region -roots -srcDoc" + opts="-case -doc -fileHandler -help -hostRoots -libs -noFunctionObjects -parallel -region -roots -srcDoc" for o in $used ; do opts="${opts/$o/}" ; done extra="" diff --git a/etc/templates/closedVolumeRotating/README b/etc/templates/closedVolumeRotating/README index 9c6f0c1cec..64b195a342 100644 --- a/etc/templates/closedVolumeRotating/README +++ b/etc/templates/closedVolumeRotating/README @@ -1,7 +1,7 @@ Overview ======== + Template case for rotating geometry flow for a closed geometry -+ Can be used for MRF or NCC simulations. Also supports AMI. ++ Can be used for MRF or NCC simulations. + Setup to run the incompressibleFluid solver module for MRF or NCC + The case is designed to be meshed with snappyHexMesh + snappyHexMesh is setup to use 3 trisurface files @@ -74,7 +74,3 @@ NCC Simulation + createNonConformalCouples must then be run to generate the couple patches required by NCC, e.g. by createNonConformalCouples -overwrite -+ To use AMI instead of NCC, the patches must be generated by createBaffles - using a suitable configuration file, provided by createBafflesDict-AMI - createBaffles -overwrite -dict system/createBafflesDict-AMI - The interface is completed by running splitBaffles, see above diff --git a/etc/templates/closedVolumeRotating/system/createBafflesDict-AMI b/etc/templates/closedVolumeRotating/system/createBafflesDict-AMI deleted file mode 100644 index 7e5e4d275b..0000000000 --- a/etc/templates/closedVolumeRotating/system/createBafflesDict-AMI +++ /dev/null @@ -1,45 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: dev - \\/ M anipulation | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - format ascii; - class dictionary; - object createBafflesDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -internalFacesOnly true; - -fields true; - -baffles -{ - baffleFaces - { - type faceZone; - zoneName rotatingZone; - - patches - { - master - { - name AMI1; - type cyclicAMI; - neighbourPatch AMI2; - } - slave - { - name AMI2; - type cyclicAMI; - neighbourPatch AMI1; - } - } - } -} - -// ************************************************************************* // diff --git a/etc/templates/inflowOutflowRotating/README b/etc/templates/inflowOutflowRotating/README index 647ec12df2..f64143c0e1 100644 --- a/etc/templates/inflowOutflowRotating/README +++ b/etc/templates/inflowOutflowRotating/README @@ -1,7 +1,7 @@ Overview ======== + Template case for rotating geometry flow with single inlet and outlet -+ Can be used for MRF or NCC simulations. Also supports AMI. ++ Can be used for MRF or NCC simulations. + Setup to run the incompressibleFluid solver module for MRF or NCC + The case is designed to be meshed with snappyHexMesh + snappyHexMesh is setup to use 3 trisurface files @@ -80,7 +80,3 @@ NCC Simulation + createNonConformalCouples must then be run to generate the couple patches required by NCC, e.g. by createNonConformalCouples -overwrite -+ To use AMI instead of NCC, the patches must be generated by createBaffles - using a suitable configuration file, provided by createBafflesDict-AMI - createBaffles -overwrite -dict system/createBafflesDict-AMI - The interface is completed by running splitBaffles, see above diff --git a/etc/templates/inflowOutflowRotating/system/createBafflesDict-AMI b/etc/templates/inflowOutflowRotating/system/createBafflesDict-AMI deleted file mode 100644 index 7e5e4d275b..0000000000 --- a/etc/templates/inflowOutflowRotating/system/createBafflesDict-AMI +++ /dev/null @@ -1,45 +0,0 @@ -/*--------------------------------*- C++ -*----------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | Website: https://openfoam.org - \\ / A nd | Version: dev - \\/ M anipulation | -\*---------------------------------------------------------------------------*/ -FoamFile -{ - format ascii; - class dictionary; - object createBafflesDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -internalFacesOnly true; - -fields true; - -baffles -{ - baffleFaces - { - type faceZone; - zoneName rotatingZone; - - patches - { - master - { - name AMI1; - type cyclicAMI; - neighbourPatch AMI2; - } - slave - { - name AMI2; - type cyclicAMI; - neighbourPatch AMI1; - } - } - } -} - -// ************************************************************************* // diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index 3dc264550f..4397bca805 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -20,7 +20,6 @@ $(basicFvPatches)/generic/genericFvPatch.C constraintFvPatches = $(fvPatches)/constraint $(constraintFvPatches)/cyclic/cyclicFvPatch.C -$(constraintFvPatches)/cyclicAMI/cyclicAMIFvPatch.C $(constraintFvPatches)/cyclicSlip/cyclicSlipFvPatch.C $(constraintFvPatches)/empty/emptyFvPatch.C $(constraintFvPatches)/processor/processorFvPatch.C @@ -149,11 +148,9 @@ $(basicFvPatchFields)/zeroGradient/zeroGradientFvPatchFields.C constraintFvPatchFields = $(fvPatchFields)/constraint $(constraintFvPatchFields)/cyclic/cyclicFvPatchFields.C -$(constraintFvPatchFields)/cyclicAMI/cyclicAMIFvPatchFields.C $(constraintFvPatchFields)/cyclicSlip/cyclicSlipFvPatchFields.C $(constraintFvPatchFields)/empty/emptyFvPatchFields.C $(constraintFvPatchFields)/jumpCyclic/jumpCyclicFvPatchFields.C -$(constraintFvPatchFields)/jumpCyclicAMI/jumpCyclicAMIFvPatchFields.C $(constraintFvPatchFields)/processor/processorFvPatchFields.C $(constraintFvPatchFields)/processor/processorFvPatchScalarField.C $(constraintFvPatchFields)/processorCyclic/processorCyclicFvPatchFields.C @@ -181,7 +178,6 @@ $(derivedFvPatchFields)/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C $(derivedFvPatchFields)/fixedFluxExtrapolatedPressure/fixedFluxExtrapolatedPressureFvPatchScalarField.C $(derivedFvPatchFields)/fixedInternalValue/fixedInternalValueFvPatchFields.C $(derivedFvPatchFields)/fixedJump/fixedJumpFvPatchFields.C -$(derivedFvPatchFields)/fixedJumpAMI/fixedJumpAMIFvPatchFields.C $(derivedFvPatchFields)/fixedMean/fixedMeanFvPatchFields.C $(derivedFvPatchFields)/fixedNormalSlip/fixedNormalSlipFvPatchFields.C $(derivedFvPatchFields)/fixedPressureCompressibleDensity/fixedPressureCompressibleDensityFvPatchScalarField.C @@ -241,7 +237,6 @@ $(derivedFvPatchFields)/uniformFixedGradient/uniformFixedGradientFvPatchFields.C $(derivedFvPatchFields)/uniformFixedValue/uniformFixedValueFvPatchFields.C $(derivedFvPatchFields)/uniformInletOutlet/uniformInletOutletFvPatchFields.C $(derivedFvPatchFields)/uniformJump/uniformJumpFvPatchFields.C -$(derivedFvPatchFields)/uniformJumpAMI/uniformJumpAMIFvPatchFields.C $(derivedFvPatchFields)/uniformTotalPressure/uniformTotalPressureFvPatchScalarField.C $(derivedFvPatchFields)/variableHeightFlowRate/variableHeightFlowRateFvPatchField.C $(derivedFvPatchFields)/variableHeightFlowRateInletVelocity/variableHeightFlowRateInletVelocityFvPatchVectorField.C @@ -270,7 +265,6 @@ $(basicFvsPatchFields)/sliced/slicedFvsPatchFields.C constraintFvsPatchFields = $(fvsPatchFields)/constraint $(constraintFvsPatchFields)/cyclic/cyclicFvsPatchFields.C -$(constraintFvsPatchFields)/cyclicAMI/cyclicAMIFvsPatchFields.C $(constraintFvsPatchFields)/cyclicSlip/cyclicSlipFvsPatchFields.C $(constraintFvsPatchFields)/empty/emptyFvsPatchFields.C $(constraintFvsPatchFields)/processor/processorFvsPatchFields.C diff --git a/src/finiteVolume/algorithms/FvFaceCellWave/FvFaceCellWave.C b/src/finiteVolume/algorithms/FvFaceCellWave/FvFaceCellWave.C index 0b73472635..2153d89327 100644 --- a/src/finiteVolume/algorithms/FvFaceCellWave/FvFaceCellWave.C +++ b/src/finiteVolume/algorithms/FvFaceCellWave/FvFaceCellWave.C @@ -26,7 +26,6 @@ License #include "FvFaceCellWave.H" #include "processorFvPatch.H" #include "cyclicFvPatch.H" -#include "cyclicAMIFvPatch.H" #include "CompactListList.H" #include "OPstream.H" #include "IPstream.H" @@ -528,194 +527,6 @@ Foam::FvFaceCellWave::handleCyclicPatches() } -template -void -Foam::FvFaceCellWave::handleCyclicAMIPatches() -{ - // Define combine operator for AMIInterpolation - - class combine - { - FvFaceCellWave& solver_; - - const cyclicAMIFvPatch& patch_; - - public: - - combine - ( - FvFaceCellWave& solver, - const cyclicAMIFvPatch& patch - ) - : - solver_(solver), - patch_(patch) - {} - - void operator() - ( - Type& x, - const label patchFacei, - const Type& y, - const scalar weight - ) const - { - if (y.valid(solver_.data())) - { - x.updateFace - ( - solver_.mesh(), - {patch_.index(), patchFacei}, - y, - solver_.propagationTol(), - solver_.data() - ); - } - } - }; - - - // Transfer information across cyclicAMI halves. - - forAll(mesh_.boundaryMesh(), patchi) - { - const fvPatch& patch = mesh_.boundary()[patchi]; - - if (isA(patch)) - { - const cyclicAMIFvPatch& cycPatch = - refCast(patch); - const cyclicAMIFvPatch& nbrPatch = cycPatch.nbrPatch(); - - // Create a combine operator to transfer sendInfo from nbrPatch - // to cycPatch - combine cmb(*this, cycPatch); - - // Get nbrPatch data (so not just changed faces) - List sendInfo(patchFaceInfo_[nbrPatch.index()]); - - // Construct default values, if necessary - List defVals; - if (cycPatch.applyLowWeightCorrection()) - { - defVals = cycPatch.patch().patchInternalList(cellInfo_); - } - - // Interpolate from nbrPatch to cycPatch, applying AMI - // transforms as necessary - List receiveInfo; - if (cycPatch.owner()) - { - forAll(cycPatch.AMIs(), i) - { - if (cycPatch.AMITransforms()[i].transformsPosition()) - { - List sendInfoT(sendInfo); - transform - ( - nbrPatch, - nbrPatch.size(), - identity(nbrPatch.size()), - cycPatch.AMITransforms()[i], - sendInfo - ); - cycPatch.AMIs()[i].interpolateToSource - ( - sendInfoT, - cmb, - receiveInfo, - defVals - ); - } - else - { - cycPatch.AMIs()[i].interpolateToSource - ( - sendInfo, - cmb, - receiveInfo, - defVals - ); - } - } - } - else - { - forAll(nbrPatch.AMIs(), i) - { - if (nbrPatch.AMITransforms()[i].transformsPosition()) - { - List sendInfoT(sendInfo); - transform - ( - nbrPatch, - nbrPatch.size(), - identity(nbrPatch.size()), - nbrPatch.AMITransforms()[i], - sendInfo - ); - cycPatch.nbrPatch().AMIs()[i].interpolateToTarget - ( - sendInfoT, - cmb, - receiveInfo, - defVals - ); - } - else - { - cycPatch.nbrPatch().AMIs()[i].interpolateToTarget - ( - sendInfo, - cmb, - receiveInfo, - defVals - ); - } - } - } - - // Shuffle up to remove invalid info - DynamicList