Difference between revisions of "OpenFOAM"

From arccwiki
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 10: Line 10:
 
* Manual:  
 
* Manual:  
 
** [https://cfd.direct/openfoam/user-guide-v6/ Version 6]
 
** [https://cfd.direct/openfoam/user-guide-v6/ Version 6]
 +
** [https://cfd.direct/openfoam/user-guide/ Latest]: Currently Version 7
 
<br/>
 
<br/>
 
===Module: Example:===
 
===Module: Example:===
 
<pre>
 
<pre>
 +
[salexan5@tlog2 ~]$ module spider openfoam
 +
-------------------------------------------------------
 +
  openfoam-org:
 +
-------------------------------------------------------
 +
    Versions:
 +
        openfoam-org/6
 +
        openfoam-org/7
 +
 +
-------------------------------------------------------
 +
  For detailed information about a specific "openfoam-org" module (including how to load the modules) use the module's full name.
 +
  For example:
 +
 +
    $ module spider openfoam-org/7
 +
-------------------------------------------------------
 +
 
[]$ module spider openfoam
 
[]$ module spider openfoam
 
-----------------------------------------------------------
 
-----------------------------------------------------------
Line 59: Line 75:
 
   foamInfo foamNewBC
 
   foamInfo foamNewBC
 
</pre>
 
</pre>
 +
 +
<pre>
 +
[]$ module load swset/2018.05 gcc/7.3.0 openmpi/3.1.0
 +
[]$ module load openfoam-org/7
 +
 +
[]$ foamInfo
 +
Missing argument: no application, model, script, etc provided
 +
 +
Usage: foamInfo [OPTIONS] <name>
 +
options:
 +
  -all    | -a        list all tutorials that use <name> (otherwise maximum 10)
 +
  -browser | -b <name> output C++ source guide web page with specified browser,
 +
                      e.g. foamInfo -browser "firefox"
 +
  -help    | -h        print the usage
 +
  -keyword | -k        uses <name> as a keyword, rather than an exact match
 +
  -web    | -w        output C++ source guide web page with the browser
 +
                      specified in the global controlDict file
 +
 +
Prints the following for an application, a script, or a model
 +
(including boundary conditions, function objects and fvOptions).
 +
- File: the location of the relevant source code header file;
 +
- Description details from the header file;
 +
- Usage details from the header file;
 +
- Examples: a list of relevant cases from the tutorials directory.
 +
 +
By default, finds a case-sensitive match to <name>; otherwise, a
 +
case-insensitive match; otherwise, looks for a broader keyword match
 +
with "-keyword | -k" option.
 +
 +
Examples:
 +
  foamInfo simpleFoam
 +
  foamInfo turbulentIntensityKineticEnergyInlet
 +
  foamInfo fixedTemperatureConstraint
 +
  foamInfo surfaces
 +
  foamInfo foamNewBC
 +
  foamInfo wallFunction
 +
  foamInfo kEpsilon
 +
  foamInfo -k kEpsilon
 +
  foamInfo fixedValue
 +
  foamInfo -k fixedValue
 +
  foamInfo -k contactAngle
 +
</pre>
 +
  
 
===Batch / Interactive Session Example:===
 
===Batch / Interactive Session Example:===

Latest revision as of 22:13, 12 February 2020

NOTE: THIS PAGE IS UNDER DEVELOPMENT
ARCC IS STILL UNDERSTANDING HOW OpenFOAM WORKS AND HOW TO SUPPORT IT



There are two flavors of OpenFOAM:

  • OpenFOAM.com variant by OpenCFD Ltd an affiliate of ESI Group.
  • OpenFOAM.org variant released by the OpenFOAM Foundation Ltd. It is this version that we have installed upon request.
  • Homepage: OpenFOAM.org: OpenFOAM is free, open source software for CFD from the OpenFOAM Foundation. According to Wiki OpenFOAM (for "Open-source Field Operation And Manipulation") is a C++ toolbox for the development of customized numerical solvers, and pre-/post-processing utilities for the solution of continuum mechanics problems, most prominently including computational fluid dynamics (CFD).
  • Manual:


Module: Example:

[salexan5@tlog2 ~]$ module spider openfoam
-------------------------------------------------------
  openfoam-org:
-------------------------------------------------------
     Versions:
        openfoam-org/6
        openfoam-org/7

-------------------------------------------------------
  For detailed information about a specific "openfoam-org" module (including how to load the modules) use the module's full name.
  For example:

     $ module spider openfoam-org/7
-------------------------------------------------------

[]$ module spider openfoam
-----------------------------------------------------------
  openfoam-org: openfoam-org/6
-----------------------------------------------------------
    You will need to load all module(s) on any one of the lines below before the "openfoam-org/6" module is available to load.
      swset/2018.05  gcc/7.3.0  openmpi/3.1.0
 
    Help:
      OpenFOAM is a GPL-opensource C++ CFD-toolbox. The openfoam.org release
      is managed by the OpenFOAM Foundation Ltd as a licensee of the OPENFOAM
      trademark. This offering is not approved or endorsed by OpenCFD Ltd,
      producer and distributor of the OpenFOAM software via www.openfoam.com,
      and owner of the OPENFOAM trademark.
[]$ module load swset/2018.05 gcc/7.3.0 openmpi/3.1.0
[]$ module load openfoam-org/6

[]$ foamInfo
Missing argument: no application, model, script, etc provided

Usage: foamInfo [OPTIONS] <name>
options:
  -all     | -a        list all tutorials that use <name> (otherwise maximum 10)
  -browser | -b <name> output C++ source guide web page with specified browser,
                       e.g. foamInfo -browser "firefox"
  -help    | -h        print the usage
  -web     | -w        output C++ source guide web page with the browser
                       specified in the global controlDict file

Prints the following for an application, a script, or a model
(including boundary conditions, function objects and fvOptions).
- File: the location of the relevant source code header file;
- Description details from the header file;
- Usage details from the header file;
- Examples: a list of relevant cases from the tutorials directory.

For example, run:
  foamInfo simpleFoam
  foamInfo kEpsilon
  foamInfo turbulentIntensityKineticEnergyInlet
  foamInfo fixedTemperatureConstraint
  foamInfo surfaces
  foamInfo foamNewBC
[]$ module load swset/2018.05 gcc/7.3.0 openmpi/3.1.0
[]$ module load openfoam-org/7

[]$ foamInfo
Missing argument: no application, model, script, etc provided

Usage: foamInfo [OPTIONS] <name>
options:
  -all     | -a        list all tutorials that use <name> (otherwise maximum 10)
  -browser | -b <name> output C++ source guide web page with specified browser,
                       e.g. foamInfo -browser "firefox"
  -help    | -h        print the usage
  -keyword | -k        uses <name> as a keyword, rather than an exact match
  -web     | -w        output C++ source guide web page with the browser
                       specified in the global controlDict file

Prints the following for an application, a script, or a model
(including boundary conditions, function objects and fvOptions).
- File: the location of the relevant source code header file;
- Description details from the header file;
- Usage details from the header file;
- Examples: a list of relevant cases from the tutorials directory.

By default, finds a case-sensitive match to <name>; otherwise, a
case-insensitive match; otherwise, looks for a broader keyword match
with "-keyword | -k" option.

Examples:
  foamInfo simpleFoam
  foamInfo turbulentIntensityKineticEnergyInlet
  foamInfo fixedTemperatureConstraint
  foamInfo surfaces
  foamInfo foamNewBC
  foamInfo wallFunction
  foamInfo kEpsilon
  foamInfo -k kEpsilon
  foamInfo fixedValue
  foamInfo -k fixedValue
  foamInfo -k contactAngle


Batch / Interactive Session Example:

After logging onto teton either:
1) Create an interactive session: In the example below change arcc to your project name, and modify the time you think you need, the example below is set for 60 minutes.

[...@tlog1]$ salloc --account=arcc --time=60:00
salloc: Granted job allocation 3489587

[...@m067]$ 
[...@m067]$ ]$ module load swset/2018.05 gcc/7.3.0 openmpi/3.1.0
[...@m067]$ ]$ module load openfoam-org/6


2) Submit a job: Below is an example of a batch file:

#!/bin/bash
#SBATCH --account=arcc
#SBATCH --time=00:30:00
#SBATCH --nodes=1
#SBATCH --mem=0
#SBATCH --output=qiime_%A.out
#SBATCH --chdir=/project/arcc/salexan5/openfoam

module load swset/2018.05 gcc/7.3.0 openmpi/3.1.0
module load openfoam-org/6

Parallel Jobs:


General Notes:


Back to HPC Installed Software