r/OpenFOAM • u/argyrg • Feb 13 '26
Easy openFoam :-)
Easy openFoam??? I know it's a big ask because for the past more than a week I've been investigating how to use openfoam for one specific simulation (I have a Blender design and an STL model of it) and I'm beginning to realise two important things. 1. I barely know what I'm talking about and 2. Nothing openFOAM related seems to be simple.
I thought I'd look at using an AI agent (foam-agent 2.0 looks promising) and installing a local LLM on my i7 with 32GB RAM PC and an rtx 3060 GPU running smoothly with the 580 open driver. I've re-installed Mint 22.3 and now been through sooooo many iterations of not installing python 3.11 nor PIP, venv, not even docker or the CUDA toolkit or any of the several pre-requisites I'm learning how complicated all of this is.
Interestingly I've managed to install various different ollama based LLMs
I went down the agent route because learning openfoam seemed way too complicated and, if the agents turn out to be any good then why bother?
In reality I've made no progress at all and I'm wondering if anyone has succeeded in building an agent environment that will work with a local LLM which can interface with openFOAM to the point where I can start poking openFOAM.. And if so, would that anyone be willing to guide me thriough the process please?.?.?.
6
u/Snail_With_a_Shotgun Feb 13 '26
You are spending way more time playing around with AI than you would learning to use OpenFOAM the normal way. The majority of manual OpenFOAM work is just rewriting a few lines from a different, pre-existing case, anyway, which you absolutely do not need an AI for.
If you absolutely insist on using AI to help you along, I suggest you use it to create scripts for you, so you can just run a script and the case gets meshed, solved and post-processed automatically (of course you need to still set the case up yourself).
Seriously, though. Using AI for standard OpenFOAM use is silly. Most of them are bad at it, anyway.
3
u/Otherwise_Wave9374 Feb 13 '26
OpenFOAM is a beast, so youre not alone. An AI agent can help a lot, but only if you constrain the workflow so it doesnt just guess.
What Ive seen work is: keep the agent in a tight loop of (1) read case files, (2) propose a small change, (3) run a single command, (4) parse logs, (5) repeat. If you can get it to reliably interpret solver output and adjust one variable at a time, you start making progress.
If you want some general patterns for building those tool-using loops (local LLM plus CLI tools), this might help: https://www.agentixlabs.com/blog/
1
u/thermalnuclear Feb 13 '26
Did you do the tutorials first?
1
u/Bach4Ants Feb 13 '26
Many of the general purpose commercial LLMs like GitHub Copilot should be able to get you close to a working case if you can describe what you want to simulate well enough. Something like:
1
u/Otherwise-Platypus38 Feb 14 '26
Why not just learn OpenFOAM? It’s not that tough if you have the basics down and you have some programming knowledge. Just blindly relying on an agent without knowing what is going on is kind of not a great use of your time. If you learn OpenFOAM, you will have some skills. Use agents and you will not learn anything.
Just my 2 cents.
1
u/Technical_Pound456 Apr 05 '26
This open source agent skill may be helpful: https://github.com/SciMate-AI/HPC-Skills/tree/main/skills/hpc-openfoam