|
[Sponsors] |
April 20, 2009, 05:00 |
Gauss Seidell Method
|
#1 |
New Member
Join Date: Apr 2009
Posts: 13
Rep Power: 16 |
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) |
|
April 20, 2009, 11:26 |
|
#2 |
New Member
Join Date: Apr 2009
Posts: 8
Rep Power: 16 |
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 |
|
April 20, 2009, 15:10 |
|
#3 | |
New Member
Join Date: Apr 2009
Posts: 13
Rep Power: 16 |
Quote:
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. |
||
April 20, 2009, 15:53 |
|
#4 |
New Member
Join Date: Apr 2009
Posts: 8
Rep Power: 16 |
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 |
|
April 20, 2009, 18:01 |
|
#5 |
New Member
Join Date: Apr 2009
Posts: 13
Rep Power: 16 |
Thank you for your interest...I know this link.
I will have been struggling for programming all weekend. |
|
April 20, 2009, 22:32 |
|
#6 | |
Member
MrFluent
Join Date: Mar 2009
Posts: 33
Rep Power: 17 |
Quote:
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. |
||
April 21, 2009, 14:14 |
|
#7 |
New Member
Join Date: Apr 2009
Posts: 13
Rep Power: 16 |
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] Last edited by student_58; April 22, 2009 at 05:12. |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
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 |