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:

u(x,0) =0 (4.1.23)

(0,t) = 1 and u(∞,t) is defined

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

η= (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));

| (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);

| (2)

> | bc1:=U(0)=1;

| (3)

The length of the domain is taken to be 5:

> | bc2:=U(5)=0;

| (4)

The nonlinear equation is solved numerically and plotted:

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

| (5)

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

> |