I'm trying to solve a nonlinear PDE using NDSolve. For reference, my mathematica code is as follows:
PDE = -(1 + 1/z^2)^(-1)(D[u[z, t], t])^2 + (1 + 1/z^2)(-z^2 D[u[z, t], z])^2 == -1
BC = u[0.1, t] == 0.1;
InitCond = u[z, 0] == z;
Sol = NDSolve[Join[{PDE}, {BC}, {InitCond}],
u, {z, 0.1, 0.9}, {t, 0, 1}]
usol[z_, t_] := u[z, t] /. Sol[[1]]
Plot3D[usol[z, t], {z, 0.1, 0.9}, {t, 0, 1}]
Upon execution, it throws out a warning and the plotted figure is nothing but an empty box. The warning goes:
NDSolve::eerr: Warning: scaled local spatial error estimate of 60.68099644559237
at z = 0.9
in the direction of independent variable t is much greater than the prescribed error tolerance. Grid spacing with 25 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.
How do I resolve this issue?
NDSolve[{PDE, BC, InitCond}, u,...]
and it will work also. i.e. no need to useJoin
command. just fyi. $\endgroup$NDSolve
with automatic options, and these solutions are complex. To plot all branches, we can useTable[Plot3D[ Abs[u[z, t]] /. Sol[[i]][[1]], {z, 0.1, 0.9}, {t, 0, 1}], {i, Length[Sol]}]
. If you expected real solutions only, please use code proposed by Nasser with handmade mesh. $\endgroup$