I am trying to solve the Stokes equation containing viscosity nonlinearity using the open source finite element software underworld2 with nested PETSc. The resolution is 2000*200. The solution results of the mumps and multigrid methods were obtained respectively.

========> mumps-parallel <========

SCR Solver Summary:

RHS V Solve: = 0.1076 secs / 1 its Pressure Solve: = 4.392 secs / 45 its Final V Solve: = 0.09192 secs / 1 its

Total BSSCR Linear solve time: 6.933524 seconds

========> multigrid-parallel <======== SCR Solver Summary:

Multigrid setup: = 0.0644 secs RHS V Solve: = 1.072 secs / 28 its Pressure Solve: = 39.63 secs / 48 its Final V Solve: = 0.9294 secs / 25 its

Total BSSCR Linear solve time: 42.033690 seconds

To my great shock, the mg method is many times slower than mumps, and this result does not improve significantly as the fractional ratio increases. This goes against the well-known multigrid approach, I wonder why? I've also tried modifying ksp_type and pc_type, but that doesn't help. It is also the mg method. I think the problem lies in the solution of the external pressure system. Why is the internal speed solution so different from the pressure solution? Any keys or suggestions would be greatly appreciated.

Many thanks!

  • $\begingroup$ What do you mean 2000*200 resolution? How many degrees of freedom are you doing? By non-linear viscosity you mean space dependent viscosity right? MUMPs will not scale for large systems equations so test something like 1,000,000 dofs with MUMPS vs multigrid with linear viscosity. It's almost known that a 100,000 dofs system solved directly is going to be faster than any iterative method. As for the influence of nonlinear viscosity, I can't comment on that. $\endgroup$ Dec 19, 2023 at 12:09
  • $\begingroup$ Thanks for the answer. Your idea is correct, viscosity is spatially varying. I have tried a resolution of 1000*1000, that is, 2e6 degrees of freedom for speed and 1e6 degrees of freedom for pressure. But the result is still like this. I don’t know why. My impression is that the speed of the mg method has an O(N) relationship with the size of the problem. $\endgroup$
    – Darcy
    Dec 19, 2023 at 13:50
  • $\begingroup$ I am not sure because I haven't used that library. Anyway, you. mentioned how non-linear viscosity is effecting the speed of the MG but you haven't reproted stats for when you have constant viscousity and I am just taking your word for it. I don't think i would help you but it could help the person checking this $\endgroup$ Dec 19, 2023 at 15:02
  • $\begingroup$ Are you applying the MG method to the entire linear system? It is difficult to construct smoothers for the Stokes system when treated monolithically, which is why most people use multigrid only on the velocity block of the Stokes system. $\endgroup$ Dec 19, 2023 at 22:55
  • $\begingroup$ Dear Prof. Bangerth, Thank you very much for your response and suggestions. I will carefully consider your advice and try to apply the multigrid method to the velocity block of the Stokes system. Your expertise is highly valuable to me. A simple test I did was to change the KSP of the pressure solution in the external system to preonly (none). I found that the entire stokes system did not converge... I think maybe I am not very clear about the entire process and only know some external ones. Thank you again for your help. $\endgroup$
    – Darcy
    Dec 20, 2023 at 3:07


Your Answer

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