0
$\begingroup$

I try to solve the following equation: $$u_t = (u^2 u_x)_x + (u^2 u_y)_y$$ $$0\le x\le10, 0\le y\le 10$$ Originally, my initial conditions are: $u(0,x,y) = 0$ ewerywhere except of circle $(x-5)^2 + (y-5)^2 = 1$ where $u = 5$ and any simple boundary conditions. I think it can be difficult to write such conditions and I wanted to try with one-point source $u(0,x,y)$ = 0 everywhere except of one point $u(0,5,5) = 5$. But, at first I wanted to write the simplies one: $u(0,x,y) = 1$ everywhere. So, I tryed to code it, but it doesn't work. Can you help me to write it right?

tt = 5.;

s = NDSolve[{D[u[t, x, y], t] == 
     u[t, x, y]*u[t, x, y]*D[u[t, x, y], x, x] + 
      2*u[t, x, y]*(D[u[t, x, y], x])^2 + 
      u[t, x, y]*u[t, x, y]*D[u[t, x, y], y, y] + 
      2 u[t, x, y]*(D[u[t, x, y], y])^2;
    u [0, x, y] == 1,
    u[t, 0, 0] == 0, u[t, 0, 10] == 0}, u[t, 10, 0] = 0, 
   u[t, 10, 10] = 0,
   u, {t, 0, tt}, {x, 1, 10}, {y, 1, 10}];


Table[Plot3D[Evaluate[u[t, x, y] /. First[%]], {x, 0, 10}, {y, 0, 10},
   PlotRange -> All, PlotPoints -> 100, Mesh -> False], {t, 1, 5}]
$\endgroup$
1
$\begingroup$

I do not claim this to be a complete answer.

There were some syntax issues in your code. Even after correct them there were issues about the boundary conditions. Note that boundary conditions should be specified along an edge of the boundary. So u[t, 0, 10] == 0 won't work as at a specified time the condition is specified for a specific point and not an edge. The following works:

NDSolve[{D[u[t, x, y], t] == 
   u[t, x, y]*u[t, x, y]*D[u[t, x, y], x, x] + 
    2*u[t, x, y]*(D[u[t, x, y], x])^2 + 
    u[t, x, y]*u[t, x, y]*D[u[t, x, y], y, y] + 
    2 u[t, x, y]*(D[u[t, x, y], y])^2,
  u[0, x, y] == 1, u[t, x, 1] == 0, u[t, 1, y] == 0, u[t, 10, y] == 0,
   u[t, x, 10] == 0}, u, {t, 0, tt}, {x, 1, 10}, {y, 1, 10}]
$\endgroup$
  • $\begingroup$ But code gives a mistake:"InterpolatingFunction::dmval: Input value {2,0.000101111,0.000101111} lies outside the range of data in the interpolating function. Extrapolation will be used." $\endgroup$ – David Johnson May 17 '17 at 17:48
  • $\begingroup$ Also, how should I code one-point source in the canter of my plane? $\endgroup$ – David Johnson May 17 '17 at 17:49
  • $\begingroup$ I tryed to write: T[x_, y_] := 5 /; (y == 5) && (x == 5) T[x_, y_] := 1 /; (y != 5) && (x != 5) before NDSolve and added in Do[ ] cicle the following: u[0,x,y] = T[t_,x_,y_]. But I just obtained a lot of mistakes $\endgroup$ – David Johnson May 17 '17 at 18:00
  • $\begingroup$ It works fine for me. Which version are you on ? I am on version 11.0.0. I am not sure how to code one point source. $\endgroup$ – Lotus May 18 '17 at 3:04
  • $\begingroup$ I use version 11.1. It's strange $\endgroup$ – David Johnson May 18 '17 at 8:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.