Merge branch 'master' into particleInteractions

This commit is contained in:
graham
2010-04-09 18:04:49 +01:00
174 changed files with 1269 additions and 1315 deletions

View File

@ -35,8 +35,94 @@
# to restore controlDict
#
#-------------------------------------------------------------------------------
Script=${0##*/}
PROGNAME=`basename $0`
usage() {
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat<<USAGE
Usage: $Script [OPTION] <pid>
Usage: $Script [OPTION] -c
options:
-clear use blockMesh reader (uses .blockMesh extension)
-case <dir> specify alternative case directory, default is the cwd
-now stop at next time step
-help print the usage
Tries to end running OpenFOAM application at next write (or optionally
at the next time step). It needs runTimeModifiable switched on in the
controlDict. It changes stopAt in the controlDict and waits for the
job to finish. Restores original controlDict if
- job has finished
- controlDict gets modified (by user)
- $Script gets killed.
The -clear option clears any outstanding $Script for the case.
USAGE
exit 1
}
unset clearOpt stopOpt
# parse options
while [ "$#" -gt 0 ]
do
case "$1" in
-h | -help)
usage
;;
-case)
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
cd "$2" 2>/dev/null || usage "directory does not exist: '$2'"
shift 2
;;
-c | -clear)
clearOpt=true
shift
;;
-n | -now)
stopOpt=now
shift
;;
-*)
usage "unknown option: '$*'"
;;
*)
break
;;
esac
done
# parent directory for normal or parallel
case "$PWD" in
processor*) caseDir=".." ;;
*) caseDir="." ;;
esac
# check that case directory is writeable
[ -w $caseDir ] || {
echo "$Script : $caseDir is not writeable"
exit 1
}
# check that controlDict is writeable
controlDict=$caseDir/system/controlDict
[ -w $controlDict ] || {
echo "$Script : $controlDict is not writeable"
exit 1
}
# need a pid unless with the -clear option
if [ "$clearOpt" = true ]
then
[ $# -eq 0 ] || usage
else
[ $# -eq 1 ] || usage
PID=$1
fi
#-------------------------------------------------------------------------------
@ -54,7 +140,7 @@ getNumberedLine() {
# getLine dictionary entry
# Prints dictionary entry line (without lineno)
getLine() {
getNumberedLine $1 "$2" | sed -e 's/^[^:]*://'
getNumberedLine $1 "$2" | sed -e 's/^[^:]*://'
}
# getRawEntry dictionary entry
@ -66,7 +152,7 @@ getRawEntry() {
# getEntry dictionary entry
# Like getRawEntry but strips " and ending ';'
getEntry() {
getRawEntry $1 "$2" | sed -e 's/^"//' -e 's/;$//' -e 's/"$//'
getRawEntry $1 "$2" | sed -e 's/^"//' -e 's/;$//' -e 's/"$//'
}
# getKey entryLine
@ -77,13 +163,14 @@ getKey() {
# setRawEntry dictionary entry newValue
# Replaces value of entry
# Replaces value of entry
setRawEntry() {
oldNumLine=`getNumberedLine $1 "$2"`
lineNo=`echo "$oldNumLine" | sed -e 's/:.*//'`
oldLine=`echo "$oldNumLine" | sed -e 's/^[^:]*://'`
oldKey=`getKey "$oldLine"`
oldVal=`getRawEntry $1 "$2"`
if [ ! "$oldKey" -o ! "$oldVal" -o ! "$oldLine" ]
then
echo "setRawStringEntry: entry $2 not found in $1"
@ -92,6 +179,7 @@ setRawEntry() {
echo "oldLine=$oldLine"
exit 1
fi
#echo "oldKey=$oldKey"
#echo "lineNo=$lineNo"
#echo "oldLine=$oldLine"
@ -108,76 +196,30 @@ getBoolEntry()
{
val=`getEntry $1 $2`
case "$val" in
'yes')
y | yes | true | on | 1)
return 0
;;
'no')
n | no | false | off | 0)
return 123
;;
'true')
return 0
;;
'false')
return 123
;;
1)
return 0
;;
0)
return 123
;;
*)
echo "$PROGNAME : getBoolEntry : Illegal boolean value $val in dictionary $1"
*)
echo "$Script : getBoolEntry : Illegal boolean value $val in dictionary $1"
exit 1
;;
esac
}
# newerFile file1 file2
# ... could also use if [ $file1 -nt $file2 ] ...
newerFile()
{
latest=`ls -1 -t $1 $2 2> /dev/null | head -1`
if [ "$latest" = $1 ]
then
return 0
else
return 1
fi
}
# processExists pid
# Returns true if pid exists.
processExists() {
ps -u $LOGNAME -o 'pid' | fgrep $1 >/dev/null
ps -u $LOGNAME -o pid | fgrep $1 >/dev/null
}
usage() {
cat << USAGE
Usage: $PROGNAME [-n] <root> <case> <pid>
or
$PROGNAME -c <root> <case>
Tries to end running Foam application at next write or at next time
step (-n (at your option). It needs runTimeModifiable switched on in the
controlDict. It changes stopAt in the controlDict and waits for the job to
finish. Restores original controlDict if
- job has finished
- controlDict gets modified (by user)
- $PROGNAME gets killed.
The -c option clears any outstanding $PROGNAME for the case.
USAGE
exit 1
}
# Restore controlDict and clean up
restoreDict() {
trap 2 3 15
trap QUIT TERM INT
echo "$PROGNAME : Restoring controlDict from controlDict_bak."
echo "$Script : Restoring controlDict from controlDict_bak"
if [ -r ${controlDict}_bak ]
then
cp ${controlDict}_bak $controlDict
@ -185,7 +227,7 @@ restoreDict() {
rm -f $pidFile
echo "$PROGNAME : Exiting."
echo "$Script : Exiting"
exit 0
}
@ -196,105 +238,51 @@ restoreDict() {
#
#-------------------------------------------------------------------------------
ARCH=`uname -s`
#-- Force standards behaving ps
# Get info on all $USER processes
case $ARCH in
HP-UX*)
UNIX95=a; export UNIX95
case `uname -s` in
HP-UX*)
UNIX95=a
export UNIX95
;;
IRIX*)
_XPG=1; export _XPG
IRIX*)
_XPG=1
export _XPG
;;
esac
#
# Initial checks
#
if [ $# -lt 3 ]
then
usage
fi
STOPNOW=''
if [ $1 = '-n' ]
then
STOPNOW='yes'
shift
fi
CLEAR=''
if [ $1 = '-c' ]
then
CLEAR='yes'
shift
if [ $# -ne 2 ]
then
usage
fi
ROOT=$1
CASE=$2
else
if [ $# -ne 3 ]
then
usage
fi
ROOT=$1
CASE=$2
PID=$3
fi
CASE=`echo $CASE | sed -e 's!/.*!!'` # strip of processorXXX ending
#- Pid actually running
if [ ! "$CLEAR" ]
# Pid actually running
if [ "$clearOpt" != true ]
then
processExists $PID
if [ $? -ne 0 ]
then
echo "$PROGNAME : process $PID not running."
echo "$Script : process $PID not running"
exit 1
fi
fi
#- case directory writeable
if [ ! -w $ROOT/$CASE ]
then
echo "$PROGNAME : $ROOT/$CASE is not writeable."
exit 1
fi
#- Controldict writeable
controlDict=$ROOT/$CASE/system/controlDict
if [ ! -w $controlDict ]
then
echo "$PROGNAME : $controlDict is not writeable."
exit 1
fi
#- runTimeModifiable
getBoolEntry $controlDict 'runTimeModifiable'
if [ $? -ne 0 ]
then
echo "$PROGNAME : runTimeModifiable not true in dictionary $controlDict."
getBoolEntry $controlDict runTimeModifiable || {
echo "$Script : runTimeModifiable not true in dictionary $controlDict"
exit 1
fi
}
#
#- Check if another foamEndJob running
#
if [ "$CLEAR" ]
if [ "$clear" = true ]
then
pidFiles=`ls $ROOT/$CASE/.foamEndJob* 2>/dev/null`
pidFiles=`ls $caseDir/.foamEndJob* 2>/dev/null`
for pidFile in $pidFiles
do
pid=`cat $pidFile`
if [ "$pid" ]
then
echo "$PROGNAME : found $PROGNAME (pid $pid) for Foam process"
echo " root: $ROOT"
echo " case: $CASE"
echo "$PROGNAME : Killing $PROGNAME (pid $pid)."
echo "$Script : found $Script (pid $pid) for OpenFOAM process"
echo " case: $PWD/$caseDir"
echo "$Script : Killing $Script (pid $pid)"
kill $pid
rm -f $pidFile
fi
@ -302,7 +290,7 @@ then
exit 0
fi
pidFile=$ROOT/$CASE/.foamEndJob${PID}
pidFile=$caseDir/.foamEndJob$PID
if [ -f $pidFile ]
then
pid=`cat $pidFile`
@ -311,12 +299,11 @@ then
processExists $pid
if [ $? -eq 0 ]
then
echo "$PROGNAME : found running $PROGNAME (pid $pid) for Foam process"
echo " root: $ROOT"
echo " case: $CASE"
echo "$Script : found running $Script (pid $pid) for OpenFOAM process"
echo " case: $PWD/$caseDir"
echo " pid : $PID"
echo " lock: $pidFile"
echo "Remove the lock if this is not the case."
echo "Remove the lock if this is not the case"
exit 1
fi
fi
@ -331,63 +318,60 @@ echo $$ > $pidFile
#- startTime
startTime=`getEntry $controlDict 'startTime'`
if [ ! "$startTime" ]
then
echo "$PROGNAME : startTime not set in dictionary $controlDict."
startTime=`getEntry $controlDict startTime`
[ "$startTime" ] || {
echo "$Script : startTime not set in dictionary $controlDict"
exit 1
fi
}
#- Write interval
writeInterval=`getEntry $controlDict 'writeInterval'`
if [ ! "$writeInterval" ]
then
echo "$PROGNAME : writeInterval not set in dictionary $controlDict."
writeInterval=`getEntry $controlDict writeInterval`
[ "$writeInterval" ] || {
echo "$Script : writeInterval not set in dictionary $controlDict"
exit 1
fi
}
#- stopAt
stopAt=`getEntry $controlDict 'stopAt'`
if [ ! "$stopAt" ]
then
echo "$PROGNAME : stopAt not set in dictionary $controlDict."
stopAt=`getEntry $controlDict stopAt`
[ "$stopAt" ] || {
echo "$Script : stopAt not set in dictionary $controlDict"
exit 1
fi
}
#- endTime
endTime=`getEntry $controlDict 'endTime'`
if [ ! "$endTime" ]
then
echo "$PROGNAME : endTime not set in dictionary $controlDict."
endTime=`getEntry $controlDict endTime`
[ "$endTime" ] || {
echo "$Script : endTime not set in dictionary $controlDict"
exit 1
fi
}
echo "$PROGNAME : Read from controlDict:"
echo "$Script : Read from controlDict:"
echo " controlDict : $controlDict"
echo " writeInterval : $writeInterval"
#echo " startTime : $startTime"
echo " stopAt : $stopAt"
#echo " endTime : $endTime"
echo "$PROGNAME : Making backup of controlDict to controlDict_bak"
echo "$Script : Making backup of controlDict to controlDict_bak"
cp $controlDict ${controlDict}_bak
#- Set up handler to restore controlDict
trap restoreDict 2 3 15
trap restoreDict QUIT TERM INT
if [ "$STOPNOW" ]
if [ "$stopOpt" = now ]
then
setRawEntry $controlDict 'stopAt' 'nextWrite'
setRawEntry $controlDict 'writeInterval' '1'
setRawEntry $controlDict stopAt nextWrite
setRawEntry $controlDict writeInterval 1
echo "$PROGNAME : Changed in controlDict:"
echo " `getLine $controlDict 'stopAt'`"
echo " `getLine $controlDict 'writeInterval'`"
echo "$Script : Changed in controlDict:"
echo " `getLine $controlDict stopAt`"
echo " `getLine $controlDict writeInterval`"
else
setRawEntry $controlDict 'stopAt' 'nextWrite'
setRawEntry $controlDict stopAt nextWrite
echo "$PROGNAME : Changed in controlDict:"
echo " `getLine $controlDict 'stopAt'`"
echo "$Script : Changed in controlDict:"
echo " `getLine $controlDict stopAt`"
fi
@ -401,23 +385,24 @@ sleep 5
touch ${controlDict}_bak
#- Loop a while to give NFS time to update
if newerFile ${controlDict} ${controlDict}_bak; then
echo "$PROGNAME : controlDict newer than controlDict_bak."
echo "$PROGNAME : Waiting for file dates to get updated."
if [ ${controlDict} -nt ${controlDict}_bak ]
then
echo "$Script : controlDict newer than controlDict_bak"
echo "$Script : Waiting for file dates to get updated"
iter=0
while newerFile ${controlDict} ${controlDict}_bak
while [ ${controlDict} -nt ${controlDict}_bak ]
do
if [ $iter -ge 120 ]
then
#- 120*5 sec = 10 mins passed. Give up
echo "$PROGNAME : File date not yet ok after 10 mins. Giving up."
echo "$Script : File date not yet ok after 10 mins ... giving up"
break
fi
#- Give _bak a later time
touch ${controlDict}_bak
#- Give nfs some time to update time on controlDict.
#- Give NFS a chance to update time on controlDict.
sleep 5
iter=`expr $iter + 1`
@ -430,21 +415,20 @@ fi
# - controlDict modified. No restore.
# - controlDict_bak removed. No restore.
echo "$PROGNAME : Waiting for Foam job $PID to finish ..."
echo "$Script : Waiting for OpenFOAM job $PID to finish ..."
while true
do
sleep 5
if [ ! -r ${controlDict}_bak ]
then
echo "$PROGNAME : ${controlDict}_bak dissappeared. Exiting without restore."
[ -r ${controlDict}_bak ] || {
echo "$Script : ${controlDict}_bak disappeared. Exiting without restore"
exit 1
fi
}
if newerFile ${controlDict} ${controlDict}_bak
if [ ${controlDict} -nt ${controlDict}_bak ]
then
echo "$PROGNAME : ${controlDict} modified externally. Exiting without restore."
echo "$Script : ${controlDict} modified externally. Exiting without restore"
exit 0
fi
@ -454,7 +438,7 @@ do
#- Job finished
break
fi
# echo "Foam job $PID still running ..."
# echo "OpenFOAM job $PID still running ..."
done
#- Dictionary restore

View File

@ -31,35 +31,36 @@
# Bugs
# -solution singularity not handled
#------------------------------------------------------------------------------
Script=${0##*/}
toolsDir=${0%/*}/tools
PROGDIR=`dirname $0`
PROGNAME=`basename $0`
DBFILE=${PROGNAME}.db
usage() {
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat <<USAGE
printUsage() {
cat <<USAGE
$PROGNAME - extracts xy files from OpenFOAM logs.
Usage: $Script [OPTIONS] <log>
-list lists but does not extract
-n create single column files with the extracted data only
-quiet quiet operation
-help print the usage
Usage: $PROGNAME [-n][-s] <log>
extracts xy files from log
$PROGNAME -l <log>
lists but does not extract
$PROGNAME -h
for a help message
$Script - extracts xy files from OpenFOAM logs.
USAGE
exit 1
}
#------------------------------------------------------------------------------
printHelp() {
printUsage
cat <<LABHELP
cat <<HELP
-----------------------------------------------------------------------------
The default is to extract for all the 'Solved for' variables the initial
residual, the final residual and the number of iterations. Additionally, a
(user editable) database is used to extract data for standard non-solved for
variables like Courant number, and execution time.
$PROGNAME -l lists all the possible variables without extracting them.
$Script -l lists all the possible variables without extracting them.
The program will generate and run an awk script which writes a set of files,
logs/<var>_<subIter>, for every <var> specified, for every occurrence inside
@ -79,7 +80,7 @@ separated with '/' :
Column 2 is the extended regular expression (egrep) to select the line.
Column 3 is the string (fgrep) to select the column inside the line.
The value taken will be the first (non-space)word after this column.
The database ($PROGNAME.db) will taken from these locations:
The database ($Script.db) will taken from these locations:
.
$HOME/.OpenFOAM/$WM_PROJECT_VERSION
@ -87,61 +88,97 @@ The database ($PROGNAME.db) will taken from these locations:
$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION
$WM_PROJECT_INST_DIR/site
$WM_PROJECT_DIR/etc
$PROGDIR/tools
$toolsDir
Option -s suppresses the default information and only prints the extracted
Option -q suppresses the default information and only prints the extracted
variables.
-----------------------------------------------------------------------------
HELP
LABHELP
usage
}
# The various places to be searched:
for i in \
. \
$HOME/.OpenFOAM/$WM_PROJECT_VERSION \
$HOME/.OpenFOAM \
$WM_PROJECT_INST_DIR/site/$WM_PROJECT_VERSION \
$WM_PROJECT_INST_DIR/site \
$WM_PROJECT_DIR/etc \
$PROGDIR/tools \
;
timeName=Time
unset listOpt quietOpt
# parse options
while [ "$#" -gt 0 ]
do
if [ -r $i/$DBFILE ]
then
DBFILE="$i/$DBFILE"
case "$1" in
-h | -help)
printHelp
exit 0
;;
-n)
unset timeName
shift
;;
-l | -list)
listOpt=true
shift
;;
-q | -quiet | -s | -silent)
quietOpt=true
shift
;;
-*)
usage "unknown option: '$*'"
;;
*)
break
fi
;;
esac
done
# find the database file
DBFILE=$Script.db
[ -f $DBFILE ] || DBFILE=`foamEtcFile $Script.db` || DBFILE=$toolsDir/$Script.db
myEcho() {
if [ "$VERBOSE" ]
then
echo "$*"
fi
# need the database file
[ -f $DBFILE ] || {
echo "$Script: Cannot read database $DBFILE"
exit 1
}
# single logFile
if [ $# -eq 1 ]
then
LOG=$1
[ -r "$LOG" ] && [ -f "$LOG" ] || usage "Cannot read log $LOG"
else
usage
fi
myEcho()
{
[ "$quietOpt" = true ] || echo "$*"
}
# getSolvedVars logFile
# Prints names of all 'solved for' variables in the log file.
getSolvedVars() {
getSolvedVars()
{
fgrep ' Solving for ' $1 | fgrep ',' | sed -e 's/.* Solving for \([^,]*\)[,:].*/\1/' | sort -u
}
# getQueries dbFile queryName
# Gets regular expressions for a certain queryName from the database
getQueries() {
if [ ! -f "$1" ]
then
echo "Cannot find dbFile $1"
exit 1
fi
getQueries()
{
dbFile=$1
queryName=$2
LINEQ=`grep -v '^#' $1 | awk -F '/' "/$queryName/ {if (\"$queryName\" "'!= $1) next; print $2}'`
NUMQ=`grep -v '^#' $1 | awk -F '/' "/$queryName/ {if (\"$queryName\" "'!= $1) next; print $3}'`
[ -f "$dbFile" ] || {
echo "Cannot find dbFile $dbFile"
exit 1
}
LINEQ=`grep -v '^#' $dbFile | awk -F '/' "/$queryName/ {if (\"$queryName\" "'!= $1) next; print $2}'`
NUMQ=`grep -v '^#' $dbFile | awk -F '/' "/$queryName/ {if (\"$queryName\" "'!= $1) next; print $3}'`
#echo "For $queryName found line selection /$LINEQ/ , column selection /$NUMQ/" 1>&2
#if [ ! "$LINEQ" -o ! "$NUMQ" ]
@ -153,14 +190,16 @@ getQueries() {
# getDbQueryList dbFile
# Echoes list of possible queries
getDbQueryList() {
getDbQueryList()
{
grep -v '^#' $1 | grep '[^ \t]' | awk -F '/' '{print $1}'
}
# getSolveQueryList logFile
# Echoes list of queries from "solved for" variables in log file
getSolveQueryList() {
getSolveQueryList()
{
solvedVars=`getSolvedVars $1`
for var in $solvedVars
@ -174,7 +213,8 @@ getSolveQueryList() {
# getAllQueries dbFile logFile
# Gets all queries from database and from logfile
getAllQueries() {
getAllQueries()
{
#-- All solved for queries from log file
queries=`getSolveQueryList $2`
@ -208,107 +248,33 @@ getAllQueries() {
# Main
#-----------------------------
# sort arguments
TIMENAME='Time'
VERBOSE='yes'
LISTONLY=''
while getopts nslh flags
do
case $flags in
n)
TIMENAME=""
;;
h)
printHelp
exit 0
;;
s)
VERBOSE=""
;;
l)
LISTONLY='yes'
;;
\?)
printUsage
exit 1
;;
esac
done
# Shift options
shift `expr $OPTIND - 1`
if [ ! -f $DBFILE ]
if [ "$listOpt" = true ]
then
echo "$PROGNAME: Cannot read database $DBFILE"
exit 1
fi
if [ "$LISTONLY" ]
then
if [ $# -ne 1 ]
then
printUsage
exit 1
fi
LOG=$1;
if [ ! -r $LOG ]
then
echo "$PROGNAME: Cannot read log $LOG"
exit 1
fi
getAllQueries $DBFILE $LOG
exit 0
fi
if [ $# -ne 1 ]
then
printUsage
exit 1
fi
caseDir=.
outputDir=$caseDir/logs
CASEDIR=.
LOG=$1
if [ ! -r $LOG ]
then
echo "$PROGNAME: Cannot read log $LOG"
[ -d "$caseDir" ] || {
echo "$Script: Cannot read $caseDir"
exit 1
fi
}
QUERYNAMES=`getAllQueries $DBFILE $LOG`
if [ ! "$CASEDIR" ]
then
printUsage
exit 1
fi
if [ ! -d "$CASEDIR" ]
then
echo "$PROGNAME: Cannot read $CASEDIR"
exit 1
fi
if [ ! -f "$LOG" ]
then
echo "$PROGNAME: Cannot read log file $LOG"
exit 1
fi
#-- Make logs dir in case directory and put awk file there.
mkdir -p $CASEDIR/logs
AWKFILE=$CASEDIR/logs/$PROGNAME.awk
#
# Make logs dir in case directory and place awk file there
#
mkdir -p $outputDir
AWKFILE=$outputDir/$Script.awk
myEcho "Using:"
myEcho " log : $LOG"
myEcho " database : $DBFILE"
myEcho " awk file : $AWKFILE"
myEcho " files to : $CASEDIR/logs"
myEcho " files to : $outputDir"
myEcho ""
@ -316,22 +282,25 @@ myEcho ""
# Generate Awk program
#-----------------------------
#-- header
rm -f $AWKFILE 2> /dev/null
cat << AWK_CONTENTS > $AWKFILE
# header
BEGIN {
Iteration=0
resetCounters()
}
rm -f $AWKFILE; touch $AWKFILE
echo "BEGIN {" >> $AWKFILE
echo " Iteration=0" >> $AWKFILE
echo " resetCounters()" >> $AWKFILE
echo "}" >> $AWKFILE
# reset counters used for variable postfix
function resetCounters() {
AWK_CONTENTS
# ----------
echo "" >> $AWKFILE
echo "# reset counters used for variable postfix" >> $AWKFILE
echo "function resetCounters() {" >> $AWKFILE
for queryName in $QUERYNAMES
do
varName=${queryName}Cnt
echo " ${varName}=0" >> $AWKFILE
done
echo " # Reset counters for general Solving for extraction" >> $AWKFILE
echo " for (varName in subIter)" >> $AWKFILE
echo " {" >> $AWKFILE
@ -341,10 +310,9 @@ echo "}" >> $AWKFILE
echo "" >> $AWKFILE
cat <<LABEL >> $AWKFILE
cat << AWK_CONTENTS >> $AWKFILE
# Extract value after columnSel
function extract(inLine,columnSel,outVar,
a,b)
function extract(inLine,columnSel,outVar,a,b)
{
a=index(inLine, columnSel)
b=length(columnSel)
@ -352,71 +320,82 @@ function extract(inLine,columnSel,outVar,
gsub("[,:]","",outVar[1])
}
LABEL
AWK_CONTENTS
# ----------
#-- Generate code for iteration separator (increments 'Iteration')
#
# Code for iteration separator (increments 'Iteration')
#
getQueries $DBFILE 'Separator'
cat <<LABSEP >> $AWKFILE
#-- Iteration separator (increments 'Iteration')
cat << AWK_CONTENTS >> $AWKFILE
# Iteration separator (increments 'Iteration')
/$LINEQ/ {
Iteration++
resetCounters()
}
LABSEP
AWK_CONTENTS
# ----------
#-- Generate code for extracting Time
#
# Code for extracting Time
#
getQueries $DBFILE 'Time'
cat <<LABTIME >> $AWKFILE
#-- Time extraction (sets 'Time')
cat << AWK_CONTENTS >> $AWKFILE
# Time extraction (sets 'Time')
/$LINEQ/ {
extract(\$0, "$NUMQ", val)
Time=val[1]
}
LABTIME
AWK_CONTENTS
# ----------
#-- Generate code for singularity handling.
cat <<LABSING >> $AWKFILE
#-- Skip whole line with singularity variable
#
# Code for singularity handling.
#
cat << AWK_CONTENTS >> $AWKFILE
# Skip whole line with singularity variable
/solution singularity/ {
next;
}
LABSING
AWK_CONTENTS
# ----------
#-- Generate code for extracting solved for quantities
cat <<LABSOLVE >> $AWKFILE
#-- Extraction of any solved for variable
#
# Code for extracting solved for quantities
#
cat << AWK_CONTENTS >> $AWKFILE
# Extraction of any solved for variable
/Solving for/ {
extract(\$0, "Solving for ", varNameVal)
varName=varNameVal[1]
file=varName "_" subIter[varName]++
file="$CASEDIR/logs/" file
file="$outputDir/" file
extract(\$0, "Initial residual = ", val)
print $TIMENAME "\t" val[1] > file
print $timeName "\t" val[1] > file
varName=varNameVal[1] "FinalRes"
file=varName "_" subIter[varName]++
file="$CASEDIR/logs/" file
file="$outputDir/" file
extract(\$0, "Final residual = ", val)
print $TIMENAME "\t" val[1] > file
print $timeName "\t" val[1] > file
varName=varNameVal[1] "Iters"
file=varName "_" subIter[varName]++
file="$CASEDIR/logs/" file
file="$outputDir/" file
extract(\$0, "No Iterations ", val)
print $TIMENAME "\t" val[1] > file
print $timeName "\t" val[1] > file
}
LABSOLVE
AWK_CONTENTS
# ----------
#-- generate code to process queries
#
# Code to process queries
#
for queryName in $QUERYNAMES
do
getQueries $DBFILE $queryName
@ -424,11 +403,11 @@ do
then
counter=${queryName}Cnt
echo "#-- Extraction of $queryName" >> $AWKFILE
echo "# Extraction of $queryName" >> $AWKFILE
echo "/$LINEQ/ {" >> $AWKFILE
echo " extract(\$0, \"$NUMQ\", val)" >> $AWKFILE
echo " file=\"$CASEDIR/logs/${queryName}_\" ${counter}" >> $AWKFILE
echo " print $TIMENAME \"\\t\" val[1] > file" >> $AWKFILE
echo " file=\"$outputDir/${queryName}_\" ${counter}" >> $AWKFILE
echo " print $timeName \"\\t\" val[1] > file" >> $AWKFILE
echo " ${counter}++" >> $AWKFILE
echo "}" >> $AWKFILE
echo "" >> $AWKFILE

View File

@ -32,41 +32,70 @@
# Also removes consecutive blank lines from file.
#
#------------------------------------------------------------------------------
foamVersion=$WM_PROJECT_VERSION
usage() {
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat<<USAGE
Usage: ${0##*/} [OPTION] <file1> ... <fileN>
options:
-v VER specifies the version to be written in the header
-h help
-version <ver> specifies the version to be written in the header
-help print the usage
Updates the header of application files and removes consecutive blank lines.
By default, writes current OpenFOAM version in the header.
An alternative version can be specified with the -v option.
An alternative version can be specified with the -version option.
USAGE
exit 1
}
#------------------------------------------------------------------------------
printHeader() {
# parse options
while [ "$#" -gt 0 ]
do
case "$1" in
-h | -help)
usage
;;
-v | -version)
[ "$#" -ge 2 ] || usage "'$1' option requires an argument"
version="$2"
shift 2
;;
-*)
usage "unknown option: '$*'"
;;
*)
break
;;
esac
done
# constant width for version - default to WM_PROJECT_VERSION
version=$(printf %-36s ${version:-$WM_PROJECT_VERSION})
[ $# -ge 1 ] || usage
#------------------------------------------------------------------------------
printHeader()
{
cat<<HEADER
/*--------------------------------*- C++ -*----------------------------------*\\
| ========= | |
| \\\\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\\\ / O peration | Version: ${foamVersion} |
| \\\\ / O peration | Version: $version |
| \\\\ / A nd | Web: www.OpenFOAM.org |
| \\\\/ M anipulation | |
\\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ${1};
class ${2};
object ${3};
format $1;
class $2;
object $3;
}
HEADER
}
@ -75,68 +104,40 @@ HEADER
#
# extract attribute '$1' from file '$2'
#
FoamFileAttribute() {
FoamFileAttribute()
{
sed -n -e 's/[ ;]*$//' -e "s/^ *$1 *//p" $2
}
#
# OPTIONS
# main
#
opts=$(getopt hv: $*)
if [ $? -ne 0 ]
then
echo "Aborting due to invalid option"
usage
fi
eval set -- '$opts'
while [ "$1" != "--" ]
do
case $1 in
-v)
foamVersion=$2
shift
;;
-h)
usage
;;
esac
shift
done
shift
[ $# -ge 1 ] || usage
# constant width for version
foamVersion=$(printf %-36s $foamVersion)
#
# MAIN
#
unset NOTE
tmpFile=FoamFile.tmp$$
for caseFile
do
if grep FoamFile $caseFile >/dev/null 2>&1
then
echo "Updating case file: $caseFile"
sed -n '/FoamFile/,/}/p' $caseFile > FoamFile.tmp
sed -n '/FoamFile/,/}/p' $caseFile > $tmpFile
FORMAT=$(FoamFileAttribute format FoamFile.tmp)
CLASS=$(FoamFileAttribute class FoamFile.tmp)
OBJECT=$(FoamFileAttribute object FoamFile.tmp)
# extract NOTE?
format=$(FoamFileAttribute format $tmpFile)
class=$(FoamFileAttribute class $tmpFile)
object=$(FoamFileAttribute object $tmpFile)
# extract note? - needs special handling
unset note
printHeader $FORMAT $CLASS $OBJECT $NOTE > FoamFile.tmp
sed '1,/}/d' $caseFile | sed '/./,/^$/!d' >> FoamFile.tmp
printHeader $format $class $object "$note" > $tmpFile
sed '1,/}/d' $caseFile | sed '/./,/^$/!d' >> $tmpFile
# use cat to avoid removing/replace soft-links
[ -s FoamFile.tmp ] && cat FoamFile.tmp >| $caseFile
rm -f FoamFile.tmp 2>/dev/null
[ -s $tmpFile ] && cat $tmpFile >| $caseFile
rm -f $tmpFile 2>/dev/null
else
echo " Invalid case file: $caseFile" 1>&2
fi
done
#------------------------------------------------------------------------------
#------------------------------------------------------------------ end-of-file

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -101,7 +101,7 @@ public:
explicit inline DynamicList(const label);
//- Construct copy.
explicit inline DynamicList
inline DynamicList
(
const DynamicList<T, SizeInc, SizeMult, SizeDiv>&
);
@ -116,7 +116,7 @@ public:
//- Construct by transferring the parameter contents
explicit inline DynamicList(const Xfer<List<T> >&);
//- Construct from Istream. Size set to size of read list.
//- Construct from Istream. Size set to size of list read.
explicit DynamicList(Istream&);

View File

@ -518,11 +518,28 @@ bool Foam::Time::loop()
if (running)
{
operator++();
if (!subCycling_)
{
readModifiedObjects();
if (timeIndex_ == startTimeIndex_)
{
functionObjects_.start();
}
else
{
functionObjects_.execute();
}
}
// Check update the "running" status following the "++" operation
// to take into account possible side-effects from functionObjects
running = run();
if (running)
{
operator++();
}
}
return running;
@ -667,20 +684,6 @@ Foam::Time& Foam::Time::operator+=(const scalar deltaT)
Foam::Time& Foam::Time::operator++()
{
if (!subCycling_)
{
readModifiedObjects();
if (timeIndex_ == startTimeIndex_)
{
functionObjects_.start();
}
else
{
functionObjects_.execute();
}
}
deltaT0_ = deltaTSave_;
deltaTSave_ = deltaT_;

View File

@ -750,6 +750,20 @@ Foam::argList::~argList()
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
void Foam::argList::printNotes() const
{
// output notes directly - no automatic text wrapping
if (!notes.empty())
{
Info<< nl;
forAllConstIter(SLList<string>, notes, iter)
{
Info<< iter().c_str() << nl;
}
}
}
void Foam::argList::printUsage() const
{
Info<< "\nUsage: " << executable_ << " [OPTIONS]";
@ -819,20 +833,7 @@ void Foam::argList::printUsage() const
);
// output notes directly - no automatic text wrapping
if (!notes.empty())
{
Info<< nl;
for
(
SLList<string>::const_iterator iter = notes.begin();
iter != notes.end();
++iter
)
{
Info<< iter().c_str() << nl;
}
}
printNotes();
Info<< nl
<<"Using OpenFOAM-" << Foam::FOAMversion

View File

@ -329,6 +329,9 @@ public:
// Print
//- Print notes (if any)
void printNotes() const;
//- Print usage
void printUsage() const;

View File

@ -6,7 +6,7 @@ wmake libso field
wmake libso forces
wmake libso IO
wmake libso utilities
wmake libso residualControl
wmake libso jobControl
wmake libso systemCall
# ----------------------------------------------------------------- end-of-file

View File

@ -29,10 +29,7 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(writeRegisteredObject, 0);
}
defineTypeNameAndDebug(Foam::writeRegisteredObject, 0);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -36,29 +36,29 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
functions
{
fieldAverage1
{
// Type of functionObject
type fieldAverage;
type fieldAverage;
// Where to load it from (if not already in solver)
functionObjectLibs ("libfieldAverage.so");
// Function object enabled flag
enabled true;
enabled true;
// When to output the average fields
outputControl outputTime;
outputControl outputTime;
// Fields to be averaged - runTime modifiable
fields

View File

@ -31,10 +31,7 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(fieldMinMax, 0);
}
defineTypeNameAndDebug(Foam::fieldMinMax, 0);
template<>

View File

@ -30,31 +30,27 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
defineTypeNameAndDebug(Foam::fieldValues::cellSource, 0);
template<>
const char* Foam::NamedEnum<Foam::fieldValues::cellSource::sourceType, 1>::
names[] =
{
namespace fieldValues
{
defineTypeNameAndDebug(cellSource, 0);
}
"cellZone"
};
template<>
const char* NamedEnum<fieldValues::cellSource::sourceType, 1>::
names[] = {"cellZone"};
const Foam::NamedEnum<Foam::fieldValues::cellSource::sourceType, 1>
Foam::fieldValues::cellSource::sourceTypeNames_;
const NamedEnum<fieldValues::cellSource::sourceType, 1>
fieldValues::cellSource::sourceTypeNames_;
template<>
const char* Foam::NamedEnum<Foam::fieldValues::cellSource::operationType, 5>::
names[] =
{
"none", "sum", "volAverage", "volIntegrate", "weightedAverage"
};
template<>
const char* NamedEnum<fieldValues::cellSource::operationType, 5>::
names[] =
{
"none", "sum", "volAverage", "volIntegrate", "weightedAverage"
};
const NamedEnum<fieldValues::cellSource::operationType, 5>
fieldValues::cellSource::operationTypeNames_;
}
const Foam::NamedEnum<Foam::fieldValues::cellSource::operationType, 5>
Foam::fieldValues::cellSource::operationTypeNames_;
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
@ -238,4 +234,3 @@ void Foam::fieldValues::cellSource::write()
// ************************************************************************* //

View File

@ -37,16 +37,16 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
functions
(
{
faceObj1
{
type faceSource;
@ -60,6 +60,7 @@ functions
// source faceZone;
// sourceName f0;
operation areaAverage;
fields
(
p
@ -79,6 +80,7 @@ functions
source faceZone;
sourceName f0;
operation sum;
fields
(
phi
@ -96,13 +98,13 @@ functions
source cellZone;
sourceName c0;
operation volAverage;
fields
(
p
U
);
}
);
}
// ************************************************************************* //

View File

@ -34,31 +34,27 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
defineTypeNameAndDebug(Foam::fieldValues::faceSource, 0);
template<>
const char* Foam::NamedEnum<Foam::fieldValues::faceSource::sourceType, 2>::
names[] =
{
namespace fieldValues
{
defineTypeNameAndDebug(faceSource, 0);
}
"faceZone", "patch"
};
template<>
const char* NamedEnum<fieldValues::faceSource::sourceType, 2>::
names[] = {"faceZone", "patch"};
const Foam::NamedEnum<Foam::fieldValues::faceSource::sourceType, 2>
Foam::fieldValues::faceSource::sourceTypeNames_;
const NamedEnum<fieldValues::faceSource::sourceType, 2>
fieldValues::faceSource::sourceTypeNames_;
template<>
const char* Foam::NamedEnum<Foam::fieldValues::faceSource::operationType, 5>::
names[] =
{
"none", "sum", "areaAverage", "areaIntegrate", "weightedAverage"
};
template<>
const char* NamedEnum<fieldValues::faceSource::operationType, 5>::
names[] =
{
"none", "sum", "areaAverage", "areaIntegrate", "weightedAverage"
};
const NamedEnum<fieldValues::faceSource::operationType, 5>
fieldValues::faceSource::operationTypeNames_;
}
const Foam::NamedEnum<Foam::fieldValues::faceSource::operationType, 5>
Foam::fieldValues::faceSource::operationTypeNames_;
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -16,7 +16,7 @@ FoamFile
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
functions
(
{
readFields1
{
type readFields;
@ -24,11 +24,13 @@ functions
enabled true;
outputControl timeStep;
outputInterval 1;
fields
(
interpolateU
);
}
faceObj2
{
type faceSource;
@ -41,12 +43,12 @@ functions
source faceZone;
sourceName f0;
operation areaAverage;
fields
(
interpolateU
);
}
);
}
// ************************************************************************* //

View File

@ -28,10 +28,7 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(readFields, 0);
}
defineTypeNameAndDebug(Foam::readFields, 0);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -31,14 +31,17 @@ License
namespace Foam
{
defineTypeNameAndDebug(streamLineParticle, 0);
defineParticleTypeNameAndDebug(streamLineParticle, 0);
defineTemplateTypeNameAndDebugWithName
(
IOField<vectorField>,
"vectorFieldField",
0
);
};
}
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -30,7 +30,7 @@ License
namespace Foam
{
defineTemplateTypeNameAndDebug(Cloud<streamLineParticle>, 0);
};
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -30,10 +30,7 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(forceCoeffs, 0);
}
defineTypeNameAndDebug(Foam::forceCoeffs, 0);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -39,10 +39,8 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(forces, 0);
}
defineTypeNameAndDebug(Foam::forces, 0);
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -34,14 +34,15 @@ namespace Foam
namespace sixDoFRigidBodyMotionConstraints
{
defineTypeNameAndDebug(fixedAxis, 0);
addToRunTimeSelectionTable
(
sixDoFRigidBodyMotionConstraint,
fixedAxis,
dictionary
);
};
};
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -34,14 +34,15 @@ namespace Foam
namespace sixDoFRigidBodyMotionConstraints
{
defineTypeNameAndDebug(fixedLine, 0);
addToRunTimeSelectionTable
(
sixDoFRigidBodyMotionConstraint,
fixedLine,
dictionary
);
};
};
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -34,14 +34,15 @@ namespace Foam
namespace sixDoFRigidBodyMotionConstraints
{
defineTypeNameAndDebug(fixedOrientation, 0);
addToRunTimeSelectionTable
(
sixDoFRigidBodyMotionConstraint,
fixedOrientation,
dictionary
);
};
};
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -34,14 +34,15 @@ namespace Foam
namespace sixDoFRigidBodyMotionConstraints
{
defineTypeNameAndDebug(fixedPlane, 0);
addToRunTimeSelectionTable
(
sixDoFRigidBodyMotionConstraint,
fixedPlane,
dictionary
);
};
};
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -34,14 +34,15 @@ namespace Foam
namespace sixDoFRigidBodyMotionConstraints
{
defineTypeNameAndDebug(fixedPoint, 0);
addToRunTimeSelectionTable
(
sixDoFRigidBodyMotionConstraint,
fixedPoint,
dictionary
);
};
};
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -35,14 +35,15 @@ namespace Foam
namespace sixDoFRigidBodyMotionRestraints
{
defineTypeNameAndDebug(linearAxialAngularSpring, 0);
addToRunTimeSelectionTable
(
sixDoFRigidBodyMotionRestraint,
linearAxialAngularSpring,
dictionary
);
};
};
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -34,14 +34,15 @@ namespace Foam
namespace sixDoFRigidBodyMotionRestraints
{
defineTypeNameAndDebug(linearSpring, 0);
addToRunTimeSelectionTable
(
sixDoFRigidBodyMotionRestraint,
linearSpring,
dictionary
);
};
};
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -34,14 +34,15 @@ namespace Foam
namespace sixDoFRigidBodyMotionRestraints
{
defineTypeNameAndDebug(sphericalAngularSpring, 0);
addToRunTimeSelectionTable
(
sixDoFRigidBodyMotionRestraint,
sphericalAngularSpring,
dictionary
);
};
};
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -36,14 +36,15 @@ namespace Foam
namespace sixDoFRigidBodyMotionRestraints
{
defineTypeNameAndDebug(tabulatedAxialAngularSpring, 0);
addToRunTimeSelectionTable
(
sixDoFRigidBodyMotionRestraint,
tabulatedAxialAngularSpring,
dictionary
);
};
};
}
}
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -0,0 +1,7 @@
abortCalculation/abortCalculation.C
abortCalculation/abortCalculationFunctionObject.C
residualControl/residualControl.C
residualControl/residualControlFunctionObject.C
LIB = $(FOAM_LIBBIN)/libjobControl

