reactingTwoPhaseEulerFoam: POSIX compliance of test Allrun scripts

This commit is contained in:
Will Bainbridge
2018-05-31 08:55:39 +01:00
parent d0609cd6ae
commit 66b189a546
2 changed files with 6 additions and 13 deletions

View File

@ -9,17 +9,14 @@ liquidSpecies="H2O C3H8O none"
runApplication blockMesh
function setArg()
{
[ $1 != "none" ] && echo -set $1 || echo -remove
}
for g in $gasSpecies
do
foamDictionary -entry inertSpecie $(setArg $g) constant/thermophysicalProperties.gas
[ $g != "none" ] && setArg="-set $g" || setArg="-remove"
foamDictionary -entry inertSpecie $setArg constant/thermophysicalProperties.gas
for l in $liquidSpecies
do
foamDictionary -entry inertSpecie $(setArg $l) constant/thermophysicalProperties.liquid
[ $l != "none" ] && setArg="-set $l" || setArg="-remove"
foamDictionary -entry inertSpecie $setArg constant/thermophysicalProperties.liquid
runApplication -s $g.gas_$l.liquid $(getApplication)
mv postProcessing postProcessing_$g.gas_$l.liquid
done

View File

@ -8,14 +8,10 @@ gasSpecies="air H2O none"
runApplication blockMesh
function setArg()
{
[ $1 != "none" ] && echo -set $1 || echo -remove
}
for g in $gasSpecies
do
foamDictionary -entry inertSpecie $(setArg $g) constant/thermophysicalProperties.gas
[ $g != "none" ] && setArg="-set $g" || setArg="-remove"
foamDictionary -entry inertSpecie $setArg constant/thermophysicalProperties.gas
runApplication -s $g.gas $(getApplication)
mv postProcessing postProcessing_$g.gas
done