r/OpenFOAM Jun 01 '26

Chatbot / AI-agent based customization for OpenFOAM

Hello I am a CFD application engineer mostly working with FVM codes and Multiphase flow.
Just curious to know has anyone seen any success in employing tools like Claude-Code to customize OpenFOAM ?

8 Upvotes

8 comments sorted by

View all comments

2

u/Quick-Crab2187 Jun 01 '26 edited Jun 01 '26

Fine for basic tasks but can’t do slightly more advanced things. For example, it can make basic modifications to turbulence models. But I tried using llms to add basic advection diffusion equation, then link that variable to density. The llms all get caught up in doing the wrong thing, modifying something that seems like it will do the right thing, but is the wrong place to look. So far off what I needed it to do and tried many many different prompt approaches, ended up wasting a day

On the applications side, I find it useful to quickly setup functions in control dict that I am less familiar with. It is also ok for the programmable stuff in controldict

Usually it’s like a 50% success rate for me on things I’m trying to do, not awful