lagrangianDistributionInjection

#!/bin/sh
cd ${0%/*} || exit 1 # run from this directory

# Source tutorial run functions
. $WM_PROJECT_DIR/bin/tools/RunFunctions

eulerianCase=../eulerianInjection

copyLagrangianData()
{
dir=$1
latestTime=$(cd $dir && foamListTimes -latestTime)
if [ -z $latestTime ]
then
if [ -d $dir/processor0 ]
then
# Try a processor directory
latestTime=$(cd $dir && foamListTimes -latestTime -processor)
if [ -n $latestTime ]
then
dir=”${dir}/processor0″
fi
fi
fi

if [ -z $latestTime ]
then
echo “Error: unable to find Lagrangian data in case $dir”
exit 1
fi

dir=$dir/${latestTime}/lagrangian

if [ -d $dir ]
then
echo “Copying lagrangian data from $dir to 0 directory”
cp -r $dir 0
else
echo “Error: unable to find Lagrangian data in case $dir”
exit 1
fi
}

restore0Dir;

copyLagrangianData ${eulerianCase}

runApplication blockMesh

runApplication decomposePar

runParallel $(getApplication)

runApplication reconstructPar

実行年月:08/29/2017