Butterfly_Wind Tunnel Grading Issue



Hi All,

Lately, I have been using the Butterfly_Wind Tunnel Grading component to generate grading and cell count. On the component, I keep cellSize to 1. Still, when I check the snappyHexMesh the cell size in the buildings is less than 1m.

In the geometry below, the X and Y dimension of buildings is 5 meters.

However, after running snappyHexMesh, I get 20 cells in either side.

This took 1 hour to run.

This is only a sample I ran. Is there a way to actually get nearest to 1 m mesh size in the buildings? In larger studies, this can save a lot of time I believe.

cfd.gh (524.0 KB)


Is it possible you have a refinement region attached to your wind tunnel? Perhaps the green box.

This looks like 2 levels of refinement (1m -> 0.5m -> 0.25m, 20 * 0.25m = 5m) in the buildings.

To get 1m exactly simple remove any refinement region you have applied. Generally, the grading is mostly done to substitute refinement regions and give a more efficient way of refining your mesh.



Thanks a lot @TheodorosGalanos,
You added not hours, days to my life. This is really useful to know. I always thought I was not very clear about refinement levels. Is there a resource I can read to fully understand how they are implemented in BF?

SnappyHex mesh doesn't seem to work

Hi,@TheodorosGalanos .

Today I update butterfly to the newest version. I found one error with Windtunnel auto grading componts. I discoverd it worked fine under +x +y -x -y 4 directions. When I set the direction to 1,1,0, it generated one error. I am confused about it .

Here is the screenshot about this error.

And this is screenshot of readme.


Hi @minggangyin thanks for posting this, it took a bit of creativity to uncover this one!

First comment is a bit unrelated to the error, I wouldn’t ever use diagonal directions for the blockMesh. The reason is, and I believe this is related to the error, that everything kind of changes. Instead of lengths of x m you have cos(x) * side meters cause everything is now diagonal. I found that it makes things difficult, although that might be due to how BF was set up as well.

Second comment, related to the error. I’m guessing that one of the three x-direction sections is failing and by the numbering that would be the region of interest. I would guess that the 1.44 is actually number of cells which can’t be. Have you tried reducing the cellSize to check if that creates the problem?

Kind regards,


Hi, @TheodorosGalanos
Sorry to reply late.Thanks for your suggestion. After redutce the cellSize, the error does not appear.