This article explains the preconditioned conjugate gradient solver, which is used by the thermal solver, preconditioning techniques, convergence criteria, and memory management strategies to enhance convergence speed and numerical stability of your thermal simulations.
Preconditioned conjugate gradient solver
Simcenter 3D uses the same thermal solver for both steady-state and transient heat transfer solutions. The thermal solver uses the following algorithm:
The preconditioned conjugate gradient solver is an iterative method for solving large, sparse systems of linear equations. It is an enhancement of the standard conjugate gradient (CG) method, designed to improve convergence speed and numerical stability.
Conjugate gradient method
Uses the bi-conjugate gradient stabilized technique to solve for temperatures. The equations are placed into the matrix format:
where:
Preconditioning
Uses an approximate inverse matrix as a preconditioner to accelerate convergence. The preconditioning matrix is created using the incomplete lower-upper (ILU) factorization method. The preconditioning matrix is updated every ten iterations for steady-state runs or integration time steps for transient runs. Additionally, before every solution, the solver checks the diagonal terms of the [GG] matrix for any changes since the last update of the preconditioning matrix. If the change exceeds 100%, the preconditioning matrix is automatically updated.
Convergence criteria and memory allocation for conjugate gradient solvers
The preconditioned conjugate gradient solver converges when the residual value is less than the convergence criterion. This is monitored and displayed with the following message:
ILU iteration 1 Residual= 1.76E-02
ILU iteration 2 Residual= 3.96E-03
ILU iteration 3 Residual= 4.64E-04
ILU iteration 4 Residual= 1.82E-04
ILU iteration 5 Residual= 8.75E-05
ILU iteration 6 Residual= 4.04E-05
ILU iteration 7 Residual= 2.05E-05
ILU iteration 8 Residual= 1.22E-05
ILU iteration 9 Residual= 8.32E-06
ILU iteration 10 Residual= 5.56E-06
When the conjugate gradient solver cannot meet the specified convergence criterion after the maximum number of iterations, it issues the following warning message:
4952
** Conjugate-gradient solver did not converge in 100 iterations.
** Solution automatically restarting with matrix fill value 210.
** Information: Residual= 6.070E-06, Target = 1.000E-05, Matrix fill = 200
** No user intervention required.
And the solver performs one of the following steps:
You can specify a higher value in the Preconditioner Matrix Fill Value box for ill-conditioned matrices. It increases the convergence, however requires more CPU time.
When convergence is difficult, this may lead to a large system to solve and large memory consumption. Verify if you have the following message in the <simulation/model name>-<solution/analysis name>_verbose.log file, the old MSGF file:
7951
** Unable to allocate sufficient memory to solve the model with a
** matrix fill value of 70. Trying to allocate 42957668352. bytes,
** 11222808612 have already been allocated. Possible cause: insufficient
** swap space. Suggestion: if you find the residual value
** acceptable, increase the convergence criterion to something
** above this value.
If the residual value is acceptable, increase the convergence criterion.
You can also request the timing and memory information in thermal solver modules by including the INCLUDE TIMING INFO IN VERBOSE OUTPUT and INCLUDE MEMORY INFO IN VERBOSE OUTPUT advanced parameters to your solution.