mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
TUT: Updates - see #856
This commit is contained in:
@ -77,7 +77,7 @@ copyParallelPointDisplacement()
|
|||||||
|
|
||||||
if notTest $@
|
if notTest $@
|
||||||
then
|
then
|
||||||
latestTime=$(cd steady && foamListTimes -noZero -latestTime -processor)
|
latestTime=$(\cd steady && foamListTimes -noZero -latestTime -processor)
|
||||||
|
|
||||||
# Clone the steady-state case to transient
|
# Clone the steady-state case to transient
|
||||||
cloneParallelCase steady transient 0 $latestTime
|
cloneParallelCase steady transient 0 $latestTime
|
||||||
@ -86,7 +86,7 @@ then
|
|||||||
|
|
||||||
# Do the transient case
|
# Do the transient case
|
||||||
\cp files/Allrun.transient transient/Allrun
|
\cp files/Allrun.transient transient/Allrun
|
||||||
(cd transient && foamRunTutorials)
|
(\cd transient && foamRunTutorials)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#------------------------------------------------------------------------------
|
#------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -14,7 +14,7 @@ FoamFile
|
|||||||
}
|
}
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
libs ("liblumpedPointMotion.so");
|
libs ("libmeshTools.so" "liblumpedPointMotion.so");
|
||||||
|
|
||||||
application pimpleFoam;
|
application pimpleFoam;
|
||||||
|
|
||||||
|
|||||||
@ -16,18 +16,19 @@ FoamFile
|
|||||||
|
|
||||||
solvers
|
solvers
|
||||||
{
|
{
|
||||||
|
"pcorr.*"
|
||||||
|
{
|
||||||
|
solver GAMG;
|
||||||
|
tolerance 1e-2;
|
||||||
|
relTol 0;
|
||||||
|
smoother GaussSeidel;
|
||||||
|
}
|
||||||
|
|
||||||
p
|
p
|
||||||
{
|
{
|
||||||
solver GAMG;
|
$pcorr;
|
||||||
tolerance 1e-7;
|
tolerance 1e-7;
|
||||||
relTol 0.01;
|
relTol 0.01;
|
||||||
smoother GaussSeidel;
|
|
||||||
nPreSweeps 0;
|
|
||||||
nPostSweeps 2;
|
|
||||||
cacheAgglomeration true;
|
|
||||||
agglomerator faceAreaPair;
|
|
||||||
nCellsInCoarsestLevel 10;
|
|
||||||
mergeLevels 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
"(cellDisplacement)"
|
"(cellDisplacement)"
|
||||||
|
|||||||
@ -17,13 +17,25 @@ channelDataDir=$channelCase/postProcessing/surfaces/inlet
|
|||||||
mkdir -p constant/boundaryData/inlet/0
|
mkdir -p constant/boundaryData/inlet/0
|
||||||
channelTimeDir=$(foamListTimes -case $channelCase -latestTime)
|
channelTimeDir=$(foamListTimes -case $channelCase -latestTime)
|
||||||
|
|
||||||
\cp -rf $channelDataDir/points constant/boundaryData/inlet
|
\cp -f $channelDataDir/points constant/boundaryData/inlet
|
||||||
\cp -rf $channelDataDir/$channelTimeDir/turbulenceProperties:R constant/boundaryData/inlet/0/R
|
\cp -f $channelDataDir/$channelTimeDir/turbulenceProperties:R constant/boundaryData/inlet/0/R
|
||||||
\cp -rf $channelDataDir/$channelTimeDir/turbulenceProperties:L constant/boundaryData/inlet/0/L
|
\cp -f $channelDataDir/$channelTimeDir/turbulenceProperties:L constant/boundaryData/inlet/0/L
|
||||||
\cp -rf $channelDataDir/$channelTimeDir/turbulenceProperties:nuTilda constant/boundaryData/inlet/0/nuTilda
|
\cp -f $channelDataDir/$channelTimeDir/turbulenceProperties:nuTilda constant/boundaryData/inlet/0/nuTilda
|
||||||
\cp -rf $channelDataDir/$channelTimeDir/U constant/boundaryData/inlet/0/U
|
\cp -f $channelDataDir/$channelTimeDir/U constant/boundaryData/inlet/0/U
|
||||||
|
|
||||||
runApplication blockMesh
|
runApplication blockMesh
|
||||||
runApplication decomposePar
|
runApplication decomposePar
|
||||||
runParallel $(getApplication)
|
runParallel $(getApplication)
|
||||||
|
|
||||||
|
if notTest $@
|
||||||
|
then
|
||||||
|
# create validation plot
|
||||||
|
# Test if gnuplot exists on the system
|
||||||
|
command -v gnuplot >/dev/null 2>&1 || {
|
||||||
|
echo "gnuplot not found - skipping graph creation" 1>&2
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
# Plot the mean velocity profiles
|
||||||
|
./plot $(foamListTimes -processor -latestTime)
|
||||||
|
fi
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
cd ${0%/*} || exit 1 # run from this directory
|
cd ${0%/*} || exit 1 # run from this directory
|
||||||
|
|
||||||
time=$1
|
time=$1
|
||||||
|
resultsDir="postProcessing/sample1/$time"
|
||||||
gnuplot<<EOF
|
gnuplot<<EOF
|
||||||
set terminal pngcairo font "arial,16" size 600,600
|
set terminal pngcairo font "arial,16" size 600,600
|
||||||
set xlabel "U/U_b"
|
set xlabel "U/U_b"
|
||||||
@ -11,42 +12,38 @@ gnuplot<<EOF
|
|||||||
set xrange [-0.5:1.5]
|
set xrange [-0.5:1.5]
|
||||||
set yrange [0:2]
|
set yrange [0:2]
|
||||||
Ub=1.10763
|
Ub=1.10763
|
||||||
|
|
||||||
set output "U_at_x_by_hm10.png"
|
set output "U_at_x_by_hm10.png"
|
||||||
plot \
|
plot "$resultsDir/xm10_U_UMean.xy" u (\$5/Ub):1 title "X/h = -1" w lines lc "black" lw 2
|
||||||
"postProcessing/sample/$time/xm10_U_UMean.xy" u (\$5/Ub):1 title "X/h = -1" w lines lc "black" lw 2
|
|
||||||
set output "U_at_x_by_hm05.png"
|
set output "U_at_x_by_hm05.png"
|
||||||
plot \
|
plot "$resultsDir/xm05_U_UMean.xy" u (\$5/Ub):1 title "X/h = -0.5" w lines lc "black" lw 2
|
||||||
"postProcessing/sample/$time/xm05_U_UMean.xy" u (\$5/Ub):1 title "X/h = -0.5" w lines lc "black" lw 2
|
|
||||||
set output "U_at_x_by_00.png"
|
set output "U_at_x_by_00.png"
|
||||||
plot \
|
plot "$resultsDir/x00_U_UMean.xy" u (\$5/Ub):1 title "X/h = 0" w lines lc "black" lw 2
|
||||||
"postProcessing/sample/$time/x00_U_UMean.xy" u (\$5/Ub):1 title "X/h = 0" w lines lc "black" lw 2
|
|
||||||
set output "U_at_x_by_05.png"
|
set output "U_at_x_by_05.png"
|
||||||
plot \
|
plot "$resultsDir/x05_U_UMean.xy" u (\$5/Ub):1 title "X/h = 0.5" w lines lc "black" lw 2
|
||||||
"postProcessing/sample/$time/x05_U_UMean.xy" u (\$5/Ub):1 title "X/h = 0.5" w lines lc "black" lw 2
|
|
||||||
set output "U_at_x_by_10.png"
|
set output "U_at_x_by_10.png"
|
||||||
plot \
|
plot "$resultsDir/x10_U_UMean.xy" u (\$5/Ub):1 title "X/h = 1" w lines lc "black" lw 2
|
||||||
"postProcessing/sample/$time/x10_U_UMean.xy" u (\$5/Ub):1 title "X/h = 1" w lines lc "black" lw 2
|
|
||||||
set output "U_at_x_by_15.png"
|
set output "U_at_x_by_15.png"
|
||||||
plot \
|
plot "$resultsDir/x15_U_UMean.xy" u (\$5/Ub):1 title "X/h = 1.5" w lines lc "black" lw 2
|
||||||
"postProcessing/sample/$time/x15_U_UMean.xy" u (\$5/Ub):1 title "X/h = 1.5" w lines lc "black" lw 2
|
|
||||||
set output "U_at_x_by_20.png"
|
set output "U_at_x_by_20.png"
|
||||||
plot \
|
plot "$resultsDir/x20_U_UMean.xy" u (\$5/Ub):1 title "X/h = 2" w lines lc "black" lw 2
|
||||||
"postProcessing/sample/$time/x20_U_UMean.xy" u (\$5/Ub):1 title "X/h = 2" w lines lc "black" lw 2
|
|
||||||
|
|
||||||
set output "U_at_x_by_25.png"
|
set output "U_at_x_by_25.png"
|
||||||
plot \
|
plot "$resultsDir/x25_U_UMean.xy" u (\$5/Ub):1 title "X/h = 2.5" w lines lc "black" lw 2
|
||||||
"postProcessing/sample/$time/x25_U_UMean.xy" u (\$5/Ub):1 title "X/h = 2.5" w lines lc "black" lw 2
|
|
||||||
|
|
||||||
set output "U_at_x_by_30.png"
|
set output "U_at_x_by_30.png"
|
||||||
plot \
|
plot "$resultsDir/x30_U_UMean.xy" u (\$5/Ub):1 title "X/h = 3" w lines lc "black" lw 2
|
||||||
"postProcessing/sample/$time/x30_U_UMean.xy" u (\$5/Ub):1 title "X/h = 3" w lines lc "black" lw 2
|
|
||||||
|
|
||||||
set output "U_at_x_by_35.png"
|
set output "U_at_x_by_35.png"
|
||||||
plot \
|
plot "$resultsDir/x35_U_UMean.xy" u (\$5/Ub):1 title "X/h = 3.5" w lines lc "black" lw 2
|
||||||
"postProcessing/sample/$time/x35_U_UMean.xy" u (\$5/Ub):1 title "X/h = 3.5" w lines lc "black" lw 2
|
|
||||||
|
|
||||||
set output "U_at_x_by_40.png"
|
set output "U_at_x_by_40.png"
|
||||||
plot \
|
plot "$resultsDir/x40_U_UMean.xy" u (\$5/Ub):1 title "X/h = 4" w lines lc "black" lw 2
|
||||||
"postProcessing/sample/$time/x40_U_UMean.xy" u (\$5/Ub):1 title "X/h = 4" w lines lc "black" lw 2
|
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|||||||
@ -8,7 +8,6 @@ if notTest $@
|
|||||||
then
|
then
|
||||||
models="
|
models="
|
||||||
kOmegaSST
|
kOmegaSST
|
||||||
kEpsilon
|
|
||||||
"
|
"
|
||||||
|
|
||||||
declare -A grading_vs_yp
|
declare -A grading_vs_yp
|
||||||
|
|||||||
Reference in New Issue
Block a user