Linear Solver
Default Linear Settings for Heat Transfer and Moisture Transport interfaces
The default linear solver is determined based on the number of degrees of freedom and physics interface settings.
For small number of degrees of freedom, the direct PARDISO solver is used. It is known to be robust and fast for small-sized problems.
For larger models, the linear iterative GMRES solver with multigrid preconditioner is used. In most cases, SOR is the presmoother and postsmoother. This solver is memory effective and fast for large models.
When the model contains settings that lead to a system matrix with 0 on the diagonal (for example, Lagrange multipliers for weak constraints), SOR cannot be used and is replaced by SCGS with Vanka option enabled, which is usually slower and uses more memory.
Default linear Settings for The Lumped Thermal System Interface
When a Lumped Thermal System interface is coupled to one or many heat transfer interfaces using Lumped Thermal Connector nodes, the default linear solver is PARDISO if the total number of degree of freedom of the heat transfer and lumped thermal system interfaces is small. Otherwise a linear iterative GMRES solver with multiple preconditioner is used. The classical multigrid preconditioner from the heat transfer interfaces is set for the heat transfer interface variables. And a direct preconditioner is used for the lumped thermal system variables.
Tuning Linear Solver
Tuning the linear solver may be considered in case of nonconvergence or low performance. When convergence fails you should first verify that this is not due to an ill-posed model, or inappropriate settings in the Time-Dependent study or nonlinear solver.
Several options are available to tune the linear solver settings. This paragraph focuses only on the most commonly used ones.
Switch to PARDISO
When the GMRES solver with multigrid preconditioner is set by default, using PARDISO instead can be considered provided that enough RAM is available. Indeed, PARDISO usually converges easily but uses much more memory than the default iterative solver. If PARDISO does not converge, it may indicate that there is an issue in the model definition or with other solver settings.
Optimize GMRES/Multigrid for Memory
In order to optimize further the memory needed by the iterative solver, the number of mesh elements on the coarser multigrid level can be reduced by, for instance, increasing the Mesh coarsening factor or the Number of multigrid levels. The latter strategy may also increase the resolution time.
Optimize GMRES/Multigrid for Convergence
When the linear solver has difficulties to converge, the following settings can be tuned:
When the convergence graph of GMRES shows a slow down every 50 iterations, the Number of iteration before restart parameter (default value of 50) should be increased — doubled for example. This may also increase the memory consumption.
Increasing the Number of iteration in the Multigrid settings, and in the presmoother and postsmoother nodes improves the quality of the preconditioner and convergence of GMRES.
Since an excessive difference between two multigrid levels can affect the convergence, lowering the Mesh coarsening factor in the Multigrid settings can help convergence.
Choosing the Right Linear System Solver in the COMSOL Multiphysics Reference Manual