Running CFDDFC with the AWS Console
- Configure a Security Group
- Create an SSH Key Pair
- Launch an Instance
- Connect to an Instance
- Using OpenFOAM on an Instance
- Data Transfer to an Instance
- Connect with the Remote Desktop (“Classic” CFDDFC)  or
Connect with the Web Browser Remote Desktop (Web CFDDFC) - Data Storage
- Creating a Cluster of Instances
Problem with these instructions? Please send a CFDDFC Support Query.
The OpenFOAM Configuration
OpenFOAM is a collection of 200+ applications that can be executed from the terminal prompt. The applications include: “solvers” that solve equations to simulate fluid flow; and, “utilities” that perform other tasks needed in CFD, e.g. generation of the computational mesh, initialisation of fields, data manipulation, etc. The applications can be executed from the terminal prompt, reading from and writing to data files of the problem case. In OpenFOAM, the case files are stored within a directory, whose name reflects the problem being simulated, in which there are typically 3 further directories, named 0, system and constant containing the case files. Users unfamiliar with Linux can consult our OpenFOAM Linux Guide.
In the OpenFOAM configuration, an environment variable named $FOAM_RUN is reserved to represent a default directory to put OpenFOAM case data. The default directory is $HOME/OpenFOAM/USER-VERSION/run, i.e. $HOME/OpenFOAM/ubuntu-11/run for USER=ubuntu and version number VERSION=11. There is also an alias named run that changes directory (cd) to the $FOAM_RUN directory. The OpenFOAM installation can be found in the /opt directory and example cases are stored in a directory named tutorials within the installation. Another environment variable $FOAM_TUTORIALS is set to represent the tutorials directory.
Testing OpenFOAM
Users can test any tutorial example in OpenFOAM. For example, in OpenFOAM version 11, the a simulation of steady, incompressible, turbulent flow over a backward facing step — the pitzDailySteady case — involves the following steps:
- changing to the
$FOAM_RUNdirectory with therunalias; - copying the
pitzDailySteadycase files from thetutorialsdirectory to the current directory (denoted in Linux as'.'); - changing to the
pitzDailySteadycase directory; - generating a mesh for the backward step geometry with the
blockMeshutility; - running the incompressibleFluid solver module with
foamRun.
Execution these steps from the terminal prompt is as follows:
run cp -r $FOAM_TUTORIALS/incompressibleFluid/pitzDailySteady . cd pitzDailySteady blockMesh foamRun
For more information about running cases, see:
Configuring OpenFOAM Applications
Solvers and utilities are configured through the data files in a case directory. The configuration of a case can be modified by opening a file in a text editor, changing settings and saving the file. 3 popular editors which can work through a terminal are:
nano: the easiest of the 3 editors for the purpose, seenanobasics guide;emacs: powerful editor that uses a more complex set of key commands,emacsbasics;vim: another editor with arguably a less familiar set of key commands, seevimquick guide.
It is worth knowing the command to exit the editor you use in case a problem arises:
nanoexits withC-x(C=Control key)emacsexits withC-x C-c(preceded byC-g, if needed)vimexits withESC :q!
The user may, for example, open the fvSolution file in the system directory in one of these editors, e.g. nano by
nano system/fvSolution
The user may edit the residualControls as follows, then exit with C-x, saving the file (Y)
residualControl
{
p 1e-3;
U 1e-4;
"(k|epsilon|omega|f|v2)" 1e-4;
}
The user can then restart foamRun from the previous solution. For more information about configuration of case files, see:
