CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to use findCelloctree (https://www.cfd-online.com/Forums/openfoam-solving/60371-how-use-findcelloctree.html)

chen_jun September 6, 2005 07:40

I have found the following usa
 
I have found the following usage:
findCell-octree <root> <case> <point> [-parallel]

So I typed "findCell-octree . cavity (0.05 0.05 0.005)". But it didn't work. How should I input the point?

A stupid question, Thanks!

henry September 6, 2005 13:20

You will need to put the (0.0
 
You will need to put the (0.05 0.05 0.005) in quotes otherwise the shell parses each piece as a separate argument:

findCell-octree . cavity "(0.05 0.05 0.005)"

olivier September 16, 2005 10:44

Hi How to find the faces of
 
Hi
How to find the faces of a wall and the cells adjacent with a face (I know the patchId of this Wall)?
thanks a lot

eugene September 16, 2005 12:04

OpenFOAM-1.2/src/OpenFOAM/lnIn
 
OpenFOAM-1.2/src/OpenFOAM/lnInclude/fvPatch.H
line 187-188:
//- Return faceCells
const labelList::subList faceCells() const;

mattijs September 16, 2005 13:14

const fvPatch& fvp = mesh.boun
 
const fvPatch& fvp = mesh.boundary()[patchId];

You can get to the lower level geometry:

const polyPatch& pp = fvp.patch()

Then you have the

.start() and .size() to give you the face indices and lots more (polyPatch.H)

olivier September 18, 2005 11:45

thanks Mattijs and Eugene, now
 
thanks Mattijs and Eugene, now I can get the centre of cells, but for patch I need to get the number of this kind of cells.
do you know how can I get it?

eugene September 19, 2005 06:11

I dont quite understand what y
 
I dont quite understand what you are getting at.

labelList::subList someName = mesh.boundary()[patchId].faceCells();

forAll(someName, snI)
{
label boundaryFaceIndex = mesh.boundary()[patchId].patch().start() + snI;
label currentFaceCellIndex = someName[snI];
const vector& currentCellCentre = mesh.C()[currentFaceCellIndex];
}

Will give you access to the label of the cell adjacent to boundary face with global index "boundaryFaceIndex". The cell centre being at "currentCellCentre".

If you mean by "number" the total count of cells adjacent to the specific boundary, then you need to do it manually, i.e. check if a cell has been counted, if not add one to the total and mark the cell as counted via a boolList or some such.

olivier September 19, 2005 09:38

Thank you Eugene I think that
 
Thank you Eugene
I think that it is what I seek. but I have the error message with
label currentFaceCellIndex =someName[snI];

In function `int main(int, char**)':
/home/baily/OpenFOAM/OpenFOAM-1.1/src/OpenFOAM/lnInclude/SubList.H:61: error: `T& Foam::SubList<t>::operator[](Foam::label) [with T = Foam::label]' is private
NewSolverFoam.C:398: error: within this context

thank you for your help

eugene September 19, 2005 09:56

Try, const labelList::subLi
 
Try,

const labelList::subList& someName = mesh.boundary()[patchId].faceCells();

and

const label& currentFaceCellIndex = someName[snI];

Please see
OpenFOAM-1.1/src/OpenFOAM/lnInclude/SubList.H:61
for why things are the way they are.

langloi December 19, 2005 20:35

Hi, please how can I get th
 
Hi,
please how can I get the cells neighbour for a given cell.

--
thanks

mattijs December 20, 2005 05:12

mesh.cellCells() http://www
 
mesh.cellCells()[cellI]

http://www.cfd-online.com/cgi-bin/Op...=1727#POST1727

langloi December 20, 2005 09:18

thank you you are the best :-)
 
thank you you are the best :-)


All times are GMT -4. The time now is 19:30.