BDF methods are only A-stable up to order 2, so you may have problems like this if the system has complex unstable eigenvalues. Try restricting the order to 2. Also, note that implicit methods are highly dissipative, so large time steps will dampen spurious as well as physical instabilities.
Hard to comment here without more detail about absolute problem size and machine architecture. Are you using a direct or iterative linear solver?
Thanks for the reply,
Sorry that I didn’t give details,
I ran the same code with bdf 3 twice in different time steps, one for 0.25, the other for 0.5, and the result shows that they are end in a different state. Is the results from larger time steps credible?
I know little about the preconditioners, so I use the default "-pc_type lu -ksp_type preonly", and I think it is a direct solver. For the medium mesh, there are 16500 vertices, and I solve NSE and heat equation with 6 processes.The refined mesh is about 10 times larger, and I thought 64 maybe appropriate, but it became much slower.
Larger timesteps are more dissipative but less accurate. I am not sure how you normalized time in your code, but I suspect both 0.25 and 0.5 are both much too large, assuming a typical reference scale. In most cases for incompressible flow with dimensionless t=D/U~1, 0.01 is a good order of magnitude guess for a reasonable time step.
Direct methods are a fine first step, but you are probably getting slammed by communication overhead on a mesh this size with that many procs. Try staying in the 4-16 processor range until you optimize your solver with iterative methods.
I use the free-fall velocity U=\sqrt{g\beta (T-T_0)L} and L/U for time, the maximum velocity in the recent trials is about 6.6e-2, L=1, and D/U\approx15, so 0.15 is a proper dt? The results with dt=0.5 finally shift to the state just like the other, but too much later, I observed the shift just before, and it seems not as a stable state as dt=0.25.
I have no idea about iterative solvers. Which iterative solver is suitable for NSE? Could you recommend an example about iterative methods?
I am sorry, but these are questions that I cannot answer without a lot more information. Are you using a second-order bdf now? It is better to get the right answer at excessive computational expense than to get the wrong answer cheaply. When in doubt, make the time-step small.
If you do not know much about iterative solvers, then stick with direct solvers for now.
Dear all,
I have a question regarding the term sig*dot(v, dub)in the Jacobian. How do we derive it? Is it related to \frac{\partial F}{\partial \dot{u}} in \frac{\partial F}{\partial u}=\frac{\partial F}{\partial \dot{u}} \frac{\partial \dot{u}}{\partial u}+\frac{\partial F}{\partial u}? I read PETSc/TAO Users Manual and find this equation in Section: TS: Scalable ODE and DAE Solvers (TS: Scalable ODE and DAE Solvers — PETSc 3.21.5 documentation).
Now, we have F=\int_\Omega\mathbf{v} \cdot \dot{\mathbf{u}} + ((\mathbf{u}\cdot\nabla) \mathbf{u} ) \cdot \mathbf{v} + \nu \nabla \mathbf{u}:\nabla \mathbf{v}
- p \nabla\cdot \mathbf{v} - q \nabla\cdot \mathbf{u}. How do we obtain the Jacobian? Thank you.