Tuesday, March 21, 2017

Free Butterfly Plugin for Computational Fluid Dynamics for Grasshopper and Dynamo Beta Released

From the Grasshopper website:

Butterfly beta release for Grasshopper and Dynamo

Posted by Mostapha Sadeghipour Roudsari on March 20, 2017

We are very excited to finally release the Butterfly plugin for both grasshopper and dynamo on this lovely first day of Spring! After several rounds of development, testing, and modification, Butterfly has finally metamorphosed to have all known major bugs fixed and is ready to be used by a larger number of people in our community.

Butterfly is powered by OpenFOAM, which is a validated and open-source engine for Computational Fluid Dynamics (CFD). Primarily, Butterfly assists with exporting geometry and other input  parameters from the CAD + scripting interface to the OpenFOAM engine. The Grasshopper plugin supports live results visualization that updates as the CFD simulation iterates.  The Dynamo plugin supports results visualization once the analysis is over or paused.

For installation instructions and guidance on getting started, check out the Butterfly wiki page. There, you can find step-by-step installation directions and tutorial videos. There also 3 YouTube playlists for getting you started with installing OpenFOAM for Windows and using Butterfly for Grasshopper and Butterfly for Dynamo.

Similar to other ladybug tools, Butterfly uses an external validated engine (in this case, OpenFOAM) and you need to install it first to get the insect up-and-running.  However, unlike Radiance and EnergyPlus, OpenFOAM doesn’t have a native installation for Windows and it requires Linux to run. Accordingly, the current version of “OpenFOAM for Windows” uses a technology called docker to run a Linux virtual machine on your system, inside which OpenFOAM operates. While this sounds complicated, the good news is that all of this setup has been packaged into the installer for “OpenFOAM for Windows.”  So running this installer with all its defaults should give you everything you need.

The bad news is that the installation can fail if you don’t check your Windows system properly beforehand or don’t follow every step carefully afterwards. You will also need to run Rhino, Revit, and OpenFOAM as an administrator to ensure Butterfly works properly (by right-clicking each launcher for the program and selecting “Run As Administrator").  This said, if you follow the steps carefully, you should have no issues with the installation. You can find some of the issues that people faced during the alpha testing and the solutions to them here.

Butterfly is the first plugin that is fully developed based on the structure that I discussed before which consists of a core library and [+] libraries for specific software (in this case Grasshopper and Dynamo). We hope this structure to extend ladybug tools to more platforms by re-using the current code. We will provide a better documentation with more details on this matter in the near future but for now you can use the API for butterfly, butterfly_grasshopper and butterfly_dynamo for customizing or extending the current development.

Finally, having access to a powerful CFD engine from inside parametric/generative modeling environments is a great power and as Spider-Man or Uncle Ben once said:

“with great power comes great responsibility!”

We believe in learning by doing and we don’t expect you to be a CFD expert to get started with butterfly however we expect you to educate yourself along the way. If you have never used OpenFOAM before here is a great presentation to get started. We also highly recommend checking out the official OpenFOAM User Guide that goes through most of its functionality. Finally, we have also collected a number of other learning resources on this page that can be a good starting point.

We understand that you will have questions about the plugins which you can post to this forum or Dynamo discussion forum however CFD related issues and questions should be posted to CFD Online.

I like to thank everyone who have helped us with the development and testing during the last year or so, and special thank to Theodore who single-handedly educated me through the process of migrating to OpenFOAM and developing butterfly. Butterfly wasn’t possible without Theodore!

As always let us know about your comments and suggestions.

Happy flying the butterfly! Happy Spring!

There's more information available on the Grasshopper website.


Anonymous said...

Great post! :)

Grasshopper is a nice tool. I have seen that there is now there is a new plugin/app for revit for automated wind simulations (CFD):

Anonymous said...

I have been having problems on installing OpenFOAM to get Butterfly 0.004 running on Windows 10. Any suggestion of an alternative? Thanks