|
[Sponsors] |
Shortest distance between cell and boundary (in parallel) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
March 23, 2016, 00:26 |
Shortest distance between cell and boundary (in parallel)
|
#1 |
Member
Ripudaman Manchanda
Join Date: May 2013
Posts: 55
Rep Power: 12 |
Hello FOAMers,
I have a topologically changing mesh where the boundary changes in size by splitting the internal faces and converting them to boundary faces. This is illustrated using the ACP methodology in the solidMechanics solvers. I want to dynamically refine my mesh based on distance from this growing boundary. So basically I would like to create a volScalarField (or scalarField) that I could use in the dynamicRefinement dictionary. So, in short, I want a method to calculate the shortest distance between a cell and a boundary patch. I could do this myself but I anticipate parallelization of that procedure to be a difficult detail to handle. Thus, before I dive into it I wanted to ask my dear FOAMers if they have ever done anything like this before. Is there anything out there that could help me? Thanks. Cheers, Ripu |
|
March 23, 2016, 04:31 |
|
#2 |
Senior Member
Join Date: Oct 2013
Posts: 397
Rep Power: 18 |
See this thread for a function to gather decomposed fields (such as cell or face centres) from all the processors: http://www.cfd-online.com/Forums/ope...processor.html
Once you have all the positions it's simply a matter of searching for nearest distance. I expect this to be quite slow though, of order O(n^1.666), with n being the number of cells, so I would think about doing some kind of nearest neighbour search, starting from the face which was closest last time if possible. |
|
March 23, 2016, 08:45 |
|
#3 |
Member
Ripudaman Manchanda
Join Date: May 2013
Posts: 55
Rep Power: 12 |
That's an interesting idea. I can probably map the global field below sorting to help keep track. The slowness is what bothers me though. I wanted to do this inside a loop that will be called 100s of times in small meshes and 1000s in larger meshes. That'll make it very slow. I was thinking of using a cell-cell approach but I am not sure if it will be easy to go across processor boundaries. Any suggestions or best practices?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Find distance from a cell to a Boundary patch | oehmu | OpenFOAM Programming & Development | 1 | March 22, 2016 23:47 |
Distance between boundary cell and boundary face | STutexas | OpenFOAM Running, Solving & CFD | 1 | March 13, 2016 07:40 |
Boundary layer first cell distance | ACER | STAR-CCM+ | 1 | July 19, 2012 10:23 |
[Commercial meshers] Trimmed cell and embedded refinement mesh conversion issues | michele | OpenFOAM Meshing & Mesh Conversion | 2 | July 15, 2005 04:15 |
Convective Heat Transfer - Heat Exchanger | Mark | CFX | 6 | November 15, 2004 15:55 |