[SciPy-User] SciPy and Diffusion Equation

James tomo.bbe at gmail.com
Mon Jan 17 10:05:53 EST 2011


You can implement a fairly basic Method of Lines solution using odeint by
applying some basic spatial differencing formulae. I have done this in the
past for 1D and 2D advection-dispersion problems, but it soon becomes quite
slow for practical problems.

Regards,
James

On Sun, Jan 16, 2011 at 7:29 PM, Lorenzo Isella <lorenzo.isella at gmail.com>wrote:

> Dear All,
> I hope that this is not too off-topic.
> I wonder if there is any tool under the scipy umbrella to deal with
> diffusion problems. I have tackled these problems with proprietary
> software in the past (e.g. Comsol Multiphysics), but I wonder if there
> are other (simple) pythonic options.
> To fix the ideas, consider c(x,t) as a time-dependent concentration
> profile and the equation
>
> \partial_t c= D\partial_x^2 c-\alpha c +beta\delta(x_0)
>
> i.e. a standard diffusion equation with a source term beta\delta(x_0)
> (what I mean is that the initial density distribution is a delta
> centered about x_0, one can probably remove that term from the equation
> while giving the initial density distribution at t=0).
> However, it all boils down to a diffusion equation in an interval [0,L]
> with an initial density profile c(x,t_0). In the case of the equation
> above, I have an analytical solution, but in general I may want to add
> sources, non-linear terms etc...so it should be considered as a starting
> point.
> Any suggestion is appreciated.
> Cheers
>
> Lorenzo
> _______________________________________________
> SciPy-User mailing list
> SciPy-User at scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20110117/8adbc682/attachment.html>


More information about the SciPy-User mailing list