本人对ubuntu操作不熟悉,也是刚接触,但是按照官网上的安装,没问题的!分享给大家!!!希望有帮助!

Ubuntu Versions

OpenFOAM and Paraview are currently available for the following

versions of Ubuntu:

12.04 LTS, codename precise

12.10, codename quantal

13.04, codename raring

13.10, codename saucy

Installation

OpenFOAM and Paraview can be simply installed using

the aptpackage

management tool. The user will need to provide superuser password

authentication when executing the following commands

with sudo

In a terminal window, add OpenFOAM to the list of repository

locations for aptto

search, by copying and

pastingthe following in

a terminal

prompt(Applications

-> Accessories ->

Terminal). VERS=$(lsb_release-cs) sudosh-c"echodebhttp://www.openfoam.org/download/ubuntu$VERSmain>/etc/apt/sources.list.d/openfoam.list"

Note

1:Line 1 stores the version name of your

Ubuntu distribution (e.g. raring)

under $VERS,

which is used in line 2

Note 2: This only

needs to be done once for a given system

Update the aptpackage

list to account for the new download repository location

sudoapt-getupdate

Install OpenFOAM (222in

the name refers to version 2.2.2): sudoapt-getinstallopenfoam222

Install Paraview (3120in

the name refers to version 3.12.0):

sudoapt-getinstallparaviewopenfoam3120

OpenFOAM-2.2.2 is now installed in

the /optdirectory

(along with and Paraview-3.12.0)

Installation Problems

Networking must be enabled in order to be able to install software

packages in Ubuntu. Installation failure due to networking problems

usually results in an error message that reports failures in

fetching archives and ends with a line like the following:

E:Unabletofetchsomearchives...

A few users have encountered an error message similar to the

following during installation (step 3)

Somepackagescouldnotbeinstalled.Thismaymeanthatyou haverequestedanimpossiblesituation... ... Thefollowinginformationmayhelptoresolvethesituation: Thefollowingpackageshaveunmetdependencies:openfoam222: Depends:cshbutitisnotinstallable Depends:libopenmpi1.3butitisnotinstallable...

The most likely cause of this error message is that

the universerepositories

are not enabled. To enable them, type the following in a terminal

window:

sudoapt-add-repositoryuniverse sudoapt-getupdate

If MPICH is installed on the system, then during user configuration

(below), the following error message might occur when sourcing

the etc/bashrcfile

in the OpenFOAM installation:

gcc:error:unrecognizedcommandlineoption'--showme:link'

The user can check whether MPICH is installed by typing the

following:

sudoupdate-alternatives--listmpi

which returns /usr/mpich/includeif

MPICH is installed. This error is caused when the

default mpiccis

MPICH, rather than OpenMPI. The simplest way to fix the problem is

to set mpiccto

OpenMPI is by running the following command in a terminal prompt:

sudoupdate-alternatives--setmpi/usr/lib/openmpi/include

The .debfiles

for different versions of Ubuntu supplied can be downloaded

directly from the following locations:

http://www.openfoam.org/download/ubuntu/dists/precise/main/binary-amd64/openfoam222_0-1_amd64.deb http://www.openfoam.org/download/ubuntu/dists/precise/main/binary-amd64/paraviewopenfoam3120_0-1_amd64.deb http://www.openfoam.org/download/ubuntu/dists/precise/main/binary-i386/openfoam222_0-1_i386.deb http://www.openfoam.org/download/ubuntu/dists/precise/main/binary-i386/paraviewopenfoam3120_0-1_i386.deb http://www.openfoam.org/download/ubuntu/dists/quantal/main/binary-amd64/openfoam222_0-1_amd64.deb http://www.openfoam.org/download/ubuntu/dists/quantal/main/binary-amd64/paraviewopenfoam3120_0-1_amd64.deb http://www.openfoam.org/download/ubuntu/dists/quantal/main/binary-i386/openfoam222_0-1_i386.deb http://www.openfoam.org/download/ubuntu/dists/quantal/main/binary-i386/paraviewopenfoam3120_0-1_i386.deb http://www.openfoam.org/download/ubuntu/dists/raring/main/binary-amd64/openfoam222_0-1_amd64.deb http://www.openfoam.org/download/ubuntu/dists/raring/main/binary-amd64/paraviewopenfoam3120_0-1_amd64.deb http://www.openfoam.org/download/ubuntu/dists/raring/main/binary-i386/openfoam222_0-1_i386.deb http://www.openfoam.org/download/ubuntu/dists/raring/main/binary-i386/paraviewopenfoam3120_0-1_i386.deb http://www.openfoam.org/download/ubuntu/dists/saucy/main/binary-amd64/openfoam222_0-1_amd64.deb http://www.openfoam.org/download/ubuntu/dists/saucy/main/binary-amd64/paraviewopenfoam3120_0-1_amd64.deb http://www.openfoam.org/download/ubuntu/dists/saucy/main/binary-i386/openfoam222_0-1_i386.deb http://www.openfoam.org/download/ubuntu/dists/saucy/main/binary-i386/paraviewopenfoam3120_0-1_i386.deb

User Configuration

In order to use the installed OpenFOAM package, complete the

following

Open the .bashrcfile

in the user’s home directory in an editor, e.g. by typing in a

terminal window (note the dot)

gedit~/.bashrc

At the bottom of that file, add the following line

(see Note1)

and save the file

source/opt/openfoam222/etc/bashrc

Open a newterminal

window (see Note 2) and

test that the icoFoam application,

from the OpenFOAM package, is working by typing

icoFoam-help

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 .bashrcfile,

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 icoFoamin

the sameterminal

window, they must first register the change to

the .bashrcfile

