3 2 GfsSimulation GfsBox GfsGEdge {} {
Time { end = 10 }
Global {
}
Solid S60-scaled.gts { ty = 0.5 }
RefineSolid LEVEL
RefineSurface { return 4; } (1e-4 - z)
VariableTracerVOF T
VariableFiltered T1 T 1
Init {} { U = FROUDE }
InitFraction T (1e-4 - z)
PhysicalParams { alpha = 1./VAR(T1,RATIO,1.) }
VariablePosition Z T z
SourceTension T -3.*(1. - RATIO) Z
Source U (x > -0.375 ? 0 : 10.*(FROUDE - U))
AdaptFunction { istep = 1 } {
cmax = 1e-2
maxlevel = (x < 1.5 ? LEVEL : 4)
minlevel = 4
} {
return (T > 0.)*fabs (Vorticity)*ftt_cell_size (cell)/FROUDE;
}
OutputSolidForce { istart = 1 istep = 1 } f
OutputTime { istep = 1 } stderr
OutputBalance { istep = 1 } stderr
OutputProjectionStats { istep = 1 } stderr
OutputTiming { istep = 10 } stderr
OutputSimulation { istep = 5 end = 4 } stdout
EventScript { istep = 5 end = 4 } { echo "Save stdout { width = 1600 height = 1200 }" }
OutputSimulation { start = 1 step = 1 } sim-%g.gfs
EventScript { start = 1 step = 1 } { gzip -f -q sim-*.gfs }
EventScript { start = 10 } {
echo "Save stdout { width = 1600 height = 1200 }" | \
gfsview-batch3D sim-10.gfs.gz closeup.gfv | \
convert -colors 256 ppm:- closeup.eps
echo "Save stdout { width = 1600 height = 1200 }" | \
gfsview-batch3D sim-10.gfs.gz front.gfv | \
convert -colors 256 ppm:- front.eps
echo "Save stdout { width = 800 height = 600 }" | \
gfsview-batch3D sim-10.gfs.gz comparison.gfv | \
convert -trim ppm:- comparison.ppm
convert tank-data.png tank-data.ppm
montage -geometry +0+0 -tile 1x2 tank-data.ppm comparison.ppm png:- | \
convert -colors 256 png:- comparison.eps
cat <<EOF | gnuplot
set term postscript eps lw 3 solid 20 colour
set output 'f.eps'
set xlabel 'Time'
set ylabel 'Force'
plot 'f' u 1:(\$2*2.) every 10 w l t 'Drag', 'f' every 10 u 1:(\$4*2.) w l t 'Lift'
EOF
}
}
GfsBox {
left = Boundary {
BcDirichlet P 0
BcDirichlet V 0
BcDirichlet W 0
BcNeumann U 0
BcNeumann T 0
}
top = Boundary
bottom = Boundary
}
GfsBox {
top = Boundary
bottom = Boundary
}
GfsBox {
right = Boundary {
BcDirichlet P 0
BcDirichlet V 0
BcDirichlet W 0
BcNeumann U 0
BcNeumann T 0
}
top = Boundary
bottom = Boundary
}
1 2 right
2 3 right