michael 2007-9-4 10:59
Narrow Gaps
[size=2]I've attached the code "Boundary_Prob" which includes a 2-d cylinder being pushed by fluid through a 2-d tube. The cylinder is rather close to the edge of the tube and there is a gap there of about .0001 units. In this case it seems that FlexPDE assumes the cylinder and wall of the tube are connected as is evidenced by the plot elevation(u) around the cylinder. In particular, since the plot elevation(u) around the cylinder has only one point where u is zero (and everywhere else u has magnitude significantly larger than 0), it seems FlexPDE simply connects the very bottom point of the sphere to the tube and leaves everything else alone. i8CA oQ ls$[.d.q
%M*Z$xs)G.v1C)i~
For the codes that I am running, inevitably the "cylinder" will get very close to the edges of the "tubes". When it does so, it is unrealistic for the velocities of the points nearest the wall to be zero.
cCw&d5sf
D$[M6[wY;f
It seems there is a tolerance which, when the gap between two boundaries is narrower than that tolerance, the two boundaries are joined (in some way). If there is, what is that tolerance and can it be changed? (In the problem I've sent you, the tolerance appears to be .001 but I don't know if that tolerance will change in my other codes...e.g. is it an absolute tolerance or a relative tolerance depending on the size of the geometry being considered.)
h-gzo9s&W_
R6h2i
t3gW
Are there any other suggestions that can be made for how to fix this sort of problem? [/size]4c7F&|fC*f
y
[size=2][/size] Zj!c)QyE
f6n aW4S
[quote]
.BG-|7N]6nU
title 'Viscous flow in 2D channel, Re < 0.1'variables u(0.1) v(0.01) p(1)scalar variables um vm omegadefinitions Lx = 1 Ly = 1 Gx = 0 Gy = 0 p0 = 1 speed2 = u^2+v^2 speed = sqrt(speed2) dens = 1 visc = 1 vxx = (p0/(2*visc*Lx))*(Ly-y)^2 { open-channel x-velocity } rball=0.25 cut = 0.05 { cut the corners of the obstruction } myshift = .25-.00099 xm1 = Lx/2 ym1 = Ly/2-myshift penalty = 100*visc/rball^2 { "equation of state" } sigma11 = 2*visc*dx(u)-p sigma21 = visc*(dy(u)+dx(v)) sigma12 = visc*(dx(v)+dy(u)) sigma22 = 2*visc*dy(v)-p TotForX = line_integral(normal(sigma11,sigma12),'myball') TotForY = line_integral(normal(sigma21,sigma22),'myball') TotTor = line_integral(cross(vector(normal(sigma11,sigma12),normal(sigma21,sigma22)),vector(x-xm1,y-ym1)),'myball')initial values u = 0.5*vxx v = 0 p = p0*x/Lxequations u: div(grad(u)) - dx(p)/visc = dens*(u*dx(u) + v*dy(u))/visc v: div(grad(v)) - dy(p)/visc = dens*(u*dx(v) + v*dy(v))/visc p: div(grad(p)) = penalty*(dx(u)+dy(v)) um: TotForX = 0 vm: TotForY = 0 omega: TotTor = 0Boundaries region 1 start(0,0) value(u) = 0 value(v) = 0 load(p) = 0 line to (Lx,0) load(u) = 0 value(p) = p0 line to (Lx,Ly) value(u) = 0 value(v) = 0 load(p) =0 line to (0,Ly) load(u) = 0 value(p) = 0 line to finishexcludestart 'myball' (xm1+rball,ym1) value(u)=um-(y-ym1)*omega value(v)=vm+(x-xm1)*omega nobc(p) arc(center=xm1,ym1) angle = 360monitors contour(speed)plots grid(x,y) contour(u) contour(v) contour(speed) painted vector(u,v) as "flow" contour(p) as "Pressure" painted contour(dx(u)+dy(v)) as "Continuity Error" contour(p) zoom(Lx/2,0,1,1) as "Pressure" elevation(u) from (0,0) to (0,Ly) elevation(u) from (Lx/2,0) to (Lx/2,Ly) elevation(u) from (Lx,0) to (Lx,Ly) elevation(u) on 'myball' elevation(v) on 'myball' elevation(p) on 'myball'end[/quote]
michael 2007-9-4 11:00
[size=2]In version 5.0.18, we implemented a controllable merge distance with the selector MERGEDIST.
;so7NQ.qz#`
h~p6z8G;a/]~
Apparently, we did not get all the merge tests modified, and this control does not work in your problem (because the critical measurement is the closest distance between a line and an arc, and this test appears not to use the user mergedist). W)weZ2bs
#m^:STQ0G#]9qcC2m
However, if you break the bottom line of the outer boundary at a point directly below the circle, the test becomes joint-to-joint proximity, and works correctly.
s3jUf)wr
7@]9QNSig
(We will complete the implementation of MERGEDIST in version 5.0.19)