2

The PDEs we are interested in solving using NDSolve is the vorticity-stream formulation of the 3D axisymmetric Navier-Stokes (Euler) equations (Ref.1 :T. Y. Hou, Potential singularity of the 3D Euler equations in the interior domain, arXiv:2107.05870): \begin{equation}\label{NSvorticityStreamD2} u_{t}+(-xf_{z}) u_{x}+(2f+xf_{x}) u_{z} =\nu \left(u_{xx} +u_{zz}+\tfrac{3}{x}u_{x}\right) +2uf_{z}\\ % w_{t}+(-xf_{z}) w_{x}+(2f+xf_{x}) w_{z} =\nu \left(w_{xx}+\omega_{zz}+\tfrac{3}{x}w_{x}\right)+2u u_{z},\\ % -w=\,\,\,\,\left(f_{xx} +f_{zz}+\tfrac{3}{x}f_{x} \tag{1}\right). \end{equation}

The initial conditions are \begin{equation}\label{InitialConditions} u(0,x,z)=\frac{12000(1-x^2)^{18}\sin(2\pi z)}{1+12.5\sin^2(\pi z)},\\ w(0,x,z)=f(0,x,z)=0 \tag{2}. \end{equation}

The boundary conditions are \begin{equation}\label{BoundaryConditionD2} u(t,\pm1,z)=f(t,\pm1,z)=w(t,\pm1,z)=0.\\ u(t,x,\pm \tfrac12)=f(t,x,\pm \tfrac12)=w(t,x,\pm \tfrac12)=0. \end{equation}

When I used the following NDSolve command

NDSolve[{PDE, IC, BC}, {u, w, f}, {t, 0, 1/10}, {x, -1, 1}, {z, -1/2, 1/2}]

I got the error message:

Infinite expression 1/0 encountered. 

I will add Mathematica code tonight. Here is the Mathematica code:

PDE = {-2*u[t, x, z]*Derivative[0, 0, 1][f][t, x, z] + 
    Derivative[0, 0, 1][u][t, x, z]*
      (2*f[t, x, z] + x*Derivative[0, 1, 0][f][t, x, 
             z]) - x*Derivative[0, 0, 1][f][t, x, z]*
      Derivative[0, 1, 0][u][t, x, z] + 
    Derivative[1, 0, 0][u][t, x, z] == 0, 
-2*u[t, x, z]*Derivative[0, 0, 1][u][t, x, z] + 
    Derivative[0, 0, 1][w][t, x, z]*
      (2*f[t, x, z] + x*Derivative[0, 1, 0][f][t, x, 
             z]) - x*Derivative[0, 0, 1][f][t, x, z]*
      Derivative[0, 1, 0][w][t, x, z] + 
    Derivative[1, 0, 0][w][t, x, z] == 0, 
w[t, x, z] + Derivative[0, 0, 2][f][t, x, z] + 
    (3*Derivative[0, 1, 0][f][t, x, z])/x + 
    Derivative[0, 2, 0][f][t, x, z] == 0}

IC = {w[0, x, z] == 0, f[0, x, z] == 0, u[0, x, z] == 12000(1 - x^2)^18 (Sin[2Piz]/(1 + (25/2)Sin[Piz]^2))}

BC = {w[t, x, 1/2] == 0, f[t, x, 1/2] == 0, u[t, x, 1/2] == 0, w[t, x, -2^(-1)] == 0, f[t, x, -2^(-1)] == 0, u[t, x, -2^(-1)] == 0, w[t, 1, z] == 0, f[t, 1, z] == 0, u[t, 1, z] == 0, w[t, -1, z] == 0, f[t, -1, z] == 0, u[t, -1, z] == 0}

NDSolve[{PDE, IC, BC}, {u, w, f}, {t, 0, 1/10}, {x, -1, 1}, {z, -1/2, 1/2}]

From inspection, we know that if $u(0,x,z),w(0,x,z),f(0,x,z)$ are even in $x$, then the solution $u(t,x,z),w(t,x,z),f(t,x,z)$ will remain to be even in $x$. So the coordinate singular term $(1/x)u_x$ is nonsingular as $x\to 0$. NDSolve is not capable of figuring out this fact.

Any suggestions?

Best regards- Mike

