Steady state in CFD: Solving large and sparse linear equation of the form $Ax =b$.

75 Views Asked by At

In CFD and computational physics a space can be discretized by describing it as a large amount of tiny volumes or cells. To find a steady state in the scheme, for example solving the electric field from a field of charges, one has to find an $x$ such that

$$Ax=b,$$

where $x$ represents the steady state at any of the tiny volumes and $b$ is a known quantity which may not be sparse. Hence, the length of $x$ is the enormously large amount of cells and $A$ would be so large that computationally it is preferable to view $A$ as an operator.

The goods news is that generally only the cells nearby interact. Therefore, $A$ is a very sparse matrix with values concentrated near the diagonal. For example $A$ could be of the form:

\begin{bmatrix} 2 & -1 & 0 & 0 \\ -1 & 4 & -1 & 0\\ 0 & -1 & 4 & -1\\ 0 & 0 & -1 & 2\\ \end{bmatrix}

What is an efficient algorithm used to solve the problem given the constraints, and can it run near $O(n)$? Furthermore, is there an implementation of the algorithm in Python for example?