mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: renamed periodicHill createPlots -> plot for consistency TUT: use nutLowReWallFunction for bump2D - required for the new nutWallFuncs hierarchy
47 lines
1.5 KiB
Bash
Executable File
47 lines
1.5 KiB
Bash
Executable File
#!/bin/sh
|
|
cd ${0%/*} || exit 1 # Run from this directory
|
|
. $WM_PROJECT_DIR/bin/tools/RunFunctions # Tutorial run functions
|
|
. $WM_PROJECT_DIR/bin/tools/CleanFunctions # Tutorial clean functions
|
|
|
|
runApplication blockMesh
|
|
|
|
# Turbulence closure models
|
|
models="
|
|
kOmegaSST
|
|
SpalartAllmaras
|
|
"
|
|
|
|
for model in $models
|
|
do
|
|
echo "Processing model: $model"
|
|
|
|
\cp constant/turbulenceProperties.template constant/turbulenceProperties
|
|
runApplication -s "$model" foamDictionary -entry RAS.RASModel \
|
|
-set "$model" constant/turbulenceProperties
|
|
|
|
runApplication $(getApplication)
|
|
|
|
timeDir=$(foamListTimes -latestTime)
|
|
|
|
# Create datasets for benchmark comparisons
|
|
echo "# ccx tau_xx tau_yy tau_zz cp" > profiles.dat
|
|
foamDictionary -entry boundaryField.bump.value -value $timeDir/Cx | \
|
|
sed -n '/(/,/)/p' | sed -e 's/[()]//g;/^\s*$/d' > Cx.$$
|
|
foamDictionary -entry boundaryField.bump.value -value $timeDir/wallShearStress | \
|
|
sed -n '/(/,/)/p' | sed -e 's/[()]//g;/^\s*$/d' > tau.$$
|
|
foamDictionary -entry boundaryField.bump.value -value $timeDir/Cp | \
|
|
sed -n '/(/,/)/p' | sed -e 's/[()]//g;/^\s*$/d' > cp.$$
|
|
\paste -d ' ' Cx.$$ tau.$$ cp.$$ >> profiles.dat
|
|
\rm -f Cx.$$ tau.$$ cp.$$
|
|
|
|
# Store model results
|
|
modelDir="$model"
|
|
\rm -rf "$modelDir"
|
|
\mkdir "$modelDir"
|
|
\mv log* profiles.dat "$timeDir" postProcessing "$modelDir"
|
|
|
|
cleanTimeDirectories
|
|
done
|
|
|
|
#------------------------------------------------------------------------------
|