2
$\begingroup$

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[2*Pi*z]/(1 + (25/2)*Sin[Pi*z]^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

$\endgroup$
10
  • 1
    $\begingroup$ 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. $\endgroup$ Commented Apr 4, 2023 at 12:44
  • 1
    $\begingroup$ The latter message suggests that you use an older version of Mathematica, do you? $\endgroup$ Commented Apr 4, 2023 at 13:53
  • 1
    $\begingroup$ 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}}) $\endgroup$
    – Michael E2
    Commented Apr 4, 2023 at 14:42
  • 1
    $\begingroup$ @mike, try changing {x, -1, 0, 1} to {x, -1, 1}. $\endgroup$
    – Michael E2
    Commented Apr 5, 2023 at 0:36
  • 1
    $\begingroup$ @mike In the paper sited Thomas used adaptive mesh method proposed in arxiv.org/pdf/2102.06663.pdf $\endgroup$ Commented Apr 5, 2023 at 4:54

1 Answer 1

3
$\begingroup$

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[2*Pi*z]/(1 + (25/2)*Sin[Pi*z]^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 - 
       x*Derivative[0, 1][F[i - 1]][x, z]*Derivative[1, 0][u][x, z] + 
       Derivative[0, 1][u][x, 
         z]*(2*F[i - 1][x, z] + x*Derivative[1, 0][F[i - 1]][x, z]) - 
       2*u[x, z]*Derivative[0, 1][F[i - 1]][x, z] - 
       nu (Derivative[0, 2][u][x, z] + (3*Derivative[1, 0][u][x, z])/
           x + Derivative[2, 0][u][x, z]) == 
      0, -2*U[i - 1][x, z]*Derivative[0, 1][u][x, z] + 
       Derivative[0, 1][w][x, 
         z]*(2*F[i - 1][x, z] + x*Derivative[1, 0][F[i - 1]][x, z]) - 
       x*Derivative[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] + (3*Derivative[1, 0][w][x, z])/
           x + Derivative[2, 0][w][x, z]) == 0, 
     w[x, z] + (Derivative[0, 2][f][x, 
          z] + (3*Derivative[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

$\endgroup$
13
  • 1
    $\begingroup$ @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$. $\endgroup$ Commented Apr 5, 2023 at 14:16
  • 1
    $\begingroup$ @mike Actually this model defined at $x\ge 0$ only. As I understand, solution at $x<0$ used for convergence only. $\endgroup$ Commented Apr 5, 2023 at 16:11
  • 1
    $\begingroup$ @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;. $\endgroup$ Commented Apr 6, 2023 at 5:05
  • 1
    $\begingroup$ Actually the "MaxCellMeasure" and dt are only parameters to improve solution. $\endgroup$ Commented Apr 7, 2023 at 4:45
  • 1
    $\begingroup$ @mike Actually we can't reproduce results from Thomas paper one to one, since he used FDM, while we use FEM. $\endgroup$ Commented Apr 11, 2023 at 6:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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