Working Folder change to $FOAM_RUN

Hi everyone,

I am a new user of butterfly, so far I am greatly impressed with the tool and I think it can really help with my CFD workflow.

The default folder for butterfly seems to be “…/user/butterfly”. I would like to change the working folder to the run folder of OpenFOAM/BlueCFD- I found somewhere that you can do that through case.wrokingDir, so I tried that:

But as you can see from the output, it is still working on /user/butterfly. How can I change the working directory?


no one can help? …

@javiervinuales As I know, it is hard to change the default folder in Grasshopper. Maybe you should change the python code of butterfly.
You can change the code as below.
The abspath is C:\Users\XXX\AppData\Roaming\McNeel\Rhinoceros\6.0\scripts\butterfly\

Hi Minggang,

Thanks a lot for your answer, I will give it a try.



Hello there! Have you successfully changed the folder directory to a custom folder? Your answer is very important to me, and I look forward to receiving your reply.

Hi Zhengrong,

Unfortunately, I discarded the Butterfly option for my CFD workflow due to limited support and solver limitations. Currently using Python, pyFoam and GH Python Remote to run parametric studies with OpenFoam as solver and controlling geometry with Grasshopper. It requires some manual case folder preparation but it is not too bad.

@javiervinuales This workflow is awesome!!! Would you like to tell us more details about it?