|
[Sponsors] |
![]() |
![]() |
#1 |
Member
Join Date: Mar 2009
Posts: 35
Rep Power: 18 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#2 |
Senior Member
|
Hi Khaled
mesh.cellCells()[cellI] gives the neighbours of cell cellI su junwei |
|
![]() |
![]() |
![]() |
![]() |
#3 |
Member
Join Date: Mar 2009
Posts: 35
Rep Power: 18 ![]() |
Hi su junwei,
thanks very much. And with "Info<< mesh.cellCells()[celli]<< endl;" I put out the neighbours of celli? Regards, Khaled |
|
![]() |
![]() |
![]() |
![]() |
#4 |
Senior Member
|
Yes, Khaled, you can print them out. This is a list of cell index in the neighbourhood.
Junwei |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Member
Join Date: Mar 2009
Posts: 35
Rep Power: 18 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#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 |
|
![]() |
![]() |
![]() |
![]() |
#7 |
Member
Join Date: Mar 2009
Posts: 35
Rep Power: 18 ![]() |
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 |
|
![]() |
![]() |
![]() |
![]() |
#8 |
Senior Member
|
Hi khaled
yes. That's Ok. Just test it. Junwei |
|
![]() |
![]() |
![]() |
![]() |
#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. |
|
![]() |
![]() |
![]() |
![]() |
#10 |
Senior Member
|
Hi Ritu
Just using the size function like this label neighbourCount=mesh.cellCells()[cellI].size() sorry for late response Junwei |
|
![]() |
![]() |
![]() |
![]() |
#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 |
|
![]() |
![]() |
![]() |
![]() |
#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 |
|
![]() |
![]() |
![]() |
![]() |
#13 |
Senior Member
Kathrin Kissling
Join Date: Mar 2009
Location: Besigheim, Germany
Posts: 134
Rep Power: 18 ![]() |
Hi Pascal,
alternatively you can use label labelOfClosestCell mesh.findCell(c y z); Best Kathrin |
|
![]() |
![]() |
![]() |
![]() |
#14 |
Member
O R
Join Date: Mar 2009
Posts: 50
Rep Power: 18 ![]() |
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. |
|
![]() |
![]() |
![]() |
![]() |
#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 |
|
![]() |
![]() |
![]() |
![]() |
#16 | |
Senior Member
|
Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#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 |
||
![]() |
![]() |
![]() |
![]() |
#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? |
|
![]() |
![]() |
![]() |
![]() |
#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 |
||
![]() |
![]() |
![]() |
![]() |
#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 |
||
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
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 |