- L_matrixThe matrix tag name corresponding to the diffusive part of the velocity equations.
C++ Type:TagName
Unit:(no unit assumed)
Controllable:No
Description:The matrix tag name corresponding to the diffusive part of the velocity equations.
- commute_lscFalseWhether to use the commuted form of the LSC preconditioner, created by Olshanskii
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Whether to use the commuted form of the LSC preconditioner, created by Olshanskii
- linear_sys_namesThe linear system names
C++ Type:std::vector<LinearSystemName>
Unit:(no unit assumed)
Controllable:No
Description:The linear system names
- mass_matrixThe matrix tag name corresponding to the mass matrix.
C++ Type:TagName
Unit:(no unit assumed)
Controllable:No
Description:The matrix tag name corresponding to the mass matrix.
- regard_general_exceptions_as_errorsFalseIf we catch an exception during residual/Jacobian evaluaton for which we don't have specific handling, immediately error instead of allowing the time step to be cut
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:If we catch an exception during residual/Jacobian evaluaton for which we don't have specific handling, immediately error instead of allowing the time step to be cut
- schur_fs_indexif not provided then the top field split is assumed to be the Schur split. This is a vector to allow recursive nesting
C++ Type:std::vector<unsigned int>
Unit:(no unit assumed)
Controllable:No
Description:if not provided then the top field split is assumed to be the Schur split. This is a vector to allow recursive nesting
- solveTrueWhether or not to actually solve the Nonlinear system. This is handy in the case that all you want to do is execute AuxKernels, Transfers, etc. without actually solving anything
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:Yes
Description:Whether or not to actually solve the Nonlinear system. This is handy in the case that all you want to do is execute AuxKernels, Transfers, etc. without actually solving anything
- use_pressure_mass_matrixFalseWhether to just use the pressure mass matrix as the preconditioner for the Schur complement
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Whether to just use the pressure mass matrix as the preconditioner for the Schur complement
NavierStokesProblem
The NavierStokesProblem
solves the saddle point incompressible Navier-Stokes equations using Schur complement field split preconditioning. It focuses on the Least Squares Commutator (LSC) preconditioner, also known as the BFBt preconditioner, developed by Elman in (Elman, 1999) and (Elman et al., 2006). The PETSc manual page on the LSC preconditioner can be found here.
A linearized version of the incompressible Navier-Stokes equations discretized with stable finite element pairings may be written as:
where denotes velocity degrees of freedom, denotes pressure degrees of freedom, and denotes the effect of body forces not dependent on the velocity/pressure degrees of freedom (e.g. gravity). The LSC preconditioner proposed by Elman approximates the Schur complement inverse via
where is a diagonal approximation of the velocity mass matrix. In the case of continuous pressure elements (per (Olshanskii and Vassilevski, 2007)), the above can be re-written as
where represents a Poisson-like operator with dimension corresponding to the number of pressure degrees of freedom, hence the subscript. PETSc has full support for LSC preconditioning. The PETSc user may optionally provide two "auxiliary" matrices for LSC preconditioning, corresponding to and , which correspond to the NavierStokesProblem
parameters "L_matrix" and "mass_matrix" respectively. Note that in order to have scaling, the PETSc option -pc_lsc_scale_diag
must be supplied. If -pc_lsc_scale_diag
is not provided, then is implicitly the identity vector. If -pc_lsc_scale_diag
is supplied and "mass_matrix" is not provided, then will be populated with the diagonal of . If "L_matrix" is not provided, then it will be computed automatically via
(Olshanskii and Vassilevski, 2007) proposed a modification to the LSC preconditioner:
The Olshanskii preconditioner replaces the velocity mass matrix with a pressure mass matrix () and a Poisson-like operator of pressure degree of freedom dimension with a Poisson-like operator of velocity degree of freedom dimension (). The Olshanskii preconditioning variant can be activated by setting the "commute_lsc" to true
and passing the PETSc option -pc_lsc_commute
. Note that if the commuted LSC preconditioner has been requested, then "L_matrix" must be provided since it cannot be formed from system matrix data. Similarly, "mass_matrix" must also be provided.
A final option available to users is the "use_pressure_mass_matrix" parameter. For Stokes flow (no advective term in the momentum equation) it is known that the pressure mass matrix is spectrally equivalent to the Schur complement, in which case the pressure mass matrix is an ideal choice for forming a preconditioner. If the user sets this option to true
, then
in which case a "standard" preconditioner can be used (e.g. -pc_type lu
, -pc_type hypre -pc_hypre_type boomeramg
, etc.) as opposed to LSC.
Which preconditioner to choose
(Zanetti and Bergamaschi, 2020) compares the Elman and Olshanskii LSC preconditioners for "high" Reynolds numbers. The overarching result from that paper is that Olshanskii is better performing, although the largest kinematic viscosity explored in that article direclty comparing the two methods is . The Olshanskii preconditioner is known to be sub-optimal for high viscosities. In the limit of Stokes flow in which the advective term is dropped, the Schur complement preconditioned with Olshanskii has a condition number that is the square of the optimally preconditioned (using the pressure mass matrix) Schur complement, which leads roughly to a doubling in iterations for the Schur complement solve (see (Olshanskii and Vassilevski, 2007)). Below we compare three different preconditioning methods for the Schur complement, Elman LSC, Olshanskii LSC, and direct preconditioning of the Schur complement with the pressure mass matrix, for three different kinematic viscosities and mesh sizes for the lid driven cavity with a peak lid velocity of 1 and mesh dimension 1 (consequently the Reynolds number is the reciprocal of the kinematic viscosity). The values shown in the table are the maximum number of linear iterations observed during Krylov solves of the Schur complement during the steady Newton solve. For this test, the Elman preconditioner outperforms Olshanskii at high viscosities. However, for low viscosities, Elman shows an iteration count that scales with the mesh size whereas Olshanskii iteration counts are independent of the mesh size. This is likely due to the better clustering of eigenvalues by the Olshanskii preconditioner compared to Elman shown in (Zanetti and Bergamaschi, 2020). Direct preconditioning with the pressure mass matrix is very effective for high viscosities (as theory predicts), but performs worse than Olshanskii (and Elman for smaller meshes) for low viscosities. In summary, we recommend that users use Elman or the pressure mass matrix directly for high viscosities (low Reynolds numbers) and Olshanskii for low viscosities (high Reynolds numbers)
Elman:
n = 20 | n = 40 | n = 80 | |
---|---|---|---|
100 | 5 | 6 | 8 |
1 | 5 | 7 | 8 |
13 | 16 | 22 |
Olshanskii:
n = 20 | n = 40 | n = 80 | |
---|---|---|---|
100 | 11 | 12 | 12 |
1 | 11 | 12 | 12 |
17 | 18 | 17 |
Pressure
n = 20 | n = 40 | n = 80 | |
---|---|---|---|
100 | 6 | 6 | 6 |
1 | 6 | 6 | 6 |
21 | 21 | 21 |
The tables above were created by running the steady_vector_fsp_elman.i
, steady_vector_fsp.i
, and steady_vector_fsp_stokes.i
inputs respectively. To focus the comparison on the preconditioning of the Schur complement itself, all multigrid preconditioners were replaced with LU decompositions (-pc_type lu
-pc_factor_mat_solver_type mumps
). In the steady_vector_fsp_stokes.i
input, an INSADMomentumAdvection kernel was added as well.
Input Parameters
- allow_initial_conditions_with_restartFalseTrue to allow the user to specify initial conditions when restarting. Initial conditions can override any restarted field
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:True to allow the user to specify initial conditions when restarting. Initial conditions can override any restarted field
- force_restartFalseEXPERIMENTAL: If true, a sub_app may use a restart file instead of using of using the master backup file
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:EXPERIMENTAL: If true, a sub_app may use a restart file instead of using of using the master backup file
- restart_file_baseFile base name used for restart (e.g.
/ or /LATEST to grab the latest file available) C++ Type:FileNameNoExtension
Unit:(no unit assumed)
Controllable:No
Description:File base name used for restart (e.g.
/ or /LATEST to grab the latest file available)
Restart Parameters
- allow_invalid_solutionFalseSet to true to allow convergence even though the solution has been marked as 'invalid'
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Set to true to allow convergence even though the solution has been marked as 'invalid'
- immediately_print_invalid_solutionFalseWhether or not to report invalid solution warnings at the time the warning is produced instead of after the calculation
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Whether or not to report invalid solution warnings at the time the warning is produced instead of after the calculation
- show_invalid_solution_consoleTrueSet to true to show the invalid solution occurance summary in console
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Set to true to show the invalid solution occurance summary in console
Solution Validity Control Parameters
- boundary_restricted_elem_integrity_checkTrueSet to false to disable checking of boundary restricted elemental object variable dependencies, e.g. are the variable dependencies defined on the selected boundaries?
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Set to false to disable checking of boundary restricted elemental object variable dependencies, e.g. are the variable dependencies defined on the selected boundaries?
- boundary_restricted_node_integrity_checkTrueSet to false to disable checking of boundary restricted nodal object variable dependencies, e.g. are the variable dependencies defined on the selected boundaries?
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Set to false to disable checking of boundary restricted nodal object variable dependencies, e.g. are the variable dependencies defined on the selected boundaries?
- check_uo_aux_stateFalseTrue to turn on a check that no state presents during the evaluation of user objects and aux kernels
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:True to turn on a check that no state presents during the evaluation of user objects and aux kernels
- error_on_jacobian_nonzero_reallocationFalseThis causes PETSc to error if it had to reallocate memory in the Jacobian matrix due to not having enough nonzeros
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:This causes PETSc to error if it had to reallocate memory in the Jacobian matrix due to not having enough nonzeros
- fv_bcs_integrity_checkTrueSet to false to disable checking of overlapping Dirichlet and Flux BCs and/or multiple DirichletBCs per sideset
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Set to false to disable checking of overlapping Dirichlet and Flux BCs and/or multiple DirichletBCs per sideset
- kernel_coverage_block_listList of subdomains for kernel coverage check. The meaning of this list is controlled by the parameter 'kernel_coverage_check' (whether this is the list of subdomains to be checked, not to be checked or not taken into account).
C++ Type:std::vector<SubdomainName>
Unit:(no unit assumed)
Controllable:No
Description:List of subdomains for kernel coverage check. The meaning of this list is controlled by the parameter 'kernel_coverage_check' (whether this is the list of subdomains to be checked, not to be checked or not taken into account).
- kernel_coverage_checkTRUEControls, if and how a kernel subdomain coverage check is performed. With 'TRUE' or 'ON' all subdomains are checked (the default). Setting 'FALSE' or 'OFF' will disable the check for all subdomains. To exclude a predefined set of subdomains 'SKIP_LIST' is to be used, while the subdomains to skip are to be defined in the parameter 'kernel_coverage_block_list'. To limit the check to a list of subdomains, 'ONLY_LIST' is to be used (again, using the parameter 'kernel_coverage_block_list').
Default:TRUE
C++ Type:MooseEnum
Unit:(no unit assumed)
Controllable:No
Description:Controls, if and how a kernel subdomain coverage check is performed. With 'TRUE' or 'ON' all subdomains are checked (the default). Setting 'FALSE' or 'OFF' will disable the check for all subdomains. To exclude a predefined set of subdomains 'SKIP_LIST' is to be used, while the subdomains to skip are to be defined in the parameter 'kernel_coverage_block_list'. To limit the check to a list of subdomains, 'ONLY_LIST' is to be used (again, using the parameter 'kernel_coverage_block_list').
- material_coverage_block_listList of subdomains for material coverage check. The meaning of this list is controlled by the parameter 'material_coverage_check' (whether this is the list of subdomains to be checked, not to be checked or not taken into account).
C++ Type:std::vector<SubdomainName>
Unit:(no unit assumed)
Controllable:No
Description:List of subdomains for material coverage check. The meaning of this list is controlled by the parameter 'material_coverage_check' (whether this is the list of subdomains to be checked, not to be checked or not taken into account).
- material_coverage_checkTRUEControls, if and how a material subdomain coverage check is performed. With 'TRUE' or 'ON' all subdomains are checked (the default). Setting 'FALSE' or 'OFF' will disable the check for all subdomains. To exclude a predefined set of subdomains 'SKIP_LIST' is to be used, while the subdomains to skip are to be defined in the parameter 'material_coverage_block_list'. To limit the check to a list of subdomains, 'ONLY_LIST' is to be used (again, using the parameter 'material_coverage_block_list').
Default:TRUE
C++ Type:MooseEnum
Unit:(no unit assumed)
Controllable:No
Description:Controls, if and how a material subdomain coverage check is performed. With 'TRUE' or 'ON' all subdomains are checked (the default). Setting 'FALSE' or 'OFF' will disable the check for all subdomains. To exclude a predefined set of subdomains 'SKIP_LIST' is to be used, while the subdomains to skip are to be defined in the parameter 'material_coverage_block_list'. To limit the check to a list of subdomains, 'ONLY_LIST' is to be used (again, using the parameter 'material_coverage_block_list').
- material_dependency_checkTrueSet to false to disable material dependency check
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Set to false to disable material dependency check
- skip_nl_system_checkFalseTrue to skip the NonlinearSystem check for work to do (e.g. Make sure that there are variables to solve for).
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:True to skip the NonlinearSystem check for work to do (e.g. Make sure that there are variables to solve for).
Simulation Checks Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Unit:(no unit assumed)
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- default_ghostingFalseWhether or not to use libMesh's default amount of algebraic and geometric ghosting
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Whether or not to use libMesh's default amount of algebraic and geometric ghosting
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Set the enabled status of the MooseObject.
Advanced Parameters
- extra_tag_matricesExtra matrices to add to the system that can be filled by objects which compute residuals and Jacobians (Kernels, BCs, etc.) by setting tags on them. The outer index is for which nonlinear system the extra tag vectors should be added for
C++ Type:std::vector<std::vector<TagName>>
Unit:(no unit assumed)
Controllable:No
Description:Extra matrices to add to the system that can be filled by objects which compute residuals and Jacobians (Kernels, BCs, etc.) by setting tags on them. The outer index is for which nonlinear system the extra tag vectors should be added for
- extra_tag_solutionsExtra solution vectors to add to the system that can be used by objects for coupling variable values stored in them.
C++ Type:std::vector<TagName>
Unit:(no unit assumed)
Controllable:No
Description:Extra solution vectors to add to the system that can be used by objects for coupling variable values stored in them.
- extra_tag_vectorsExtra vectors to add to the system that can be filled by objects which compute residuals and Jacobians (Kernels, BCs, etc.) by setting tags on them. The outer index is for which nonlinear system the extra tag vectors should be added for
C++ Type:std::vector<std::vector<TagName>>
Unit:(no unit assumed)
Controllable:No
Description:Extra vectors to add to the system that can be filled by objects which compute residuals and Jacobians (Kernels, BCs, etc.) by setting tags on them. The outer index is for which nonlinear system the extra tag vectors should be added for
Tagging Parameters
- identify_variable_groups_in_nlTrueWhether to identify variable groups in nonlinear systems. This affects dof ordering
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Whether to identify variable groups in nonlinear systems. This affects dof ordering
- ignore_zeros_in_jacobianFalseDo not explicitly store zero values in the Jacobian matrix if true
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Do not explicitly store zero values in the Jacobian matrix if true
- nl_sys_namesnl0 The nonlinear system names
Default:nl0
C++ Type:std::vector<NonlinearSystemName>
Unit:(no unit assumed)
Controllable:No
Description:The nonlinear system names
- previous_nl_solution_requiredFalseTrue to indicate that this calculation requires a solution vector for storing the previous nonlinear iteration.
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:True to indicate that this calculation requires a solution vector for storing the previous nonlinear iteration.
- use_nonlinearTrueDetermines whether to use a Nonlinear vs a Eigenvalue system (Automatically determined based on executioner)
Default:True
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Determines whether to use a Nonlinear vs a Eigenvalue system (Automatically determined based on executioner)
Nonlinear System(S) Parameters
- near_null_space_dimension0The dimension of the near nullspace
Default:0
C++ Type:unsigned int
Unit:(no unit assumed)
Controllable:No
Description:The dimension of the near nullspace
- null_space_dimension0The dimension of the nullspace
Default:0
C++ Type:unsigned int
Unit:(no unit assumed)
Controllable:No
Description:The dimension of the nullspace
- transpose_null_space_dimension0The dimension of the transpose nullspace
Default:0
C++ Type:unsigned int
Unit:(no unit assumed)
Controllable:No
Description:The dimension of the transpose nullspace
Null Space Removal Parameters
- parallel_barrier_messagingFalseDisplays messaging from parallel barrier notifications when executing or transferring to/from Multiapps (default: false)
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Displays messaging from parallel barrier notifications when executing or transferring to/from Multiapps (default: false)
- verbose_multiappsFalseSet to True to enable verbose screen printing related to MultiApps
Default:False
C++ Type:bool
Unit:(no unit assumed)
Controllable:No
Description:Set to True to enable verbose screen printing related to MultiApps
- verbose_setupfalseSet to 'true' to have the problem report on any object created. Set to 'extra' to also display all parameters.
Default:false
C++ Type:MooseEnum
Unit:(no unit assumed)
Controllable:No
Description:Set to 'true' to have the problem report on any object created. Set to 'extra' to also display all parameters.
Verbosity Parameters
References
- Howard Elman, Victoria E Howle, John Shadid, Robert Shuttleworth, and Ray Tuminaro.
Block preconditioners based on approximate commutators.
SIAM Journal on Scientific Computing, 27(5):1651–1668, 2006.[BibTeX]
- Howard C Elman.
Preconditioning for the steady-state navier–stokes equations with low viscosity.
SIAM Journal on Scientific Computing, 20(4):1299–1316, 1999.[BibTeX]
- Maxim A Olshanskii and Yuri V Vassilevski.
Pressure schur complement preconditioners for the discrete oseen problem.
SIAM Journal on Scientific Computing, 29(6):2686–2704, 2007.[BibTeX]
- Filippo Zanetti and Luca Bergamaschi.
Scalable block preconditioners for linearized navier-stokes equations at high reynolds number.
Algorithms, 13(8):199, 2020.[BibTeX]