Define A0 0.5
Define U0 1.
1 0 GfsAxi GfsBox GfsGEdge {} {
Time { end = 100 }
PhysicalParams { L = 50 }
Refine 4
Refine (LEVEL + 1./50.*(x*x + y*y)*(4. - LEVEL))
Solid (ellipse (0., 0., A0, A0))
SourceViscosity 1./RE
Init {} { U = U0 }
AdaptGradient { istep = 1 } { cmax = 5e-2 maxlevel = LEVEL } U
AdaptGradient { istep = 1 } { cmax = 5e-2 maxlevel = LEVEL } V
AdaptFunction { istep = 1 } { cmax = 1e-2 maxlevel = LEVEL } {
return (fabs(dx("U"))+fabs(dy("U")))/fabs(U)*ftt_cell_size (cell);
}
EventStop { step = 0.1 } U 1e-3 DU
OutputSimulation { start = end } end-LEVEL-RE.gfs
OutputLocation { step = 0.1 } {
awk 'BEGIN { t = 2.; oldl = -1.; oldt = 0.; } {
if ($1 != t) { t = $1; x1 = $2; u1 = $7; }
else {
x2 = $2; u2 = $7;
if (u1 <= 0. && u2 > 0.) {
l = (u1*x2 - u2*x1)/(u1 - u2) - A0;
dl = (l - oldl)/(t - oldt);
print t, l, dl;
fflush (stdout);
oldl = l;
oldt = t;
}
x1 = x2; u1 = u2;
}
}' > l-LEVEL-RE
} axis
}
GfsBox {
left = Boundary { BcDirichlet U U0 }
right = BoundaryOutflow
bottom = Boundary
}