Commit 9a8d64ce authored by Ned Coltman's avatar Ned Coltman
Browse files

[gnuplot][script] add script to run all turbulence models and plot results

parent 34003236
add_input_file_links()
dune_symlink_to_source_files(FILES references)
dune_symlink_to_source_files(FILES references scripts)
add_executable(test_ff_rans_lauferpipe_kepsilon EXCLUDE_FROM_ALL main.cc)
target_compile_definitions(test_ff_rans_lauferpipe_kepsilon PUBLIC "KEPSILON=1")
......
reset
set term pngcairo size 800,600 solid
set output "./LawOfTheWall.png"
set datafile separator ','
DATA='./'
set xlabel "y^+ [-]"
set ylabel "u_+ [-]"
set yrange [0:25]
set log x
set xrange [1:1100]
set key right bottom samplen 1
set arrow from 5,0 to 5,25 lc rgb 'gray70' nohead
set arrow from 30,0 to 30,25 lc rgb 'gray70' nohead
plot './references/laufer_re50000_u+y+.csv' u 1:2 w p t 'Laufer 1954, Re=50000',\
DATA.'lauferpipe_kepsilon.csv' u 11:12 w l lc rgb "red" t 'KEpsilon with u_{tau}',\
DATA.'lauferpipe_kepsilon.csv' u 15:16 w l lc rgb "orange" t 'KEpsilon with u_{tau,nom}',\
DATA.'lauferpipe_lowrekepsilon.csv' u 11:12 w l lc rgb "yellow" t 'Low Re KEpsilon',\
DATA.'lauferpipe_komega.csv' u 11:12 w l lc rgb "green" t 'KOmega',\
DATA.'lauferpipe_oneeq.csv' u 11:12 w l lc rgb "cyan" t 'OneEq',\
DATA.'lauferpipe_zeroeq.csv' u 11:12 w l lc rgb "purple" t 'ZeroEq',\
1/0.41*log(x)+5 w l lc rgb 'gray10',\
x w l lc rgb 'gray40
DATA="."
SCRIPT="../../../../bin/postprocessing/extractlinedata.py"
runSim () {
./$1 $INPUT -Problem.Name $2 | tee -a logfile.out
input=`ls -ltr lauferpipe*vtu | tail -n 1 | awk '{print $9}'`
echo $input" -> "$2 | tee -a logfile.out
pvpython $SCRIPT -f $input -o $DATA -of $2 -p1 $P1 -p2 $P2 -v 2 -r 10000 | tee -a logfile.out
}
### lauferpipe
INPUT=params_verbose.input
P1="8.0 0.0 0.0"
P2="8.0 0.12345 0.0"
runSim test_ff_rans_lauferpipe_kepsilon lauferpipe_kepsilon
runSim test_ff_rans_lauferpipe_komega lauferpipe_komega
runSim test_ff_rans_lauferpipe_lowrekepsilon lauferpipe_lowrekepsilon
runSim test_ff_rans_lauferpipe_oneeq lauferpipe_oneeq
runSim test_ff_rans_lauferpipe_zeroeq lauferpipe_zeroeq
gnuplot scripts/lawofthewall.gp
gnuplot scripts/velocitydistribution.gp
reset
set term pngcairo size 800,600 solid
set output "./VelocityDistribution.png"
set datafile separator ','
DATA='./'
set xlabel "v_x/v_{x,max} [-]"
set ylabel "y [-]"
set yrange [0:0.5]
set key left center samplen 1
plot './references/laufer_re50000.csv' u 2:1 w p t 'Laufer 1954, Re=50000' ,\
DATA.'lauferpipe_kepsilon.csv' u 6:($29/0.2456) w l lc rgb "red" t 'KEpsilon',\
DATA.'lauferpipe_lowrekepsilon.csv' u 6:($25/0.2456) w l lc rgb "orange" t 'Low Re KEpsilon',\
DATA.'lauferpipe_komega.csv' u 6:($25/0.2456) w l lc rgb "green" t 'KOmega',\
DATA.'lauferpipe_oneeq.csv' u 6:($24/0.2456) w l lc rgb "cyan" t 'OneEq',\
DATA.'lauferpipe_zeroeq.csv' u 6:($23/0.2456) w l lc rgb "purple" t 'ZeroEq'
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment