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

Pressure Possion equ.and multigrid method

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 22, 2001, 22:22
Default Pressure Possion equ.and multigrid method
  #1
Tony
Guest
 
Posts: n/a
Hi,CFD people,

I am a newcomer in multigrid method,when I extend my code to multigrid method,I met a problem,

Because the pressure Possion equ.for imcompressible flow converge very slow,I want to use multigrid method to get a quickly convergence(without MG,the code is OK),in the pressure Possion equ.there are terms including pressure(the last time step)and the temperal velocities(I use projection method,FDM with staggered grids), in my code,three levels is used for MG,because of the linear Possion equ.I use the simple V-cycle,and the pressure (last time step) and the temperal velocities are restricted on coaser grids,the aera-weighed interpolation scheme was used,when running my code,I found that at the end of one V-cycle,the iteration residual didnot change small,even large,but for several iterations,the iteration neither converge,nor disconverge,anyone who have experence on this,please help me,I am waiting for reply.

thanks a lot

  Reply With Quote

Old   April 22, 2001, 22:53
Default Re: Pressure Possion equ.and multigrid method
  #2
Junseok Kim
Guest
 
Posts: n/a
In this case, people usually use finite element method for Poisson solver in multigrid method.

Usually, the boundary condition for Poisson solver is the main cause for not convergence, but if you use finite element method for relaxation step in MG of Poisson solver, then you will see the convergence.

  Reply With Quote

Old   April 23, 2001, 00:09
Default Re: Pressure Possion equ.and multigrid method
  #3
Tony
Guest
 
Posts: n/a
Thanks, with the help of staggered grids,the pressure possion equ.converge in my code without MG,although slowly,should there any care be taken when using MG with staggered grids to solve the pressure equ.?it should be independent of the method,i.e.FDM or FEM.I think.
  Reply With Quote

Old   April 23, 2001, 00:24
Default Re: Pressure Possion equ.and multigrid method
  #4
Junseok Kim
Guest
 
Posts: n/a
I was in the same situation for this, the main difficulty is how to impose boundary condition for the pressure, which is not clear so far.

But if you use finite element relaxation in pressure solver, which means you use higher order discretization for laplacian, which is equivalent to using 9 point stencils for laplacian. And it cares for boundary consitions and compatibility requirement automatically.

I think you are implementing projection method by "Ann S. Almgren, John B. Bell, and William G. Szymczak" A numerical method for the incompressible navier-stokes equations based on an approximate projection.

And in that paper, they used the projection based on a finte element formulation.

  Reply With Quote

Old   April 23, 2001, 00:52
Default Re: Pressure Possion equ.and multigrid method
  #5
Gary
Guest
 
Posts: n/a
Hi Junseok,

Would you please give more details on the reference by Ann S. Almgren et al.?

Thanks.
  Reply With Quote

Old   April 23, 2001, 00:56
Default Re: Pressure Possion equ.and multigrid method
  #6
Junseok Kim
Guest
 
Posts: n/a
Sure, no problem.

SIAM J. Sci. COMPUT. Vol. 17, No. 2, pp. 358-369, March 1996

"A Numerical method for the incompressible navier-stokes equations based on an approximate projection"

by Ann S. Almgren, John B. Bell, and William G. Szymczak.

  Reply With Quote

Old   April 23, 2001, 05:02
Default Re: Pressure Possion equ.and multigrid method
  #7
Abhijit Tilak
Guest
 
Posts: n/a
Hi tony,

