Drexel dragonThe Math ForumDonate to the Math Forum

Search All of the Math Forum:

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

Math Forum » Discussions » Software » comp.soft-sys.matlab

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

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Christian Abegglen

Posts: 1
Registered: 5/9/06
assigning initial conditions on PDE solver?
Posted: May 9, 2006 6:08 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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.

Thanks in advance


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum 1994-2015. All Rights Reserved.