CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

Gauss Seidell Method

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 20, 2009, 05:00
Default Gauss Seidell Method
  #1
New Member
 
Join Date: Apr 2009
Posts: 13
Rep Power: 16
student_58 is on a distinguished road
Hi everyone;
I have a problem which will be solved by gauss seidel iterative method.My problem is poisson equation. I attain the main formula of my problem and make necesary arrangements.I will solve this problem with Matlab.
I have x,y,k direction.K is the iteration, x and y are displacements.I have a tolerans for the distaction of previous and present iteration.I have to continue iteration until necassary tolerance attain.When ı want to program this, How should I follow a program algorithm?
Because ı propogate both x and y direction and also k.
İf ı had only x and y direction, ı would make two "for cycle"(for j=2:N and for i=2:M)(like 2D parabolic crank nicholson)
student_58 is offline   Reply With Quote

Old   April 20, 2009, 11:26
Default
  #2
New Member
 
Join Date: Apr 2009
Posts: 8
Rep Power: 16
neazen is on a distinguished road
Hi,

Your post is not very clear but I think that I got your point.

Gauss-Seidel is a solver for linear system of equations Ax = F, so the appropriate procedure is the following:

Whatever is the approach you're adopting (finite difference, finite elements,...) the first step is to discretise your equation, the result being a set of discrete equations (one for each unknown node of your mesh). These equations are written in a matrix form, i.e. in A, and you are supposed to have also a vector F containing the right hand side. This must be done independently of the linear solver you're going to use.

The next step is to call your Gauss-Seidel function, or any other, such that its arguments will be the matrix A, and the vectors F and x.

Hope it's enough clear
__________________
If a problem can be solved, there is nothing to worry about. If it can't be solved, worrying will do no good.
So be Zen and stay Zen
neazen is offline   Reply With Quote

Old   April 20, 2009, 15:10
Default
  #3
New Member
 
Join Date: Apr 2009
Posts: 13
Rep Power: 16
student_58 is on a distinguished road
Quote:
Originally Posted by neazen View Post
Hi,

Your post is not very clear but I think that I got your point.

Gauss-Seidel is a solver for linear system of equations Ax = F, so the appropriate procedure is the following:

Whatever is the approach you're adopting (finite difference, finite elements,...) the first step is to discretise your equation, the result being a set of discrete equations (one for each unknown node of your mesh). These equations are written in a matrix form, i.e. in A, and you are supposed to have also a vector F containing the right hand side. This must be done independently of the linear solver you're going to use.

The next step is to call your Gauss-Seidel function, or any other, such that its arguments will be the matrix A, and the vectors F and x.

Hope it's enough clear
Yes you are right.Gauss seidel is a solver for linear system of equations.
and I know that we have matrice form.(A.x=b)
My question was how ı can solve poisson equation by gauss seidel method.I will use MATLAB for solution.You told me gauss seidel matrice structure.But I know this.I wanted to tell how ı can solve poisson equation by Matlab,using gauss seidel method.
student_58 is offline   Reply With Quote

Old   April 20, 2009, 15:53
Default
  #4
New Member
 
Join Date: Apr 2009
Posts: 8
Rep Power: 16
neazen is on a distinguished road
I guess that you'll have to write your own function, there's many ressources on the web explaining the algorithm.
Or simply use this one :
http://matlabdb.mathematik.uni-stutt...ID=3&MP_ID=406

Now my advice, knowing the sparsity of Poisson equation matrix, is to use the conjuguate gradient method, specially if you're concerned by the time and the accuracy and if your matrix size is "large"

Hope I wasn't again way of the mark
__________________
If a problem can be solved, there is nothing to worry about. If it can't be solved, worrying will do no good.
So be Zen and stay Zen
neazen is offline   Reply With Quote

Old   April 20, 2009, 18:01
Default
  #5
New Member
 
Join Date: Apr 2009
Posts: 13
Rep Power: 16
student_58 is on a distinguished road
Thank you for your interest...I know this link.
I will have been struggling for programming all weekend.
student_58 is offline   Reply With Quote

Old   April 20, 2009, 22:32
Default
  #6
Member
 
MrFluent
Join Date: Mar 2009
Posts: 33
Rep Power: 17
mr_fluent is on a distinguished road
Quote:
Originally Posted by student_58 View Post
Yes you are right.Gauss seidel is a solver for linear system of equations.
and I know that we have matrice form.(A.x=b)
My question was how ı can solve poisson equation by gauss seidel method.I will use MATLAB for solution.You told me gauss seidel matrice structure.But I know this.I wanted to tell how ı can solve poisson equation by Matlab,using gauss seidel method.

since you know that
1. gauss seidel is for solving matrices of form AX = src
and
2. you want to solve poisson equation by it

I conclude by common sense that i need to represent Poisson equation in the form AX = src.

From you post it is not clear whether you are asking - how to represent poisson equation in form AX = src or are you asking how to solve AX = src by Gauss-Seidel method.

If you asked 1 that is how to represent poisson in form AX=src then you got to spend time with book talking about it.
If you asked how to solve by Gauss- Seidel then I hope you looked at wiki at cfd-online. Because for me no point in writing what is already written.

Good luck.
mr_fluent is offline   Reply With Quote

Old   April 21, 2009, 14:14
Default
  #7
New Member
 
Join Date: Apr 2009
Posts: 13
Rep Power: 16
student_58 is on a distinguished road
I will use numerical difference for poisson equation.I will write taylor central difference formula instead of second derivatives.I will program this in Matlab.We have five unknowns gauss seidel for poisson equation.So ı can`t use thomas algorihm.Therefor ı will use iterative method.

[IMG]file:///C:/DOCUME%7E1/Kalp_Ev/LOCALS%7E1/Temp/moz-screenshot-1.jpg[/IMG]
Attached Images
File Type: jpg adsız.JPG (12.9 KB, 13 views)

Last edited by student_58; April 22, 2009 at 05:12.
student_58 is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in fvschemes divSchemes cannot use Gauss linearUpwind nico765 OpenFOAM Bugs 30 August 9, 2018 08:39
How to specify p in the flux required subdictionary amitshah OpenFOAM Running, Solving & CFD 4 February 15, 2016 01:34
Water pump OpenFOAM 15 ANSYS CFX 110 comparation waynezw0618 OpenFOAM Running, Solving & CFD 39 March 5, 2009 13:57
Code for most powerfull FDV Method D.S.Nasan Main CFD Forum 6 September 4, 2008 03:08
Stability problems with kepsilon in external aero edreed OpenFOAM Running, Solving & CFD 21 July 16, 2008 16:00


All times are GMT -4. The time now is 07:03.