Difference between revisions of "OpenFOAM"

From CAC Documentation wiki
Jump to navigation Jump to search
Line 42: Line 42:
* Run the simulations:
* Run the simulations:
** <code>blockMesh</code>
** <code>icoFoam</code>

Revision as of 10:37, 18 September 2020

This page describes how to run OpenFOAM in a docker container in Red Cloud.

Launch Instance

Launch a Red Cloud instance using the openfoam-docker-2020-09-17 image. See the Red Cloud Linux instances page on how to launch an instance.

Run and Attach to Docker Container

  1. ssh to the Red Cloud instance.
  1. Run and attach a docker container containing OpenFOAM image: docker container run -ti openfoam/openfoam7-paraview56



Based on the experimental work of Pitz and Daily (1981). It features a backward facing step. Such a ``classic`` case is instructive for comparing different turbulence models with respect to the size and shape of the recirculation zone.

  • Inside the Openfoam docker container, first make a unique working directory:
WORK_DIR=$FOAM_RUN-$(whoami)-$(date +%s) 
echo $WORK_DIR
mkdir -p $WORK_DIR 
cp -r $FOAM_TUTORIALS/incompressible/simpleFoam/pitzDaily .
cd pitzDaily
  • Next, we will run the simulations; it is very quick under a minute.
    • blockMesh
    • simpleFoam

IcoFoam Cavity

  • Within the working directory (cd $WORK_DIR)as above,
cp -r $FOAM_TUTORIALS/incompressible/icoFoam/cavity/cavity . 
cd cavity
  • Run the simulations:
    • blockMesh
    • icoFoam