Skip to content
Snippets Groups Projects
Commit eaadf34c authored by Felix's avatar Felix
Browse files

script for running different scenarios

parent de13928c
No related branches found
No related tags found
No related merge requests found
wrong_velocities
#! /usr/bin/env sh
set -e
# f = force = do not error on nonexisting files
rm -rf 'postProcessing/patchAverage(name=cylinder,mag(grad(T)))'
rm -rf '0/grad(T)'
rm -rf '0/mag(grad(T))'
decomposePar -force
foamJob -wait -p buoyantBoussinesqPimpleFoam
reconstructPar
# Calculate the average of the magnitude of the temperature gradient
postProcess -func 'grad(T)'
postProcess -func 'mag(grad(T))'
postProcess -func 'patchAverage(name=cylinder,mag(grad(T)))'
#! /usr/bin/env sh
set -e
top="${pwd}"
echo "" >> runmany.archive
touch runmany.log
cat runmany.log >> runmany.archive 2> /dev/null
echo "" > runmany.log
top="$(pwd)"
for n in 1 2
do
for logu in -1 0 1 2
for logu in -2 -1 0 1
do
cd "${top}"
new="freeCylinderFlow-N${n}-u${logu}"
if test -d "${new}"
then
echo "skip ${new}" >> runmany.log
continue # done in previous run, hopefully
fi
echo "copy and run ${new}" >> runmany.log
cp -r freeCylinderFlow ${new}
cd "${new}"
sed -i 's#^inVelocity .*;$#inVelocity 2e'"${logu}"';' parameters
grep --quiet "2e${logu}" parameters # should crash script if grep does not find it
sed -i 's#^inVelocity .*;$#inVelocity 5e'"${logu}"';#' parameters
grep --quiet "5e${logu}" parameters # should crash script if grep does not find it
./run.sh $n
done
done
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment