mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
ENH: simplify turbulentDigitalFilterInlet BC
This commit is contained in:
committed by
Andrew Heather
parent
4a798b9ea5
commit
60809c3f50
86
tutorials/verificationAndValidation/turbulentInflow/PCF/Allrun
Executable file
86
tutorials/verificationAndValidation/turbulentInflow/PCF/Allrun
Executable file
@ -0,0 +1,86 @@
|
||||
#!/bin/sh
|
||||
cd "${0%/*}" || exit # Run from this directory
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/RunFunctions # Tutorial run functions
|
||||
. ${WM_PROJECT_DIR:?}/bin/tools/CleanFunctions # Tutorial clean functions
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Collect data into the 'results' directory,
|
||||
# and clean the case for the next run
|
||||
#
|
||||
# $1 = model
|
||||
# ----
|
||||
collectData(){
|
||||
model=$1
|
||||
runType=$2
|
||||
echo " Moving results into 'results/$model.$runType'"
|
||||
results="results/$model.$runType"
|
||||
mkdir -p "$results"
|
||||
timeDir=$(foamListTimes -latestTime)
|
||||
mv -f log* *.png postProcessing "$timeDir" "$results" 2>/dev/null
|
||||
|
||||
cleanTimeDirectories
|
||||
rm -rf processor* > /dev/null 2>&1
|
||||
}
|
||||
|
||||
|
||||
# Compute the case in 'serial' mode,
|
||||
# and collect the data
|
||||
#
|
||||
# $* = models
|
||||
# ----
|
||||
serialRun(){
|
||||
models=$*
|
||||
for model in $models
|
||||
do
|
||||
echo " Running with the synthetic turbulence model: $model"
|
||||
(cd 0 && ln -snf "inlet.$model" inlet)
|
||||
(cd constant/boundaryData && ln -snf "inlet.$model" inlet)
|
||||
|
||||
runApplication -s "$model" $(getApplication)
|
||||
./plot
|
||||
collectData $model "serial"
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
# Compute the case in 'parallel' mode,
|
||||
# and collect the data
|
||||
#
|
||||
# $* = models
|
||||
# ----
|
||||
parallelRun(){
|
||||
models=$*
|
||||
for model in $models
|
||||
do
|
||||
echo " Running with the synthetic turbulence model: $model"
|
||||
(cd 0 && ln -snf "inlet.$model" inlet)
|
||||
(cd constant/boundaryData && ln -snf "inlet.$model" inlet)
|
||||
|
||||
runApplication -s "$model" decomposePar -force
|
||||
runParallel -s "$model" $(getApplication)
|
||||
runApplication -s "$model" reconstructPar -latestTime
|
||||
./plot
|
||||
collectData $model "parallel"
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
# Prepare the numerical setup
|
||||
./Allrun.pre
|
||||
|
||||
# Run with the synthetic turbulence models
|
||||
models="
|
||||
FSM
|
||||
DFM
|
||||
DFSEM
|
||||
"
|
||||
|
||||
parallelRun $models
|
||||
|
||||
serialRun $models
|
||||
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user