bin/tools/RunFunctions: Added getSolver function for use with foamPostProcess

This commit is contained in:
Henry Weller
2022-08-10 09:37:10 +01:00
parent 19f984d58d
commit bfa40570ad
4 changed files with 14 additions and 5 deletions

View File

@ -2,7 +2,7 @@
# ========= |
# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
# \\ / O peration | Website: https://openfoam.org
# \\ / A nd | Copyright (C) 2011-2021 OpenFOAM Foundation
# \\ / A nd | Copyright (C) 2011-2022 OpenFOAM Foundation
# \\/ M anipulation |
#------------------------------------------------------------------------------
# License
@ -49,6 +49,11 @@ getApplication()
foamDictionary -entry application -value system/controlDict
}
getSolver()
{
foamDictionary -entry solver -value system/controlDict
}
runApplication()
{
APP_RUN=

View File

@ -1,6 +1,6 @@
#!/bin/sh
cd ${0%/*} || exit 1
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/CleanFunctions
@ -18,3 +18,5 @@ find 0 -mindepth 1 -maxdepth 1 \
! -name T \
! -name U \
-exec rm -rf {} \;
#------------------------------------------------------------------------------

View File

@ -1,10 +1,12 @@
#!/bin/sh
cd ${0%/*} || exit 1
cd ${0%/*} || exit 1 # Run from this directory
. $WM_PROJECT_DIR/bin/tools/RunFunctions
runApplication blockMesh
runApplication topoSet
runApplication $(getApplication)
runApplication foamPostProcess -solver fluid -latestTime
runApplication foamPostProcess -solver $(getSolver) -latestTime
#------------------------------------------------------------------------------

View File

@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # Run from this directory
runApplication blockMesh
runApplication foamRun
runApplication -s age foamPostProcess -solver incompressibleFluid -latestTime \
runApplication -s age foamPostProcess -solver $(getSolver) -latestTime \
-func "age(diffusion=true)"
runApplication -s probes1 foamPostProcess -func probes1 -latestTime
runApplication -s probes2 foamPostProcess -func probes2 -latestTime