#! /bin/csh 
#----------------------------------------------------------------------#
# batch_run.csh    S.J. Ormiston for MECH 4822
#----------------------------------------------------------------------#
# Script to run a single CFX run (or a set of runs) in batch mode.
# Note that the file specified after the "-def" can be a results file 
# (e.g. run01_001.res) if you want to restart from a previous simulation.
#----------------------------------------------------------------------#
# This file is called "batch_run.csh" but could be renamed.
# To run this file, you can:
# 1)  make it executable by typing:
#   chmod u+x batch_run.csh
#
# 2) invoke the script by typing
#   ./batch_run.csh &
#
# This should put the job in the background (the "&" does this).
# 
# If you forget the "chmod" command above, you can also run the script
# interactively by typing:
#   csh batch_run.csh > & run.log &
#
#===================================================================#
# Choose one of the following approaches by uncommenting 
# (remove the "###" at the start of the appropriate lines)
#
#-------------------------------------------------------------------#
# Plan A: To do all the runs in the same directory
# have all the .def files ready in one directory (folder)
#
###cfx5solve -batch -def run01.def -double \
###          -part 4 -start-method "Platform MPI Local Parallel"
#
###cfx5solve -batch -def run02.def -double \
###          -part 4 -start-method "Platform MPI Local Parallel"
#
###cfx5solve -batch -def run03.def -double \
###          -part 4 -start-method "Platform MPI Local Parallel"
#
#-------------------------------#
#... and so on.
#===================================================================#
# Plan B: To change directories to start runs with .def files in other 
#    directories. Assumes that all runs are in subdirectories at the
#    same level. Each folder has its own .def file.
#
# start at the folder above all the run folders
#
###cd run01folder
###cfx5solve -batch -def run01.def -double \
###          -part 4 -start-method "Platform MPI Local Parallel"
#
###cd ../run02folder
###cfx5solve -batch -def run02.def -double \
###          -part 4 -start-method "Platform MPI Local Parallel"
#
###cd ../run03folder
###cfx5solve -batch -def run03.def -double \
###          -part 4 -start-method "Platform MPI Local Parallel"
#
#-------------------------------#
#... and so on.
#-------------------------------------------------------------------#
#