View File

@ -31,10 +31,8 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(abortCalculation, 0);
}
defineTypeNameAndDebug(Foam::abortCalculation, 0);
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //

View File

@ -1,4 +1,4 @@
*--------------------------------*- C++ -*----------------------------------*\
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 1.6 |
@ -37,31 +37,32 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
functions
(
{
convergenceChecks
{
type residualControl;
functionObjectLibs ( "libresidualControl.so" );
outputControl timeStep;
outputInterval 1;
type residualControl;
functionObjectLibs ( "libjobControl.so" );
outputControl timeStep;
outputInterval 1;
maxResiduals
(
(p 5e-4)
(U 1e-3)
);
}
);
{
p 5e-4;
U 1e-3;
// possibly check turbulence fields
"(k|epsilon|omega)" 1e-3;
}
}
}
// ************************************************************************* //

View File

@ -24,40 +24,35 @@ License
\*---------------------------------------------------------------------------*/
#include "residualControl.H"
#include "dictionary.H"
#include "fvMesh.H"
#include "Time.H"
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(residualControl, 0);
}
defineTypeNameAndDebug(Foam::residualControl, 0);
// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * //
bool Foam::residualControl::checkCriteria(const bool output) const
bool Foam::residualControl::checkCriteria(const bool verbose) const
{
bool achieved = true;
const fvMesh& mesh = static_cast<const fvMesh&>(obr_);
const dictionary& solverDict = mesh.solverPerformanceDict();
forAll(maxResiduals_, i)
forAllConstIter(dictionary, solverDict, iter)
{
const word& variableName = maxResiduals_[i].first();
if (solverDict.found(variableName))
const word& variableName = iter().keyword();
scalar maxResidual;
if (maxResiduals_.readIfPresent(variableName, maxResidual))
{
const scalar maxResidual = maxResiduals_[i].second();
const lduMatrix::solverPerformance
sp(solverDict.lookup(variableName));
const scalar eqnResidual = sp.initialResidual();
const scalar eqnResidual =
lduMatrix::solverPerformance(iter().stream()).initialResidual();
achieved = achieved && (eqnResidual < maxResidual);
if (output)
if (verbose)
{
Info<< " " << variableName
<< ": requested max residual = " << maxResidual
@ -121,7 +116,7 @@ void Foam::residualControl::read(const dictionary& dict)
{
if (active_)
{
dict.lookup("maxResiduals") >> maxResiduals_;
maxResiduals_ = dict.subDict("maxResiduals");
}
}

View File

@ -37,8 +37,8 @@ SourceFiles
#ifndef residualControl_H
#define residualControl_H
#include "dictionary.H"
#include "pointFieldFwd.H"
#include "Tuple2.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
@ -69,8 +69,8 @@ protected:
//- On/off switch - on if obr_ is an fvMesh object
bool active_;
//- List of variable name vs max residual
List<Tuple2<word, scalar> > maxResiduals_;
//- Dictionary of variable names vs max residual
dictionary maxResiduals_;
//- Flag to indicate whether convergence criteria have been met
bool criteriaSatisfied_;
@ -79,7 +79,7 @@ protected:
// Protected Member Functions
//- Perform residual control checks
bool checkCriteria(const bool output) const;
bool checkCriteria(const bool verbose) const;
//- Disallow default bitwise copy construct
residualControl(const residualControl&);
@ -113,7 +113,7 @@ public:
// Member Functions
//- Return name of the system call set
//- Return name of the residual criteria check name
virtual const word& name() const
{
return name_;
@ -122,13 +122,13 @@ public:
//- Read the system calls
virtual void read(const dictionary&);
//- Execute the "executeCalls" at each time-step
//- Check the residual criteria at each time-step
virtual void execute();
//- Execute the "endCalls" at the final time-loop
//- Report residual criteria check at the final time-loop
virtual void end();
//- Write, execute the "writeCalls"
//- Write, not used
virtual void write();
//- Update for changes of mesh

View File

@ -1,4 +0,0 @@
residualControl.C
residualControlFunctionObject.C
LIB = $(FOAM_LIBBIN)/libresidualControl

View File

@ -29,10 +29,7 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(systemCall, 0);
}
defineTypeNameAndDebug(Foam::systemCall, 0);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -1,6 +1,3 @@
abortCalculation/abortCalculation.C
abortCalculation/abortCalculationFunctionObject.C
staticPressure/staticPressure.C
staticPressure/staticPressureFunctionObject.C

View File

@ -34,10 +34,7 @@ using namespace Foam::constant;
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(dsmcFields, 0);
}
defineTypeNameAndDebug(Foam::dsmcFields, 0);
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //

View File

@ -29,10 +29,8 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(staticPressure, 0);
}
defineTypeNameAndDebug(Foam::staticPressure, 0);
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -37,29 +37,30 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
functions
{
fileUpdate1
{
type timeActivatedFileUpdate;
type timeActivatedFileUpdate;
functionObjectLibs ("libutilityFunctionObjects.so");
outputControl timeStep;
outputInterval 1;
fileToUpdate "$FOAM_CASE/system/fvSolution";
outputControl timeStep;
outputInterval 1;
fileToUpdate "$FOAM_CASE/system/fvSolution";
timeVsFile
(
(-1 "$FOAM_CASE/system/fvSolution.0")
(0.10 "$FOAM_CASE/system/fvSolution.10")
(0.20 "$FOAM_CASE/system/fvSolution.20")
(0.35 "$FOAM_CASE/system/fvSolution.35")
( -1 "$FOAM_CASE/system/fvSolution.0" )
( 0.10 "$FOAM_CASE/system/fvSolution.10" )
( 0.20 "$FOAM_CASE/system/fvSolution.20" )
( 0.35 "$FOAM_CASE/system/fvSolution.35" )
);
}
}

View File

@ -30,10 +30,7 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(timeActivatedFileUpdate, 0);
}
defineTypeNameAndDebug(Foam::timeActivatedFileUpdate, 0);
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -36,10 +36,8 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(isoSurface, 0);
}
defineTypeNameAndDebug(Foam::isoSurface, 0);
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -34,10 +34,8 @@ License
// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * //
namespace Foam
{
defineTypeNameAndDebug(isoSurfaceCell, 0);
}
defineTypeNameAndDebug(Foam::isoSurfaceCell, 0);
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //

View File

@ -36,11 +36,11 @@ usage()
while [ "$#" -ge 1 ]; do echo "$1"; shift; done
cat<<USAGE
usage: $0 [OPTION]
usage: ${0##*/} [OPTION]
options:
-d sets up a default scheme on all schemes
-h this usage
-default sets up a default scheme on all schemes
-help print the usage
* quickly tests the tutorials and writes out the scheme/solver information
@ -48,6 +48,30 @@ USAGE
exit 1
}
#------------------------------------------------------------------------------
unset DEFAULT_SCHEMES
# parse options
while [ "$#" -gt 0 ]
do
case "$1" in
-h | -help)
usage
;;
-d | -default)
DEFAULT_SCHEMES=true
shift
;;
-*)
usage "unknown option: '$*'"
;;
*)
break
;;
esac
done
setDefaultFvSchemes()
{
@ -98,6 +122,7 @@ done
[ -f "$MAIN_CONTROL_DICT" ] || usage "main controlDict not found"
TUTORIALS_DIR=.
TEST_RUN_DIR=../tutorialsTest
FV_SCHEMES=\
@ -113,30 +138,7 @@ SCHEMES_FILE="FvSchemes"
SCHEMES_TEMP="FvSchemes.temp"
SOLVERS_FILE="FvSolution"
SOLVERS_TEMP="FvSolution.temp"
DEFAULT_SCHEMES=0
#
# OPTIONS
#
OPTS=`getopt hd $*`
if [ $? -ne 0 ]
then
usage "Aborting due to invalid option"
fi
eval set -- "$OPTS"
while [ $1 != -- ]
do
case $1 in
-d)
DEFAULT_SCHEMES=1
;;
-h)
usage
;;
esac
shift
done
shift
#
# MAIN
@ -182,7 +184,7 @@ do
${CD}.org > ${CD}
done
if [ $DEFAULT_SCHEMES = 1 ]
if [ "$DEFAULT_SCHEMES" = true ]
then
echo "Modifying the fvSchemes to contain only default schemes"
for FV_SC in `find . -name fvSchemes`
@ -209,8 +211,7 @@ do
echo "$APP: " | tr -d "\n" >> $SOLVERS_FILE
for ST in $FV_SCHEMES
do
rm $SCHEMES_TEMP > /dev/null 2>&1
rm $SOLVERS_TEMP > /dev/null 2>&1
rm $SCHEMES_TEMP $SOLVERS_TEMP > /dev/null 2>&1
echo " ${ST}" >> $SCHEMES_FILE
for LOG in `find ${APP} -name "log.${APP}"`
do

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
graphFormat raw;

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
// ************************************************************************* //

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
// ************************************************************************* //

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
// ************************************************************************* //

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
// ************************************************************************* //

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep yes;
@ -57,6 +57,7 @@ functions
functionObjectLibs ( "libfieldFunctionObjects.so" );
enabled true;
outputControl outputTime;
fields
(
U
@ -76,5 +77,4 @@ functions
}
}
// ************************************************************************* //

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression compressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep yes;
@ -57,6 +57,7 @@ functions
functionObjectLibs ( "libfieldFunctionObjects.so" );
enabled true;
outputControl outputTime;
fields
(
U
@ -76,5 +77,4 @@ functions
}
}
// ************************************************************************* //

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep no;

