Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: assigning initial conditions on PDE solver?
Replies: 5   Last Post: Apr 5, 2013 11:26 AM

 Messages: [ Previous | Next ]
 Christian Abegglen Posts: 1 Registered: 5/9/06
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 end-state
(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.

Christian

Date Subject Author
5/9/06 Christian Abegglen
5/15/06 Vassili
4/5/13 gunesh
3/4/13 Peiwen Lau
3/5/13 Torsten
3/5/13 Torsten