13. FLOW_PRESSURE_SOLVER and FLOW_VISCOUS_SOLVER Namelist

13.1. Overview

The flow algorithm requires the solution of two linear systems at each time step: the implicit viscous velocity update system and the pressure Poisson system. Truchas uses the hybrid solver from the HYPRE software library to solve these systems.

The hybrid solver first uses a diagonally-scaled iterative Krylov solver. If it determines that convergence is too slow, the solver switches to a more expensive but more effective preconditioned Krylov solver that uses an algebraic multigrid (AMG) preconditioner (BoomerAMG).

The FLOW_VISCOUS_SOLVER namelist sets the HYPRE hybrid solver parameters for the solution of the implicit viscous velocity update system, and the FLOW_PRESSURE_SOLVER namelist sets the solver parameters for the solution of the pressure Poisson system. The same variables are used in both namelists.

13.2. FLOW_VISCOUS_SOLVER Namelist Features

Required/Optional : Required only for viscous flow with viscous_implicitness > 0.
Single/Multiple Instances: Single

13.3. FLOW_PRESSURE_SOLVER Namelist Features

Required/Optional : Required
Single/Multiple Instances: Single

13.4. Components

krylov_method

Description : Selects the Krylov method used by the HYPRE hybrid solver.
Type : string
Default : cg
Valid Values: cg, gmres, bicgstab

krylov_dim

Description : The Krylov subspace dimension for the restarted GMRES method.
Type : integer
Default : \(5\)
Valid Values: \(\gt 0\)

conv_rate_tol

Description : The convergence rate tolerance \(\theta\) where the hybrid solver switches to the more expensive AMG preconditioned Krylov solver. The average convergence rate after \(n\) iterations of the diagonally-scaled Krylov solver is \(\rho_n = (‖r_n‖/‖r_0‖)^{1/n}\), where \(r_n = Ax_n − b\) is the residual of the linear system, and its convergence is considered too slow when

\([1-\frac{|\rho_n-\rho_{n-1}|}{max(\rho_n,\rho_{n-1})}]\rho_n \gt \theta\)

Type : real
Default : \(0.9\)
Valid Values: \((0,1)\)

abs_tol, rel_tol

Description : The absolute and relative error tolerances \(\epsilon_1\) and \(\epsilon_2\) for the solution of the linear system. The test for convergence is \(‖r‖ \leq max\{\epsilon_1,\epsilon_2‖b‖\}\), where \(r = Ax − b\) is the residual of the linear system.
Type : real
Default : none

max_ds_iter

Description : The maximum number of diagonally scaled Krylov iterations allowed. If convergence is not achieved within this number of iterations the hybrid solver will switch to the preconditioned Krylov solver.
Type : integer

max_amg_iter

Description : The maximum number of preconditioned Krylov iterations allowed.
Type : integer

13.5. Additional HYPRE parameters (Expert)

Some additional HYPRE solver parameters and options can be set using these namelists. Nearly all of these are associated with the BoomerAMG preconditioner, and all have reasonable defaults set by HYPRE. See the ParCSR Hybrid Solver section in the HYPRE reference manual for details. The HYPRE documentation has some additional information. The variables that can be set are listed below. Note that the variables correspond to similarly-named HYPRE library functions and not actual HYPRE variables. Also note that there are many parameters and options that cannot currently be set by the namelists.

  • cg_use_two_norm(logical)

  • amg_strong_threshold(real)

  • amg_max_levels(integer)

  • amg_coarsen_method(integer)

  • amg_smoothing_sweeps(integer)

  • amg_smoothing_method(integer)

  • amg_interp_method(integer)