If i got u correctly, then ur solving a non-linear problem. so u must be using FAS. u need to correctly interpolate residuals & the nodal values. I made a similar mistake & my code diverged!( i did'nt understand FAS correctly at that time). As u said ur a starter u can read a book by William Briggs " A tutorial on Multigrid" (some thing like that) I think problem is with interpolation. hope this helps abhijit
  Reply With Quote

Old   April 23, 2001, 07:12
Default Re: Pressure Possion equ.and multigrid method
  #8
andy
Guest
 
Posts: n/a
Tony,

The multigrid method generally works very well for incompressible flows with only a few things that catch it out. I would treat the advice in the above two threads with some caution since the MG method is essentially independent of discretization scheme and if you are performing an accurate time simulation (an assumption?) there is often not much to be gained from treating the momentum equations implicitly (with a few exceptions).

Some questions/observations:

(1) Have you got a pressure term on the RHS (I am confused on this point)? If so, where does it come from? The smoothing? Do you have an implicit or explicit scheme?

(2) Assuming an implicit scheme. If the coefficients are strongly anisotropic (e.g. very long thin cells) you will generally need something more sophisticated than SOR. Line solvers like ADI are relatively simple first improvement. If have serious anisotropy (usually encountered with FAS schemes and not just Poisson equations for pressure) then you may have to make the grid coarsening sensitive to the anisotropy in the coefficients.
  Reply With Quote

Old   April 23, 2001, 08:09
Default Re: Pressure Possion equ.and multigrid method
  #9
Tony
Guest
 
Posts: n/a
hi,Abhijit, thanks for your help,I mixed with what you said,last year,I have used the FAS to generate body-fitted mesh,but I still think,this possion equ.is linear,because the pressure of last time step and the temperal velocity are known,the unknown is the pressure of the current time step(i use projection method in which the momentum equ.for the temperal velocity contain pressure belongs to the last time step ),why u said it is nonlinear and should use FAS? more detail: on staggered grids,the Restriction for temperal velocity is(1/2,1/2),Restriction for pressure(last time) and residual of current pressure is 1/4*(p(i,j)+p(i,j+1)+p(i+1,j)+p(i+1,j+1)),the interpolation for correction is like (3*p(i,j)+3p(i,j+1)+p(i+1,j)+9p(i+1,j+1))/16.

what I wonder is ,the restriction for the knowns(temperal velocity and last time step's pressure) is consistent with the restriction for residual(the correction for current pressure)?

  Reply With Quote

Old   April 23, 2001, 08:40
Default Re: Pressure Possion equ.and multigrid method
  #10
Tony
Guest
 
Posts: n/a
Dear andy,

just as what you said,I am performing an accurate time simulation,and there is a pressure term in RHS of the possion equ.for pressure,which belongs to the last time layer,implicit scheme are used .

for the 2nd point you said,it's right,but as for equ.,the coef.of the equ arenot anisotropy seriously.
  Reply With Quote

Old   April 23, 2001, 14:51
Default Re: Pressure Possion equ.and multigrid method
  #11
andy
Guest
 
Posts: n/a
If the pressure source term is for an earlier time step then no problems.

Suggestions:

(1) Test the Poisson equation solver with a zero source term and a non-constant initial field. If this does not converge to roundoff in less than 10 cycles for a decent sized grid you have not implemented your MG scheme correctly.

(2) If that test passes, introduce your mass errors and check the source terms always sum to zero.

(3) If that test passes, check your residuals are being weighted/evaluated correctly (a FVM and FDM are different here). Scale down the size of the residuals/corrections and observe if convergence appears.

(4) If that test passes, I am starting to struggle. Check your boundary treatment on the coarser grids.

(5) If that test passes, the last resort is to pick a small region of the grid and print out everything that is going on until something observably wrong happens.

An alternative approach is to get someone elses code (one which works of course), run both codes simultaneously printing out coefficients/values for both codes until the difference/error is located. It can be a hassle setting things up but is a bomb-proof test. (I found a MG problem with a FAS scheme doing precisely this many years ago).

  Reply With Quote

Old   April 24, 2001, 00:42
Default Re: Pressure Possion equ.and multigrid method
  #12
Tony
Guest
 
Posts: n/a
Dear andy,

thanks for your help,sorry,i didnot formulate my problem clearly,I want to tell you something more,

the source term of pressure equ.including pressure(last time step)and the termperal velocity(the current time step which is known,but the temperal velocity donot satisfy the free-divergence condition--projection method),I Keep this unchanged on the finest grids,so I am sure this pressure equ.is linear,and the simple V-cycle can deal with this correctly,do you think so?

for B.C.,I use dp/dn=0 at all face,and use this at all multigrid level,so for the restriction,because of staggered grid with FDM,1/4*(rP(i,j)+rp(i+1,j)+rp(i,j+1)+rp(i+1,j+1)) is used for residuals of pressure(rp),while,I use interpolation like what I said response to Abhijit .

I look at my code again and again,it's simple,but not ok,why?

thanks for your time

tony
  Reply With Quote

Old   April 24, 2001, 02:01
Default Re: Pressure Possion equ.and multigrid method
  #13
Abhijit Tilak
Guest
 
Posts: n/a
Hi tony,

I read through the rest of threads. your formula for restriction/ prolongation is correct. I used same. I doubt if PDE for P'is linear. It's non-homogeneous bcos RHS is not zero. I have a paper by prof S.P.Vanka (UIUC) excatly on same topic we are discussing. Actually it's almost a year since i read about MG. I'll wipe some dust from my file cabinet & let u know asap.

Abhijit
  Reply With Quote

Old   April 24, 2001, 04:25
Default Re: Pressure Possion equ.and multigrid method
  #14
Tony
Guest
 
Posts: n/a
hi,Abhijit ,

I am almost exhaustive,and donot know what's wrong with my code,i am waiting for your help,thanks a lot
  Reply With Quote

Old   April 24, 2001, 07:07
Default Re: Pressure Possion equ.and multigrid method
  #15
andy
Guest
 
Posts: n/a
Firstly, does your MG scheme satisfy the first test? If you cannot solve Laplaces equation efficiently with fixed boundary conditions you have a coding error. There seems little point prodding other parts of the code without knowing your MG scheme works in isolation.

A Poisson equation with non-Dirichlet boundary conditions and source terms which do not sum to zero has no solution. Consider the trivial case of a single 1D element with zero gradient on both boundaries. For your Poisson equation the LHS is always zero so if your RHS is anything other than zero you are in trouble. This is the point of the second test (which I phrased poorly). A divergence free velocity field is not relevant - if your flow field was divergence free after advancing the momentum equations there would be no point solving the pressure equation!. There seems a fair chance you are violating this.

> I look at my code again and again,it's simple,but not ok,why?

Some advice. As a rule of thumb a quality piece of software is going to have as many source statements written to test/debug/prove it as there are performing the basic operations. Often a lot more and only rarely less. I would suggest you stop looking at the code and start generating code to methodically test the component parts in isolation.
  Reply With Quote

Old   April 27, 2001, 02:02
Default Re: Pressure Possion equ.and multigrid method
  #16
Abhijit Tilak
Guest
 
Posts: n/a
Dear Tony,

I have a good reference for you. a paper by S.P.Vanka in Comp. Methods in App Mech & Engg Vol 55 1986 pg 321- . It gives details on prolongation & restriction formulae , flowcharts of the algorithm. It's in great detail. I think u can cross check ur code with that. U can download some papers /reports from his site at UIUC . Since i am not familiar with the method ur using i cannot help much . This paper mainly deals with SIMPLE variants.

hope this helps Abhijit
  Reply With Quote

Old   April 28, 2001, 13:08
Default Thanks andy !
  #17
Tony
Guest
 
Posts: n/a
Dear andy,

just as what you said,the source terms in the pressure possion equ. do not sum to zero,which leading to quickly disconverge in MG V-cycle.now,my code is OK,thanks for your help.

best regards

Tony
  Reply With Quote

Reply


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
Pressure Velocity Coupling using Moment Interpolation method gerardosrez Main CFD Forum 2 January 18, 2011 13:31
pressure correction method ravikant Main CFD Forum 9 November 26, 2009 00:52
Pressure enigma. Sara Main CFD Forum 22 July 30, 2009 05:46
pressure gradient term in low speed flow Atit Koonsrisuk Main CFD Forum 2 January 10, 2002 11:52
Method for Stokes flow with continuous pressure gradients? Matthew Cordery Main CFD Forum 0 August 31, 1998 18:58


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