I’m trying to solve the system with piecewise initial conditions.
w = NDSolve[{D[u[r, thet, t], t] ==
D[u[r, thet, t], {r, 2}] + (1/r) D[u[r, thet, t], r] + (1/r^2) D[
u[r, thet, t], {thet, 2}] +
u[r, thet, t] (1 - u[r, thet, t] - c*x[r, thet, t]),
D[x[r, thet, t], t] ==
mu*(D[x[r, thet, t], {r, 2}] + (1/r) D[x[r, thet, t],
r] + (1/r^2) D[x[r, thet, t], {thet, 2}]) +
a*x[r, thet, t] (1 - c*u[r, thet, t] - b*x[r, thet, t]),
D[u[r, thet, t], r] == 0 /. {r -> 1},
D[x[r, thet, t], r] == 0 /. {r -> 1},
D[u[r, thet, t], r] == 0 /. {r -> 0.01},
D[x[r, thet, t], r] == 0 /. {r -> 0.01},
(*u[r,thet,0]==0(*Piecewise[{{1,r<= r0},{0,r>r0}}]*),
x[r,thet,0]==0(*Piecewise[{{1,r<= r0},{0,r>r0}}]*)},*)
u[r, thet, t] ==
Piecewise[{{Piecewise[{{0, 0 <= thet <= Pi/6}, {1,
Pi/6 < thet < 2 Pi}}], r <= r0}, {0, r > r0}}] /. {t ->
0},
x[r, thet, t] ==
Piecewise[{{Piecewise[{{1, 0 <= thet <= Pi/6}, {0,
Pi/6 < thet < 2 Pi}}], r <= r0}, {0, r > r0}}] /. {t -> 0}},
{u[r, thet, t], x[r, thet, t]}, {t, 0, 5}, {r, 0.01, 1}, {thet, 0,
2 Pi}]
With this code Mathematica throws some errors
NDSolve::mxsst: Using maximum number of grid points 100 allowed by the MaxPoints or MinStepSize options for independent variable r.
NDSolve::mxsst: Using maximum number of grid points 100 allowed by the MaxPoints or MinStepSize options for independent variable thet.
General::stop: "Further output of NDSolve will be suppressed during this calculation. "
How can I work this out? Without piecewise conditions Mathematica solves this system without problems.
Thanks.