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?

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.

Hi @TheodorosGalanos, @minggangyin and @devang,

I am currently running a wind simulation with Butterfly for a stadium. First I have simulated the wind for Summer which has a wind speed of approximately 6 m/s and a direction almost perpendicular to the stadium. In this simulation, everything works fine. But when I try to run it for Winter, when the wind speed is 2.6 m/s and the direction is not as orthogonal as the previous (the Summer case), then, the wind tunnel grading reports and error, similar to the one described above in this topic. It says solution exception: invalid input [and a number]. Do you know where the problem could be? I have tried to change all the parameters for the refine levels but nothing works.


Hi @Julioamodia89 The wind tunnel grading compotent sometime worked badly. As for this moment, I will try to generate XYZ grading manually using grading_XYZ compotent.


Hi Julio,

I would suggest you rotate your geometry accordingly and leave the wind tunnel oriented parallel to the wind flow (for e.g. on the y+). There are a lot of issues, especially with grading the domain, when you have a diagonal wind tunnel (the math simply are different).

You can rotate your geometry before passing it to the BF geometry components and this should work nicely.


1 Like

Hi @TheodorosGalanos,

I have rotated it before the BF geometry as you suggested but still doesn’t work.

Do you have any other suggestions?, I don’t know what I am doing wrong.


Could you please explain what does wakeOffset and HeightOffset mean?

@WuMinShiun You can refer to the instruction of the wind tunnel grading compotent.

Thanks for your response. But it’s still hard for me to understand. I don’t know what’s so called the end and topic of the geometry bounding and area of interest(default:2).

Hi, @WuMinShiun Don’t pay more attention on these settings. I usually keep it as default.

haha I know. Thank you.
But I still curious about (default:2) What’s the unit of 2 ? m or mesh?