|
[Sponsors] |
Multigrid Solver using Matlab for Poisson Equation |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 5, 2018, 07:35 |
Multigrid Solver using Matlab for Poisson Equation
|
#1 |
Member
Suman Sapkota
Join Date: Feb 2018
Posts: 32
Rep Power: 8 |
Hello,
I coded multigrid solver for Poisson equation in matlab. In my case, I am making simple multigrid i.e. coarse grid correction cycle using 2 levels (fine and coarse grid). The problem is when I increase the number of points i.e. 'n' , the relaxations needed to get the required accuracy also increases. With two level grids, the relaxations required on fine 'v1' and coarse grid 'v2' , v1+v2<=3 should give the same solution. After all, we are using it for fast convergence. But I am not getting the same solution. My gauss siedel function is correct. I checked it with others. But the problem of requiring high relaxations has been troubling my convergence rate. Thus, i know the solver is not working properly. Please Help!! |
|
February 5, 2018, 21:06 |
|
#2 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,290
Rep Power: 34 |
Quote:
Thats because you only use 2 levels. It is possible for the 2 levels to show the behaviour you mentioned. Even if you used multiple levels but not solving completely at the coarsest level in this case too many times multigrid may stall and does not converge as fast as you expect. Coarse level solution is absolutely important in case of multigrid. |
||
February 6, 2018, 02:37 |
|
#3 |
Member
Suman Sapkota
Join Date: Feb 2018
Posts: 32
Rep Power: 8 |
Hello, Thank you for the rely.
Does it mean that I am not solving the problem completely in the coarse grid though? I am solving Le= Ir where e= error, L=laplace operator, I= Interpolation constant and r= residual injected from fine grid. I took this equation in gauss siedel relaxation. solving this equation means that I suppose the problem is solved in coarse grid. Correct me if I am wrong. |
|
February 6, 2018, 20:18 |
|
#4 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,290
Rep Power: 34 |
Quote:
Yes it means that. Gauss Seidel becomes ineffective as the problem size increases, so at the coarser level it won't be removing all the errors. Multigrid gains efficiency by removing all frequencies of error by using coarser and coarser girds and each level is responsible for removing certain frequency of errors. So at the coarsest level you have still some errors remaining that then completely solved by using a direct solver (Typically LU factorization). |
||
February 7, 2018, 09:47 |
|
#5 |
Member
Suman Sapkota
Join Date: Feb 2018
Posts: 32
Rep Power: 8 |
But I am using an iterative solver. gauss siedel reduces the error efficiently than jacobi but is there any better option to solve the Le=Ir equation in coarse grid???.. where L = operator ; e=error; Ir= interpolated value of residual from fine grid. Another question is: Can the laplace operator that I use in the fine grid be used as the coarse grid L operator? because i am using same gauss siedel function to relax in both fine and coarse grid.
|
|
February 13, 2018, 00:19 |
|
#6 | |
Senior Member
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,290
Rep Power: 34 |
Quote:
There are other options but very unlikely that is the issue. Main thing is that for 2 level multigrid the behaviour you were complaining is possible Thats makes something called geometric or full multigrid. Don't go in that direction, stick to algebraic version unless you are specifically asked to do geometric mg. |
||
Tags |
gauss siedel, laplace, matlab code, multigrid, poisson |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
suGWFoam: Richards equation solver for porous media flows | liu | OpenFOAM Announcements from Other Sources | 4 | February 10, 2021 16:14 |
Add Work due to body force in the energy equation for a lagrangian solver | mneben | OpenFOAM Programming & Development | 6 | January 19, 2016 06:30 |
lid-driven cavity in matlab using BiCGStab | Don456 | Main CFD Forum | 1 | January 19, 2012 16:00 |
Coupled solver and multigrid | Hong | Main CFD Forum | 0 | September 11, 2000 10:05 |
Matlab Unsteady 1D Euler Solver??? | Johan Sylwander | Main CFD Forum | 1 | May 24, 2000 16:26 |