New: first postProcessing tool

This commit is contained in:
L-Nafaryus 2021-06-15 11:37:47 +05:00
parent 93990fe053
commit 36539a58c6
2 changed files with 26 additions and 2 deletions

View File

@ -11,8 +11,8 @@ name = "anisotropy"
format = "%(levelname)s: %(message)s"
[base]
simple = true
bodyCentered = true
simple = false
bodyCentered = false
faceCentered = true
###

24
postProcessing/showFailed Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/env bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/.."
cd ${DIR}
source $OPENFOAM
getcase()
{
for _case in $( find $1 -type f -name $2 ); do
if [ "$( cat $_case | grep "$3" )" ]; then
echo $_case
fi
done
}
echo -e "\nFailed mesh:"
getcase "$DIR/build" "task.toml" "mesh = false"
echo -e "\nFailed flow:"
getcase "$DIR/build" "task.toml" "flow = false"
endTime="$( foamDictionary "${DIR}/openfoam/template/system/controlDict" -entry endTime -value )"
echo -e "\nComputation exceed 'endTime = $endTime':"
getcase "$DIR/build" "simpleFoam.log" "Time = $endTime"