||
在dealvm虚拟系统上安装了openfoam4.0(link),按照user guider中的 tutorial1 : 2.1 Lid-driven cavity flow,一步一步地操作。第1步就出错了。
在terminal中输入blockMesh后,出现blockMesh: command not found的错误。
排查原因:
系统环境变量列表中还没有OpenFOAM的相关命令。
修正方法:
参照官网的方法,添加环境变量。link
摘录如下:
User Configuration
In order to use the installed OpenFOAM package, complete the following
Open the .bashrc file in the user’s home directory in an editor, e.g. by typing in a terminal window (note the dot)
gedit ~/.bashrcAt the bottom of that file, add the following line (see Note 1 below) and save the file
source /opt/openfoam4/etc/bashrcOpen a new terminal window (see Note 2 below) and test that the simpleFoam application, from the OpenFOAM package, is working by typing
simpleFoam -helpA “Usage” message should appear. Your installation and user configuration is complete.
Note 1: If a similar line has already been added to the user’s .bashrc file, e.g. for a previous version of OpenFOAM, then the line should be deleted or, alternatively, commented out by inserting a # at the beginning of the line.
Note 2: If a user wishes to execute simpleFoam in the same terminal window, they must first register the change to the .bashrc file by typing at the terminal prompt (note the dots): source $HOME/.bashrc
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-4-27 20:27
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社