|
[Sponsors] |
September 6, 2005, 08:40 |
I have found the following usa
|
#1 |
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! |
|
September 6, 2005, 14:20 |
You will need to put the (0.0
|
#2 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 22 |
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)" |
|
September 16, 2005, 11:44 |
Hi
How to find the faces of
|
#3 |
Member
olivier Petit
Join Date: Mar 2009
Location: Göteborg, Sweden
Posts: 67
Rep Power: 17 |
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 |
|
September 16, 2005, 13:04 |
OpenFOAM-1.2/src/OpenFOAM/lnIn
|
#4 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21 |
OpenFOAM-1.2/src/OpenFOAM/lnInclude/fvPatch.H
line 187-188: //- Return faceCells const labelList::subList faceCells() const; |
|
September 16, 2005, 14:14 |
const fvPatch& fvp = mesh.boun
|
#5 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
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) |
|
September 18, 2005, 12:45 |
thanks Mattijs and Eugene, now
|
#6 |
Member
olivier Petit
Join Date: Mar 2009
Location: Göteborg, Sweden
Posts: 67
Rep Power: 17 |
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? |
|
September 19, 2005, 07:11 |
I dont quite understand what y
|
#7 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21 |
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. |
|
September 19, 2005, 10:38 |
Thank you Eugene
I think that
|
#8 |
Member
olivier Petit
Join Date: Mar 2009
Location: Göteborg, Sweden
Posts: 67
Rep Power: 17 |
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 |
|
September 19, 2005, 10:56 |
Try,
const labelList::subLi
|
#9 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 21 |
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. |
|
December 19, 2005, 21:35 |
Hi,
please how can I get th
|
#10 |
Guest
Posts: n/a
|
Hi,
please how can I get the cells neighbour for a given cell. -- thanks |
|
December 20, 2005, 06:12 |
mesh.cellCells()
http://www
|
#11 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 26 |
||
December 20, 2005, 10:18 |
thank you you are the best :-)
|
#12 |
Guest
Posts: n/a
|
thank you you are the best :-)
|
|
Thread Tools | Search this Thread |
Display Modes | |
|
|