I am trying to solve this following 2D-Diffusion equation (I wrote it in Word, so it looks nice)
(Note: I am solving this for a 100x100 mesh point)
I tried to solve the above equation using the following code:
s1 = NDSolve[{D[u[t, x, y], t] ==
D[u[t, x, y], x, x] + D[u[t, x, y], y, y] + 3*Tanh[u[t, x, y]],
u[0, x, y] == Sin[(\[Pi] x)/5] Sin[(2 \[Pi] y)/5],
u[t, -5, y] == 0, u[t, 5, y] == 0, u[t, x, -5] == 0,
u[t, x, 5] == 0}, u, {t, 0, 6}, {x, -5, 5}, {y, -5, 5},
Method -> {"FixedStep", Method -> "ExplicitEuler"},
MaxStepFraction -> 10000, WorkingPrecision -> MachinePrecision]
This results in the consistent error of:
NDSolve::eerr
Warning: scaled local spatial error estimate of 26.30473550335526` at \
t = 6.` in the direction of independent variable x is much greater \
than the prescribed error tolerance. Grid spacing with 15 points may
be too large to achieve the desired accuracy or precision. A
singularity may have formed or a smaller grid spacing can be
specified using the MaxStepSize or MinPoints method options.
I also want to visualize the above equation in such a way that it is appropriate to show for a professional presentation (preferably as a movie)
This is the code that I came up with for the following problem:
a = Table[
Plot3D[u[t, x, y] /. s1, {x, -5, 5}, {y, -5, 5}, Mesh -> 100,
PlotRange -> All,
ColorFunction -> Function[{x, y, z}, Hue[.3 (1 - z)]]], {t, 0, 6}]
In summary, I cannot solve the above equation because of an error and I don't know how to visualize equations similar to it properly.



