- 安装PyFoam
sudo apt-get install python-numpy
pip install PyFoam
- 测试安装
python
# in the Python-shell
import PyFoam
import PyFoam.FoamInformation
print(PyFoam.FoamInformation.foamTutorials())
测试结果:
/home/li/OpenFOAM/OpenFOAM-5.x/tutorials
- 应用案例
tut
cd incompressible/icoFoam/cavity/cavity
blockMesh
pyFoamPlotRunner.py --clear icoFoam
foamCleanTutorials
参考:
PyFoam安装