Example4.12 rev 1.mw

Example 4.12 

Consider the transient diffusion in a rectangle in which the diffusivity varies linearly as a function of concentration.[10] The governing equation is:    

 

 

Typesetting:-mrow(Typesetting:-mo(  

                               

                                                                               u(x,0) =0                                                        (4.1.23) 

 

Typesetting:-mrow(Typesetting:-mo((0,t) = 1 and u(∞,t) is defined  

 

 

 

The following transformation is used to combine the variable:[7] 

 

                                              η=  Typesetting:-mfrac(Typesetting:-mrow(Typesetting:-mi(                                                            (4.1.24) 

 

The variable u in the new coordinate η is represented by U.  The governing equation (ordinary differential equation) for U is obtained by converting the time and spatial derivative in equation(4.1.23) (partial differential equation) to derivatives in the η coordinate.  The boundary conditions for U are: 

                                               U(0)=1 

                                                                                                                                                     (4.1.25) 

 

                                                                        U(∞)=0 

 

The governing equation for U is then solved with the above boundary conditions to obtain the final solution.  Example 4.12 is solved in Maple below: 

> restart:
 

> with(student):
 

> with(plots):
 

The governing equation is entered here: 

> eq:=diff(u(x,t),t)-diff(((1+u(x,t))*diff(u(x,t),x),x));
 

`+`(diff(u(x, t), t), `-`(`*`(`^`(diff(u(x, t), x), 2))), `-`(`*`(`+`(1, u(x, t)), `*`(diff(diff(u(x, t), x), x))))) (1)
 

> eq1:=changevar(u(x,t)=U(eta(x,t)),eq):
 

> eq2:=expand(simplify(subs(eta(x,t)=x/2/(t)^(1/2),eq1))):
 

> eq2:=expand(eq2*t):
 

> eq2:=subs(x=eta*2*(t)^(1/2),eq2):
 

> eq2:=convert(eq2,diff):
 

The governing equation in the combined variable is: 

> eq2:=expand(-2*eq2);
 

`+`(`*`(diff(U(eta), eta), `*`(eta)), `*`(`/`(1, 2), `*`(`^`(diff(U(eta), eta), 2))), `*`(`/`(1, 2), `*`(diff(diff(U(eta), eta), eta))), `*`(`/`(1, 2), `*`(diff(diff(U(eta), eta), eta), `*`(U(eta))))) (2)
 

> bc1:=U(0)=1;
 

U(0) = 1 (3)
 

The length of the domain is taken to be 5: 

> bc2:=U(5)=0;
 

U(5) = 0 (4)
 

The nonlinear equation is solved numerically and plotted: 

> sol:=dsolve({eq2,bc1,bc2},U(eta),type=numeric);
 

proc (x_bvp) local res, data, solnproc, ndsol, outpoint, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; `:=`(_EnvDSNumericSaveDigits, Digits); `:=`(Digits, 14); if _EnvInF... (5)
 

> odeplot(sol,[eta,U(eta)],0..5,axes=boxed,title="Figure Exp. 4.1.25.",thickness=4);
 

Plot_2d
 

>