MetaOpenFOAM: an LLM-based multi-agent framework for CFD
- Python >= 3.9
- MetaGPT v0.8.0
- Langchain v0.1.19
- OpenFOAM 10
-
Create a Python >= 3.9 environment. In this example, we'll create a Python 3.11.4 environment in a directory called
your_dir.conda create --prefix your_dir python=3.11.4
-
Activate the environment.
conda activate your_dir
-
Verify the Python version.
python --version
-
Create a new working directory called
MetaOpenFOAM_pathand navigate to it.mkdir MetaOpenFOAM_path cd MetaOpenFOAM_path -
Clone the MetaGPT repository and install the development version.
git clone https://github.com/geekan/MetaGPT.git cd MetaGPT pip install -e .
-
Install Langchain version 0.1.19.
pip install langchain==0.1.19
-
Verify the Langchain version.
python -c "import langchain; print(langchain.__version__)"
-
After installing OpenFOAM 10, activate the OpenFOAM environment.
source OpenFOAM_PATH/OpenFOAM/OpenFOAM-10/etc/bashrc -
Verify the environment activation.
echo $WM_PROJECT_DIR
-
Clone the MetaOpenFOAM repository.
git clone https://github.com/Terry-cyx/MetaOpenFOAM.git
-
Set the
PYTHONPATHto include the MetaOpenFOAM directory.export PYTHONPATH="MetaOpenfoam_dir/metaOpenfoam:$PYTHONPATH" -
Run
maketo build the project.make
Now your environment is set up and you can start working with MetaOpenFOAM.
The code and inputs of MetaOpenFOAM 2.0 is going to upload as soon as possible (deadline: 2025.3.1)
If you find our work useful in your research, please consider citing:
@article{Chen2024MetaOpenFOAM,
title={MetaOpenFOAM: an LLM-based multi-agent framework for CFD},
author={Yuxuan Chen and Xu Zhu and Hua Zhou and Zhuyin Ren},
journal={Journal Name},
year={2024},
doi={http://arxiv.org/abs/2407.21320}
}
@article{Chen2025MetaOpenFOAM2.0,
title={MetaOpenFOAM 2.0: Large Language Model Driven Chain of Thought for Automating CFD Simulation and Post-Processing},
author={Yuxuan Chen and Xu Zhu and Hua Zhou and Zhuyin Ren},
journal={Journal Name},
year={2025},
doi={http://arxiv.org/abs/2502.00498}
}