Butterfly and HumanUI: an outdoor CFD example

Hello everyone,

In anticipation of the first public release of Butterfly I would like to share a small definition that can hopefully get people started and allow some experimentation with Butterfly.

This definition is designed for an outdoor study (an indoor example will follow shortly). It also includes a hopefully more user friendly UI that allows the user to set all the necessary inputs for the simulation and run the case without using the actual GH definition.

To use this example to its full extent, along with Butterfly (details on installations can be found here https://github.com/mostaphaRoudsari/Butterfly/wiki/Getting-Started-…) you will also need the HumanUI tools (http://www.food4rhino.com/project/human-ui?ufh). However, HUI isn’t necessary if you are only interested in the BF part of the definition which will still run.

Butterfly, and the example itself, is still a work in progress. I hope it can inspire people to get involved, test things out, and help it improve!

Kind regards,

Theodore.

P.S.: Add the path of the attached butterfly logo’s location in your computer in the definition for a more buggy feeling :slight_smile:

160818_Butterfly&HumanUI_OutdoorCFD.gh (79.4 KB)

Hi Theodore. Very nice! Thanks for sharing. I copy your screen capture from twitter here to make it visual.

Hi Theodoros and thank you for the example.

I’ve found a problem when changing the wind direction. I corrected this in the attached (the rotation of the vector wasn’t right).

Also i have a question on this. In the HumanUI window it says that the wind direction go: 0 North, 90 East, 180 south, 270 West. If this is right the example should be fixed too in order to give the right data. Right now giving 0 means that the wind is blowing from the south.

-A.

160818_ButterflyHumanUI_OutdoorCFD_AY.gh (80 KB)

Hi Abraham,

Thanks for testing man! Also, much appreciated for fixing that vector thing, I thing I wasn’t actually testing that part of the definition and forgot to check.

And yes you are right 0 means South wind for BF since as in all Ladybug tools Y is North. I believe that’s why I left it simply as a number in the UI window.

I should also add that the little crude way of creating a location in mesh that is inside the wind tunnel but outside the building (as it should) is not really working properly for multiple geometry inputs.

Kind regards,

Theodore.

Hi Abraham,

I just realized that the wind direction input in the definition was completely wrong. I was actually rotating the wind tunnel which does nothing since the wind is always considered in relation to the input geometry.

The following definition should do the job. I also updated the tool-tip to represent the change and logic of wind direction in a wind tunnel. Finally, the location in mesh should be ok now and will work for any Brep input.

Kind regars,

Theodore.

160825_ButterflyHumanUI_OutdoorCFD_AY_TG.gh (75 KB)

Hi Theodore,

Thank you very much for all this.

I have run your grasshopper definition.

This was the first error I encountered. I then bypassed the humanUI by using boolean toggles into the ‘runit’ inputs of the rest of the components.

these failed to collect data.

All ran well up to Time 1000. However after trying to read the results in different ways it seems that the meshes return one value only. Perhaps it is due to the compression? there isnt any postprocessing subfolder as there used to be in the case folder. There are zipped files in 0,100,200…1000 folders

Would you know How can I solve this?

Things are getting closer. So excited.

Kind Regards,
Olivier

Hi Olivier,

There is a boolean that indicates if you want the results to be compressed. Make sure you have writeCompression in controlDict component set to False.


Mostapha

Hi Mostapha,

thank you.

I have clustered my geometry entirely defined in GH and will try to run it.
I have attached the file here, could you have a quick look at the settings?

It seems there are 2 rectangles within the wind tunnel.

Olivier

1109_butterflytest.gh (116 KB)

The Input geometry had 4 values whereas the BFsurface component output 3.
I flattened and it solved the issue.

I am running it now… crossing fingers. Will update here.

Olivier

Hi Olivier, Thanks for posting an image. I think for your case you need to refine the mesh around the object (which we haven’t implemented in Butterfly yet) or create a very dense mesh overall to get all the edges correctly. Keep me posted and I can apply the mesh refinement boundaries.

Hi Mostapha,

Here is the result capture of these settings:

Wind speed 1m/s

Refinement level 5

Grid size 0.5m

Resolving time steps 500

I understand the simulation is running with k and epsilon at default values 0.001, how were those values determined if I may ask? Are these results accurate?

Kind Regards,
Olivier

Hi Olivier,

Thanks for trying out BF! And I am sorry for responding so late, I have been quite busy at home lately.

First of all thanks for finding out kinks in the HumanUI file. That one is just intended for an easier application of BF and not really for learning how to use BF, hope it was helpful. Not sure what this error is though as I can’t reproduce it in my computer. Are you sure you have the latest Human components? I’ll try and look it up when I can for you.

Concerning your results, they do look as expected. A heavy wake area behind the building has been created as you can see, with a quite clear pattern of wind deceleration and a recirculating vortex. This is a standard pattern in outdoor wind and something that generally we try to either minimize or plan activities around since these areas tend to have lower wind velocities and less recirculation, thus leading to debris/dust deposition and potentially higher pollutant concentration.

There are a lot of nice examples of urban wind patterns online you can check, it makes easier for you to help validate the results you get.

Finally, the k and epsilon values for outdoor studies are currently being calculated with (pretty) standard equations for the k-e family of turbulence models. I believe you can find these in the BF source code. Unfortunately I don’t have access right now to check where exactly but I would look before the blockMesh component, since the case folder with all the values is created at that point.

Good luck in your CFD journey! Please keep posting results and issues!

P.S.: Btw if you are interested on the effect of your building geometry at a section parallel to the wind direction you could also try a 2D simulation. You can do that either by manually editing your blockMeshDict and setting 1 cell width on the direction perpendicular to your wind or by simply assigning a 1m wide windTunnel (centered at your geometry). This will allow you to refine your model much more than possible in a 3D case with lower run times as well. Ofc it’s not as accurate as a 2D case but it’s nice for experimentation.

Kind regards,

Theodore.

Hi Theodore,

Thank you for your previous reply. Please forgive me the silence as it took me a while before pursuing back my CFD journey.

I have been using the outdoor example file to run airflow through an atrium with windward windows opened. I believe the results are coherent, the area of stagnant air on the 2nd floor is a result of pressure differences on a multistorey building.

My future intention is to optimise the outlet’s geometry to benefit best from wind driven effects, I will set to an evolutionary solver to lower the average pressure in the leeward side of the outlet.
For this reason I will have to proceed with lower accuracy to reduce run times and finally set it to the maximum for reliability of the final solution and result visualisation.

The way I have been trying to increase accuracy is by lowering down the testgrid size to 0.1 and using snappyhexmeshdict.
I am not so confident in varying the different refinement levels and cell sizes of the refinement region and windtunnel.
Would you be able to provide me with a a brief explanation on how to handle these parameters for higher or lower accuracy?


Does Butterfly/OpenFoam processes stratification of heat (stack effect) accounting for internal heat gain?
I was thinking of allocating a mannequin somewhere in the rooms and assign its surface temperature to human body temperature, and perhaps add some boxes for any electrical devices.

Thank you for making all of this possible.

Kind Regards,
Olivier

Olivier,

If you use Heat Transfer recipe Butterfly with consider surface temperatures in solution.

For the case of optimization maybe you should try to make a 2D analysis instead of decreasing the mesh quality.

Finally you can use Grading not to mesh all the wind tunnel equally and only generate denser meshes around your building.

Mostapha

Hi Olivier,

I second Mostapha’s suggestions. I would start with a 2D case in which you can actually increase the mesh quality and still have it run incredibly fast. Also the buyoant solver in the Heat Transfer recipy can consider all heating/temperature effects. You can assign temperatures to walls, bodies or other surfaces, even the air.

Interesting stuff, keep us updated.

Kind regards,

Theodore.

1 Like

Mostapha and Theodoros,

Many thanks for helping.
I have figured out how to use grading to generate denser mesh where needed. Very Useful!
2D cases are convenient, I will post some results of optimisations.

On the thermal end:
Although Butterfly is already making things user-friendly like none other, I am still limited by my scarce knowledge on CFD simulations which I am trying to cope with by fumbling around openfoam forums.

I am still unable to use the heat transfer recipe correctly in the indoor example definition. Most of the stepbystep Tutorials are provided with OpenFoam lines which I have come to find uneasy to interpret with what is already written in the components of Butterfly.
I am gaining experience thanks to you.


I am still unsure of how to set the conditions for a box (heatsource at 37 C, bodytemp) to visualise stack effect in the room.

1. Is it necessary to set custom boundary conditions for this case? If yes, would you recommend a library of the corresponding parameters for different generic items?
As a simplification, could the wallboundary be used to create the geometry and input the temperature ?

2. in the createBgeometry component,must the Jagged component be plugged into meshset?

3. Is the temperature of the Inlet, the temperature of the fluid/air entering the room?

4. With the heat transfer recipe blindly plugged into the solution. I am not sure how to solve these errors:

"Radiation model not active: Radiation properties not found




–> FOAM FATAL ERROR:
Continuity error cannot be removed by adjusting the outflow.
Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow."


Thank you for your patience and for kindly considering these questions.

Best,
Olivier

Hi Olivier.

Sorry to interrupt, but your case study caught my attention as I was checking for any updates in the fora on Butterfly and temperature.

That is exactly because I am currently doing my masters thesis on exactly stratification in atria and big semi-outdoor rooms.
I am testing a bunch of variables and I was thus looking into utilizing Butterfly. However, this new update came too late in the process for me to fully test out.

I am very interested in your findings, as I had to go to the old fashion (and correct but yet very slow) way of using Ansys Fluent for my investigations.

I would however very much like to compare my results with the ways of the parametric tools, i.e. Butterfly: How valid are the results of BF so far? What could be optimized? When is the parametric tool favourable over the hardcore tools when considering these factors? What are the future objectives?

Could I therefore borrow your script later on at some point to use for my own to generate some analyses?
Or would it maybe be possible for you to (in a month or so?) to create a very basic template script that is prepared for temperature analyses in an very simple atrium-like room maybe with an inlet and outlet as you are (or seem to be) making them? I am willing to go with NDA or give full credit to you and your work.

Very interesting what you are doing!!

Regards

Lasse Hamborg

Hi Olivier,

I think we need a little bit more time to make sure all the default values for the ‘Heat Transfer’ recipe is set correctly, and also provide a more comprehensive example on how to use it for examples such as the ones that you mentioned.

Hi Lasse, A comparative study between the results of your work and Butterfly will be quite variable. Except for the time that you need to run the cases it should take a very short amount of time to generate the options. I have to add that since Butterfly is using OpenFOAM to run the analysis, the first step is to look for similar comparative studies between Fluent and OpenFOAM. We can use your findings to compare, modify the default boundary conditions, however, you are able to set your own OpenFOAM boundary conditions as desired using butterfly. Also check the comparison here.

Mostapha

Roudsari,Ok, so the results of BF can be assumed (or proved?) to be the very same as those from OpenFOAM?

Yes I know about that comparison. Zarisu is a good friend of mine actually, so I’ve been on the sideline on that comparison. But my interest is within the thermal investigations in big indoor spaces/semi-outdoor spaces as I am studying temperature distributions in atria. So it was regarding those kind of comparisons.

I sure hope I have time within my project to test out BF and hopefully compare to Ansys. I’d btw be using the k-w SST solver in Ansys. Which solvers are available in BF for indoor studies?

  • Lasse

hi everyone

I am very excited about the implementation of CFD into the grasshopper environment and I tried the definition attached above but it generated an error, I wish you could help me out find a solution. I attached a screenshot of the problem. thank you