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

Good Starting Guesses for Faster Iterative Solution of Unsteady Simulations

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 27, 2013, 14:28
Default Good Starting Guesses for Faster Iterative Solution of Unsteady Simulations
  #1
Senior Member
 
Robert
Join Date: Sep 2010
Posts: 155
Rep Power: 6
lordvon is on a distinguished road
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).
lordvon is offline   Reply With Quote

Old   July 27, 2013, 15:38
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 1,662
Rep Power: 23
FMDenaro will become famous soon enough
For an iterative algorithm in unsteady solvers is quite common to use the solution of the previous time step as starting value
FMDenaro is online now   Reply With Quote

Old   July 27, 2013, 16:17
Default
  #3
Senior Member
 
Robert
Join Date: Sep 2010
Posts: 155
Rep Power: 6
lordvon is on a distinguished road
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.
lordvon is offline   Reply With Quote

Old   July 27, 2013, 17:02
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 1,662
Rep Power: 23
FMDenaro will become famous soon enough
Quote:
Originally Posted by lordvon View Post
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
FMDenaro is online now   Reply With Quote

Old   July 29, 2013, 19:46
Default
  #5
Member
 
Join Date: Jul 2011
Posts: 59
Rep Power: 6
rmh26 is on a distinguished road
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.
rmh26 is offline   Reply With Quote

Old   July 29, 2013, 21:12
Default
  #6
Senior Member
 
Robert
Join Date: Sep 2010
Posts: 155
Rep Power: 6
lordvon is on a distinguished road
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.
lordvon is offline   Reply With Quote

Old   July 30, 2013, 11:58
Default
  #7
Member
 
Join Date: Jul 2011
Posts: 59
Rep Power: 6
rmh26 is on a distinguished road
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
rmh26 is offline   Reply With Quote

Old   July 31, 2013, 01:36
Default
  #8
Senior Member
 
Robert
Join Date: Sep 2010
Posts: 155
Rep Power: 6
lordvon is on a distinguished road
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?
lordvon is offline   Reply With Quote

Old   July 31, 2013, 15:53
Default
  #9
Member
 
Join Date: Jul 2011
Posts: 59
Rep Power: 6
rmh26 is on a distinguished road
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
rmh26 is offline   Reply With Quote

Old   July 31, 2013, 16:26
Default
  #10
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 374
Rep Power: 10
arjun is on a distinguished road
Quote:
Originally Posted by rmh26 View Post
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?
arjun is offline   Reply With Quote

Old   July 31, 2013, 16:41
Default
  #11
Member
 
Join Date: Jul 2011
Posts: 59
Rep Power: 6
rmh26 is on a distinguished road
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.
rmh26 is offline   Reply With Quote

Old   July 31, 2013, 16:55
Default
  #12
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 1,662
Rep Power: 23
FMDenaro will become famous soon enough
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.
FMDenaro is online now   Reply With Quote

Old   August 1, 2013, 11:51
Default
  #13
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 374
Rep Power: 10
arjun is on a distinguished road
Quote:
Originally Posted by rmh26 View Post
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.
arjun is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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


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


All times are GMT -4. The time now is 12:21.