CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Shortest distance between patches faces

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 7, 2021, 10:11
Default Shortest distance between patches faces
  #1
Member
 
Join Date: Feb 2020
Posts: 90
Rep Power: 6
Shibi is on a distinguished road
Hello to all,


I would like to know if there is any built-in function in OpenFoam to calculate the shortest distance between a face and a certain patch. In addition, any ideas on how I can filter the e.g., 20% faces further from a patch?


The image bellow is a resume of what is intended.




Shibi is offline   Reply With Quote

Old   April 18, 2021, 04:35
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,685
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
First thoughts. I think you would need a modified mesh wave similar to this
https://www.openfoam.com/documentati...e.html#details

but with the face centres for the tracking quantity. After that, you will need some global reduction to know min/max limits. After that your fun really starts. How do you bin things to ensure that you pick up your 20‰ of the faces? How do you coordinate this in parallel? Do you consider all faces, or pre/post-filter to only consider faces mostly parallel to the patch? Do you handle curved patches?
olesen is offline   Reply With Quote

Old   April 18, 2021, 06:29
Default
  #3
Member
 
Join Date: Feb 2020
Posts: 90
Rep Power: 6
Shibi is on a distinguished road
Quote:
Originally Posted by olesen View Post
First thoughts. I think you would need a modified mesh wave similar to this
https://www.openfoam.com/documentati...e.html#details

but with the face centres for the tracking quantity. After that, you will need some global reduction to know min/max limits. After that your fun really starts. How do you bin things to ensure that you pick up your 20‰ of the faces? How do you coordinate this in parallel? Do you consider all faces, or pre/post-filter to only consider faces mostly parallel to the patch? Do you handle curved patches?



Hello Mr. Olesen,


Thank you for the reply.



My idea was to have a field to store this information before the solver started its thing. The user would supply the patch name, afterwards I would need to calculate the shortest distance between each face of any other patch and the defined patch through its face coordinates. After getting this field, I would have to check which cells would fulfill the requirement of being the furthest from the input patch.


For bit more context, this comes from a previous post (InterFoam letting one phase leave the domain) where a boundary condition was defined for use in InterFoam to let one of the phases leave the domain. However, the convergence is not good and I tough of defining part of the domain with a no-slip boundary condition and the rest with a dynamic outlet/wall boundary at least during the beginning of the simulation.



Best Regards
Shibi is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Decomposing meshes Tobi OpenFOAM Pre-Processing 22 February 24, 2023 09:23
[snappyHexMesh] SHM Layer Addition Phase dickcruz OpenFOAM Meshing & Mesh Conversion 4 November 1, 2018 07:05
[mesh manipulation] Importing Multiple Meshes thomasnwalshiii OpenFOAM Meshing & Mesh Conversion 18 December 19, 2015 18:57
Compressor Simulation using rhoPimpleDyMFoam Jetfire OpenFOAM Running, Solving & CFD 107 December 9, 2014 13:38
[Commercial meshers] fluentMeshToFoam multidomain mesh conversion problem Attesz OpenFOAM Meshing & Mesh Conversion 12 May 2, 2013 10:52


All times are GMT -4. The time now is 02:29.