|
[Sponsors] |
February 14, 2009, 11:31 |
How to identify cell neighbours
|
#1 |
Member
Join Date: Mar 2009
Posts: 35
Rep Power: 17 |
Hello,
i am new in openFoam and i donīt know how to identify and output the neighbours of a cell[i]! Is it possible in openFaom? I hope someone can help me! Thanks and kind regards Khaled |
|
February 14, 2009, 14:52 |
Hi Khaled
mesh.cellCell
|
#2 |
Senior Member
|
Hi Khaled
mesh.cellCells()[cellI] gives the neighbours of cell cellI su junwei |
|
February 15, 2009, 05:58 |
Hi su junwei,
thanks very m
|
#3 |
Member
Join Date: Mar 2009
Posts: 35
Rep Power: 17 |
Hi su junwei,
thanks very much. And with "Info<< mesh.cellCells()[celli]<< endl;" I put out the neighbours of celli? Regards, Khaled |
|
February 15, 2009, 06:16 |
Yes, Khaled, you can print the
|
#4 |
Senior Member
|
Yes, Khaled, you can print them out. This is a list of cell index in the neighbourhood.
Junwei |
|
February 15, 2009, 06:30 |
Thanks Su. Iīll try it now.
|
#5 |
Member
Join Date: Mar 2009
Posts: 35
Rep Power: 17 |
Thanks Su. Iīll try it now.
Btw. do you know how to integrate over a special patch or is it possible with openfoam? Thanks and regards khaled |
|
February 15, 2009, 06:41 |
Hi Khaled
patchIntegra
|
#6 |
Senior Member
|
Hi Khaled
patchIntegrate can be used to integrate over a special patch, you can use it like this patchIntegrate fieldname patchname. This is a postprocessing utility. Junwei |
|
February 15, 2009, 07:07 |
Hi Su Junwei,
oh ok, thanks
|
#7 |
Member
Join Date: Mar 2009
Posts: 35
Rep Power: 17 |
Hi Su Junwei,
oh ok, thanks. But mybe i hope you ask my last question here. Exactly i want to integrate over the patch "outlet" of the pressure field "p". So then i only write patchIntegrate p [1] if the patchname is [1]? Thanks, Khaled |
|
February 15, 2009, 14:19 |
Hi khaled
yes. That's Ok.
|
#8 |
Senior Member
|
Hi khaled
yes. That's Ok. Just test it. Junwei |
|
June 2, 2010, 12:24 |
number of cell neighbours
|
#9 |
New Member
Ritu Marpu
Join Date: Oct 2009
Posts: 3
Rep Power: 17 |
Hi Su,
Thanks for the hint, it was very helpful. I was wondering if there is a command to find the number of cell neighbours for a cell. mesh.cellCells()[cellI] gives <no. of neighbouring cells>(<neighbours>) If I want just the <no. of neighbouring cells> alone, how do I get it ? Thanks. |
|
June 6, 2010, 03:04 |
|
#10 |
Senior Member
|
Hi Ritu
Just using the size function like this label neighbourCount=mesh.cellCells()[cellI].size() sorry for late response Junwei |
|
November 16, 2010, 17:31 |
closest cell from point
|
#11 |
Member
Pascal
Join Date: Jun 2009
Location: Montreal
Posts: 65
Rep Power: 17 |
Hi Su Junwei and Khaled,
Does anyone know how to select the closest cell near the point (x,y,z)? Thank you, Pascal |
|
November 17, 2010, 01:16 |
|
#12 |
Senior Member
|
Hi Pascal
you can use the following code meshSearch ms(mesh); label nearestCellIndex = ms.findNearestCell(p); p is your point for searching nearest cell. nearestCellIndex is the cell index that you want. Don't forget to include "meshSearch.H" Junwei |
|
November 17, 2010, 02:58 |
|
#13 |
Senior Member
Kathrin Kissling
Join Date: Mar 2009
Location: Besigheim, Germany
Posts: 134
Rep Power: 17 |
Hi Pascal,
alternatively you can use label labelOfClosestCell mesh.findCell(c y z); Best Kathrin |
|
December 9, 2010, 10:38 |
|
#14 |
Member
O R
Join Date: Mar 2009
Posts: 50
Rep Power: 17 |
Hi
I was looking in the forum and I hope you might help me? I want to identify cells whose face(s) are in a patch and give them a value what would it the the best way ? Thanks O. R. |
|
December 9, 2010, 17:33 |
post processing
|
#15 |
Member
|
Hi everybody,
I am trying to model a free turbulent jet with LES. In part of my project I have to determine value of some variables along a specific line inside my domain to compare my results with my refrences results but I dont know how I can do that? I would appreciate any help. best regards, Yashar |
|
December 10, 2010, 09:42 |
|
#16 | |
Senior Member
|
Quote:
|
||
December 10, 2010, 09:45 |
|
#17 | |
Senior Member
|
Quote:
Just use faceCells in polyPatch class. faceCells give you the index of a cell who owns the current patch face. Regards, Junwei |
||
December 10, 2010, 13:14 |
|
#18 |
Member
|
Hi Su,
thank you very much for your response. indeed, I want to compute my jet width along the jet centreline. for that reason, I have to determine the centreline velocity(u(x,0,0)) that is function of x-axis then compute distance from jet centreline in y-direction where the x component of velocity become half of the centreline velocity. is there any utility that can do that for me or I have to write a code? |
|
December 11, 2010, 04:50 |
|
#19 | |
Senior Member
|
Quote:
1) Cut several planes along centreline transversely. 2) select points on these planes. These points are not necessary on the cell center. 3) interpolate values to the selected points 4) find the point who has maximum velocity on each plane, and this point is on the cenerline 5) loop all the planes. In each planes, fix Y, and change z from min to maximum, and find the two points who has the most approaching value to half the maximum velocity. Distance between these two points is the jet width on this line. In 3D the wide should be different for different Y. The points you selected shoud cover your jets. The algorithm is an approximated method. If you have problem in implementation, please let me know. Regards, Junwei |
||
December 11, 2010, 10:40 |
|
#20 | |
Member
|
Quote:
I really appreciate all the help you gave me. basically, I think that it would better for me to export my result to a .dat file and write a separate(from OF) code to digest in my data but I would appreciate if you could answer my question: how I could export my data so that I could specify and link for each point(cell centre) , the position(x,y,z) and velocity(u,v,w) variables of that point as a same file? Best regards, Yashar |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[mesh manipulation] Importing Multiple Meshes | thomasnwalshiii | OpenFOAM Meshing & Mesh Conversion | 18 | December 19, 2015 19:57 |
Determining cell neighbours on unstructured grid | orxan.shibli | Main CFD Forum | 4 | September 25, 2011 06:29 |
Help Me, what's the Cell Above any given cell in 3D. | gomane8 | Main CFD Forum | 3 | September 11, 2011 22:29 |
neighbours of a cell | Asghari | FLUENT | 17 | October 7, 2010 18:41 |
neighbours of a cell | Asghari | FLUENT | 0 | July 9, 2006 14:28 |