Navigation:  Sample Problems > applications > fluids >

vector_swirl

Print this Topic Previous pageReturn to chapter overviewNext page

{  VECTOR_SWIRL.PDE

 

 This is a modification of the example SWIRL.PDE to use vector variables.

}

 

TITLE 'Swirling cylindrical flow'

 

COORDINATES

 ycylinder ('r','z')

 

VARIABLES

 V(0.001)  = vector(vr, vz, vt)        

 p(0.001) { pressure, with linear interpolation and minimum expected range  }

 

DEFINITIONS

 rad=0.01   { vial radius }

 ht=0.035   { vial height }

 

 dens=1000     { fluid density }

 visc=0.001   { fluid viscosity }

 

 vm=magnitude(V)

 

 div_v=  div(V)   { velocity divergence }

 

 PENALTY = 1e4*visc/rad^2 { the phony equation of state coefficient }

 

 band = ht/20 { height of force band }

 bf = 1000     { arbitrary body-force scaling }

 f             { stirbar force - assigned by region later }

 rpm =staged(50,100,150)   { several stirring speeds }

 vimp = 2*pi*r*rpm/60     { impeller velocity }

 vr0 = 0.2*vimp   { arbitrary partition of stirring velocity }

 vt0 = 1.0*vimp  

 vz0 = 0.3*vimp  

 V0 = vector(vr0, vz0, vt0)

 

 mass_balance = div_v/integral(1)

 

INITIAL VALUES

 vr=0

 vz=0

 vt=0

 p=0

 

EQUATIONS

 V: dens*dot(V,grad(V)) + grad(p) - visc*div(grad(V)) = F*(V0-V)

 p: div(grad(p)) =  penalty*div_v

 

BOUNDARIES

 

Region 'domain'

   F=0

  Start 'outer' (0,0)

    { mirror conditions on bottom boundary }

    natural(vr)=0 natural(vt)=0   value(vz)=0   natural(p)=0 line to (rad,0)

    { no slip on sides (ie, velocity=0)  }

    value(vr)=0   value(vt)=0     value(vz)=0   natural(p)=0 line to (rad,ht)

    { zero pressure and no z-flow on top, but free vr and vt }

    natural(vr)=0 natural(vt)=0   value(vz)=0   value(p)=0   line to (0,ht)

    { no radial or tangential velocity on spin axis }

    value(vr)=0   value(vt)=0     natural(vz)=0 natural(p)=0 line to close

Region "impeller"

   F=bf

  Start(0,0) line to (0.9*rad,0) to (0.9*rad,band) to (0,band) to close

{ add a gridding feature to help resolve the shear layer at the wall }

Feature start(0.95*rad,0) line to (0.95*rad,ht)

 

 

MONITORS

contour(vr) as "Radial Velocity" report(rpm)

contour(vt) as "Swirling Velocity" report(rpm)

contour(vz) as "Axial Velocity" report(rpm)

elevation(vt,v0) from(0,0) to (rad,0) as "Impeller Velocity" report(rpm)

contour(p) as "Pressure"

vector(vr,vz) as "R-Z Flow"

 

PLOTS

contour(vr) as "Radial Velocity" report(rpm)

contour(vt) as "Swirling Velocity" report(rpm)

contour(vz) as "Axial Velocity" report(rpm)

contour(vm) as "Velocity Magnitude" report(rpm)

contour(p) as "Pressure" report(rpm)

vector(vr,vz) norm as "R-Z Flow" report(rpm)

contour(mass_balance) report(rpm)

elevation(vr) from (0,0) to (rad,0) as "Radial Velocity"   report(rpm)

elevation(vt) from (0,0) to (rad,0) as "Swirling Velocity" report(rpm)

elevation(vz) from (0,0) to (rad,0) as "Axial Velocity" report(rpm)

elevation(vt,v0) from(0,0) to (rad,0) as "Impeller Velocity" report(rpm)

elevation(vm) from (0,0) to (rad,0) as "Velocity Magnitude" report(rpm)

elevation(vr) from (0,ht/2) to (rad,ht/2) as "Radial Velocity"   report(rpm)

elevation(vt) from (0,ht/2) to (rad,ht/2) as "Swirling Velocity" report(rpm)

elevation(vz) from (0,ht/2) to (rad,ht/2) as "Axial Velocity" report(rpm)

elevation(vm) from (0,ht/2) to (rad,ht/2) as "Velocity Magnitude" report(rpm)

elevation(vr) from (0,0.9*ht) to (rad,0.9*ht) as "Radial Velocity"   report(rpm)

elevation(vt) from (0,0.9*ht) to (rad,0.9*ht) as "Swirling Velocity" report(rpm)

elevation(vz) from (0,0.9*ht) to (rad,0.9*ht) as "Axial Velocity" report(rpm)

elevation(vm) from (0,0.9*ht) to (rad,0.9*ht) as "Velocity Magnitude" report(rpm)

elevation(vm) from (rad/2,0) to (rad/2,ht) as "Velocity Magnitude" report(rpm)

 

END

 


Page url: index.html?applications_fluids_vector_swirl.html