... | ... | @@ -10,33 +10,33 @@ |
|
|
## Introduction
|
|
|
|
|
|
Depending on your packaging system (or system administrator),
|
|
|
various openfoam shell sessions may be available. For example,
|
|
|
various OpenFOAM shell sessions may be available. For example,
|
|
|
```
|
|
|
/usr/bin/openfoam -> openfoam2006
|
|
|
/usr/bin/openfoam1912
|
|
|
/usr/bin/openfoam2006
|
|
|
/usr/bin/openfoam1912
|
|
|
```
|
|
|
They provide the simplest means of starting OpenFOAM immediately and
|
|
|
can be used for an _interactive_ bash session, or to run a single
|
|
|
OpenFOAM command within the OpenFOAM environment.
|
|
|
|
|
|
Using the `-help` option for the respective shell session
|
|
|
(eg, `openfoam2006 -help`) displays some useful information.
|
|
|
(e.g., `openfoam2006 -help`) displays some useful information.
|
|
|
|
|
|
|
|
|
## Purpose
|
|
|
|
|
|
The purpose of the OpenFOAM shell session is simply convenience.
|
|
|
|
|
|
- quickly set and use an interactive environment for OpenFOAM
|
|
|
- quickly set and use an interactive environment for OpenFOAM.
|
|
|
- use a single OpenFOAM application without preliminary setup of an
|
|
|
OpenFOAM environment.
|
|
|
- use OpenFOAM applications from a parallel installation with a
|
|
|
different precision.
|
|
|
- entrypoint for container scripts
|
|
|
- entrypoint for container scripts.
|
|
|
|
|
|
|
|
|
## Interactive
|
|
|
## Interactive session
|
|
|
|
|
|
Calling an OpenFOAM shell session without any arguments opens an
|
|
|
interactive _bash_ session with the respective OpenFOAM environment
|
... | ... | @@ -47,11 +47,11 @@ For example, |
|
|
```
|
|
|
$ openfoam
|
|
|
|
|
|
Using: OpenFOAM-1912 - see www.openfoam.com
|
|
|
Using: OpenFOAM-2006 - see www.openfoam.com
|
|
|
Arch: linux64GccDPInt32Opt (mpi=openmpi-system)
|
|
|
OpenFOAM shell session - use exit to quit
|
|
|
|
|
|
OpenFOAM-1912:~/
|
|
|
OpenFOAM-2006:~/
|
|
|
mark$
|
|
|
```
|
|
|
|
... | ... | @@ -61,7 +61,7 @@ Although the OpenFOAM environment is sourced _after_ your home |
|
|
references from within your `~/.bashrc` file.
|
|
|
|
|
|
|
|
|
## Non-interactive
|
|
|
## Non-interactive session
|
|
|
|
|
|
If an OpenFOAM shell session is called with arguments, it will setup
|
|
|
an OpenFOAM environment before executing a single command. For
|
... | ... | @@ -87,9 +87,13 @@ $ openfoam2006 -c 'echo "openfoam=$WM_PROJECT_DIR uses $WM_OPTIONS"' |
|
|
yields: `openfoam=/usr/lib/openfoam/openfoam2006 uses linux64GccDPInt32Opt`
|
|
|
|
|
|
|
|
|
## NOTES
|
|
|
## Notes
|
|
|
|
|
|
- OpenFOAM shell sessions are included as part of Debian and RPM packages.
|
|
|
|
|
|
- ***Never*** attempt to embed the shell session wrapper as part of
|
|
|
your `~/.bashrc` - this may cause an infinite loop!
|
|
|
|
|
|
|
|
|
----
|
|
|
|
|
|
Copyright (C) 2020 OpenCFD Ltd. |