mike
  • 303
  • 1
  • 6
  • 1
    Having got what you wrote about the functions that are even in x I would still recommend replacing the terms like (3*Derivative[0, 1, 0][f][t, x, z])/x with (3*Derivative[0, 1, 0][f][t, x, z])/Sqrt[x^2+eps] where eps=0.00001 or so. This alone does not solve your problem, since the warning: "Unable to find initial conditions that satisfy..." pops up. – Alexei Boulbitch Apr 04 '23 at 12:44
  • @AlexeiBoulbitch: Thanks for your help. I replaced 1/x by 1/Sqrt[x^2+eps] and got error message: "Unable to find initial conditions that satisfy the residual function within specified tolerances. Try giving initial conditions for both values and derivatives of the functions". After I specify the initial derivatives for all 3 dependent variables, I got error message :"Nonlinear coefficients are not supported in this version of NDSolve." – mike Apr 04 '23 at 13:02
  • 1
    The latter message suggests that you use an older version of Mathematica, do you? – Alexei Boulbitch Apr 04 '23 at 13:53
  • 1
    Using a spatial grid with an even number of points will avoid $x=0$ and perhaps have small error. Unfortunately, there is still the problem of finding initial conditions for all the variables (= functions & their derivatives). Perhaps you can do that by hand. (How to get an even number of points: Method -> {"MethodOfLines", "TemporalVariable" -> t, "SpatialDiscretization" -> {"TensorProductGrid", "MaxPoints" -> 50, "MinPoints" -> 50}}) – Michael E2 Apr 04 '23 at 14:42
  • @AlexeiBoulbitch you are right. with version 13.2, it is running now. By the way, because $-1<=x<=1$, I need to replace $1/x$ with Sign[x]/Sqrt[x^2+eps]$ – mike Apr 04 '23 at 21:03
  • @MichaelE2 Thanks for the suggestion. For your option, the error message I got is "Because the coordinates were explicitly given for the direction of independent variable x, the values of options {MaxPoints, MinPoints, StartingPoints, MaxStepSize,MinStepSize,StartingStepSize} will be disregarded for this direction". – mike Apr 04 '23 at 21:07
  • 1
    @mike, try changing {x, -1, 0, 1} to {x, -1, 1}. – Michael E2 Apr 05 '23 at 00:36
  • 1
    @mike In the paper sited Thomas used adaptive mesh method proposed in https://arxiv.org/pdf/2102.06663.pdf – Alex Trounev Apr 05 '23 at 04:54
  • @MichaelE2: I tried. It does not help. Thanks again! – mike Apr 05 '23 at 08:56
  • @AlexTrounev: Their adaptive mesh method looks too complicated to me. I hope to take short cut with NDSolve. :-) – mike Apr 05 '23 at 09:01

1 Answers1

3

We can solve this problem using implicit-explicit method and linear FEM as follows. First, we add artificial viscosity of about $10^{-6}$ so that $\nu\ne 0$. Note that artificial viscosity also used in the paper even Thomas Hou supposed $\nu=0$. Second, we use time step of about $dt=0.00005675$, while in the paper $dt\le 10^{-6}$. Third, our mesh is of 4050 quad elements only, while in the paper there is adaptive mesh by $1536\times 1536$ elements. Nevertheless we can reproduce singularity similar as in the paper.

Needs["NDSolve`FEM`"];

mesh = ToElementMesh[Rectangle[{-1, -1/2}, {1, 1/2}], AccuracyGoal -> 5, PrecisionGoal -> 5, "MaxCellMeasure" -> 0.0005] ; U[0][x_, z_] := 12000(1 - x^2)^18(Sin[2Piz]/(1 + (25/2)Sin[Piz]^2)); W[0][x_, z_] := 0; F[0][x_, z_] := 0; nu = 10^-6; dt = 0.00227/40; T = {0.002271815, 0.002274596, 0.002276480};

Do[{U[i], W[i], F[i]} = NDSolveValue[{(u[x, z] - U[i - 1][x, z])/dt - xDerivative[0, 1][F[i - 1]][x, z]Derivative[1, 0][u][x, z] + Derivative[0, 1][u][x, z](2F[i - 1][x, z] + xDerivative[1, 0][F[i - 1]][x, z]) - 2u[x, z]Derivative[0, 1][F[i - 1]][x, z] - nu (Derivative[0, 2][u][x, z] + (3Derivative[1, 0][u][x, z])/ x + Derivative[2, 0][u][x, z]) == 0, -2U[i - 1][x, z]Derivative[0, 1][u][x, z] + Derivative[0, 1][w][x, z](2F[i - 1][x, z] + xDerivative[1, 0][F[i - 1]][x, z]) - xDerivative[0, 1][F[i - 1]][x, z]* Derivative[1, 0][w][x, z] + (w[x, z] - W[i - 1][x, z])/dt - nu (Derivative[0, 2][w][x, z] + (3Derivative[1, 0][w][x, z])/ x + Derivative[2, 0][w][x, z]) == 0, w[x, z] + (Derivative[0, 2][f][x, z] + (3Derivative[1, 0][f][x, z])/x + Derivative[2, 0][f][x, z]) == 0, DirichletCondition[{w[x, z] == 0, f[x, z] == 0, u[x, z] == 0}, True]}, {u, w, f}, Element[{x, z}, mesh], Method -> {"FiniteElement", "InterpolationOrder" -> {u -> 2, w -> 2, f -> 2}}];, {i, 1, 40}]

Visualization

Table[Plot3D[U[i][x, z], Element[{x, z}, mesh], PlotRange -> All, 
  Mesh -> None, ColorFunction -> "Rainbow", PlotLabel -> 1. dt i], {i,
   0, 40, 10}]

Table[Plot3D[W[i][x, z], Element[{x, z}, mesh], PlotRange -> All, Mesh -> None, ColorFunction -> "Rainbow", PlotLabel -> 1. dt i], {i, 10, 40, 10}]

Figure 1

The detailed picture of singularity

{Plot3D[U[40][x, z], {x, 0, .04}, {z, 0, .04}, PlotRange -> All, 
  Mesh -> None, ColorFunction -> "Rainbow"], 
 Plot3D[W[40][x, z], {x, 0, .04}, {z, 0, .04}, PlotRange -> All, 
  Mesh -> None, ColorFunction -> "Rainbow"]}

Figure 2

Alex Trounev
  • 44,369
  • 3
  • 48
  • 106
  • Very impressive! I would suggest that you publish it. I do not quite understand that "Rectangle[{-1, -1/2}, {1, 1/2}]". The solutions are symmetric in $x$ and anti-symmetric in $z$. I can follow you if you solve the PDEs for $-1<=x<=0,0<=z<=1/2$ and then symmetrize it wrt $x$ and anti-symmetrized wrt $z$. But why "Rectangle[{-1, -1/2}, {1, 1/2}]"? What do is mean? – mike Apr 05 '23 at 12:39
  • The thing people want to now is whether the singularity will form on the z axis (x=0) in finite time. Thus the thing that is less ideal in Hou's paper, in my opinion, is that x=0 is the boundary of their simulation. This may introduce large error. In my equations above, (x=0,z=0) is in the middle of the domain $D_2={(x,z): -1<=x<=1,-1/2<=z<=1/2}$, I was hoping to see that by putting the potential singular region in the middle of the simulation domain, we would see more accurate behavior of the solutions (finite time blowup singlarity formation) – mike Apr 05 '23 at 12:40
  • 1
    @mike In your notation Rectangle[{-1, -1/2}, {1, 1/2}] is $D_2=(x, z): -1\le x\le 1, -1/2\le z \le 1/2$. – Alex Trounev Apr 05 '23 at 14:16
  • I see. These are the lower-left and up-right corners. Have you checked plots like "Plot[U[40][x, 0], {x, -0.05, 0.05}, PlotRange -> All]" and "Plot[U[40][x, 0], {x, -0.05, 0.05}, PlotRange -> All]"? Why are they anti-symmetric in x? – mike Apr 05 '23 at 15:08
  • 1
    @mike Actually this model defined at $x\ge 0$ only. As I understand, solution at $x<0$ used for convergence only. – Alex Trounev Apr 05 '23 at 16:11
  • You are right. Since doubling the domain in $x$ will not automatically reduce the error near $x=0$, I go back to original domain in Hou's paper $D={(x,z):0\leq x\leq 1,0\leq z\leq 1/2}$. The solution looks similarly nice. $1/x$ term will not cause trouble. – mike Apr 05 '23 at 23:19
  • I also have question about DirichletCondition[{w[x, z] == 0, f[x, z] == 0, u[x, z] == 0}, True]. Is this an initial condition? Why do we not need boundary conditions? – mike Apr 06 '23 at 02:11
  • 1
    @mike DirichletCondition[{w[x, z] == 0, f[x, z] == 0, u[x, z] == 0}, True] are boundary conditions same as yours BC, while initial conditions are U[0][x_, z_] := 12000*(1 - x^2)^18*(Sin[2*Pi*z]/(1 + (25/2)*Sin[Pi*z]^2)); W[0][x_, z_] := 0; F[0][x_, z_] := 0;. – Alex Trounev Apr 06 '23 at 05:05
  • Alex: How can I improve the quality of your NDSolve/FEM solution. (1) set "MaxCellMeasure" to 0.0001 or even smaller; reduce dt to 1/10 of its original value and increase the total time steps tp 400. Can I set "InterpolationOrder" to 4? Best regards- – mike Apr 07 '23 at 02:02
  • 1
    Actually the "MaxCellMeasure" and dt are only parameters to improve solution. – Alex Trounev Apr 07 '23 at 04:45
  • In the answer to question "https://mathematica.stackexchange.com/questions/188101/ndsolve-method-of-lines-unexpected-error-insufficient-boundary-conditions", @xzczd mentioned that "We can use r=0 as the left boundary because "FiniteElement" is able to handle the removable singularity there". This probably explained why FEM worked here as well. – mike Apr 10 '23 at 08:27
  • Hi Alex: I noticed an interesting difference between Thomas numerical solution in Ref.1 and your solution in the answer. If you let $z1=4*10^{-3}} and do Plot[u[40][x,z1],{x,-0.02,0.02}], you will see that u[t(40)][x=0,z1]>1. But from inspection of Figure (3.1) in Ref.1, you will see that |u[t(40)],x=0,z1)|<1/10. This also true for w. As you now that (Thomas)u1==(your)u, (Thomas)omega1==(your)w. – mike Apr 10 '23 at 08:40
  • 1
    @mike Actually we can't reproduce results from Thomas paper one to one, since he used FDM, while we use FEM. – Alex Trounev Apr 11 '23 at 06:32