tutorials: Prevent foamDictionary output from printing during test loop
foamDictionary executions are now wrapped by runApplication like any other execution so that they do not print during a test loop. foamDictionary does not produce a conforming log, however, so log.foamDictionary has been filtered out of the formation of the test loop report so that false failures are not reported.
This commit is contained in:
@ -14,7 +14,8 @@ setInertY()
|
||||
y=${1%.*}
|
||||
phase=${1#*.}
|
||||
[ $y != "none" ] && arg="-set $y" || arg="-remove"
|
||||
foamDictionary -entry inertSpecie $arg constant/thermophysicalProperties.$phase
|
||||
runApplication -a foamDictionary -entry inertSpecie $arg \
|
||||
constant/thermophysicalProperties.$phase
|
||||
}
|
||||
|
||||
for gY in $gYs
|
||||
|
||||
@ -18,7 +18,8 @@ setInertY()
|
||||
* ) arg="-set $y";;
|
||||
esac
|
||||
|
||||
foamDictionary -entry inertSpecie $arg constant/thermophysicalProperties.$phase
|
||||
runApplication -a foamDictionary -entry inertSpecie $arg \
|
||||
constant/thermophysicalProperties.$phase
|
||||
}
|
||||
|
||||
setThermoAndEnergy()
|
||||
@ -32,7 +33,7 @@ setThermoAndEnergy()
|
||||
* ) exit 1;;
|
||||
esac
|
||||
|
||||
foamDictionary -entry thermoType.thermo -set $thermo \
|
||||
runApplication -a foamDictionary -entry thermoType.thermo -set $thermo \
|
||||
constant/thermophysicalProperties.$phase
|
||||
|
||||
case $he in
|
||||
@ -41,7 +42,7 @@ setThermoAndEnergy()
|
||||
* ) exit 1;;
|
||||
esac
|
||||
|
||||
foamDictionary -entry thermoType.energy -set $energy \
|
||||
runApplication -a foamDictionary -entry thermoType.energy -set $energy \
|
||||
constant/thermophysicalProperties.$phase
|
||||
}
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ setThermoAndEnergy()
|
||||
he=${1%.*}
|
||||
phase=${1#*.}
|
||||
|
||||
foamDictionary -entry thermoType.thermo -set ${he}Const \
|
||||
runApplication -a foamDictionary -entry thermoType.thermo -set ${he}Const \
|
||||
constant/thermophysicalProperties.$phase
|
||||
|
||||
case $he in
|
||||
@ -21,7 +21,7 @@ setThermoAndEnergy()
|
||||
* ) exit 1;;
|
||||
esac
|
||||
|
||||
foamDictionary -entry thermoType.energy -set $energy \
|
||||
runApplication -a foamDictionary -entry thermoType.energy -set $energy \
|
||||
constant/thermophysicalProperties.$phase
|
||||
}
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
# ========= |
|
||||
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
|
||||
# \\ / O peration | Website: https://openfoam.org
|
||||
# \\ / A nd | Copyright (C) 2011-2018 OpenFOAM Foundation
|
||||
# \\ / A nd | Copyright (C) 2011-2020 OpenFOAM Foundation
|
||||
# \\/ M anipulation |
|
||||
#------------------------------------------------------------------------------
|
||||
# License
|
||||
@ -80,7 +80,7 @@ logReportDir()
|
||||
|
||||
cd $1 || return 1
|
||||
|
||||
logs=`find . -name "log.*"`
|
||||
logs=`find . -name "log.*" ! -name "log.foamDictionary"`
|
||||
[ -n "$logs" ] || return 0
|
||||
|
||||
retVal=0
|
||||
|
||||
@ -28,9 +28,9 @@ cloneCase moriyoshiHomogeneous moriyoshiHomogeneousHydrogen
|
||||
|
||||
if ! isTest $@
|
||||
then
|
||||
foamDictionary system/controlDict -entry deltaT -set 1e-05
|
||||
foamDictionary system/controlDict -entry endTime -set 0.015
|
||||
foamDictionary system/controlDict -entry writeInterval -set 50
|
||||
runApplication -a foamDictionary system/controlDict -entry deltaT -set 1e-05
|
||||
runApplication -a foamDictionary system/controlDict -entry endTime -set 0.015
|
||||
runApplication -a foamDictionary system/controlDict -entry writeInterval -set 50
|
||||
|
||||
runApplication -a XiFoam
|
||||
fi
|
||||
|
||||
@ -17,20 +17,20 @@ runApplication setFields
|
||||
if ! isTest $@
|
||||
then
|
||||
# Run the application without chemistry until 1500 to let the flow develop
|
||||
foamDictionary -entry "startTime" -set "0" system/controlDict
|
||||
foamDictionary -entry "writeInterval" -set "1500" system/controlDict
|
||||
foamDictionary -entry "endTime" -set "1500" system/controlDict
|
||||
runApplication -a foamDictionary -entry "startTime" -set "0" system/controlDict
|
||||
runApplication -a foamDictionary -entry "writeInterval" -set "1500" system/controlDict
|
||||
runApplication -a foamDictionary -entry "endTime" -set "1500" system/controlDict
|
||||
rm -rf constant/chemistryProperties > /dev/null 2>&1
|
||||
foamDictionary -entry "chemistry" -set "off" constant/chemistryProperties
|
||||
runApplication -a foamDictionary -entry "chemistry" -set "off" constant/chemistryProperties
|
||||
|
||||
runApplication $application
|
||||
|
||||
# Run with chemistry until flame reach its full size
|
||||
foamDictionary -entry "startTime" -set "1500" system/controlDict
|
||||
foamDictionary -entry "writeInterval" -set "100" system/controlDict
|
||||
foamDictionary -entry "endTime" -set "5000" system/controlDict
|
||||
runApplication -a foamDictionary -entry "startTime" -set "1500" system/controlDict
|
||||
runApplication -a foamDictionary -entry "writeInterval" -set "100" system/controlDict
|
||||
runApplication -a foamDictionary -entry "endTime" -set "5000" system/controlDict
|
||||
rm -rf constant/chemistryProperties > /dev/null 2>&1
|
||||
foamDictionary -entry "chemistry" -set "on" constant/chemistryProperties
|
||||
runApplication -a foamDictionary -entry "chemistry" -set "on" constant/chemistryProperties
|
||||
fi
|
||||
|
||||
runApplication -o $application
|
||||
|
||||
@ -8,7 +8,7 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
|
||||
runApplication foamSetupCHT
|
||||
|
||||
foamDictionary -entry internalField -set "uniform 348" 0/solid/T
|
||||
runApplication foamDictionary -entry internalField -set "uniform 348" 0/solid/T
|
||||
|
||||
runApplication decomposePar -allRegions -dict system/decomposeParDict
|
||||
|
||||
|
||||
@ -9,9 +9,9 @@ runApplication blockMesh
|
||||
runApplication decomposePar -copyZero
|
||||
|
||||
# Run snappy without layers
|
||||
foamDictionary system/snappyHexMeshDict -entry castellatedMesh -set on
|
||||
foamDictionary system/snappyHexMeshDict -entry snap -set on
|
||||
foamDictionary system/snappyHexMeshDict -entry addLayers -set off
|
||||
runApplication -a foamDictionary system/snappyHexMeshDict -entry castellatedMesh -set on
|
||||
runApplication -a foamDictionary system/snappyHexMeshDict -entry snap -set on
|
||||
runApplication -a foamDictionary system/snappyHexMeshDict -entry addLayers -set off
|
||||
runParallel snappyHexMesh -overwrite
|
||||
|
||||
# Convert the face zones into mapped wall baffles and split
|
||||
@ -20,9 +20,9 @@ runParallel mergeOrSplitBaffles -split -overwrite
|
||||
rm -rf processor*/constant/polyMesh/pointLevel
|
||||
|
||||
# Run snappy again to create layers
|
||||
foamDictionary system/snappyHexMeshDict -entry castellatedMesh -set off
|
||||
foamDictionary system/snappyHexMeshDict -entry snap -set off
|
||||
foamDictionary system/snappyHexMeshDict -entry addLayers -set on
|
||||
runApplication -a foamDictionary system/snappyHexMeshDict -entry castellatedMesh -set off
|
||||
runApplication -a foamDictionary system/snappyHexMeshDict -entry snap -set off
|
||||
runApplication -a foamDictionary system/snappyHexMeshDict -entry addLayers -set on
|
||||
runParallel -a snappyHexMesh -overwrite
|
||||
|
||||
# Split the mesh into regions
|
||||
|
||||
@ -36,7 +36,7 @@ setAtmosphereBC () {
|
||||
|
||||
echo "Setting $_field BC on atmosphere patch to $_BC"
|
||||
|
||||
foamDictionary \
|
||||
runApplication -a foamDictionary \
|
||||
-entry boundaryField.atmosphere.type \
|
||||
-set "$_BC" \
|
||||
"0/$_field" > /dev/null 2>&1
|
||||
|
||||
@ -5,9 +5,9 @@ cd ${0%/*} || exit 1 # Run from this directory
|
||||
. $WM_PROJECT_DIR/bin/tools/RunFunctions
|
||||
|
||||
runApplication blockMesh
|
||||
foamDictionary -entry "method" -set "hierarchical" system/decomposeParDict
|
||||
runApplication -a foamDictionary -entry "method" -set "hierarchical" system/decomposeParDict
|
||||
runApplication decomposePar -copyZero
|
||||
foamDictionary -entry "method" -set "ptscotch" system/decomposeParDict
|
||||
runApplication -a foamDictionary -entry "method" -set "ptscotch" system/decomposeParDict
|
||||
runParallel snappyHexMesh -overwrite
|
||||
|
||||
runParallel topoSet
|
||||
|
||||
@ -13,7 +13,7 @@ runApplication blockMesh
|
||||
|
||||
for i in 1 2 3 4 5 6
|
||||
do
|
||||
foamDictionary system/refineMeshDict -entry set -set c${i}
|
||||
runApplication -a foamDictionary system/refineMeshDict -entry set -set c${i}
|
||||
|
||||
runApplication -a topoSet
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ runApplication blockMesh
|
||||
|
||||
for i in 1 2 3 4 5 6
|
||||
do
|
||||
foamDictionary system/refineMeshDict -entry set -set c${i}
|
||||
runApplication -a foamDictionary system/refineMeshDict -entry set -set c${i}
|
||||
|
||||
runApplication -a topoSet
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@ runApplication blockMesh
|
||||
|
||||
for i in 1 2 3 4 5 6
|
||||
do
|
||||
foamDictionary system/refineMeshDict -entry set -set c${i}
|
||||
runApplication -a foamDictionary system/refineMeshDict -entry set -set c${i}
|
||||
|
||||
runApplication -a topoSet
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ runApplication blockMesh -dict system/blockMeshDict.1
|
||||
|
||||
for i in 1 2 3 4 5 6 7
|
||||
do
|
||||
foamDictionary system/refineMeshDict -entry set -set c${i}
|
||||
runApplication -a foamDictionary system/refineMeshDict -entry set -set c${i}
|
||||
runApplication -a topoSet -dict system/topoSetDict.1
|
||||
runApplication -a refineMesh -dict system/refineMeshDict -overwrite
|
||||
done
|
||||
|
||||
@ -17,7 +17,7 @@ runApplication blockMesh -dict system/blockMeshDict.2
|
||||
|
||||
for i in 1 2 3 4
|
||||
do
|
||||
foamDictionary system/refineMeshDict -entry set -set c${i}
|
||||
runApplication -a foamDictionary system/refineMeshDict -entry set -set c${i}
|
||||
runApplication -a topoSet -dict system/topoSetDict.2
|
||||
runApplication -a refineMesh -dict system/refineMeshDict -overwrite
|
||||
done
|
||||
|
||||
@ -14,8 +14,8 @@ runParallel $application
|
||||
|
||||
if ! isTest $@
|
||||
then
|
||||
foamDictionary system/controlDict -entry endTime -set 4
|
||||
foamDictionary system/controlDict -entry startTime -set 0.5
|
||||
runApplication -a foamDictionary system/controlDict -entry endTime -set 4
|
||||
runApplication -a foamDictionary system/controlDict -entry startTime -set 0.5
|
||||
runParallel -a foamDictionary 0.5/T.liquid -entry boundaryField.wall.q -set "uniform 73900"
|
||||
runParallel -a foamDictionary 0.5/U.liquid -entry boundaryField.inlet.type -set "fixedValue"
|
||||
runParallel -a $application
|
||||
|
||||
@ -14,8 +14,8 @@ runParallel $application
|
||||
|
||||
if ! isTest $@
|
||||
then
|
||||
foamDictionary system/controlDict -entry endTime -set 4
|
||||
foamDictionary system/controlDict -entry startTime -set 0.5
|
||||
runApplication -a foamDictionary system/controlDict -entry endTime -set 4
|
||||
runApplication -a foamDictionary system/controlDict -entry startTime -set 0.5
|
||||
runParallel -a foamDictionary 0.5/T.liquid -entry boundaryField.wall.q -set "uniform 73900"
|
||||
runParallel -a foamDictionary 0.5/U.liquid -entry boundaryField.inlet.type -set "fixedValue"
|
||||
runParallel -a $application
|
||||
|
||||
@ -15,8 +15,8 @@ runParallel $application
|
||||
|
||||
if ! isTest $@
|
||||
then
|
||||
foamDictionary system/controlDict -entry endTime -set 4
|
||||
foamDictionary system/controlDict -entry startTime -set 0.5
|
||||
runApplication -a foamDictionary system/controlDict -entry endTime -set 4
|
||||
runApplication -a foamDictionary system/controlDict -entry startTime -set 0.5
|
||||
runParallel -a foamDictionary -expand 0.5/T.liquid -entry boundaryField.wall.q -set "uniform 73900"
|
||||
runParallel -a foamDictionary -expand 0.5/U.liquid -entry boundaryField.inlet.type -set "fixedValue"
|
||||
runParallel -a $application
|
||||
|
||||
@ -15,8 +15,8 @@ runParallel $application
|
||||
|
||||
if ! isTest $@
|
||||
then
|
||||
foamDictionary system/controlDict -entry endTime -set 4
|
||||
foamDictionary system/controlDict -entry startTime -set 0.5
|
||||
runApplication -a foamDictionary system/controlDict -entry endTime -set 4
|
||||
runApplication -a foamDictionary system/controlDict -entry startTime -set 0.5
|
||||
runParallel -a foamDictionary -expand 0.5/T.liquid -entry boundaryField.wall.q -set "uniform 73900"
|
||||
runParallel -a foamDictionary -expand 0.5/U.liquid -entry boundaryField.inlet.type -set "fixedValue"
|
||||
runParallel -a $application
|
||||
|
||||
Reference in New Issue
Block a user