LinearSystem

Solving nonlinear problems with customizable linearization in MOOSE

In MOOSE, a LinearSystem denotes a linear algebraic equation system that arises from the spatial discretization of a linearized partial differential equation. Unlike NonlinearSystem, where Newton's method is used to linearize a nonlinear equation, the LinearSystem allows the user to customize how the system is linearized using objects that contribute to a system matrix and right hand side. The simplest case is a Picard-style approach where coupled nonlinear terms are linearized by evaluating with known solution states. For better clarity an example is provided below.

commentnote

Currently, LinearSystem with a Picard-style solution approach is only supported with the finite volume spatial discretization.

Picard-style diffusion problem in MOOSE using a LinearSystem

Considering that at the time this documentation is written only finite volume simulations utilize this system, this example presents a nonlinear 1D diffusion problem with a fixed source term:

with the following Dirichlet boundary conditions on the left and right boundaries of the domain:

Let's split the domain into 3 cells with the following cell widths: . Considering that the diffusion coefficient () is a function of the solution, we need to linearize the problem. In this example we use a Picard-style linearization where the -th iterate is denoted by: . This leads to the following equation:

-\nabla \cdot (D(u{n-1}) \nabla un) = S,

To derive the discretized form of the diffusion term, we first integrate it over the volume of cell (denoted by ):

where the divergence theorem was employed to derive a surface integral with being the surface normal. Now, employing a cell-centered finite volume approximation, we assume that the solution field is cell-wise constant so we have 3 unknowns: and often referred to as degrees of freedom. Furthermore, over the faces between cells can be approximated as:

while on boundaries it is approximated as follows:

One approach to express the diffusion coefficient on the face is to use linear interpolation using the diffusion coefficients at the cell centers:

whereas the diffusion coefficients on the Dirichlet boundaries can just be evaluated at the boundary value: . With this in mind, we can write down three equations for the three cells:

These provide a linear algebraic equation system for the following three variables: and . The algebraic equation system in a matrix notation can be expressed as:

where is referred to as system matrix (often just matrix) and is the right hand side vector. In this specific example the system matrix is:

while the right hand side vector can be expressed as:

This equation can be solved for which can be used to update the diffusion coefficient and recompute the system matrix to solve the equation for the next iterate, until this process converges to with a given tolerance.

Populating the system in LinearSystem

At the moment the user can implement new objects derived from linear finite volume kernels and linear finite volume boundary conditions to provide the entries in system matrix and right hand side vector .