LAMMPS安装和使用经验

更新时间:2023-09-25 02:55:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

Lammps/LIGGGHTS安装即使用步骤:

1. 按照安装 Ubuntu LINUX 系统、OpenFOAM程序、CFDEM程序(默认安装了LAMMPS及

LIGGGHTS包)。

2. Make (编译可执行程序),见. 在~LIGGGHTS-PUBLIC/src目录下,键入

“make package fedora_fpic -j 32“ ,会编译生成一个 lmp_fedora_fpic可执行程序。 将编译好的可执行程序复制到系统默认程序安装目录,便于使用 “sudo cp lmp_fedora_fpic /usr/local/bin/liggghts”;或者每次将可执行文件拷贝到存放in.filename的目录下。

3. 运行lammps。参考后半部讨论记录,在in.filename所在的目录下,键入命令

“./lmp_fedora_fpic

4. 安装和运行lpp (python程序下的一个将dump***.filename文件转换成VTK格式的文件,该类型文

件可供Paraview后处理程序使用)。参照 ,按照下面提示安装和使用lpp。在post目录下运行“lpp dump***.filename”, 会在同一目录下生成dump***.vtk格式的文件,转换成功。

Install LPP for postprocessing

sudo apt-get install python-numpy

sudo git clone https://github.com/CFDEMproject/LPP.git $HOME/LPP gedit ~/.bashrc

add at the bottom alias lpp=\ ? ##Checking the lpp installation

Open new terminal

cd /home/\ lpp dump*.chute

.vtk files will be created in the post folder which can be used later for visualization of simulation in paraview. -------------------

5. 使用paraview程序进行后处理。新打开一个linux 的terminal, 键入“paraview”,打开一个paraview视

窗,然后打开filename***.vtk文件,再点击视窗左下方的”apply”按钮,即打开了生成文件,进行后处理操作。

http://www.cfdem.com/download Dear all,

INSTALL OpenFOAM(R)-2.1.x

For those who want to set up CFDEMproject from from scratch, I would recommend to use Ubuntu. Then install OpenFOAM(R)-2.1.x following this procedure .

INSTALL CFDEMproject

Once OpenFOAM(R)-2.1.x is set up correctly and all environment variables are correct, you can easily install CFDEMcoupling and LIGGGHTS following this recipe githubAccess_public.pdf below.

The download section is on the bottom of the page. You have to login in order to have access to the download section! If you do not have an account yet, please register for free. #- in case that questions arise please contact the forum: Forum on CFD-DEM

LEGAL NOTE

This offering is not approved or endorsed by OpenCFD Limited, the producer of the OpenFOAM software and owner of the OPENFOAM? and OpenCFD? trade marks. OPENFOAM? is a registered trade mark of OpenCFD Limited, a wholly owned subsidiary of the ESI Group.

Ubuntu Linux operation system

http://www.ubuntu.com/download/desktop

OpenFOAM software download

Based on Ubuntu system pack installation:

http://www.openfoam.org/archive/2.2.2/download/ubuntu.php

papers published cited LAMMPS http://lammps.sandia.gov/papers.html

其他参考网站: 逸宇 12:47:45

cfdem.dcs-computing.com

逸宇 12:49:04

http://www.cfdem.com/liggghts-downloads 逸宇 12:49:26

https://github.com/CFDEMproject/LIGGGHTS-PUBLIC

---------------------------------

