How to understand and choose the LEQ solver and the linear preconditioner

Hello everyone,

How to understand the LEQ solver and the linear preconditioner and what they are used for?

I noticed a report named “Linear Solver Performance Analysis of MFiX integrated with a Next Generation Computational Framework” online ( PowerPoint Presentation (doe.gov)), findind a page about LEQ solver attached below. It seems that the LEQ solver has some effects on results. So my second question is how to choose the LEQ solver? Similarly, how to choose the linear preconditioner?

Thanks for your help.

Kindly regards

The governing equations are linearized so they can be written as a set of linear equations Ax=b. This needs to be solved with an iterative method at each time step. This is what the LEQ (Linear EQuation) solver refers to. With MFiX we recommend using the BICGs solver. The preconditionner helps convergence for stiff systems. The Line preconditioner will help if initial conditions are not well defined. Otherwise you can most likely use no preconditioner.

Thank you @jeff.dietiker . However, I am confused about the governing equation residual and the linear equation tolerance. If the governing equations are linearized, can the governing equation residual be seem as the linear equation tolerance? I feel thar are similar. But all the tolerances of linear equations are 1.0e-4, while the residuals for governing equations are not specified the same number.

These are two different tolerances. LEQ_TOL is for solving the system of linear equations during one of the SIMPLE iterations. TOL_RESID is used to check convergence of the SIMPLE algorithm.

I can roughly have a general understanding of LEQ_TOL and TOL_RESID. I also read BiCGSTAB for LEQ_TOL in Matlab Help ( Solve system of linear equations — stabilized biconjugate gradients method - MATLAB bicgstab - MathWorks China) to promote my understanding. In this page, there is a picture in which a line referring to the tolerance for linear equations is marked and I copy this figure here.
image
However, this line in the former figure is very similar to the line in the residual figure below. For example, the default MAX_NIT=50. The iteration would go to the next time step even if the number of the present iteration is 10, if the residuals of ineration below their TOL_RESID values. The red solid line may be TOL_RESID but how to mark LEQ_TOL in the figure below? LEQ_TOL=1.0e-4 and not all the lines should reach this value during one iteration.

These 2 plots are not the same. The top one shows the linear equation solver iterations while the bottom one shows the SIMPLE iterations (here the iterations are not reset to zero at each time step but just aggregate so we can plot a history of convergence over many time steps. When we go below the red line, we move on to the next time step and it takes approximately 5 SIMPLE iterations per time step). MAX_NIT=50 is the maximum number of iterations. If convergence is reached in fewer iterations, we move on to the next time step. If convergence is not reached, the time step will decrease and we try again to converge. There is no way to mix the linear equation solver iterations and the SIMPLE iterations on the same plot.

1 Like

Thank you very much. You mean each SIMPLE iteration during one time step comes from a period of iterations for the linear equation?

Yes. During each SIMPLE iteration, we solve several governing equations (continuity, momentum etc). For each of these equations, we solve Ax=b with an iterative method, which takes a few iterations (linear equation solver iterations) to converge.

2 Likes

I get it. Much thanks.