CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

How to use findCelloctree

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   September 6, 2005, 07:40
Default I have found the following usa
  #1
chen_jun
Guest
 
Posts: n/a
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!
  Reply With Quote

Old   September 6, 2005, 13:20
Default You will need to put the (0.0
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 14
henry is on a distinguished road
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)"
henry is offline   Reply With Quote

Old   September 16, 2005, 10:44
Default Hi How to find the faces of
  #3
Member
 
olivier Petit
Join Date: Mar 2009
Location: Göteborg, Sweden
Posts: 67
Rep Power: 9
olivier is on a distinguished road
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
olivier is offline   Reply With Quote

Old   September 16, 2005, 12:04
Default OpenFOAM-1.2/src/OpenFOAM/lnIn
  #4
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 13
eugene is on a distinguished road
OpenFOAM-1.2/src/OpenFOAM/lnInclude/fvPatch.H
line 187-188:
//- Return faceCells
const labelList::subList faceCells() const;
eugene is offline   Reply With Quote

Old   September 16, 2005, 13:14
Default const fvPatch& fvp = mesh.boun
  #5
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 17
mattijs is on a distinguished road
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)
mattijs is offline   Reply With Quote

Old   September 18, 2005, 11:45
Default thanks Mattijs and Eugene, now
  #6
Member
 
olivier Petit
Join Date: Mar 2009
Location: Göteborg, Sweden
Posts: 67
Rep Power: 9
olivier is on a distinguished road
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?
olivier is offline   Reply With Quote

Old   September 19, 2005, 06:11
Default I dont quite understand what y
  #7
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 13
eugene is on a distinguished road
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.
eugene is offline   Reply With Quote

Old   September 19, 2005, 09:38
Default Thank you Eugene I think that
  #8
Member
 
olivier Petit
Join Date: Mar 2009
Location: Göteborg, Sweden
Posts: 67
Rep Power: 9
olivier is on a distinguished road
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
olivier is offline   Reply With Quote

Old   September 19, 2005, 09:56
Default Try, const labelList::subLi
  #9
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 13
eugene is on a distinguished road
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.
eugene is offline   Reply With Quote

Old   December 19, 2005, 21:35
Default Hi, please how can I get th
  #10
langloi
Guest
 
Posts: n/a
Hi,
please how can I get the cells neighbour for a given cell.

--
thanks
  Reply With Quote

Old   December 20, 2005, 06:12
Default mesh.cellCells() http://www
  #11
Super Moderator
 
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,416
Rep Power: 17
mattijs is on a distinguished road
mesh.cellCells()[cellI]

http://www.cfd-online.com/cgi-bin/Op...=1727#POST1727
mattijs is offline   Reply With Quote

Old   December 20, 2005, 10:18
Default thank you you are the best :-)
  #12
langloi
Guest
 
Posts: n/a
thank you you are the best :-)
  Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 15:00.