
assigning initial conditions on PDE solver?
Posted:
May 9, 2006 6:08 AM


Hi I'd like to model adsorption of a substance onto activated carbon, using the homogenous surface diffusion model. This model uses a partial differential equation: dq/dt = K/r^2 d/dr(r^2 dq/dr)
I can solve this equation easily using pdepe. In the next step, I'd like to solve this equation in a loop, where the calculated endstate (q(x, t_end)) should be used as new initial condition.
However, I can't use a vector as initial condition. In the newsgroups I found exactly my problem. Unfortunately I don't fully understand its solution, how to use pdeval... anonymissy, "assigning initial conditions on PDE solver?" #, 11 Mar 2004 12:52 am </WebX?50@@.eed2dac>
I tried the following:
sol = pdepe(m, @pdehsdm, @pdehsdmic, @pdehsdmbc, x, t, [], q_old) ... function q0 = pdehsdmic(m, x, q_old) q0 = pdeval(m, x, q_old, xout);
where q_old is a row vector q(t_end, x) and x = linspace(0,R,10).
I know that q0 is a matrix with [q_old, dq_old/dx], but I don't get to run my program.
Help will be greatly appreciated.
Thanks in advance
Christian

