<< Click to Display Table of Contents >> vector_lowvisc |
{ VECTOR_LOWVISC.PDE
This example is an implementation of LOWVISC.PDE using vector variables.
}
title 'Viscous flow in 2D channel, Re > 40'
select errlim = 0.005
variables
vel(0.01) = vector(u,v)
p(1)
definitions
Lx = 5 Ly = 1.5
Gx = 0 Gy = 0
p0 = 2
speed2 = u^2+v^2
speed = sqrt(speed2)
dens = 1
visc = 0.04
vxx = -(p0/(2*visc*(2*Lx)))*(Ly^2-y^2) { open-channel x-velocity }
rball = 0.4
cut = 0.1 { value for bevel at the corners of the obstruction }
penalty = 100*visc/rball^2
Re = globalmax(speed)*(Ly/2)/(visc/dens)
initial values
vel = vector(0.5*vxx ,0)
p = p0*(Lx+x)/(2*Lx)
equations
vel: visc*div(grad(vel)) - grad(p) = dens*dot(vel,grad(vel))
p: div(grad(p)) = penalty*div(vel)
Boundaries
region 1
start(-Lx,0)
load(u) = 0 value(v) = 0 load(p) = 0
line to (Lx/2-rball,0)
value(vel)=vector(0,0) load(p)= 0
line to (Lx/2-rball,rball) bevel(cut)
to (Lx/2+rball,rball) bevel(cut)
to (Lx/2+rball,0)
load(u) = 0 value(v) = 0 load(p) = 0
line to (Lx,0)
load(u) = 0 value(v) = 0 value(p) = p0
line to (Lx,Ly)
value(vel)=vector(0,0) load(p) = 0
line to (-Lx,Ly)
load(u) = 0 value(v) = 0 value(p) = 0
line to close
monitors
contour(speed)
plots
contour(u) report(Re)
contour(v) report(Re)
contour(speed) painted report(Re)
vector(u,v) as "flow" report(Re)
contour(p) as "Pressure" painted
contour(dx(u)+dy(v)) as "Continuity Error"
elevation(u) from (-Lx,0) to (-Lx,Ly)
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)
end