Author |
Message |
Pete Kim (don_tron)
New member Username: don_tron
Post Number: 2 Registered: 11-2003
| Posted on Wednesday, November 26, 2003 - 03:39 am: | |
Hi all, I solve the following (simple and linear!) problem for diffusion equation: title "Dynamics of mass transfer" select errlim=1.e-4 {SENSITIVITY=0.2 } SMOOTHINIT variables u(range=0,1) definitions a1= 6.2e-7 a2= 6.2e-7 L = 0.005 {domain length} R = 0.005 {domain widht} alf = 1.76e-6 u0 = 0.3 ue = 0.09 endtime=10 dtime=0.1 tau=10 uext=ue {+(u0-ue)*exp(-t/tau)} uave = VOL_INTEGRAL(u)/(L*R) dslog=log10( abs( (uave-uext) / (1+uext) ) ) initial value u = u0 equations dt(u) = dx(a1*dx(u))+dy(a2*dy(u)) boundaries region 1 start(0,0) natural(u) = 0 line to (L,0) natural(u) = -alf*(u - uext)/a1 line to (L,R) natural(u) = -alf*(u - uext)/a2 line to (0,R) natural(u) = 0 line to finish time 0 to endtime by dtime plots for t = 0 by dtime to endtime elevation(u) from (0,R/2) to (L,R/2) range=(0,1) as "Water concentration u(x,t)" contour(u) HISTORIES HISTORY(uave) as "Mean water concentration" HISTORY(dslog) as "Log10((uave-ue)/(1+ue))" end 62162 but FLEXPDE dont integrate this problem in long time (t)! |
Robert G. Nelson (rgnelson)
Moderator Username: rgnelson
Post Number: 65 Registered: 06-2003
| Posted on Wednesday, November 26, 2003 - 02:24 pm: | |
You have the sign wrong on the natural boundary condition. You have programmed an inward flux proportional to the surface value, so the solution is an exponentiating catastrophe. With all terms moved to the left, you have essentially the equation dt(u)-dxx(u) = 0. The natural BC for this equation is the outward normal component of -dx(u), or the outward flux. Your natural BC gives the value of this flux as -alpha*u+F0, which is an inward flux proportional to u.
|
|