
[Sponsors] 
Good Starting Guesses for Faster Iterative Solution of Unsteady Simulations 

LinkBack  Thread Tools  Display Modes 
July 27, 2013, 14:28 
Good Starting Guesses for Faster Iterative Solution of Unsteady Simulations

#1 
Senior Member
Robert
Join Date: Sep 2010
Posts: 155
Rep Power: 7 
Hello,
I am writing an unsteady solver for the incompressible NavierStokes 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 matrixfree 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 (timeaccurate) solver for HighReynoldsNumber 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 tradeoff, of course). 

July 27, 2013, 15:38 

#2 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 1,787
Rep Power: 24 
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: 155
Rep Power: 7 
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 liddriven 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: 1,787
Rep Power: 24 
Quote:
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: 6 
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: 155
Rep Power: 7 
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 orderofmagnitude effects on speed. 

July 30, 2013, 11:58 

#7 
Member
Join Date: Jul 2011
Posts: 59
Rep Power: 6 
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: 155
Rep Power: 7 
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 MGpreconditioned 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: 6 
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 2d 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: 384
Rep Power: 10 
Quote:


July 31, 2013, 16:41 

#11 
Member
Join Date: Jul 2011
Posts: 59
Rep Power: 6 
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: 1,787
Rep Power: 24 
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 workunit 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: 384
Rep Power: 10 
Quote:


Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Do I need Convergence Monitor for Unsteady Simulations?  1/153  Main CFD Forum  3  September 2, 2012 11:00 
Unsteady solution  Christophe  FLUENT  0  August 11, 2006 11:13 
General Unsteady solution convergence  Freeman  Main CFD Forum  0  December 7, 2005 18:08 
fft of unsteady solution  K S Chang  Main CFD Forum  6  January 15, 2004 07:42 
Unsteady Solution Diverges  Prateep Chatterjee  FLUENT  4  August 18, 2002 12:15 