8000 GitHub - TimoLin/openfoam231-docker: Build source code of OpenFOAM-2.3.1 in docker.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

TimoLin/openfoam231-docker

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenFoam231-docker

Please note that this repo reuses publicly available scripts and the following instruction created by OpenCFD. Scripts and the instruction were modified according to my needs and to run OpenFoam 2.3.1.

This instruction assumes that you have a working docker on your system.

How-to

Note that you may need to mark the install and start scripts as executable.

1. Run the prepareOpenFOAM231 script.

This will download an image from ztnuaa/openfoam231 and setup a container based on Ubuntu-18.04. The container has already installed the building environment to compile the OpenFOAM-2.3.1 following the guide from OpenFOAM wiki Step 1-4. Note, the qt environment for Paraview is not considered here.

2. To run OpenFoam run the "startOpenFOAM231" script.

This will start the openfoam231 container if it's stopped, or enter the container if it's already running.

4. Build OpenFOAM-2.3.1 and your own solvers/libraries.

The etc/bashrc of OpenFOAM-2.3.1 has been already sourced in the docker run command. If you have some environment variables, your should export it by yourself. To compile the OpenFOAM-2.3.1 source code, please follow the installation guide at OpenFOAM-2.3.1 Ubuntu-18.04 Step 5~15.

5. "Getting started" in 580C struction from OpenFOAM website.

Use it to check if everything is working well.

Create a project directory within the $HOME/OpenFOAM directory named -2.2.2 (e.g. chris-2.2.2 for user chris and OpenFOAM version 2.2.2) and create a directory named run within it, e.g. by typing:

mkdir -p $FOAM_RUN

Copy across the backward facing step example, generate the mesh with blockMesh and run the steady flow, incompressible solver simpleFoam

cd $FOAM_RUN
cp -r $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily .
cd pitzDaily
blockMesh
simpleFoam
paraFoam

About

Build source code of OpenFOAM-2.3.1 in docker.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 90.4%
  • Dockerfile 9.6%
0