|
[Sponsors] |
May 2, 2015, 16:54 |
Filter problem with unallocLabelList
|
#1 |
Senior Member
Join Date: Sep 2010
Posts: 226
Rep Power: 16 |
Hello Foamers,
Recently i was stuck with "const unallocLabelList& mesh.cellCells()". Here it is the story: I am trying to create a spatial filter based on number of levels for neighbourhood cells but that can be limited to a predefined user disk (or sphere if 3D) of radius R for neighbourhood cells. The filter loops overall mesh cells and for each cell it must identify only all the neighbourhood cells which are lying inside the disk of radius R. The filter is as the following: C_i = sum(C_n * H_ni) / sum(H_ni) with i=cell index, n=neighbourhood cell index and H_ni = R - mag(C_i - C_n) I followed an approach of a recursive function in a class to do this by calling itself, but the problem lies in the neigbours of neigbours indices update using the cellCells() function. I can not update the indices each time after calling my function due to the nature of const unallocLabelList& ? so any ideas ? i tried all like dynamic lists and labelList pointers, etc.. also I tried to do this filter by modifying the already class member functions fvc::average(), or spread(), etc.. but without success ! Any help or ideas ?? any other proposed approaches will be welcomed .. Thanks Best Regards, T.D. |
|
May 10, 2015, 15:30 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Quick answer: The only things that come to mind right now are:
|
|
May 11, 2015, 05:49 |
|
#3 | |
Senior Member
Join Date: Sep 2010
Posts: 226
Rep Power: 16 |
Quote:
Hi wyldckat, thanks a lot. Yes, really, i was looking at what is done with LES the last week. But with no success.. i will look at the "wallDist", and IDDES.. Thanks a lot, Best regards, T.D. |
||
May 18, 2015, 15:25 |
|
#4 | |||
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Hi T.D.,
I hope you don't mind, but I'll answer the question you sent me via PM here on this thread of yours: Quote:
Quote:
Quote:
As for searching techniques: http://openfoamwiki.net/index.php/In...hing_for_files Good luck! Best regards, Bruno |
||||
May 19, 2015, 04:03 |
|
#5 | |
Senior Member
Join Date: Sep 2010
Posts: 226
Rep Power: 16 |
Hi Bruno,
Thanks Here my example as the following: I am doing a loop on all mesh cells, and i modify each cell value based on the neighboring cells values by calling the function mesh.cellCells(). This is Ok in serial. But in parallel, the function mesh.cellCells() runs but not correctly due to decomposition of the domain (it does mixing of cells IDs without taking in account the domain on each proc.). So my real problem is how to handle this issue in parallel ? In another way, how to handle this function to work fine on each processor ? Thanks, T.D. Quote:
|
||
September 20, 2015, 08:08 |
|
#6 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128 |
Hi T.D.,
I've had this on my to-do list for sometime and only now did I finally managed to at least think a bit more about this. I don't know if you've found a solution for this, but here's what comes to mind: The first solution that comes to mind is to actually have more control over the decomposition itself, i.e. to avoid that a specific faceZone or faceSet is kept all inside the same processor. This can be achieved with the keywords "preserveFaceZones" and "singleProcessorFaceSets". More details are provided in the main example dictionary file "applications/utilities/parallelProcessing/decomposePar/decomposeParDict": https://github.com/OpenFOAM/OpenFOAM...composeParDict The second solution I can think of requires an auxiliary field, similar to the wave algorithm for calculating distances that is already used in OpenFOAM. The difference is that instead of a single value being stored inside each face centre, you would need a more complex field, e.g. a 3D tensor (3x3x3), that has the sums for each direction. The other downside to this is that it requires a specific equation for calculating this... which depends on what you're trying to calculate. The idea here is that since the values are then calculated with equations, the solver will take care of propagating the values between neighbours, since the values are stored on the faces of the cells, which are transported via processor patches. Beyond this, I can't think of more solutions right now. Best regards, Bruno
__________________
|
|
September 21, 2015, 02:56 |
|
#7 |
Senior Member
Join Date: Sep 2010
Posts: 226
Rep Power: 16 |
Hi Bruno,
Thank you very much. I will think about it.. Best Regards, T.D. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
area does not match neighbour by ... % -- possible face ordering problem | St.Pacholak | OpenFOAM | 10 | February 7, 2024 21:50 |
LES Filter function | cfdmms | Main CFD Forum | 0 | August 29, 2014 02:58 |
Problem in implementing cht | tilek | CFX | 3 | May 8, 2011 08:39 |
natural convection problem for a CHT problem | Se-Hee | CFX | 2 | June 10, 2007 06:29 |
Adiabatic and Rotating wall (Convection problem) | ParodDav | CFX | 5 | April 29, 2007 19:13 |