Could someone else verify that an example from the Numerical Solutions to Differential Equations isn't working.
- To: mathgroup at smc.vnet.net
- Subject: [mg127308] Could someone else verify that an example from the Numerical Solutions to Differential Equations isn't working.
- From: W Craig Carter <ccarter at MIT.EDU>
- Date: Sun, 15 Jul 2012 04:28:27 -0400 (EDT)
- Delivered-to: l-mathgroup@mail-archive0.wolfram.com
- Delivered-to: mathgroup-newout@smc.vnet.net
- Delivered-to: mathgroup-newsend@smc.vnet.net
I am looking at the example on page 348 of the tutorial for a numerical solution to the Sine-Gordon equation. (http://www.wolfram.com/learningcenter/tutorialcollection/AdvancedNumericalDifferentialEquationSolvingInMathematica/). It doesn't work for me for M8.0.4, MacBook, MacOs 10.7.4. Can someone else verify that this doesn't work? Here is the example: L = 10; (*the tutorial has L=-10, but I think that is a typo. In any case, the example doesn't work with + or - *) state = First[NDSolve`ProcessEquations[{D[u[t, x, y], t, t] == D[u[t, x, y], x, x] + D[u[t, x, y], y, y] - Sin[u[t, x, y]], u[0, x, y] == Exp[-(x^2 + y^2)], Derivative[1, 0, 0][u][0, x, y] == 0, u[t, -L, y] == u[t, L, y], u[t, x, -L] == u[t, x, L]}, u, t, {x, -L, L}, {y, -L, L}, Method -> {"MethodOfLines", "SpatialDiscretization" -> {"TensorProductGrid", "DifferenceOrder" -> "Pseudospectral"}}]] GraphicsGrid[Partition[Table[ NDSolve`Iterate[state, tau]; Plot3D[ Evaluate[ u[tau, x, y] /. NDSolve`ProcessSolutions[state, "Forward"]], {x, -L, L}, {y, -L, L}, PlotRange -> {-1/4, 1/4}], {tau, 0, 20, 5}], 2]] Thanks, Craig W Craig Carter Professor of Materials Science, MIT
- Follow-Ups:
- Re: Could someone else verify that an example from the
- From: Geraghty Syd <sydgeraghty@mac.com>
- Re: Could someone else verify that an example from the