Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Numerical Solver for 2D/3D (Reaction-)Diffusion equation

13 views
Skip to first unread message

Oliver Ruebenkoenig

unread,
Jan 8, 2011, 3:39:19 AM1/8/11
to
On Tue, 4 Jan 2011, Alois wrote:

> I'm trying to solve numerically a 2d/3d reaction-diffusion equation
> using NDSolve. The system can be solved for one spatial dimension (+
> time dimension), but it does not converge for two spatial dimensions
> (x,y,t). Actually, I'm trying to use polar coordinates (r, phi, t),
> because the problem has a point source.
>
> I'm using NDsolve with the following method:
> Method -> {"MethodOfLines", "SpatialDiscretization" ->
> {"TensorProductGrid", "Coordinates" -> myGrid}
>
> which fails. Can you recommend a better method to solve the problem in
> 2D (and eventually in 3D) ?
>
> Kind regards,
> Alois
>
>
>
>

Alois,

things like


eqn = \[Rho]*cp*D[u[t, x, y], t] - \[Lambda]*
D[u[t, x, y], x, x] + -\[Lambda]*D[u[t, x, y], y, y] ==
f + r*u[t, x, y]*If[x == p1X, y == p1Y, 1, 0]

NDSolve[Join[{eqn},
bc, ic], u, {t, 0, tEnd}, {x, 0, xEnd}, {y, 0, yEnd},
Method -> {"MethodOfLines",
"SpatialDiscretization" -> {"TensorProductGrid",
MaxPoints -> {35, 35}, MinPoints -> {35, 35}
}}
];

work in principal. Now, the exact details depend on the equation
parameters. Note that the Max and Min points need to be chosen
such that the tensor grid generates a point {p1X,p1Y}.

Hth,
Oliver

0 new messages