We’re rewarding the question askers & reputations are being recalculated! Read more.
3 deleted 54 characters in body
source | link

This problem can be solved by iterations. Here, the function u[t,r,z] is restored by the value of the function v[t,z], and the function v[t,z] by the value Derivative[0, 1, 0][u][t, 1, z]. In this example, the solution converges quickly to u[t,r,z]=1 and v[t,z]=1 is not reached because of the errors encountered when(I changed bc at r=r0=10^-6).

U[0][t_, r_, z_] := 1;
V[0][t_, z_] := 1; n = 5; r0 = 10^-6;
Do[U[i] = 
   NDSolveValue[{-(D[u[t, r, z], {z, 2}]/r^2) - D[u[t, r, z], r]/r - 
       D[u[t, r, z], {r, 2}] + D[u[t, r, z], t] == 0, u[0, r, z] == 1,
      u[t, r, 0] == u[t, r, 2*Pi], 
     Derivative[0, 1, 0][u][tu[t, r0, z] == 01, 
     u[t, 1, z] == V[i - 1][t, z]}, 
    u, {t, 0, 1}, {r, r0, 1}, {z, 0, 2*Pi}]; 
  V[i] = NDSolveValue[{-D[v[t, z], {z, 2}] + D[v[t, z], t] + 
       Derivative[0, 1, 0][U[i]][t, 1, z] == 0, v[0, z] == 1, 
     v[t, 0] == v[t, 2*Pi]}, v, {t, 0, 1}, {z, 0, 2*Pi}];, {i, 1, 
   n}] // Quiet


Table[Plot3D[U[i][1, r, z], {r, r0, 1}, {z, 0, 2*Pi}, 
  PlotRange -> All], {i, 1, n}]

Table[Plot3D[V[i][t, z], {t, 0, 1}, {z, 0, 2*Pi}, 
  PlotRange -> All], {i, 1, n}]  

fig1fig1

This problem can be solved by iterations. Here, the function u[t,r,z] is restored by the value of the function v[t,z], and the function v[t,z] by the value Derivative[0, 1, 0][u][t, 1, z]. In this example, the solution u[t,r,z]=1 and v[t,z]=1 is not reached because of the errors encountered when r=r0=10^-6.

U[0][t_, r_, z_] := 1;
V[0][t_, z_] := 1; n = 5; r0 = 10^-6;
Do[U[i] = 
   NDSolveValue[{-(D[u[t, r, z], {z, 2}]/r^2) - D[u[t, r, z], r]/r - 
       D[u[t, r, z], {r, 2}] + D[u[t, r, z], t] == 0, u[0, r, z] == 1,
      u[t, r, 0] == u[t, r, 2*Pi], 
     Derivative[0, 1, 0][u][t, r0, z] == 0, 
     u[t, 1, z] == V[i - 1][t, z]}, 
    u, {t, 0, 1}, {r, r0, 1}, {z, 0, 2*Pi}]; 
  V[i] = NDSolveValue[{-D[v[t, z], {z, 2}] + D[v[t, z], t] + 
       Derivative[0, 1, 0][U[i]][t, 1, z] == 0, v[0, z] == 1, 
     v[t, 0] == v[t, 2*Pi]}, v, {t, 0, 1}, {z, 0, 2*Pi}];, {i, 1, 
   n}] // Quiet


Table[Plot3D[U[i][1, r, z], {r, r0, 1}, {z, 0, 2*Pi}, 
  PlotRange -> All], {i, 1, n}]

Table[Plot3D[V[i][t, z], {t, 0, 1}, {z, 0, 2*Pi}, 
  PlotRange -> All], {i, 1, n}]  

fig1

This problem can be solved by iterations. Here, the function u[t,r,z] is restored by the value of the function v[t,z], and the function v[t,z] by the value Derivative[0, 1, 0][u][t, 1, z]. In this example, the solution converges quickly to u[t,r,z]=1 and v[t,z]=1(I changed bc at r=r0=10^-6).

U[0][t_, r_, z_] := 1;
V[0][t_, z_] := 1; n = 5; r0 = 10^-6;
Do[U[i] = 
   NDSolveValue[{-(D[u[t, r, z], {z, 2}]/r^2) - D[u[t, r, z], r]/r - 
       D[u[t, r, z], {r, 2}] + D[u[t, r, z], t] == 0, u[0, r, z] == 1,
      u[t, r, 0] == u[t, r, 2*Pi],u[t, r0, z] == 1, 
     u[t, 1, z] == V[i - 1][t, z]}, 
    u, {t, 0, 1}, {r, r0, 1}, {z, 0, 2*Pi}]; 
  V[i] = NDSolveValue[{-D[v[t, z], {z, 2}] + D[v[t, z], t] + 
       Derivative[0, 1, 0][U[i]][t, 1, z] == 0, v[0, z] == 1, 
     v[t, 0] == v[t, 2*Pi]}, v, {t, 0, 1}, {z, 0, 2*Pi}];, {i, 1, 
   n}] 


Table[Plot3D[U[i][1, r, z], {r, r0, 1}, {z, 0, 2*Pi}, 
  PlotRange -> All], {i, 1, n}]

Table[Plot3D[V[i][t, z], {t, 0, 1}, {z, 0, 2*Pi}, 
  PlotRange -> All], {i, 1, n}]  

fig1

2 deleted 992 characters in body
source | link

This problem can be solved by iterations. Here, the function u[t,r,z] is restored by the value of the function v[t,z], and the function v[t,z] by the value Derivative[0, 1, 0][u][t, 1, z]. In this example, the solution u[t,r,z]=1 and v[t,z]=1 is not reached because of the errors encountered when r=r0=10^-26.

U[0][t_, r_, z_] := 1;
V[0][t_, z_] := 1; n = 5; r0 = 10^-2;6;
Do[U[i] = NDSolveValue[{-((
\!\(\*SuperscriptBox[\(u\), 
TagBox[
RowBox[{"(", 
RowBox[{"0", ",", "0", ",", "2"}], ")"}],
Derivative],
MultilineFunctionNDSolveValue[{->None]\)[t(D[u[t, r, z]/r + 
\!\(\*SuperscriptBox[\(u\), 
TagBox[
RowBox[{"(", 
RowBox[{"0", ",", "1", ","z, "0"2}], "/r^2)"}],
Derivative],
MultilineFunction ->None]\)[t D[u[t, r, z]), r]/r) - 
\!\(\*SuperscriptBox[\(u\), 
TagBox[
RowBox[{"(", 
RowBox[{"0", ",", "2", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[tD[u[t, r, z] + 
\!\(\*SuperscriptBox[\(u\), 
TagBox[
RowBox[{"(", 
RowBox[{"1", ",", "0", ","r, "0"2}], ")"}],
Derivative],
MultilineFunction->None]\)[t+ D[u[t, r, z], t] == 0, u[0, r, z] == 1, 
      u[t, r, 0] == u[t, r, 2*Pi], 
     Derivative[0, 1, 0][u][t, r0, z] == 0, 
     u[t, 1, z] == V[i - 1][t, z]}, 
    u, {t, 0, 1}, {r, r0, 1}, {z, 0, 2*Pi}]; 
  V[i] = NDSolveValue[{-
\!\(\*SuperscriptBox[\(v\)D[v[t, 
TagBox[
RowBox[{"("z], 
RowBox[{"0", ",", "2"}]z, ")"2}],
Derivative],
MultilineFunction->None]\)[t, z] + 
\!\(\*SuperscriptBox[\(v\), 
TagBox[
RowBox[{"("D[v[t, 
RowBox[{"1"z], ",",t] "0"}],+ ")"}],
Derivative],
MultilineFunction->None]\)[t, z] + 
\!\(\*SuperscriptBox[\(U[i]\), 
TagBox[
RowBox[{"(", 
RowBox[{"0", ",", "1", ","Derivative[0, "0"}]1, ")"}],
Derivative],
MultilineFunction->None]\)[t0][U[i]][t, 1, z] == 0, v[0, z] == 1, 
     v[t, 0] == v[t, 2*Pi]}, v, {t, 0, 1}, {z, 0, 2*Pi}];, {i, 1, 
   n}] // Quiet


Table[Plot3D[U[i][1, r, z], {r, r0, 1}, {z, 0, 2*Pi}, 
  PlotRange -> All], {i, 1, n}]

Table[Plot3D[V[i][t, z], {t, 0, 1}, {z, 0, 2*Pi}, 
  PlotRange -> All], {i, 1, n}]  

fig1fig1

This problem can be solved by iterations. Here, the function u[t,r,z] is restored by the value of the function v[t,z], and the function v[t,z] by the value Derivative[0, 1, 0][u][t, 1, z]. In this example, the solution u[t,r,z]=1 and v[t,z]=1 is not reached because of the errors encountered when r=r0=10^-2.

U[0][t_, r_, z_] := 1;
V[0][t_, z_] := 1; n = 5; r0 = 10^-2;
Do[U[i] = NDSolveValue[{-((
\!\(\*SuperscriptBox[\(u\), 
TagBox[
RowBox[{"(", 
RowBox[{"0", ",", "0", ",", "2"}], ")"}],
Derivative],
MultilineFunction->None]\)[t, r, z]/r + 
\!\(\*SuperscriptBox[\(u\), 
TagBox[
RowBox[{"(", 
RowBox[{"0", ",", "1", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[t, r, z])/r) - 
\!\(\*SuperscriptBox[\(u\), 
TagBox[
RowBox[{"(", 
RowBox[{"0", ",", "2", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[t, r, z] + 
\!\(\*SuperscriptBox[\(u\), 
TagBox[
RowBox[{"(", 
RowBox[{"1", ",", "0", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[t, r, z] == 0, u[0, r, z] == 1, 
     u[t, r, 0] == u[t, r, 2*Pi], 
     Derivative[0, 1, 0][u][t, r0, z] == 0, 
     u[t, 1, z] == V[i - 1][t, z]}, 
    u, {t, 0, 1}, {r, r0, 1}, {z, 0, 2*Pi}]; V[i] = NDSolveValue[{-
\!\(\*SuperscriptBox[\(v\), 
TagBox[
RowBox[{"(", 
RowBox[{"0", ",", "2"}], ")"}],
Derivative],
MultilineFunction->None]\)[t, z] + 
\!\(\*SuperscriptBox[\(v\), 
TagBox[
RowBox[{"(", 
RowBox[{"1", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[t, z] + 
\!\(\*SuperscriptBox[\(U[i]\), 
TagBox[
RowBox[{"(", 
RowBox[{"0", ",", "1", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[t, 1, z] == 0, v[0, z] == 1, 
     v[t, 0] == v[t, 2*Pi]}, v, {t, 0, 1}, {z, 0, 2*Pi}];, {i, 1, 
   n}] // Quiet


Table[Plot3D[U[i][1, r, z], {r, r0, 1}, {z, 0, 2*Pi}, 
  PlotRange -> All], {i, 1, n}]

Table[Plot3D[V[i][t, z], {t, 0, 1}, {z, 0, 2*Pi}, 
  PlotRange -> All], {i, 1, n}]

fig1

This problem can be solved by iterations. Here, the function u[t,r,z] is restored by the value of the function v[t,z], and the function v[t,z] by the value Derivative[0, 1, 0][u][t, 1, z]. In this example, the solution u[t,r,z]=1 and v[t,z]=1 is not reached because of the errors encountered when r=r0=10^-6.

U[0][t_, r_, z_] := 1;
V[0][t_, z_] := 1; n = 5; r0 = 10^-6;
Do[U[i] = 
   NDSolveValue[{-(D[u[t, r, z], {z, 2}]/r^2) - D[u[t, r, z], r]/r - 
       D[u[t, r, z], {r, 2}] + D[u[t, r, z], t] == 0, u[0, r, z] == 1,
      u[t, r, 0] == u[t, r, 2*Pi], 
     Derivative[0, 1, 0][u][t, r0, z] == 0, 
     u[t, 1, z] == V[i - 1][t, z]}, 
    u, {t, 0, 1}, {r, r0, 1}, {z, 0, 2*Pi}]; 
  V[i] = NDSolveValue[{-D[v[t, z], {z, 2}] + D[v[t, z], t] + 
       Derivative[0, 1, 0][U[i]][t, 1, z] == 0, v[0, z] == 1, 
     v[t, 0] == v[t, 2*Pi]}, v, {t, 0, 1}, {z, 0, 2*Pi}];, {i, 1, 
   n}] // Quiet


Table[Plot3D[U[i][1, r, z], {r, r0, 1}, {z, 0, 2*Pi}, 
  PlotRange -> All], {i, 1, n}]

Table[Plot3D[V[i][t, z], {t, 0, 1}, {z, 0, 2*Pi}, 
  PlotRange -> All], {i, 1, n}]  

fig1

1
source | link

This problem can be solved by iterations. Here, the function u[t,r,z] is restored by the value of the function v[t,z], and the function v[t,z] by the value Derivative[0, 1, 0][u][t, 1, z]. In this example, the solution u[t,r,z]=1 and v[t,z]=1 is not reached because of the errors encountered when r=r0=10^-2.

U[0][t_, r_, z_] := 1;
V[0][t_, z_] := 1; n = 5; r0 = 10^-2;
Do[U[i] = NDSolveValue[{-((
\!\(\*SuperscriptBox[\(u\), 
TagBox[
RowBox[{"(", 
RowBox[{"0", ",", "0", ",", "2"}], ")"}],
Derivative],
MultilineFunction->None]\)[t, r, z]/r + 
\!\(\*SuperscriptBox[\(u\), 
TagBox[
RowBox[{"(", 
RowBox[{"0", ",", "1", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[t, r, z])/r) - 
\!\(\*SuperscriptBox[\(u\), 
TagBox[
RowBox[{"(", 
RowBox[{"0", ",", "2", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[t, r, z] + 
\!\(\*SuperscriptBox[\(u\), 
TagBox[
RowBox[{"(", 
RowBox[{"1", ",", "0", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[t, r, z] == 0, u[0, r, z] == 1, 
     u[t, r, 0] == u[t, r, 2*Pi], 
     Derivative[0, 1, 0][u][t, r0, z] == 0, 
     u[t, 1, z] == V[i - 1][t, z]}, 
    u, {t, 0, 1}, {r, r0, 1}, {z, 0, 2*Pi}]; V[i] = NDSolveValue[{-
\!\(\*SuperscriptBox[\(v\), 
TagBox[
RowBox[{"(", 
RowBox[{"0", ",", "2"}], ")"}],
Derivative],
MultilineFunction->None]\)[t, z] + 
\!\(\*SuperscriptBox[\(v\), 
TagBox[
RowBox[{"(", 
RowBox[{"1", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[t, z] + 
\!\(\*SuperscriptBox[\(U[i]\), 
TagBox[
RowBox[{"(", 
RowBox[{"0", ",", "1", ",", "0"}], ")"}],
Derivative],
MultilineFunction->None]\)[t, 1, z] == 0, v[0, z] == 1, 
     v[t, 0] == v[t, 2*Pi]}, v, {t, 0, 1}, {z, 0, 2*Pi}];, {i, 1, 
   n}] // Quiet


Table[Plot3D[U[i][1, r, z], {r, r0, 1}, {z, 0, 2*Pi}, 
  PlotRange -> All], {i, 1, n}]

Table[Plot3D[V[i][t, z], {t, 0, 1}, {z, 0, 2*Pi}, 
  PlotRange -> All], {i, 1, n}]

fig1