{ 3D_VECTOR_FLOWBOX.PDE
This is a modification of the example 3D_FLOWBOX.PDE to use vector variables.
This problem demonstrates the use of FlexPDE in 3D fluid flow. It shows the flow of
fluid through a plenum box with a circular inlet at the bottom and an offset circular
outlet at the top. The inlet pressure is arbitrarily set at 0.05 units.
The problem runs in two stages, first as a massless fluid to get an initial pressure
and velocity distribution in a linear system, and then with momentum terms included.
Adaptive mesh refinement is turned off for speed in demonstration. In a real application,
regridding could be used to better resolve the flow past the corners of the ducts.
The solution uses a "penalty pressure", in which the pressure variable is used merely
to guarantee mass conservation.
}
title '3D flow through a plenum'
coordinates
cartesian3
variables
v(1e-6) = vector(vx,vy,vz)
p
select
ngrid=20
stages=2
regrid=off
definitions
long = 2
wide = 1
high = 1/2
xin = -1 yin = 0
xout = 1 yout = 0
rc = 0.5
duct = 0.2
dens=staged(0,1) { fluid density }
visc= 0.01 { fluid viscosity }
vm=magnitude(v)
div_v = dx(vx) + dy(vy) + dz(vz)
PENALTY = 1e4*visc/high^2
Pin = 0.05
Pout = 0
INITIAL VALUES
v = vector(0,0,0)
p=Pin+(Pout-Pin)*(z+high+duct)/(2*high+2*duct)
EQUATIONS
v: dens*dot(v,grad(v)) + grad(p) - visc*div(grad(v)) = 0
p: div(grad(p)) = PENALTY*div_v
extrusion z = -high-duct,-high,high,high+duct
boundaries
Region 1 { plenum box }
surface 2 value(v) = vector(0,0,0) natural(p)=0
surface 3 value(v) = vector(0,0,0) natural(p)=0
layer 1 void
layer 3 void
start(-long,-wide)
value(v) = vector(0,0,0) natural(p)=0 { fix all side values }
line to (long,-wide)
to (long,wide)
to (-long,wide)
to close
limited Region 2 { input hole }
layer 1
surface 1 natural(v) = vector(0,0,0) value(p)=Pin { input duct opening }
start(xin,yin-rc)
layer 1 value(v) = vector(0,0,0) natural(p)=0 { duct sidewall drag }
arc(center=xin,yin) angle=360
limited Region 3 { exit hole }
layer 3
surface 4 natural(v) = vector(0,0,0) value(p)=Pout { output duct opening }
start(xout,yout-rc)
layer 3 value(v) = vector(0,0,0) natural(p)=0 { duct sidewall drag }
arc(center=xout,yout) angle=360
monitors
contour(vx) on x=0 report dens report pin
contour(vx) on y=0 report dens report pin
contour(vz) on y=0 report dens report pin
vector(vx,vz)on y=0 report dens report pin
contour(vx) on z=0 report dens report pin
contour(vy) on z=0 report dens report pin
contour(vz) on z=0 report dens report pin
vector(vx,vy)on z=0 report dens report pin
contour(p) on y=0 report dens report pin
plots
contour(vx) on x=0 report dens report pin
contour(vx) on y=0 report dens report pin
contour(vz) on y=0 report dens report pin
vector(vx,vz)on y=0 report dens report pin
contour(vx) on z=0 report dens report pin
contour(vy) on z=0 report dens report pin
contour(vz) on z=0 report dens report pin
vector(vx,vy)on z=0 report dens report pin
contour(p) on y=0 report dens report pin
end
Page url: index.html?applications_fluids_3d_vector_flowbox.html