|
[Sponsors] |
June 8, 2011, 12:55 |
creating faceSet
|
#1 |
Member
Ganesh Vijayakumar
Join Date: Jan 2010
Posts: 44
Rep Power: 16 |
I need to create a list of faceSets as follows
PtrList<faceSet> faceSetList(hFaceLevelsTotal) ; forAll(faceSetList,hLevel) { boxToFace thisLevel(mesh, treeBoundBox(point(0.0, 0.0, double(hLevel)*dz-dz/10.0),point(L,L, double(hLevel)*dz+dz/10.0))) ; faceSetList.set(hLevel, new faceSet(mesh,"blah",0)) ; thisLevel.applyToSet(topoSetSource::NEW, faceSetList[hLevel]) ; } I then loop over the faces to get the average in the faceSet as follows. forAll(faceSetList, hLevel) { bAvg[hLevel] = 0 ; forAllConstIter(faceSet, faceSetList[hLevel], iter) { label faceI = iter.key() ; bAvg[hLevel] = bAvg[hLevel]+[faceI]; } } This seems to work on a smaller grid with 32 procs. But when I scale it up to a much larger grid with 96 procs it always fails after 3 iterations no matter what my initial condition is. The code runs fine without this averaging step. I have a feeling it has something to do with how I am using iter.key(). Can anyone throw some light on this? Also is there a way to make the boxToFace avoid boundary faces? ganesh |
|
June 15, 2011, 10:13 |
Wrong method
|
#2 |
Member
Ganesh Vijayakumar
Join Date: Jan 2010
Posts: 44
Rep Power: 16 |
This is the wrong way to create the faceSet. It turns out that if we try to create the faceSet after domain decomposition, additional processor boundary faces are added. The best way to do this was to use a script with setSet, use setsToZones and then use simpleFunctionObjects like before to average them. The only problem was that I had to write a script to write the functionObjects part of the controlDict.
|
|
Tags |
boxtoface, faceset |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating faceSet on stl-surface | mjans | OpenFOAM Pre-Processing | 2 | April 17, 2019 03:43 |
OpenFoam restarting simulation, stops at first Time loop | syntex | OpenFOAM Running, Solving & CFD | 4 | April 5, 2019 12:20 |
Possible Bug in pimpleFoam (or createPatch) (or fluent3DMeshToFoam) | cfdonline2mohsen | OpenFOAM | 3 | October 21, 2013 10:28 |
Creating nonOrtho faceSet | alf12 | OpenFOAM Pre-Processing | 0 | August 7, 2012 12:52 |
Problem in running ICEM grid in Openfoam | Tarak | OpenFOAM | 6 | September 9, 2011 18:51 |