Skip to content

Installation

Rick Fenrich edited this page Sep 27, 2018 · 38 revisions

Currently we recommend using the feature_elliptical branch of MULTI-F to obtain all the new features. Running the nozzle model requires the following programs to be installed:

  • Python 2: (code is not compatible with Python 3). Requires Numpy 1.10.0 or greater and Scipy 0.14.0 or greater.
  • SU2 (nozzlethrust branch): custom version of CFD code developed at Stanford. Required version: at least commit a5cf8e from July 31, 2018
  • Gmsh : an open source mesh generator. Required version: 3.0.5
  • Open Cascade : open source computational geometry engine. Required version: see Gmsh requirements.
  • Aero-S : finite element code developed at Stanford. Recommended version: commit 84fdd44 from 10-25-17. More recent commits have an input file parsing bug.
  • SWIG : software development tool for connecting C and Python programs. Required version: any recent version

MULTI-F

Several libraries need to be compiled in order to use MULTI-F. These libraries include meshing utilities (MULTIF/multif/meshutils), interpolation utilities (MULTIF/multif/mshint), and a C version of the low-fidelity model. During the compilation process, the include, source, and library directories of Gmsh, and the include and library directories of OpenCascade need to be referenced.

To install MULTI-F, first change to the MULTIF\multif directory. Then run the following command, replacing the include directories and library directories with the correct ones for your computer:

python setup.py build_ext --inplace --include-dirs=/home/user/codes/gmsh/gmsh-3.0.5-install/include/gmsh:/home/user/codes/gmsh/gmsh-3.0.5-source:/home/user/codes/OCC/opencascade-7.2.0-install/include/opencascade --library-dirs=/home/user/codes/gmsh/gmsh-3.0.5-install/lib:/home/user/codes/OCC/opencascade-7.2.0-install/lib

_meshutils_module.so, _mshint_module.so, and _nozzle_module.so should now reside in your MULTIF/multif directory. _quasi1dnozzle.so should reside in the MULTIF/multif/LOWF directory.

SU2

A custom version of SU2 is available on Github:

$ git clone -b nozzlethrust https://github.com/vmenier/SU2.git

All the information needed to compile SU2 can be found here: https://github.com/su2code/SU2/wiki/Installation

If you are using the adjoint gradients computation in MULTIF, you need to configure SU2 with Automatic Differentiation (AD) support (see Information about AD build).

Specific information for windows users: https://github.com/su2code/SU2/wiki/Windows-Installation

Gmsh

Currently Gmsh must be compiled from the source code with Open Cascade support. To do so, obtain the Gmsh source code (see http://gmsh.info/src/) and ensure Open Cascade is installed. This may require compiling Open Cascade manually (see https://www.opencascade.com/content/latest-release) if the version installed via the package manager (lib-oce-foundation-dev and/or liboce-modeling-dev on Ubuntu) is too old. Previously, a source code file needed to be replaced in Gmsh. This is no longer the case for Gmsh 3.0.5. Once Open Cascade in installed, on Linux, the following example set of instructions have been successfully used:

tar -zxvf gmsh-3.0.5-source.tgz
mkdir gmsh-3.0.5-build
cd gmsh-3.0.5-build
cmake -DENABLE_FLTK:BOOL=OFF -DENABLE_MESH:BOOL=ON -DENABLE_PARSER:BOOL=ON -DCMAKE_INSTALL_PREFIX=/home/user/codes/gmsh-3.0.5-install -DENABLE_OCC:BOOL=ON -DCMAKE_CXX_FLAGS=-std=c++11 -DDEFAULT=0 -DENABLE_ANN:BOOL=ON -DENABLE_BUILD_LIB=1 -DENABLE_BUILD_SHARED=1 -DOCC_INC=/home/user/codes/opencascade-7.2.0-install/include/opencascade -DCMAKE_PREFIX_PATH=/home/user/codes/opencascade-7.2.0-install/lib /home/user/codes/gmsh-3.0.5-source
make -j 8
make install -j 8

Note that if you are a mac user, you can install Gmsh using Homebrew (http://brew.sh) by running the following command line: brew install gmsh

Aero-S

Aero-S is the general-purpose finite element code developed by the FRG at Stanford. Installation instructions are included in the FEM-Manual.pdf found in the Aero-S source directory. A basic installation procedure is outlined below:

  1. Install flex and bison.
  2. Install Eigen3 (http://eigen.tuxfamily.org) Versions 3.2.6 and 3.3.3 have been successfully used. Versions 3.3.9 does not work.
    • Add SuiteSparse library and includes to CMAKE_LIBRARY_PATH and CMAKE_INCLUDE_PATH if necessary
  3. cmake -DAERO=1 .
  4. make -j 8
    • Ensure all directories in CMakeCache.txt are correct and manually change them if necessary
    • If errors arise related to UF_long and/or SuiteSparse_long being undefined, then add typedef long UF_long; to the top of eigen3/Eigen/src/CholmodSupport/CholmodSupport.h and typedef long SuiteSparse_long; to the top of eigen3/Eigen/src/SPQRSupport/SuiteSparseQRSupport.h
    • For other C++11 related errors, add -std=c++0xx to CMakeLists.txt
    • For certain errors with the GCC compilers, adding the compile flag -fpermissive will treat some errors as warnings
    • For errors relating to tbb, add -ltbb and -ltbbmalloc to CMakeLists.txt
    • For errors related to std::remainder, a file may need to be edited. Contact us if this occurs.
  5. make install

To check the version and date of your aero-s repository, the following mercurial command is useful:

hg log -r . --template "v{latesttag}--{date|isodate}--{node|short}\n"

To checkout a specific commit, run the following:

hg revert -r 84fdd443b5fd --all
hg update
hg id -i

The last command should print the hash of the current commit which should be 84fdd443b5fd.