Many tasks related to our work in the CFD lab can be very repetitive or time-consuming without the use of scripts.This page is intended to give access to a variety of scripts written by students over the years so that others might benefit from them. To run scripts from anywhere on your user account, copy them into your ~/bin directory. You will also need to make sure that the bin directory is in the $PATH. To add it to the path, just add the line:
if [ -d ~/bin ]; then PATH=$PATH:~/bin; fi
somewhere in your ~/.bashrc file. Now you can run any script, say "script_A", from anywhere on the file system just by typing "script_A".
Grid Utilities
The grid_utils directory distributed with the JetStream repository contains many useful scripts designed to perform grid-related tasks that would be too tedious to carry out manually. Running the makefile in the grid_utils library will compile the scripts therein, which are written in FORTRAN. These compiled files can then either be moved to the ~/bin directory or used directly in the grid_utils directory.
File Name
Purpose
appendgrids
Appends a set of plot3D grids into a single grid file
check_grid
Checks the grid and grid.con file for interface match consistency. Also outputs some parameters about the grid
coarsen_grid
Removes every other grid line from a mesh
coarsen_sol
convert_connect
Creates the grid.con file from icem data
create_connect
Attempts to automatically create a grid.con file by examining the corresponding grid.g file
create_patch
Automatically generates patch connectivity file for 3D grid
get_surface_grid
get_surface_grid_ascii
get_surfaces
grid_info
Produces a file with information on grid.g
reorder_blks
Reorders the blocks in grid.g based on a input text file
scale_grid
splitgrid
Subdivides each block into a given number of sublocks in each direction and outputs a new grid
Note that refining the mesh is more complicated than coarsening since it requires the aerodynamic surface to be fit with B-spline control points. This cannot be done with simple scripts and needs to be done through JetStream.
JetStream Project Manager (JSPM)
This is a set of useful scripts for setting up large numbers of cases for testing on a wide range of operating conditions if desired. JSPM also sets up a number of useful scripts for managing and processing data from the cases. JSPM is currently distributed with the JetStream repository.
Click here to go to the JSPM main page.
Other Useful Scripts
Here is the main purpose of this page: for group members to share useful scripts that they have written that are not in the JetStream repository. Ideally, these scripts should contain enough comments in the header that the user should be able to open the script up and figure out what it does and how to use it.
The script run submits your submit script. It will also check your input file to see if it is a restart and remove results files if necessary. It only knows the "opt_method" options 'flowsolve' and 'optimize' however. Check the comments in the script for more information and options.
The check_input script checks your input file for errors by comparing against the default assignment in Common_Mod. This is useful for checking the input file for errors before submitting your job. There are a few cases in which the script might not detect problems or might give a false positive but generally it can save you a lot of time and trouble submitting a job only to find after hours of sitting in the queue that an input variable is incorrect. Check the comments in the script for more information.
The cj script is a very simple script used to cancel large volumes of jobs such as those created from scripts. This is useful if you submitted a large number of jobs by script and need to cancel them. The script takes in two input arguments: the ID of the first and last job to cancel. It will just try to cancel all jobs between those values.
if [ -d ~/bin ]; then PATH=$PATH:~/bin; fi
somewhere in your ~/.bashrc file. Now you can run any script, say "script_A", from anywhere on the file system just by typing "script_A".
Grid Utilities
The grid_utils directory distributed with the JetStream repository contains many useful scripts designed to perform grid-related tasks that would be too tedious to carry out manually. Running the makefile in the grid_utils library will compile the scripts therein, which are written in FORTRAN. These compiled files can then either be moved to the ~/bin directory or used directly in the grid_utils directory.JetStream Project Manager (JSPM)
This is a set of useful scripts for setting up large numbers of cases for testing on a wide range of operating conditions if desired. JSPM also sets up a number of useful scripts for managing and processing data from the cases. JSPM is currently distributed with the JetStream repository.Click here to go to the JSPM main page.
Other Useful Scripts
Here is the main purpose of this page: for group members to share useful scripts that they have written that are not in the JetStream repository. Ideally, these scripts should contain enough comments in the header that the user should be able to open the script up and figure out what it does and how to use it.The script run submits your submit script. It will also check your input file to see if it is a restart and remove results files if necessary. It only knows the "opt_method" options 'flowsolve' and 'optimize' however. Check the comments in the script for more information and options.
The check_input script checks your input file for errors by comparing against the default assignment in Common_Mod. This is useful for checking the input file for errors before submitting your job. There are a few cases in which the script might not detect problems or might give a false positive but generally it can save you a lot of time and trouble submitting a job only to find after hours of sitting in the queue that an input variable is incorrect. Check the comments in the script for more information.
The cj script is a very simple script used to cancel large volumes of jobs such as those created from scripts. This is useful if you submitted a large number of jobs by script and need to cancel them. The script takes in two input arguments: the ID of the first and last job to cancel. It will just try to cancel all jobs between those values.