逸宇StreamDEM(56960577) 16:28:00 3、进入src目录 cd liggghts_1p5/src 4、多核并行编译,加快编译速度 make package fedora_fpic -j 32 5、将编译好的可执行程序复制到系统默认程序安装目录,便于使用 sudo cp lmp_fedora_fpic /usr/local/bin/liggghts 这是我用的编译步骤 /usr/local/bin一般都是系统默认路径 如果不是你可以增加到环境变量path中如何运行一个lmmps例子呢 有inp文件 逸宇StreamDEM(56960577) 16:43:02 liggghts < in.**** 如果你按照我之前发的步骤做任意目录都可以直接运行 黑贝-Eric(51537310) 16:57:24 那么dump.***会在哪里生成? 已经按照你的步骤做了 可未找到dump.***文件 逸宇StreamDEM(56960577) 16:59:00 新建一个post目录 黑贝-Eric 17:18:15 我的可执行文件是lmp_fedora_fpic 你的呢 散漫守望 17:19:21 我的也是 lmp_serial也可以的 黑贝-Eric 17:20:36 你的例子是不是在example文件夹中? 散漫守望 18:00:32 我的例子是在example中 example下应该有LIGGGHTS吧 黑贝-Eric 18:02:54 有LIGGGHTS 然后你如何运行example中的例子? 散漫守望 18:03:39 恩呢,进入LIGGGHTS中 比如我们运行conveyor这个算例吧 黑贝-Eric 18:04:18 cd LIGGGHTS 就可以了? 散漫守望 18:04:23恩呢,是的 散漫守望 18:04:34 cd LIGGGHTS cd conveyor 然后你需要把你刚才生成好的那个lmp_fedora_fpic 黑贝-Eric 18:05:31 我的盘符是: home/LIGGGHTS/LIGGGHTS-PUBLIC/examples/LIGGGHTS/Totorials_public/conveyor 散漫守望 18:05:44 恩恩,我的也是 lmp_fedora_fpic这个复制到conveyor下 黑贝-Eric 18:06:19 哦 好的 我试试 散漫守望 18:06:57 用cp这个命令复制啊,用鼠标右键的那个复制或在ctrl+C有可能出问题。 然后再conveyor目录下执行:./lmp_fedora_fpic

LIGGGHTS INSTALLATION GUIDE FOR UBUNTU 12.04 LTS AND 13.04 Submitted by rahulsoni on Mon, 09/09/2013 - 08:09

Note:

I am a newbie to LIGGGHTS. After wondering around, I successfully installed LIGGGHTS 3-4 times with the help of available posts in this forum. However, I found some missing points in existing posts that may panic the new users. Therefore, I am bringing below a compiled form of tutorial that will help installing LIGGGHTS. The method has worked fine in both Ubuntu 12.04 LTS and 13.04. However, it is expected to work with other versions too.

Fairly the whole credit goes to the writers of previously existing posts especially Paul. 1.

##Installing Libraries g++ and git-core

sudo apt-get install libvtk5-dev libeigen2-dev libopenmpi-dev g++ git-core ##Checking installations which mpirun

/usr/bin/mpirun comes up? which mpic++

/usr/bin/mpic++ comes up? mpic++ -v

gcc-Version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1) comes up at the last line? ##Installing cmake

sudo apt-get install cmake 2.

## Installing OpenFOAM 2.2.0

sudo sh -c \http://www.openfoam.org/download/ubuntu quantal main > /etc/apt/sources.list.d/openfoam.list\ sudo apt-get update

sudo apt-get install openfoam220 gedit ~/.bashrc

- add at the bottom -> source /opt/openfoam220/etc/bashrc - open new Terminal -> icoFoam -help Some messages like below should appear:

Usage: icoFoam [OPTIONS] options:

-case specify alternate case directory, default is the cwd -noFunctionObjects

do not execute functionObjects -parallel run in parallel -roots <(dir1 .. dirN)>

slave root directories for distributed running -srcDoc display source code in browser

-doc display application documentation in browser -help print the usage

Using: OpenFOAM-2.2.0 (see www.OpenFOAM.org) Build: 2.2.0-5be49240882f 3.

##Installing VTK

Download vtk-5.8.0.tar.gz from http://www.vtk.org/VTK/resources/software.html#previous2 Extract downloaded folder into home directory cd /home/\ sudo cmake . sudo make

sudo make install

The last instructions will install .h, .a and .cmake files under /usr/local, such as /usr/local/include/vtk-5.8 and /usr/local/lib/vtk-5.8. For

convenience of upgrading, it would be useful to create symbolic links such as /usr/local/include/vtk and /usr/local/lib/vtk to these directories: cd /usr/local/include sudo ln -s vtk-5.8 vtk cd /usr/local/lib/

sudo ln -s vtk-5.8 vtk

After installing VTK, go to the directory where cmake is installed, e.g. /usr/share/cmake-2.8. Then, go to the subdirectory Module and open the file FindVTK.cmake and you will see the following lines:

# The following cache entries must be set by the user to locate VTK: # VTK_DIR - The directory containing VTKconfig.cmake.

本文来源:https://www.bwwdw.com/article/k1kd.html

Top