CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Meshing & Mesh Conversion (https://www.cfd-online.com/Forums/openfoam-meshing/)
-   -   [Gmsh] background mesh in gmsh (https://www.cfd-online.com/Forums/openfoam-meshing/109317-background-mesh-gmsh.html)

Nick_J November 14, 2012 18:11

background mesh in gmsh
 
Hello all,

I hope someone can help me using gmsh with a background mesh for refinements. I would like to create a (2D) mesh where very small areas are refined. The refinement is dependent on the solution of a previous simulation and there is no easy way to do the refinements using an Attractor field with lines and/or points. Therefore, I would like to use a background mesh.

My first question is about how the background is exactly used to determine the element sizes. Is there some sort of ‘sampling mesh’, where the vertices are used to determine the values in the background mesh? If so, what is the resolution of this sampling mesh?

My second question is related to the first. Because it would be too time consuming to make the whole sampling mesh with the resolution of the small areas, I would like to use an iterative procedure (as suggested in the manual). However, I am having difficulty implementing this iterative process in gmsh. I tried using ‘merge’, but it always seems that the same sampling mesh is used, yielding the same result for every iteration.

Can someone point me in the right direction?

Thank you very much in advance!
Nick

fportela March 20, 2013 05:20

Hi Nick,

I'm not sure if I can help you directly with your questions. The experience I have with this is pretty basic, but at the time it worked well for me.

If you construct a .pos file with the target mesh sizes at the nodes of the elements, you can then use it as a background mesh.

Have a look at this files (the .zip was to large to attach to this message): https://www.dropbox.com/s/gsihvjnmhz...adaptation.zip

Hope it helps!


All times are GMT -4. The time now is 21:43.