Computational Fluid Dynamics Laboratory #2 Instructions

1. Basic Setup

There are two different programs that you have to run in order to do the second lab. First there is the oblique shock wave calculation which is started by executing the "oblique" command. The second is the program that is used for observing the results, called "Fieldview".
 

1.1 Getting a copy of the CFD code

If you are reading this, then you can get the assignment off of my web page.  You can download the file to your /scratch/<username> directory and then decompress it there, using the command:

zcat 595.tar.Z | tar xvf -

The assignment is also located on the m38 system in my home directory under "/usr/people/dnwillia/595". To copy the assignment for your group:

1. login to m38 
2. Change to your /scratch directory
3. Type "cp -R /usr/people/dnwillia/595/ ."
You now have the necessary files to run the assignment problem in a directory called "595" that should be in your root directory.

2. Running Fieldview

The Fieldview binaries are located in the directory /local/fv/bin.  You should add this path to your PATH environment variable, and then type fv to start Fieldview. To add this path to your path environment variable add the following line to your .profile: export PATH=$PATH:/local/fv/bin.
 

3. Running the Oblique Shock Wave Program

To run the oblique shock wave program, one just edits the startup.txt file which contains the data
that sets up the initial conditions, and controls the program.  After editing this file, one just types
oblique to start the calculations.  If you do not want to wait around for it to finish, you should type
the following instead:

nohup oblique &

which runs the program in the background, and makes it so that the program will keep running when you log out.

3.1 Input Data Files for the Shock Wave Program

An example startup.txt  file is already set up for a Mach 1.5 flow, atmospheric temperature of 22 degrees, atmospheric pressure of 90 kPa, and a 23 degree wedge. This roughly corresponds to the experiment you performed earlier this year.   An explanation of this file follows.
 
  • startup.txt:
  • This file contains the input data for the oblique shock wave program. The program reads the data that defines the free stream properties, wedge geometry, and the variables that control the simulation behaviour.   An example of this file is as follows:
     
    ***** INPUT DATA **********
    # Free-Stream Mach number (Nozzle exit mach number) 
    1.5
    # Atmospheric Temperature (degrees C)
    22.0
    # Atmospheric Pressure (kilopascals, kPa)
    90.0
    # Wedge or Cone Angle (degrees)
    23.0
    # Wedge or Cone simulation (1 = Wedge, 2 = Cone)
    1
    ***** SIMULATION CONTROL DATA ************
    # Initial data control ( 0 = uniform, 1 = start with restart file )
    0
    # Number of timesteps
    10000
    # Control for output of Fieldview files (0 = no, 1 = yes)
    1
    # Interval between Fieldview files
    20
    # Output control ( 0 = no restart files, 1 = write restart files )
    1
    # Interval between output (restart) files (In timesteps)
    200
    # File name for input restart file (max 80 characters)
    restart.00200
    Figure 3.1: Example "startup.txt" Input Data File
     
    Lines with # signs and the beginning are comments, other lines are input data.  Each line of input data can be explained as follows:

    1. The free stream Mach number, ahead of the wedge or cone.

    2. Atmospheric temperature, which must be in degrees celcius.

    3. Atmospheric pressure, which must be in kPa.

    4. The angle of deflection of the wedge or cone.

    5. Flag controlling whether you want to simulate the flow over a wedge or cone (1,2).

    6. Flag that controls the initial startup condition (0,1)

    7. Number of time steps to run 8. Control of output for Fieldview files(0,1) 9. Interval between Fieldview files
     

    10. Flag for saving restart files or not

    11. Interval between successive restart files.