CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   What does Gauss Seidel iteration mean? (https://www.cfd-online.com/Forums/main/155546-what-does-gauss-seidel-iteration-mean.html)

Turbomachine July 2, 2015 17:58

What does Gauss Seidel iteration mean?
 
Hello,

I am trying to build the model for bacterial chemotaxis as described in the paper Tyson, Leveque (2000) - Fractional step methods applied to a chemotaxis model.

Without going into the details, they are solving the the diffusion term using the trapezoidal rule and the BDF2 method (TR-BDF). I implemented these the standard way, by constructing a tridiagional matrix and then inverting it to get a solution to the implicit problem. Unfortunately I get oscillating solutions.

I have no idea what the authors mean by few sweeps of Gauss-Seidel iteration. Is that how I am supposed to invert the matrix? Isn't that very inefficient?

Here's the extract from the paper:

"We implemented TR-BDF2 by splitting the method dimensionally and then correcting for cross terms by using a few sweeps of Gauss-Seidel (or under-relaxed Jacobi) iteration. The first stage of the method, TR, is implemented by taking one step of a locally one-dimensional (LOD) method, which is just a fractional step method in which the x- and y -derivative terms are split apart, resulting in simple tridiagonal systems of equations to solve along each grid line [22]. The second stage,BDF2, is implemented first by taking another step of an LOD method, with differ-ent coefficients this time. This gives a very good initial guess for the Gauss-Seidel procedure. In principle advancing by LOD alone should be enough to maintain second order accuracy, but we have found that this can reintroduce grid-scale oscillations."

Any help greatly appreciated!!!

FMDenaro July 2, 2015 18:15

The GS method belongs to the class of iterative solver for linear algebric system, it is not a inversion of the matrix.
However, for tridiagonal system the Thomas algorithm is well suited

Turbomachine July 2, 2015 18:27

Quote:

Originally Posted by FMDenaro (Post 553070)
The GS method belongs to the class of iterative solver for linear algebric system, it is not a inversion of the matrix.
However, for tridiagonal system the Thomas algorithm is well suited

Thanks for the reply. From the extract of the paper it seems that first I need to apply the TR-BDF2 method, which involves 2 matrix inversions and which returns an array x. This is then the initial condition for Gauss Seidel? If yes, what is the linear system that I need to solve? It seems they use the Gauss-Seidel method purely to get rid of the oscillations.

FMDenaro July 2, 2015 18:36

Quote:

Originally Posted by Turbomachine (Post 553071)
Thanks for the reply. From the extract of the paper it seems that first I need to apply the TR-BDF2 method, which involves 2 matrix inversions and which returns an array x. This is then the initial condition for Gauss Seidel? If yes, what is the linear system that I need to solve? It seems they use the Gauss-Seidel method purely to get rid of the oscillations.


I would need to know the details ...however, if the diffusion operator is a 2D Laplace operator (d2/dx2 + d2/dy2), the factorization technique introduces an error of high order term that can lead to oscillations. You have two successive tridiagonal systems.
But in no way an iterative solver can be able to avoid oscillation that are inherent to the type of approximate solution.

Turbomachine July 2, 2015 18:57

Quote:

Originally Posted by FMDenaro (Post 553073)
I would need to know the details ...however, if the diffusion operator is a 2D Laplace operator (d2/dx2 + d2/dy2), the factorization technique introduces an error of high order term that can lead to oscillations. You have two successive tridiagonal systems.
But in no way an iterative solver can be able to avoid oscillation that are inherent to the type of approximate solution.

Thanks for your time.

The problem looks as follows. In fact I'm only doing 1D now.

\frac{\partial n}{\partial t} =D \frac{\partial^2 n}{\partial x^2} -  \frac{\partial}{\partial x}\left(A n \frac{1}{(1+c)^2}\frac{\partial c}{\partial x}\right)
\frac{\partial c}{\partial t} = \frac{\partial^2 c}{\partial x^2} + \frac{n^2}{1+n^2}


where D and A are constants. Because of the non-linear advection term I am using fractional timestep method to split the terms and use Clawpack to solve the advection term, TR-BDF2 method for the diffusion terms and Runge-Kutta for the reaction term.

My problem concerns the diffusion terms. Essentially, I take a solution and apply the trapezoidal rule with half time step (I-k/2h*A)U* =(I+k/2h*A)U_n, and then the BDF2 method with half time step (I-k/6h)U_n+1=1/3(4U* - U_n).

These involve two inversions. I am trying to make sense where the Gauss-Seidel iterations may come in.

FMDenaro July 3, 2015 04:40

the first step is a simple Crank-Nicolson integration for 1D and the Thomas algorithm is fine


All times are GMT -4. The time now is 05:37.