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);
Set the concentrations in the two parts.
> C0:= 100; C1:= 50;
Set the number of terms of the summation and the dimensionless time.
> nmax:= 200; tau:= 0.01;
The partial summation for the solution.
> C:= (C0+C1)/2 + sum(term, n=1..nmax):
Plot of the solution.
> plot(C, xi=0..1);
>
The concentration at the midpoint is equal to the average value for all time.