by typing at the terminal prompt (note the dots):

source

$HOME/.bashrc

Getting Started

Create a project directory within the $HOME/OpenFOAMdirectory

named <USER>-2.2.2(e.g. chris-2.2.2for

user chris and OpenFOAM version 2.2.2) and create a directory

named runwithin

it, e.g. by typing:

mkdir-p$FOAM_RUN

Copy

thetutorialexamples

directory in the OpenFOAM distribution to

therundirectory.

If the OpenFOAM environment variables are set correctly, then the

following command will be correct:

cp-r$FOAM_TUTORIALS$FOAM_RUN

Run

the first example case of incompressible laminar flow in a

cavity:

cd$FOAM_RUN/tutorials/incompressible/icoFoam/cavity blockMesh icoFoam paraFoam

Refer

to theOpenFOAM

User Guideto

get started.

openfoam linux教程,ubuntu安装OpenFOAM官网教程相关推荐

  1. python官网教程怎么下载,python官网教程在哪

    python入门教程(非常详细) python入门教程如下:准备材料:windows电脑.python1.这里简单告用python软件编写的一个关于货物售价折扣方面的一个计算程序,首先打开python ...

  2. ubuntu 编译安装opencv官网教程

    官方教程:https://docs.opencv.org/master/d7/d9f/tutorial_linux_install.html 获取源码 获取master 进入安装目录,如/opencv ...

  3. YDOOK :Pycharm 专业版下载安装 :官网直接下载安装 详细教程

    YDOOK :Pycharm 专业版下载安装 :官网直接下载安装 详细教程 1. 点击下面的链接直接进入,Pycharm 的官网下载界面: https://www.jetbrains.com/pych ...

  4. linux安装openssh服务器的命令,ubuntu 安装openssh服务器的教程详解

    1.安装openssh 首先得安装 openssl 和zlib 安装openssl ---下载openssl-1.0.1j.tar.gz,解压到/usr/openssl/目录下进入解压目录 执行./c ...

  5. Linux环境下安装Redis(保姆级教程)

    本篇博文目录: 1.安装环境 2.Redis的安装 (1) 复制Redis国内镜像网址中的下载地址 (2) 通过Xshell下载Redis (3) 解压redis的压缩包 (4) 安装C语言编译器 ( ...

  6. linux psycopg2,Ubuntu安装psycopg2笔记

    在Windows上和Ubuntu Linux上安装psycopg2都遇到了点小插曲,记录如下 Windows下: 1. 点击这里前往官网下载源代码 2. 解压 3. 运行python setup.py ...

  7. Linux基础——Ubuntu安装

    Ubuntu安装 Ubuntu是什么? VirtualBox安装 Ubuntu 18.04下载 添加虚拟机和Ubuntu 18.04安装 Ubuntu初体验 窗口界面和命令行界面的切换 命令行提示解析 ...

  8. CMake学习笔记(一)——CMake官网教程

    CMake学习笔记(一)--CMake官网教程 前言: 经历了一星期痛苦的交叉编译,笔者深刻认知到Linux下make的重要性.所以准备放缓两三天自己的工作进度,并学习一下CMake与Makefile ...

  9. System之Ubuntu:VMware虚拟机 Ubuntu安装详细过程(图文教程,最强攻略,步骤详细,建议收藏)

    System之Ubuntu:VMware虚拟机 Ubuntu安装详细过程(图文教程,最强攻略,步骤详细,建议收藏) 导读         不是每一个程序员都必须玩过linux,只是博主觉得现在的很多服 ...

最新文章

  1. Python基于MASK信息抽取ROI子图并构建基于迁移学习(densenet)的图像分类器实战(原始影像和mask文件都是二维的情况)
  2. Gitlab+Jenkins学习之路(三)之gitlab权限管理--issue管理
  3. 若依框架二次开发中的坑
  4. 怎么安装jdk和java_如何安装JAVA JDK?
  5. jsp:include
  6. 类型参数作为约束 where T : U 的作用
  7. iOS语言中的代理模式
  8. 概率就是个冷冰冰的坑
  9. Linux lvm分区扩容
  10. 初学python100例-案例23 python输出菱形图案 青少年python编程 少儿编程案例讲解
  11. 更新sqlmap1.5.5版本教程(附带下载地址)
  12. 微信小程序怎么字体鼠标放上去变颜色?_【干货】CDR快捷键常识小技巧大全,记得收藏!...
  13. 工具篇-sdkman-SDK管理利器
  14. document的用法
  15. 中小型项目请求限流设计
  16. 不知道考研那些书比较好么?我来推荐~~~(二)
  17. 计算机系统配置有哪些内容,组装电脑主要配置有哪些丨组装电脑主要配置图解...
  18. 专栏 | 香侬科技独家对话Facebook AI研究院首席科学家Devi Perikh
  19. 微信支付的回调函数实现验签以及解密
  20. 全球及中国生命科学产业投资现状分析与十四五深度调研报告2022年

热门文章

  1. JavaScript Math floor
  2. 玖逸云黑v1.5-不仅仅是云黑系统
  3. 【Jenkins学习 】Jenkins安装 Build User Vars Plugin插件来获取jenkins用户相关信息
  4. AEROFILTR液体用差压变送器DPTL
  5. 芯片LM339,LM339D,LM339A的区别
  6. simulink的应用实验MATLAB,实验1 运用MATLABSimulink进行系统仿真实验(指导书)
  7. MTK/联发科 5G安卓智能核心板(MT6877 天玑900平台)
  8. 仓库库存管理系统:目的、开发和使用
  9. 未来计算机的重要性论文1000字,未来的作文1000字5篇
  10. Jbuilder 9.0光标错位问题