Skip to content

Installation

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

Running the nozzle model requires the following elements to be installed:

  • meshutils : a simple in-house C code embedded in MULTIF used for CAD and pre-/post-processing,
  • SU2 : CFD code developed at Stanford,
  • GMsh : an open source mesh generator,
  • AEROS : finite element code developed at Stanford.

meshutils

Meshutils is a simple in-house C code embedded in the MULTIF python module. It computes the nozzle shape parameterization and performs all the pre- post-processing operations. The C functions are directly called from python.

To compile meshutils, first change the current directory to the one containing the core of multif:

$ cd /Path/to/MULTIF
$ cd multif/

Then, run the following command, which require to specify the location of the Gmsh include files and library.

$ python setup.py build_ext --inplace --include-dirs=/path/to/Gmsh/include/gmsh --library-dirs=/path/to/Gmsh/install/lib

This will compile meshutils and create a python module to be imported in multif.

NB: Running the setup requires to have SWIG installed. SWIG is a widely used software development tool that connects programs written in C with python. More information: http://www.swig.org

SU2

A custom version of SU2 is available on github:

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

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

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

This version of SU2 includes a local under-relaxation coefficient and a local CFL value for implicit simulations. To enable them, the following options were added to the configuration file:


 % ---- Local CFL options ----

 % Activate local CFL? (YES/NO)
 CFL_ADAPT_LOCAL= YES

 % Parameters of the adaptive CFL number (factor down, factor up, CFL min value,   
 %                                        CFL max value )       
 CFL_ADAPT_LOCAL_PARAM= ( 0.1, 1.5, 1e-12, 30.0 ) 

 % ---- Under-relaxation options ----
 
 % Activate local under-relaxation? (YES/NO)
 RELAXATION_LOCAL= YES

 % Maximum local variation percentage of the density at each time step,
 % and minimum value for the density
 HARD_LIMITING_PARAM= (0.25, 1e-5)

Gmsh

Currently Gmsh must be compiled from the source code with openCASCADE support. To do so, obtain the Gmsh source code (see http://gmsh.info/src/) and ensure openCASCADE is installed (this can be done via package manager for Linux distributions, for example on Ubuntu the liboce-foundation-dev and/or liboce-modeling-dev packages suffice). A bug has also been found in Gmsh, and a modified source file must be included before compilation. Contact us to obtain the file. Once this is done, on Linux, the following example set of instructions have been successfully used:

tar -zxvf gmsh-2.13.1-source.tgz  
mkdir gmsh-2.13.1-build  
cd gmsh-2.13.1-build  
cmake ../path/to/gmsh/source  
cmake -DENABLE_FLTK:BOOL=OFF -DCMAKE_INSTALL_PREFIX=/path/to/install/location .  
cmake -DDEFAULT=0 -DENABLE_BUILD_LIB=1 -DENABLE_BUILD_SHARED=1 .  
make lib  
make shared  
make install

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)
    • 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