3 2 GfsSimulation GfsBox GfsGEdge {} {
Global {
}
Time { end = 1.6 }
Refine (x < -0.5 + length && R2(y,z) < 2.*radius*radius ? level : 5)
Variable T0
InitFraction T0 (radius*radius - R2(y,z))
VariableTracerVOF T
VariableCurvature K T Kmax
SourceTension T 0.00003 K
SourceViscosity 2.*radius/Re*rho(T)
PhysicalParams { alpha = 1./rho(T) }
AdaptFunction { istep = 1 } {
minlevel = 0
maxlevel = level
} (T > 0 && T < 1)
Init {} {
T = (x < -0.5 + length ? T0 : 0)
U = T
}
EventBalance { istep = 1 } 0.1
OutputTime { istep = 1 } log
OutputBalance { istep = 1 } log
OutputProjectionStats { istep = 1 } log
OutputTiming { istep = 100 } log
GModule gfsview
OutputView { step = 4e-3 } { ppm2theora -s 640x480 > jet.ogv } {
format = PPM width = 1280 height = 960
} jet.gfv
OutputView { step = 4e-3 } { ppm2theora -s 640x480 > back.ogv } {
format = PPM width = 1280 height = 960
} back.gfv
EventScript { istep = 100 } { rm -f snapshot-*.gfs }
OutputSimulation { istep = 100 } snapshot-%ld.gfs { }
OutputView { start = end } jet.ppm { format = PPM width = 1280 height = 960 } jet.gfv
OutputView { start = end } back.ppm { format = PPM width = 1280 height = 960 } back.gfv
EventScript { start = end } {
for f in jet back; do
convert $f.ppm -geometry 640x480 $f.png
convert $f.png $f.eps
rm -f $f.ppm
done
awk '{if ($1 == "step:") t = $4;
else if ($1 == "domain") print t,$3,$5,$9;}' < log > balance
cat <<EOF | gnuplot
set term postscript eps color lw 2 20 solid
set output 'balance.eps'
set xlabel 'Time'
set ylabel 'Number of cells per processor'
plot [0:1.6]'balance' u 1:2 w l t 'Minimum', \
'balance' u 1:3 w l t 'Average', \
'balance' u 1:4 w l t 'Maximum'
EOF
}
}
GfsBox { pid = 0
top = Boundary
bottom = Boundary
back = Boundary
front = Boundary
left = Boundary {
BcDirichlet U T0*(1. + 0.05*sin (10.*2.*M_PI*t))
BcDirichlet T T0
BcDirichlet V 0
BcDirichlet W 0
}
}
GfsBox { pid = 0
top = Boundary
bottom = Boundary
back = Boundary
front = Boundary
}
GfsBox { pid = 1
top = Boundary
bottom = Boundary
back = Boundary
front = Boundary
right = BoundaryOutflow
}
1 2 right
2 3 right