View File

@ -37,7 +37,7 @@ writeFormat binary;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
@ -47,7 +47,7 @@ adjustTimeStep yes;
maxCo 0.1;
runTimeModifiable yes;
runTimeModifiable true;
// ************************************************************************* //

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep no;

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep no;

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep no;

View File

@ -36,7 +36,7 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
@ -44,7 +44,7 @@ timePrecision 6;
graphFormat raw;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep yes;

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep yes;

View File

@ -37,7 +37,7 @@ writeFormat ascii;
writePrecision 15;
writeCompression uncompressed;
writeCompression off;
timeFormat general;

View File

@ -20,32 +20,34 @@ USAGE
exit 1
}
# -----------------------------------------------------------------------------
unset timeOpt
OPTS=`getopt hl $*`
[ $? -eq 0 ] || usage "Aborting due to invalid option"
eval set -- "$OPTS"
while [ $1 != -- ]
# parse options
while [ "$#" -gt 0 ]
do
case $1 in
-l)
timeOpt="-latestTime"
;;
-h)
case "$1" in
-h | -help)
usage
;;
-l | -latestTime)
timeOpt="-latestTime"
shift
;;
*)
usage "unknown option/argument: '$*'"
;;
esac
shift
done
shift
sample $timeOpt
SDIR="sets"
SDIR=sets
LSDIR=`ls $SDIR | head -1`
EXAMPLE_FILE=`ls -1 $SDIR/${LSDIR}/* | head -1`
FS=`basename $EXAMPLE_FILE | cut -d_ -f2-`
for d in $SDIR/*
do
cat ${d}/cone25_${FS} ${d}/cone55_${FS} ${d}/base_${FS} > ${d}/biconic_${FS}

View File

@ -37,7 +37,7 @@ writeFormat ascii;
writePrecision 15;
writeCompression uncompressed;
writeCompression off;
timeFormat general;

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep yes;

View File

@ -37,7 +37,7 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
@ -45,7 +45,7 @@ timePrecision 6;
graphFormat raw;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep yes;

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep yes;

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep no;

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep no;

View File

@ -37,19 +37,18 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep no;
maxCo 0.5;
functions
{
fieldAverage1
@ -58,6 +57,7 @@ functions
functionObjectLibs ( "libfieldFunctionObjects.so" );
enabled true;
outputControl outputTime;
fields
(
U
@ -77,5 +77,4 @@ functions
}
}
// ************************************************************************* //

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep no;

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep yes;

View File

@ -37,7 +37,7 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
@ -45,7 +45,7 @@ timePrecision 6;
graphFormat raw;
runTimeModifiable yes;
runTimeModifiable true;
// ************************************************************************* //

View File

@ -37,7 +37,7 @@ writeFormat binary;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
@ -45,7 +45,7 @@ timePrecision 6;
graphFormat raw;
runTimeModifiable yes;
runTimeModifiable true;
// ************************************************************************* //

View File

@ -37,7 +37,7 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
@ -45,7 +45,7 @@ timePrecision 6;
graphFormat raw;
runTimeModifiable yes;
runTimeModifiable true;
// ************************************************************************* //

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
// ************************************************************************* //

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
// ************************************************************************* //

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep no;

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep no;

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
// ************************************************************************* //

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
// ************************************************************************* //

View File

@ -37,26 +37,28 @@ writeFormat ascii;
writePrecision 6;
writeCompression compressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
functions
{
forces
{
type forceCoeffs;
type forceCoeffs;
functionObjectLibs ( "libforces.so" );
outputControl timeStep;
outputInterval 1;
outputControl timeStep;
outputInterval 1;
patches
(
WALL10
);
pName p;
UName U;
log true;
@ -71,5 +73,4 @@ functions
}
}
// ************************************************************************* //

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
// ************************************************************************* //

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression compressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
// ************************************************************************* //

View File

@ -37,90 +37,90 @@ writeFormat ascii;
writePrecision 10;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep no;
functions
(
{
dsmcFields1
{
type dsmcFields;
enabled on;
type dsmcFields;
functionObjectLibs ( "libutilityFunctionObjects.so" );
outputControl outputTime;
enabled true;
outputControl outputTime;
}
fieldAverage1
{
type fieldAverage;
type fieldAverage;
functionObjectLibs ( "libfieldFunctionObjects.so" );
outputControl outputTime;
resetOnOutput off;
outputControl outputTime;
resetOnOutput off;
fields
(
rhoN
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
rhoM
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
dsmcRhoN
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
momentum
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
linearKE
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
internalE
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
iDof
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
q
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
fD
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
);
}
);
}
// ************************************************************************* //

View File

@ -37,90 +37,90 @@ writeFormat ascii;
writePrecision 10;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep no;
functions
(
{
dsmcFields1
{
type dsmcFields;
enabled on;
type dsmcFields;
functionObjectLibs ( "libutilityFunctionObjects.so" );
outputControl outputTime;
enabled true;
outputControl outputTime;
}
fieldAverage1
{
type fieldAverage;
type fieldAverage;
functionObjectLibs ( "libfieldFunctionObjects.so" );
outputControl outputTime;
resetOnOutput off;
outputControl outputTime;
resetOnOutput off;
fields
(
rhoN
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
rhoM
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
dsmcRhoN
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
momentum
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
linearKE
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
internalE
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
iDof
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
q
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
fD
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
);
}
);
}
// ************************************************************************* //

View File

@ -37,90 +37,90 @@ writeFormat ascii;
writePrecision 10;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep no;
functions
(
{
dsmcFields1
{
type dsmcFields;
enabled on;
type dsmcFields;
functionObjectLibs ( "libutilityFunctionObjects.so" );
outputControl outputTime;
enabled true;
outputControl outputTime;
}
fieldAverage1
{
type fieldAverage;
type fieldAverage;
functionObjectLibs ( "libfieldFunctionObjects.so" );
outputControl outputTime;
resetOnOutput off;
outputControl outputTime;
resetOnOutput off;
fields
(
rhoN
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
rhoM
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
dsmcRhoN
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
momentum
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
linearKE
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
internalE
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
iDof
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
q
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
fD
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
);
}
);
}
// ************************************************************************* //

View File

@ -38,104 +38,104 @@ writeFormat ascii;
writePrecision 10;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep no;
functions
(
{
dsmcFields1
{
type dsmcFields;
enabled on;
type dsmcFields;
functionObjectLibs ( "libutilityFunctionObjects.so" );
outputControl outputTime;
enabled true;
outputControl outputTime;
}
fieldAverage1
{
type fieldAverage;
type fieldAverage;
functionObjectLibs ( "libfieldFunctionObjects.so" );
outputControl outputTime;
resetOnOutput off;
outputControl outputTime;
resetOnOutput off;
fields
(
rhoN
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
rhoM
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
dsmcRhoN
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
momentum
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
linearKE
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
internalE
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
iDof
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
q
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
fD
{
mean on;
prime2Mean off;
base time;
mean on;
prime2Mean off;
base time;
}
);
}
forces1
{
type forces;
enabled on;
type forces;
enabled true;
functionObjectLibs ( "libforces.so" );
outputControl outputTime;
patches ( obstacle );
outputControl outputTime;
patches ( obstacle );
directForceDensity true;
fDName fDMean;
CofR ( 0 0 0 );
log on;
fDName fDMean;
CofR ( 0 0 0 );
log on;
}
);
}
// ************************************************************************* //

View File

@ -36,13 +36,13 @@ writeFormat ascii;
writePrecision 12;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep no;

View File

@ -36,13 +36,13 @@ writeFormat ascii;
writePrecision 12;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep no;

View File

@ -36,13 +36,13 @@ writeFormat ascii;
writePrecision 12;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep no;

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
// ************************************************************************* //

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
// ************************************************************************* //

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
graphFormat raw;

View File

@ -37,13 +37,13 @@ writeFormat ascii;
writePrecision 6;
writeCompression uncompressed;
writeCompression off;
timeFormat general;
timePrecision 6;
runTimeModifiable yes;
runTimeModifiable true;
adjustTimeStep no;

Some files were not shown because too many files have changed in this diff Show More