ElmerFoamFSI  2.0
ElmerFoamFSI is fluid-solid interaction simulation application built up from OpenFOAM CFD and Elmer CSM coupled through the IMPACT multiphysics software integration infrastructure.
 All Classes Namespaces Files Functions Variables Typedefs Enumerator Macros Groups Pages
ElmerFoamFSI Documentation

Introduction

ElmerFoamFSI is a fluid-solid interaction simulation application built on OpenFOAM (CFD) and Elmer (CSM), coupled through Illinois Rocstar's IMPACT multiphysics software integration infrastructure.

To begin using ElmerFoamFSI, clone the repository from github via git clone:

git clone https://github.com/IllinoisRocstar/ElmerFoamFSI

Build and Install

The top level directory of ElmerFoamFSI comes with a build script ( BuildScript ) made to run within a Linux terminal. This script executes cmake, make, and make install for the various components of the project.
ElmerFoamFSI requires C, C++, and Fortran compilers. Additionally, it requires gfortran of version greater than 4.8.
Before beginning ensure that your gfortran compiler meets this requirement.

1. Obtain the required submodules

Navigate into the top level directory for ElmerFoamFSI:

cd ElmerFoamFSI

Issue the following command to obtain the necessary submodules from GitHub:

git submodule update --init --recursive

The directories IMPACT, IMPACT/IRAD/ elmerfem, and foam should now be populated.

2. Execute the build script

Call the build script from the top level ElmerFoamFSI directory. Provide it with the argument "first," since this is the first time building it:

./BuildScript first

The script may ask if the user wishes to compile without Paraview. It is fine to say "yes" to this question. The entire build and install process can take up to around 6 hours depending on the machine.
If any errors occur during the build and install process, ElmerFoamFSI should stop the process and log the error. All output from the build is located in a file named Build.dat located in the same location as BuildScript; the output can be checked for build, install, and error messages. At the end of the build, the tests for ElmerFoamFSI should run and all pass. If any tests fail, there may be an issue with the build.
If all goes according to plan, executing this script and answering "yes" should be the only steps required to build.

3. Rebuilding

In the event you want to rebuild ElmerFoamFSI, BuildScript can simply be executed again without providing the "first" argument above:

./BuildScript

The "first" argument causes the OpenFOAM first install script to be called instead of the regular build script, patches some files required for linking the two applications, and makes some useful links in the install directory.

The full list of arguments for BuildScript are as follows:

  • first:
    • Causes OpenFOAM's Allwmake.firstInstall to be called instead of Allwmake
    • Patches appropriate files in Elmer and OpenFOAM
    • Links Elmer's libraries to the main lib directory in the ElmerFoamFSI install directory
  • notest:
  • nofoam:
    • Skips the building of OpenFOAM (generally the building of OpenFOAM is the longest portion, so skipping this component when possible is desirable)

BuildScript calls a series of other scripts located in the /ElmerFoamFSI/BuildTools/ director y. The precise manner in which these scripts are called can be seen by looking in the BuildScript file.
If the user wishes to rebuild only one component of the project, these files can be called individually. They are listed below with their associated arguments:

  • BuildElmerFoamFSIDriver : builds only the orchestrator component
    • first argument must be the full path to the top level ElmerFoamFSI directory
    • optional second argument "notest" skips the running of the tests
  • BuildElmerModule : builds the Elmer software as well as the module for interfacting Elmer with IMPACT
    • first argument must be the full path to the top level ElmerFoamFSI directory
    • optional second argument "first" indicates that it is the first build and the Elmer libraries need to be linked to the appropriate location
  • BuildIMPACT : builds IMPACT as well as IMPACT's submodule, IRAD
    • first argument must be the full path to the top level ElmerFoamFSI directory
  • BuildOpenFoam : builds the OpenFOAM application only
    • first argument must be the full path to the top level ElmerFoamFSI directory
  • BuildOpenFoamModule : builds the module to interface OpenFOAM with IMPACT
    • first argument must be the full path to the top level ElmerFoamFSI directory
  • PatchScript : patches some files within the the Elmer and OpenFOAM sources in order for interfacing with IMPACT
    • first argument must be the full path to the top level ElmerFoamFSI directory

Two additional files are present in the BuildTools directory: BashSourceScript and CshellSourceScript . These two files provide the appropriate environment setup for building and running ElmerFoamFSI. Users should source the one appropriate for the shell they are using before running the code. Each takes the full path to the top level ElmerFoamFSI directory as the first argument.
For example, from the top level, the command could be (if using Bash):

Source ElmerFoamFSI/BuildTools/BashSourceScript/full/path/to/top/level/ElmerFoamFSI

4. Troubleshooting

In the event that something goes wrong with the build, it is recommended that the build steps be executed in smaller batches or potentially the entire process done manually. BuildScript calls a series of other scripts as noted above in the "Rebuilding" section. Each of these scripts can be executed by hand in order to help clarify any issues that are occuring. Additionally, all the steps taken in the various build scripts can be done by hand. In order to manually build ElmerFoamFSI, users should either follow the steps in the scripts or read the full instruction set at Manual Installation.

We encourage you to share your ideas, improvements, and issues with us. In the event that a manual install fails, please contact our support staff:
Customer Support Staff Email: tech@.nosp@m.illi.nosp@m.noisr.nosp@m.ocst.nosp@m.ar.co.nosp@m.m

Illinois Rocstar

Project Template

ElmerFoamFSI uses the Illinois Rocstar Project Template IRProject and uses the following internal and third-party packages: OpenFOAM, Elmer, CMake, CTest, Doxygen, IMPACT, IRAD, MPI