Good Starting Guesses for Faster Iterative Solution of Unsteady Simulations

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

 July 27, 2013, 14:28 Good Starting Guesses for Faster Iterative Solution of Unsteady Simulations #1 Senior Member   Robert Join Date: Sep 2010 Posts: 158 Rep Power: 8 Sponsored Links Hello, I am writing an unsteady solver for the incompressible Navier-Stokes equations using the exact fractional step method (EFS) (by J.B. Perot). I am currently using Conjugate Gradients (CG) to solve for the linear system at each time step. I would like to discuss how the starting guess used for solving the linear system could be manipulated for efficiency. Can we somehow use information from previous time steps to formulate our starting guesses for solving the current time step that result in faster convergence (lower required iterations)? Thanks for your time and input. P.S. In case you were curious, I am using CG because in my implementation because the contents of the system matrix is determinable from the grid, and constant throughout the whole simulation. So, this allows for a matrix-free implementation. I think CG also lends itself to effective GPU implementation. Comments on these thoughts are welcome as well! Note that I am trying to make an unsteady (time-accurate) solver for High-Reynolds-Number flow, so small time steps (compared to implicit methods) will probably be desired. So, more expensive solution methods that allow for larger time steps may not necessarily be more desirable (depending on the trade-off, of course).

 July 27, 2013, 15:38 #2 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 3,417 Rep Power: 39 For an iterative algorithm in unsteady solvers is quite common to use the solution of the previous time step as starting value

 July 27, 2013, 16:17 #3 Senior Member   Robert Join Date: Sep 2010 Posts: 158 Rep Power: 8 Yes, I forgot to mention I am doing that but I dont get any difference compared to when I start with a zero vector for a lid-driven cavity flow. I was wondering if there are any more sophisticated techniques.

July 27, 2013, 17:02
#4
Senior Member

Filippo Maria Denaro
Join Date: Jul 2010
Posts: 3,417
Rep Power: 39
Quote:
 Originally Posted by lordvon Yes, I forgot to mention I am doing that but I dont get any difference compared to when I start with a zero vector for a lid-driven cavity flow. I was wondering if there are any more sophisticated techniques.

the CG method is somehow much more independent from the starting solution than methods like Jacobi, S.O.R., ... see the paragraph in the book of Peric & Ferziger

 July 29, 2013, 19:46 #5 Member   Join Date: Jul 2011 Posts: 59 Rep Power: 8 Are you using a preconditioner? That will improve your performance much more than the initial guess. I am using a multigrid preconditioner and having a good initial guess helps a little but is nothing compared to the effect of the preconditioner.

 July 29, 2013, 21:12 #6 Senior Member   Robert Join Date: Sep 2010 Posts: 158 Rep Power: 8 Can you tell me how it affects the memory requirements and regularity of the system matrix? Even if a really successful preconditioner reduces iterations by a factor of lets say 2, it may not be faster in implementation for GPUs due to memory bandwidth, coalescing, latency, etc. considerations, which have order-of-magnitude effects on speed.

 July 30, 2013, 11:58 #7 Member   Join Date: Jul 2011 Posts: 59 Rep Power: 8 A multigrid preconditioner will reduce the number of iterations by at least an order of magnitude. Not familiar with the exact fractional step method, but I am using a fraction step method and it involves the solution of an elliptic equation for the pressure which is the time limiting step. I run everything on the CPU but multigrid methods can be ported to GPU's. The are highly parallel algorithms so I don't think that will be an issue. The extra memory required would likely be close to half of what you are using for the CG part of the solution. You could try doing a simple version of multigrid like a two level method to get an idea of how it will work without investing too much time on it

 July 31, 2013, 01:36 #8 Senior Member   Robert Join Date: Sep 2010 Posts: 158 Rep Power: 8 I thought MG would be too much of a time investment, but at your suggestion and explanation of the magnitude of the rewards, I will put it on my list of things to try to implement. I have read that MG-preconditioned CG works better than MG -- what do you think? What kind of matrix storage do you use (CSR, etc.)? Is the matrix still symmetric?

 July 31, 2013, 15:53 #9 Member   Join Date: Jul 2011 Posts: 59 Rep Power: 8 I would try using a MGCG over just a plain MG method. If you have discontinous coefficients or sharp forcing terms then plain MG can sometimes fail to converge. I'm not sure if the resulting matrix is still symmetric, however I know people have used MG as a CG preconditioner. I use it with BiCGstab so I don't have to worry about symmetry or positive definitness. As for the storage scheme I'm using a regular cartesian grid so I can get away with storing everything in 2-d arrays. Mudpack is an open source multigrid package but it is only for CPUs. http://www2.cisl.ucar.edu/resources/legacy/mudpack A quick search turned up this open source code for MG on a GPU (CUDA). https://developer.nvidia.com/cusp

July 31, 2013, 16:26
#10
Senior Member

Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 702
Rep Power: 19
Quote:
 Originally Posted by rmh26 A multigrid preconditioner will reduce the number of iterations by at least an order of magnitude. Not familiar with the exact fractional step method, but I am using a fraction step method and it involves the solution of an elliptic equation for the pressure which is the time limiting step. I run everything on the CPU but multigrid methods can be ported to GPU's. The are highly parallel algorithms so I don't think that will be an issue. The extra memory required would likely be close to half of what you are using for the CG part of the solution. You could try doing a simple version of multigrid like a two level method to get an idea of how it will work without investing too much time on it
I am really confused, the elliptic equation for pressure is typically solved with the help of multigrid so why multigrid at one place is very efficient and at another place is the reason for inefficiency?

 July 31, 2013, 16:41 #11 Member   Join Date: Jul 2011 Posts: 59 Rep Power: 8 I meant that the most time consuming part of the problem is the Poisson equation for the pressure. Because multgrid methods were design for elliptic problems it is often worth the effort to apply a multigrid preconditioner for the pressure equation because it will speed it up so much and because the pressure equation typically takes up most of the computation time.

 July 31, 2013, 16:55 #12 Senior Member   Filippo Maria Denaro Join Date: Jul 2010 Posts: 3,417 Rep Power: 39 just to say something about my experience... if the elliptic equation for pressure is the standard one coming from the second order FD discretization of the Poisson equation, try the simple SOR method with the correct relaxation value for the grid. If the system is of O(10^6), SOR can be the fastest method in terms of CPU time and can be simply parallelized (for example b/w procedure). Further, SOR does not require to store all the matrix coefficients. I tried multigrid (with Jacobi iteration), CG, GMRES and I always obtained that the work-unit of the SOR is so fast to be convenient even for a number of iterations ten times greater than others... Of course, for systems of huge number of equations, the situation becomes different.

August 1, 2013, 11:51
#13
Senior Member

Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 702
Rep Power: 19
Quote:
 Originally Posted by rmh26 I meant that the most time consuming part of the problem is the Poisson equation for the pressure. Because multgrid methods were design for elliptic problems it is often worth the effort to apply a multigrid preconditioner for the pressure equation because it will speed it up so much and because the pressure equation typically takes up most of the computation time.
I think by multigrid you mean Full or Geometric multigrid. That could be slightly faster than algebraic multigrid, but on the other hand it is really difficult to design full multigrids for general polyhderals. Creating valid coarse level meshes is challenge in itself.

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post 1/153 Main CFD Forum 3 September 2, 2012 11:00 Christophe FLUENT 0 August 11, 2006 11:13 Freeman Main CFD Forum 0 December 7, 2005 18:08 K S Chang Main CFD Forum 6 January 15, 2004 07:42 Prateep Chatterjee FLUENT 4 August 18, 2002 12:15