Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.95 KB | None | 0 0
  1. s1 = NDSolve[{D[u[t, x, y], t] ==
  2. D[u[t, x, y], x, x] + D[u[t, x, y], y, y] + 3*Tanh[u[t, x, y]],
  3. u[0, x, y] == Sin[([Pi] x)/5] Sin[(2 [Pi] y)/5],
  4. u[t, -5, y] == 0, u[t, 5, y] == 0, u[t, x, -5] == 0,
  5. u[t, x, 5] == 0}, u, {t, 0, 6}, {x, -5, 5}, {y, -5, 5},
  6. Method -> {"FixedStep", Method -> "ExplicitEuler"},
  7. MaxStepFraction -> 10000, WorkingPrecision -> MachinePrecision]
  8.  
  9. NDSolve::eerr
  10. Warning: scaled local spatial error estimate of 26.30473550335526` at
  11. t = 6.` in the direction of independent variable x is much greater
  12. than the prescribed error tolerance. Grid spacing with 15 points may
  13. be too large to achieve the desired accuracy or precision. A
  14. singularity may have formed or a smaller grid spacing can be
  15. specified using the MaxStepSize or MinPoints method options.
  16.  
  17. a = Table[
  18. Plot3D[u[t, x, y] /. s1, {x, -5, 5}, {y, -5, 5}, Mesh -> 100,
  19. PlotRange -> All,
  20. ColorFunction -> Function[{x, y, z}, Hue[.3 (1 - z)]]], {t, 0, 6}]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement