Takeo2801

10 Reputation

One Badge

7 years, 278 days

MaplePrimes Activity


These are questions asked by Takeo2801

I am now working on differential equations like the following, and wonder how I can deal with diff(C(x,t),x).  In particular, I would like to know the values of diff(C(x,t),x) at specific sets of (x, t).  I also would like to know how to integrate diff(C(x,t),x) for a time period (at x = 0.5L or x = L).

 

restart;

C0 := 10;

K  := 3.0e6;

d  := 5.0E-14;

hm := 5.0E-4;

L  := 0.001;

 

DE1 := diff(C(x, t), t) = d*diff(C(x,t), x, x);

IC := C(x, 0) = piecewise(x < 0, 0, 0 <=x <= L, C0, L < x, 0);

BC1 := D[1](C)(0, t) = 0;

BC2 := -d*D[1](C)(L, t) = hm * C(L, t) / K;

 

pds:=pdsolve(DE1, {IC, BC1, BC2}, type=numeric, spacestep=L/10000, timestep=10000);

 

T := 60*60*24*100;

pds:-plot(t=T, x=0..L);

 

#I tried the following, but these seem to always return zero (while the plot suggests some negative value of diff(C(x, t), x));

v1 := pds:-value(diff(C(x, t), x));

v1(L, T);

v2 := pds:-value(int(diff(C(x, t), x), t = 0 .. T));

v2(L, 0);

Page 1 of 1