|
[Sponsors] |
![]() |
![]() |
#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! |
|
![]() |
![]() |
![]() |
#2 |
Senior Member
Join Date: Mar 2009
Posts: 854
Rep Power: 23 ![]() |
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)" |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
olivier Petit
Join Date: Mar 2009
Location: Göteborg, Sweden
Posts: 67
Rep Power: 18 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 22 ![]() |
OpenFOAM-1.2/src/OpenFOAM/lnInclude/fvPatch.H
line 187-188: //- Return faceCells const labelList::subList faceCells() const; |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 27 ![]() |
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) |
|
![]() |
![]() |
![]() |
![]() |
#6 |
Member
olivier Petit
Join Date: Mar 2009
Location: Göteborg, Sweden
Posts: 67
Rep Power: 18 ![]() |
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? |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 22 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#8 |
Member
olivier Petit
Join Date: Mar 2009
Location: Göteborg, Sweden
Posts: 67
Rep Power: 18 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#9 |
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 22 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#10 |
Guest
Posts: n/a
|
Hi,
please how can I get the cells neighbour for a given cell. -- thanks |
|
![]() |
![]() |
![]() |
#11 |
Senior Member
Mattijs Janssens
Join Date: Mar 2009
Posts: 1,419
Rep Power: 27 ![]() |
||
![]() |
![]() |
![]() |
![]() |
#12 |
Guest
Posts: n/a
|
thank you you are the best :-)
|
|
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|