|
Front |
Top Previous Next |
|
{ FRONT.PDE This problem demonstrates the use of the FRONT statement to create a dense mesh at a moving front }
title 'FRONT statement in Chemical Reactor'
select painted { make color-filled contour plots }
variables Temp (threshold=1) C (threshold=1)
definitions Lz = 1 r1=1 heat=0 gamma = 16 beta = 0.2 betap = 0.3 BI = 1 T0 = 1 TW = 0.92 RC = (1-C)*exp(gamma-gamma/Temp) { the very nasty reaction rate } xev=0.96 { some plot points } yev=0.25
initial value Temp=T0 C=0
equations Temp: div(grad(Temp)) + heat + betap*RC = dt(Temp) C: div(grad(C)) + beta*RC = dt(C)
boundaries region 1 start (0,0)
natural(Temp) = 0 natural(C) = 0 line to (r1,0) { a mirror plane on X-axis }
{ "Strip Heater" at fixed temperature } value(Temp)=T0 + 0.2*uramp(t,t-0.05) { ramp the boundary temp, because discontinuity is costly to diffuse }
natural(C)=0 { ... and no mass flow } arc(center=0,0) angle 5 { ... on outer arc }
natural(Temp)=BI*(TW-Temp) { convective cooling } natural(C)=0 { ... and no mass flow } arc(center=0,0) angle 85 { ... on outer arc }
natural(Temp) = 0 natural(C) = 0 line to (0,0) to close { another mirror plane on Y-axis }
time 0 to 1
front(C-0.5, 0.1) { FORCE CELLS TO SPAN NO MORE THAN 0.1 ACROSS C=0.5 }
plots for cycle=10 { watch the fast events by cycle } grid(x,y) contour(Temp) contour(C) as "Completion"
for t= 0.2 by 0.05 to 0.3 { show some surfaces during burn } surface(Temp) surface(C) as "Completion"
histories history(Temp,C) at (0,0) (xev/2,yev/2) (xev,yev) (yev/2,xev/2) (yev,xev)
end |