... | ... | @@ -21,9 +21,27 @@ flexibility or permanence is desired. |
|
|
|
|
|
## Transient (one-time) use
|
|
|
|
|
|
In many cases it is desirable to _activate_ a particular OpenFOAM
|
|
|
version, do something with it and possibly restore to the previous
|
|
|
state without exiting the shell.
|
|
|
In many cases it is desirable to activate or use a particular OpenFOAM
|
|
|
version without any additional setup.
|
|
|
|
|
|
### ![bash](/icons/gnubash.svg "bash") [Shell session](/running/shell-session)
|
|
|
|
|
|
Depending on your packaging system (or system administrator), an
|
|
|
[OpenFOAM shell session](/running/shell-session) command may be
|
|
|
available as a convenient means of defining and using an OpenFOAM
|
|
|
environment. For example,
|
|
|
```
|
|
|
# Interactive shell
|
|
|
$ openfoam
|
|
|
```
|
|
|
|
|
|
The shell session can be particularly useful when running a single
|
|
|
OpenFOAM application from within a workflow. For example,
|
|
|
```
|
|
|
# Use an older version
|
|
|
$ openfoam2012 simpleFoam
|
|
|
```
|
|
|
|
|
|
|
|
|
### Manually
|
|
|
|
... | ... | @@ -40,18 +58,14 @@ The _/path/to/openfoam_ location will depend on the OpenFOAM version |
|
|
and installation.
|
|
|
|
|
|
|
|
|
### ![bash](/icons/gnubash.svg "bash") [Shell session](/running/shell-session)
|
|
|
|
|
|
Depending on your packaging system (or system administrator), an
|
|
|
[OpenFOAM shell session](/running/shell-session) command may be
|
|
|
available as a convenient means of defining and using an OpenFOAM
|
|
|
environment.
|
|
|
## Persistent selection
|
|
|
|
|
|
The shell session can be particularly useful when running a single
|
|
|
OpenFOAM application from within a workflow.
|
|
|
### [openfoam-selector](/running/openfoam-selector)
|
|
|
|
|
|
Depending on your packaging system (or system administrator), an
|
|
|
[openfoam-selector](/running/openfoam-selector) may be available
|
|
|
to define the preferred OpenFOAM version for the ***login*** shell.
|
|
|
|
|
|
## Persistent selection
|
|
|
|
|
|
### Manual
|
|
|
|
... | ... | @@ -64,7 +78,7 @@ following to that file: |
|
|
It is usually prudent to check the existence of the file prior to
|
|
|
sourcing it:
|
|
|
```
|
|
|
if [ -f /path/to/openfoam/etc/bashrc ]
|
|
|
if [ -f /path/to/openfoam/etc/bashrc ]
|
|
|
then . /path/to/openfoam/etc/bashrc
|
|
|
fi
|
|
|
```
|
... | ... | @@ -74,14 +88,7 @@ The _/path/to/openfoam_ location will depend on the OpenFOAM version |
|
|
and installation.
|
|
|
|
|
|
|
|
|
### Configured via [openfoam-selector](/running/openfoam-selector)
|
|
|
|
|
|
Depending on your packaging system (or system administrator), an
|
|
|
[openfoam-selector](/running/openfoam-selector) may be available
|
|
|
to define the preferred OpenFOAM version for the ***login*** shell.
|
|
|
|
|
|
|
|
|
----
|
|
|
|
|
|
Copyright (C) 2019-2020 OpenCFD Ltd.
|
|
|
Copyright (C) 2019-2021 OpenCFD Ltd.
|
|
|
|