Changes

296 bytes added ,  19:10, 15 September 2017
no edit summary
Line 1: Line 1:  
This page will help you with installing SU2, as well as provide specific help with the way we use SU2.
 
This page will help you with installing SU2, as well as provide specific help with the way we use SU2.
 +
[[File:SU2_Logo.png | right | 300px ]]
 +
[https://github.com/su2code/SU2 Link to the Github code repository for SU2]
 +
[https://github.com/su2code/SU2/wiki Link to the super helpful SU2 wiki (which is also hosted in Github)]
   −
https://github.com/su2code/SU2
+
=The Big Picture=
https://github.com/su2code/SU2/wiki
+
Need to compile the code in order to run the solver. Once compiled for either a serial or multi-core system, you can run the CFD solver. The solver requires two inputs: a mesh grid and a configuration file.  
 +
 
 +
*Will add a few templates once we figure out realistic configuration cases for our rockets.
 +
*Will add a sample mesh once we have one.
 +
 
 +
=Installation on personal computer=
   −
Need to compile the code in order to run the solver. Once compiled for either a serial or multi-core system, you can run the CFD solver. The solver requires two inputs: a mesh grid and a configuration file.  
+
General Tips:
 +
*Learn how to navigate around your computer using just your terminal
 +
*Understand how to edit .bashrc files
 +
*Understand how to change path variables in your terminal
 +
*If not compiling with cygwin due to some carriage return error, add this to your .bash_profile script (in your home directory)
 +
<code>export SHELLOPTS</code>
   −
Will add a few templates once we figure out realistic configuration cases for our rockets.
+
<code>set -o igncr</code>
Will add a sample mesh once we have one.
  −
Installation for personal computer:
  −
Windows - install cygwin with g++, gcc, make, and cpp packages. You need to be able to compile C++ code. Need to figure which exact packages.
     −
Mac and Linux - You already have a compiler, so download source code zip, unzip, and follow the tutorial on SU2’s site.
+
==Windows==
 +
Install cygwin with g++, gcc, make, and cpp packages. You need to be able to compile C++ code. Need to figure which exact packages.  
   −
Tips:
+
==Mac and Linux==
Learn how to navigate around your computer using just your terminal
+
You already have a compiler, so download source code zip, unzip, and follow the tutorial on SU2’s site.
Understand how to edit .bashrc files
  −
Understand how to change path variables in your terminal
  −
If not compiling with cygwin due to some carriage return error, add this to your .bash_profile script (in your home directory)
     −
<code>
+
=Installation in Corn=
export SHELLOPTS
  −
set -o igncr
  −
</code>
     −
Installation for Corn
+
[https://web.stanford.edu/group/farmshare/cgi-bin/wiki/index.php/FarmVNC How to set up VNC for your computer]
VNC help: https://web.stanford.edu/group/farmshare/cgi-bin/wiki/index.php/FarmVNC
      
Don’t bother attempting to move files around with Filezilla. Login to a VNC session and execute the <code>firefox</code> command in the terminal. Go to SU2's github repository and download everything there. Navigate to the zip file and
 
Don’t bother attempting to move files around with Filezilla. Login to a VNC session and execute the <code>firefox</code> command in the terminal. Go to SU2's github repository and download everything there. Navigate to the zip file and
Line 32: Line 36:  
<code>
 
<code>
 
./configure --prefix="/afs/.ir/users/i/a/iangomez/SU2compiled/" CXXFLAGS="-03" --enable-mpi --with-cc=/usr/bin/mpicc --with-cxx=/usr/bin/mpicxx
 
./configure --prefix="/afs/.ir/users/i/a/iangomez/SU2compiled/" CXXFLAGS="-03" --enable-mpi --with-cc=/usr/bin/mpicc --with-cxx=/usr/bin/mpicxx
 +
 
make -j 8 install
 
make -j 8 install
 
</code>
 
</code>
   −
Note: change the prefix to your directory! If you’re confused by this read
+
'''Note''': change the prefix to your directory! If you’re confused by this read
 
<code>./configure --help </code> or email Ian or your RCC.
 
<code>./configure --help </code> or email Ian or your RCC.
   Line 41: Line 46:     
<code>
 
<code>
export SU2_RUN="/afs/.ir/users/i/a/iangomez/SU2compiled/bin"
+
export SU2_RUN="/afs/.ir/users/i/a/iangomez/SU2compiled/bin"\\
 
export SU2_HOME="/afs/.ir/users/i/a/iangomez/SU2-master"
 
export SU2_HOME="/afs/.ir/users/i/a/iangomez/SU2-master"
 +
 
export PATH=$PATH:$SU2_RUN
 
export PATH=$PATH:$SU2_RUN
 +
 
export PYTHONPATH=$PYTHONPATH:$SU2_RUN
 
export PYTHONPATH=$PYTHONPATH:$SU2_RUN
 
</code>
 
</code>
    
And obviously, change the paths to be correct. In order to find your .bashrc and open it in terminal:
 
And obviously, change the paths to be correct. In order to find your .bashrc and open it in terminal:
      
<code>
 
<code>
 
cd
 
cd
 +
 
ls -al
 
ls -al
 +
 
vim .bashrc
 
vim .bashrc
 
</code>
 
</code>
   −
Or you can open it in the GUI, by going to your home directory and pressing ctrl+h in order to show hidden files. Then double click your .bashrc file and add the specified lines.
+
Or you can open it in the GUI, by going to your home directory and pressing ctrl+h in order to show hidden files. Then double click your .bashrc file and add the specified lines. '''Make sure to execute the bash file to get the <code>PATH</code> updated: <code>exec bash</code>.'''
   −
Then go to the directory where you’ve compiled SU2 and run the following command on each module:
+
At this point, you will be able to run the code from any directory. However, if the files aren't executing, you can change their permissions to make them executables. Go to the directory where you’ve compiled SU2 and run the following command on each module, like this:<code> corn17:~/SU2compiled/bin> chmod +x SU2_CFD</code>
   −
<code>
+
=Running sample code=
corn17:~/SU2compiled/bin> chmod +x SU2_CFD
+
The tutorial is really great. Read it. But also make sure to grab the sample mesh files from the separate test case repository: [https://github.com/su2code/TestCases Link to SU2 Testcase meshes]
corn17:~/SU2compiled/bin> chmod +x SU2_DEF
+
You will need it to run the config files that come pre-prepped for you.
corn17:~/SU2compiled/bin> chmod +x SU2_DOT
  −
corn17:~/SU2compiled/bin> chmod +x SU2_GEO
  −
corn17:~/SU2compiled/bin> chmod +x SU2_MSH
  −
corn17:~/SU2compiled/bin> chmod +x SU2_SOL
  −
</code>
     −
Currently confused by how to run the code in parallel. Working on it.
  −
Running sample code
  −
The tutorial is really great. Read it. But also make sure to grab the sample mesh files from the separate test case repository: https://github.com/su2code/TestCases
  −
You will need it to run the config files that come pre-prepped for you.
  −
{{rocket-stub}}
   
[[Category: Rockets]]
 
[[Category: Rockets]]
 +
[[Category:CFD]]
 +
[[Category: Rockets Guides]]
84

edits