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

Getting coarse mesh from a finer initial mesh

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   September 16, 2015, 10:16
Default Getting coarse mesh from a finer initial mesh
  #1
Senior Member
 
Join Date: Oct 2013
Posts: 371
Rep Power: 7
chriss85 is on a distinguished road
I have some calculations which are very expensive, so I would like to run them on a coarser mesh with reduced accuracy compared to the rest of the solver. I've looked around in the source code and the forums but I couldn't find any proper method to generate a coarse mesh yet. Does anyone know of such a function in OpenFOAM or a usable strategy one could use to implement something like this?

There are some overlaps in the GAMG code however GAMG only creates the lduMesh and not the fvMesh objects it seems. Since fvMesh inherits from lduMesh, I'm not sure if we can construct an fvMesh from it.

Dynamic meshes have support for refining but not coarsening, so they aren't a real option either (because control over the main mesh is desired; creating it as a refinement causes problems with cell count and small features).

Another thing is the faceAgglomerate tool used in view factor radiation modelling to agglomerate faces on the boundaries. This would possibly be helpful to me already, but I would prefer coarsening the whole mesh for a presumably better accuracy/performance rating.

I find it quite surprising that such a relatively common task hasn't been covered before. Am I missing anything?
chriss85 is offline   Reply With Quote

Old   September 17, 2015, 11:38
Default
  #2
Senior Member
 
Join Date: Oct 2013
Posts: 371
Rep Power: 7
chriss85 is on a distinguished road
I have settled with using the pairPatchAgglomeration class to generate a coarser boundary mesh. I would've preferred a coarser mesh instead of only a coarse boundary because I would expect better accuracy at the same computation time but this is likely good enough for me right now. pairPatchAgglomeration can be a bit difficult to make it work properly if you want to coarsen by a larger factor but using a higher number of mergeLevels helped me. Before I had wrong values when interpolating back to the fine mesh. I didn't explicitly check the values on the coarse mesh though.
chriss85 is offline   Reply With Quote

Old   April 1, 2016, 07:28
Default
  #3
Member
 
Join Date: Jul 2011
Posts: 50
Rep Power: 7
A_Pete is on a distinguished road
Hey chriss85,

did you manage to generate a whole coarse fvMesh from your original fine mesh?

I am looking for ways to do the same thing. I want to use a coarser mesh for just a few operations inside of the code, which originates from the mesh I use for my simulation.
A_Pete is offline   Reply With Quote

Old   April 1, 2016, 08:57
Default
  #4
Senior Member
 
Join Date: Oct 2013
Posts: 371
Rep Power: 7
chriss85 is on a distinguished road
I have settled with another method. In my case I needed to calculate an integral over the volume. What I did was to use a Monte-Carlo based integration scheme, picking random cells for the integral and weighting them appropriately.
chriss85 is offline   Reply With Quote

Old   April 1, 2016, 10:03
Default
  #5
Member
 
Join Date: Jul 2011
Posts: 50
Rep Power: 7
A_Pete is on a distinguished road
Ah ok. Thanks anyways for answering this quickly.

I have to evaluate if a lagrangian particle does hit a wall, but can not loop over the original cells, since the particles may hit a wall but be located way outside of it.

I will now try to replace the cells with bigger geometrical objects near the walls, which are checked whether particles are inside them and hitting the walls.

In your case, maybe you can use cellZones as well to integrate over a certain volume? This could be costly though.
A_Pete is offline   Reply With Quote

Old   April 4, 2016, 03:51
Default
  #6
Senior Member
 
Join Date: Oct 2013
Posts: 371
Rep Power: 7
chriss85 is on a distinguished road
cellZones won't really help since I need the complete volume. I can get rid of some cells based on a threshold criterium though. For your case, how about using an octree structure? This might be very helpful. I think there may be some function to find the cell in which a point lies though.
chriss85 is offline   Reply With Quote

Old   April 4, 2016, 07:15
Default
  #7
Member
 
Join Date: Jul 2011
Posts: 50
Rep Power: 7
A_Pete is on a distinguished road
Thank you. Yes, we thought about an octree structure as well. But we still need to reduce the mesh to a coarser one near the considered surface.
A_Pete is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Star CCM Overset Mesh Error (Rotating Turbine) thezack CD-adapco 7 October 12, 2016 11:14
Coarse Mesh be_inspired OpenFOAM Meshing & Mesh Conversion 1 January 9, 2014 11:47
snappyHexMesh won't work - zeros everywhere! sc298 OpenFOAM Native Meshers: snappyHexMesh and Others 2 March 27, 2011 21:11
fluent add additional zones for the mesh file SSL FLUENT 2 January 26, 2008 12:55
Icemcfd 11: Loss of mesh from surface mesh option? Joe CFX 2 March 26, 2007 18:10


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