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

  • Follow


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



0
Reply Alois 1/4/2011 9:22:51 AM

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,

you find an example of one way to do it here

http://library.wolfram.com/infocenter/Conferences/7549/


Hope this helps,
Oliver

0
Reply Oliver 1/6/2011 7:06:54 AM


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
Reply Oliver 1/8/2011 8:39:19 AM

Hi!

You can see my implementayion: http://sources.codenet.ru/file/4784/Brusselator.zip
The created in Borland C++ Builder, but it for grafics. Greather of the code you can easy to adapt for other compilers. Comments in russian, but code in c++.

0
Reply petrukhinoleg (1) 4/15/2013 6:28:14 AM

3 Replies
836 Views

(page loaded in 0.064 seconds)

Similiar Articles:













7/22/2012 3:02:38 AM


Reply: