Plot of Concentration Solution

M.M. Yovanovich

PLOTSOLN1P4.MWS

Plot of concentration solution of Chapter 13, Section 1.4.

> restart:

General term of the solution.

> term:= 2/Pi*(C0-C1)*sin(n*Pi/2)/n*exp(-n^2*Pi^2*tau)*cos(n*Pi*xi);

[Maple Math]

Set the concentrations in the two parts.

> C0:= 100; C1:= 50;

[Maple Math]

[Maple Math]

Set the number of terms of the summation and the dimensionless time.

> nmax:= 200; tau:= 0.01;

[Maple Math]

[Maple Math]

The partial summation for the solution.

> C:= (C0+C1)/2 + sum(term, n=1..nmax):

Plot of the solution.

> plot(C, xi=0..1);

[Maple Plot]

>

The concentration at the midpoint [Maple Math] is equal to the average value for all time.