Files
openfoam/tutorials/incompressible/pimpleFoam/LES/surfaceMountedCube/fullCase/Allrun
Mark Olesen e6dfb39c66 STYLE: remove unnecessary stdout, stderr /dev/null redirects
- no stderr redirect needed:
    * 'command -v'

- no stdout/stderr redirect needed:
    * 'rm -f'

STYLE: consistent spacing after redirects
2019-11-06 10:44:36 +01:00

44 lines
1.5 KiB
Bash
Executable File

#!/bin/sh
cd ${0%/*} || exit 1 # Run from this directory
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
#------------------------------------------------------------------------------
channelCase=../initChannel
channelDataDir=$channelCase/postProcessing/surfaces/inlet
[ -d $channelDataDir ] || {
echo "Unable to locate precursor channel case - exiting"
exit 1
}
# Copy the channel data
# Note: this is mapped using a timeVaryingMapped condition on the inlet patch
mkdir -p constant/boundaryData/inlet/0
channelTimeDir=$(foamListTimes -case $channelCase -latestTime)
\cp -f $channelDataDir/points constant/boundaryData/inlet
\cp -f $channelDataDir/$channelTimeDir/turbulenceProperties:R constant/boundaryData/inlet/0/R
\cp -f $channelDataDir/$channelTimeDir/turbulenceProperties:L constant/boundaryData/inlet/0/L
\cp -f $channelDataDir/$channelTimeDir/turbulenceProperties:nuTilda constant/boundaryData/inlet/0/nuTilda
\cp -f $channelDataDir/$channelTimeDir/U constant/boundaryData/inlet/0/U
runApplication blockMesh
runApplication decomposePar
runParallel $(getApplication)
if notTest $@
then
# create validation plot
# Require gnuplot
command -v gnuplot >/dev/null || {
echo "gnuplot not found - skipping graph creation" 1>&2
exit 1
}
# Plot the mean velocity profiles
./plot $(foamListTimes -processor -latestTime)
fi
# -----------------------------------------------------------------------------