slaon的个人博客分享 http://blog.sciencenet.cn/u/slaon

博文

OpenFOAM错误:blockMesh command not found

已有 11424 次阅读 2016-7-23 23:09 |个人分类:OpenFOAM|系统分类:科研笔记

在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

  1. 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 ~/.bashrc


  2. At the bottom of that file, add the following line (see Note 1 below) and save the file

    source /opt/openfoam4/etc/bashrc


  3. Open a new terminal window (see Note 2 below) and test that the simpleFoam application, from the OpenFOAM package, is working by typing

    simpleFoam -help


  4. A “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





https://wap.sciencenet.cn/blog-531760-992429.html


下一篇:合肥烧烤天
收藏 IP: 112.26.67.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-27 16:13

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部