Preconditioning pressure for 2.5D hydrodynamic stability calculations

6 views
Skip to first unread message

j.simo...@gmail.com

unread,
Oct 15, 2025, 8:21:44 AM (23 hours ago) Oct 15
to Nek5000
Hi Neks!

I have implemented a 2.5D integrator in Nek5000 (2D baseflow, 3D linear perturbations) which integrates the coupled linear equations forward in time for the real and imaginary parts of the perturbations separately, using the temperature field as a storage space for the third (w) perturbation component.

I follow the same explicit/implicit blend as for the regular 2D or 3D nek simulations in PnPn-2 mode with a Jacobi-preconditioned Helmholtz solve for the intermediate velocity and a pressure correction step using the semg_xxt preconditioner.

I have never looked into the pressure preconditioning in detail and I hope some of you can point me in the right direction for how to proceed.

Some details on the problem:

I am changing the matrix A (the Laplace operator). Due to dt<<1 this does not affect the velocity solution method that still works great, but the pressure preconditioner does not work (somewhat expected). When I say 'does not work' I mean that the first iterations the residual stagnates and only if the residual is below tolerance once do the subsequent iterations work well. This initial inaccuracy of the solution is a roadblock for stability calculations. 

Thoughts:

1. Since the cases are all 2D and we are not looking into huge runs, XXT should in principle be the right preconditioner to use (correct me if I'm wrong)
2. For now the new timestepping algorithm is hard-coded, so if I need to change the preconditioner, I need to do it manually (cannot simply change the keyword in the par file)
3. As I understand XXT (and also the AMG preconditioner) it should in principle work also for the new Laplace operator which is structurally similar to the regular 2D version. I am hoping that it's sufficient to alter the coarse-grid solves in the same way as the fine-grid solves to restore preconditioning efficacy. I have tried identifying this location in the code behind hsmg_solve inside the GMRES iteration but have a hard time understanding where I should make changes.

I'm very happy for any ideas on this! I think having an efficient 2.5D timestepper in Nek would be a game changer for stability computations :)

YuHsiang Lan

unread,
Oct 15, 2025, 7:15:40 PM (13 hours ago) Oct 15
to Nek5000
Hi,

Can you provide the equations you are solving? 
Do you also modify the matrix for the pressure Poisson equation?

If so, there are LOTS of changes that need to be updated deeply inside the SEMG.
The default preconditioner for PnPn-2 has theses components:
- Multigrid SEMG (hsmg_solve), Typically, N=7 (lx1=8) -> N=3 -> N=1
- Schwatz smoother (hsmg_schwarz), where subdomains are approximately solved by FDM (hsmg_fdm).
  Basically, it approximates the inverse of the elementwise mat-vec with tensor products. 
  For your case, this might be tricky if the operator is not separable.
-  crs: Coarse grid (N=1) solve (hsmg_coarse_solve) via either XXT or HYPRE.
   This turns out to be very easy since it uses Galerkin projection and one only needs to update the forward operator in get_local_crs_galerkin.

Alternatively, I'd suggest trying uzprec first.
Then, I'd probably try two grid method: uzprec + crs or jacobi + crs.
It will be easier to avoid Schwatz smoother and replace it with Jacobi (+ Chebyshev) smoother.
You can follow hmh_gmres, replace fdm_h1 with jacobi or uzprec, followed by a your updated crs_solve_h1.

All of this assumes you still have symmetric positive definite matrix. If not, you might want to consider different approaches.

Hope this helps,
Yu-Hsiang
--
Reply all
Reply to author
Forward
0 new messages