3

I'm trying to solve the following PDE by Mathematica in 2-D case in the unit disk using polar cordinates,

enter image description here

where $\Omega$ is a bounded domain of $\mathbb{R}^n$, $\Gamma =\partial \Omega$ is the boundary of $\Omega$, $\partial_\nu$ is the normal derivative, and $\nu$ is the outer unit vector.

Thanks to pdetoode proposed by @xzczd I simplified the problem as follows:

eq = With[{u = u[t, r, z]}, D[u, t] == Laplacian[u, {r, z}, "Polar"]];
ic = u[0, r, z] == 1;
bc = With[{u = u[t, r, z]}, (eq[[1]] == eq[[2]] - D[u, r]) /. r -> 1];
tend = 1;
domain@r = {2 10^-6, 1};
domain@z = {0, 2 Pi};
points@r = points@z = 25;
difforder = 4;
(grid@# = Array[# &, points@#, domain@#]) & /@ {r, z};
ptoofunc = pdetoode[u[t, r, z], t, grid /@ {r, z}, difforder];
delbothside = #[[1 ;; -1]] &;
ode = delbothside /@ delbothside@ptoofunc@eq;
odeic = delbothside /@ delbothside@ptoofunc@ic;
odebc = MapAt[delbothside, ptoofunc@bc, {{1}, {2}}];`

When integrating the resulting ODEs with NDSolve :

sollst = NDSolveValue[{ode, odeic, odebc}, 
 Outer[u, grid@r, grid@z], {t, 0, tend}];

It generates the following error

NDSolveValue::overdet: There are fewer dependent variables
 {u[1/500000,0][t],u[1/500000,\[Pi]/12][t],u[1/500000,\[Pi]/6][t],u[
 /500000,\[Pi]/4][t],u[1/500000,\[Pi]/3][t],u[1/500000,(5 \[Pi])/12
 [t],u[1/500000,\[Pi]/2][t],u[1/500000,(7 \[Pi])/12][t],u[1/500000,(2
 \[Pi])/3][t],u[1/500000,(3 \[Pi])/4][t],u[1/500000,(5 \[Pi])/6][t],u[
 /500000,(11 \[Pi])/12][t],u[1/500000,\[Pi]][t],u[1/500000,(13 \[Pi])/12
 [t],u[1/500000,(7 \[Pi])/6][t],<<22>>,u[500023/12000000,\[Pi]
 [t],u[500023/12000000,(13 \[Pi])/12][t],u[500023/12000000,(7 \[Pi])/6
 [t],u[500023/12000000,(5 \[Pi])/4][t],u[500023/12000000,(4 \[Pi])/3
 [t],u[500023/12000000,(17 \[Pi])/12][t],u[500023/12000000,(3 \[Pi])/2
 [t],u[500023/12000000,(19 \[Pi])/12][t],u[500023/12000000,(5 \[Pi])/3
 [t],u[500023/12000000,(7 \[Pi])/4][t],u[500023/12000000,(11 \[Pi])/6
 [t],u[500023/12000000,(23 \[Pi])/12][t],u[500023/12000000,2 \[Pi]
 [t],<<575>>}, than equations, so the system is overdetermined.

I think the problem is in the part when we delete some ODEs to make place for BCs equations. I lost many days to solve this, but still unsolved.

Update:

To be more precise, the equation to solve in polar cordinates $(r,\theta)$ is

$$u_t=\frac{d^2 u}{d r^2}+\frac{1}{r} \frac{d u}{d r}+\frac{1}{r^2} \frac{d^2 u}{d \theta^2} \quad in \quad \Omega'=[0,1)\times [0,2 \pi)$$ $$u_t|_{r=1}=(\frac{d^2 u}{d \theta^2}-\frac{d u}{d r}) \Big|_{r=1}, \quad and \quad u|_{\theta=0}=u|_{\theta=2 \pi}=1, \quad (BC)$$ $$u(0,r,\theta)=1 \; in \; [0,1)\times [0,2 \pi), \quad u(0,1,\theta)=1 \; on \quad [0,2 \pi) \quad (IC).$$

user21
  • 39,710
  • 8
  • 110
  • 167
S. Maths
  • 203
  • 1
  • 9
  • 1
    Several issues I can spot at the moment: 1. What's the meaning of $\Delta_\Gamma$? Are you sure the b.c. is translated correctly? 2. Where's the b.c. at $r=0$? 3. Where's the b.c. in $z$ direction? – xzczd Feb 04 '19 at 02:42
  • 1
  • Please explain what's Laplace-Beltrami operator. 2. You do need boundary condition for $r=0$ and in $z$ direction. Notice when analytically solve PDE in polar coordinate, though we don't use explicit b.c. for $r=0$, we always make use of implicit constraint such as "the solution is bounded in the whole domain", and you need to translate such implicit constraint to explicit boundary condition when implement FDM and its friends. Needless to say you also need b.c. for $z$, given it's the angle of the polar coordinate, the b.c. is usually periodic b.c..
  • – xzczd Feb 04 '19 at 09:55
  • 1
    The obvious solution is u[t,r,z]=1. Therefore, we can put u[t,0,z]==1 and add periodic boundary conditions u[t,r,0]==u[t,r,2*Pi]. – Alex Trounev Feb 04 '19 at 13:01
  • 1
    @Alex Reading the follow up comments of OP, the problem seems to be circularly symmetric. If so, a possible b.c. for $r=0$ is $\frac{\partial u}{\partial r}\big|_{r=0}=0$. Deduction: Expand[(r #1 &) /@ With[{u = u[r]}, D[u, t] == Laplacian[u, {r, theta}, "Polar"]]] /. r -> 0(* 0 == Derivative[1][u][0] *). – xzczd Feb 06 '19 at 03:06
  • @Alex, I think I get your idea, and it seems to be true following this answer https://math.stackexchange.com/a/1794380/515871 – S. Maths Feb 06 '19 at 17:11
  • Hello @xzczd and Alex. It have been a long time and my question still unaswered. I updated my post with the precise quation based on Alex coments. Thanks for any help. – S. Maths Mar 09 '19 at 12:39
  • @S.Cho See my post. – Alex Trounev Mar 09 '19 at 18:47