|
[Sponsors] |
July 20, 2021, 12:21 |
myBC does not work in parallel
|
#1 |
Member
UOCFD
Join Date: Oct 2020
Posts: 40
Rep Power: 6 |
I have tried to modify the activePressureForceBaffleVelocity BC.
It works fine in a single processor but not in parallel. Any hint? Code:
const fvPatch& cyclicPatch = patch().boundaryMesh()[cyclicPatchLabel_]; const labelList& cyclicFaceCells = cyclicPatch.patch().faceCells(); const fvPatch& nbrPatch = refCast<const cyclicFvPatch> ( cyclicPatch ).neighbFvPatch(); const labelList& nbrFaceCells = nbrPatch.patch().faceCells(); scalar valueDiff = 0; scalar valueDiffAvg = 0; const scalar& cyclicFacesNumber = cyclicFaceCells.size(); //scalar cyclicFacesNumber = cyclicFaceCells.size(); //scalar cyclicFacesNumber = 0; Info<< "Show = " << cyclicFaceCells.size() << endl; Info<< "Faces in each cyclic baffle1 = " << cyclicFacesNumber << endl; if (fBased_) { ... } else // pressure based { forAll(cyclicFaceCells, facei) { valueDiff += p[cyclicFaceCells[facei]]; } forAll(nbrFaceCells, facei) { valueDiff -= p[nbrFaceCells[facei]]; } if (cyclicFacesNumber>0) { valueDiffAvg = valueDiff/cyclicFacesNumber; Info<< "Faces in each cyclic baffle2 = " << cyclicFacesNumber << endl; Info<< "Baffle face-averaged deltaP = " << valueDiffAvg << endl; } Info<< "Pressure difference = " << valueDiff << endl; } //if ((mag(valueDiff) > mag(minThresholdValue_)) || baffleActivated_) if ((mag(valueDiffAvg) > mag(minThresholdValue_)) || baffleActivated_) |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Communication Deadlock in MPPICFoam Parallel Solver | auburnhpc | OpenFOAM Running, Solving & CFD | 1 | May 29, 2021 17:55 |
The problem when i use parallel computation for mesh deforming. | Hiroaki Sumikawa | OpenFOAM Running, Solving & CFD | 0 | November 20, 2018 03:58 |
[snappyHexMesh] OpenFoam in parallel with sHM and sFE | pradyumnsingh | OpenFOAM Meshing & Mesh Conversion | 4 | October 26, 2018 17:25 |
problem during mpi in server: expected Scalar, found on line 0 the word 'nan' | muth | OpenFOAM Running, Solving & CFD | 3 | August 27, 2018 05:18 |
Cases with small length scale work fine on a single processor but fail in parallel | adona058 | OpenFOAM Bugs | 5 | April 17, 2009 05:41 |