diff --git a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C index 688aceb5..e4a64e38 100644 --- a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C +++ b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.C @@ -126,6 +126,7 @@ cfdemCloud::cfdemCloud mesh, dimensionedScalar("zero", dimensionSet(0,0,-1,0,0), 0) // 1/s ), + checkPeriodicCells_(false), turbulence_ ( mesh.lookupObject @@ -298,6 +299,29 @@ cfdemCloud::cfdemCloud dataExchangeM().setCG(); if (!cgOK_ && cg_ > 1) FatalError<< "at least one of your models is not fit for cg !!!"<< abort(FatalError); + + // check if simulation is a fully periodic box + const polyBoundaryMesh& patches = mesh_.boundaryMesh(); + int nPatchesCyclic(0); + int nPatchesNonCyclic(0); + forAll(patches, patchI) + { + const polyPatch& pp = patches[patchI]; + if (isA(pp) || isA(pp)) + ++nPatchesCyclic; + else if (!isA(pp)) + ++nPatchesNonCyclic; + } + + if (nPatchesNonCyclic == 0) + { + checkPeriodicCells_ = true; + } + else if (nPatchesCyclic > 0 && nPatchesNonCyclic > 0) + { + if (verbose_) Info << "nPatchesNonCyclic=" << nPatchesNonCyclic << ", nPatchesCyclic=" << nPatchesCyclic << endl; + Warning << "Periodic handing is disabled because the domain is not fully periodic!\n" << endl; + } } // * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * // diff --git a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H index 9b84aa73..bf014ddf 100644 --- a/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H +++ b/src/lagrangian/cfdemParticle/cfdemCloud/cfdemCloud.H @@ -160,6 +160,8 @@ protected: mutable volScalarField ddtVoidfraction_; + mutable Switch checkPeriodicCells_; + const turbulenceModel& turbulence_; autoPtr* forceModel_; @@ -395,6 +397,8 @@ public: void resetArray(double**&,int,int,double resetVal=0.); void otherForces(volVectorField&); + + bool checkPeriodicCells() { return checkPeriodicCells_; } };