Re: Numerical Solver for 2D/3D (Reaction-)Diffusion equation
- To: mathgroup at smc.vnet.net
- Subject: [mg115346] Re: Numerical Solver for 2D/3D (Reaction-)Diffusion equation
- From: Oliver Ruebenkoenig <ruebenko at wolfram.com>
- Date: Sat, 8 Jan 2011 03:39:20 -0500 (EST)
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