Different mesh size superposition, specifying Box field shape
Hello,
Here is my problem, I have a geometry and I would like to refine the mesh in a particular zone of the geometry. This zone is delimited by a polygon. In fact, I would like to to the same thing as in t10.py
with the Box
field, but instead of a box, I would like to specify any shape (here in this case a polygon).
Now I can explain precisely my case. I want to mesh the "fluidic pinball", (see figure below where we can see the vorcity field in blue/white/red color map).
Following the t10.py
tutorial, I managed to refine my mesh close to the three cylinders. What I want to do now, is to refine it (not as fine as close to the cylinders) around them and in the wake. This region is delimited by the so-called polygon, that includes the cylinders and the wake. You can see this polygon (pentagon here) in the result below.
In the end I have 3 levels of mesh size:
- the whole geometry (rectangle with 3 holes corresponding to the 3 cylinders)
- the polygon
- the regions close to the three cylinders
The mesh goes finer as it goes from levels 1) to 3).
So I tried to do that, creating for instance a geometry entity (a surface) and a field base on it, but instead of creating one mesh that takes the minimum element size of all fields, it creates 2 (see image below).
With other trials nothing happens (like in the second image of my post), only the Box
seems to work properly, and it does exaclty what I would like, except I would like it to have the shape of my pentagon, instead of the rectangle specific to Box
field (see image below).
Could you enlight me on how to solve that issue ? I also joined my script which should be well commented (pinball_mesh.py).
Thanks and regards, MOCHON Rémi