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

Linear solvers for CFD: references?

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

Like Tree2Likes
  • 1 Post By sbaffini
  • 1 Post By sbaffini

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 3, 2022, 15:15
Default Linear solvers for CFD: references?
  #1
Member
 
Luca
Join Date: Mar 2021
Location: Italy
Posts: 58
Rep Power: 6
xisluke is on a distinguished road
Hi guys!

I have only a basic knowledge about linear solvers for CFD applications, I'd like to learn some more especially on the methods based on Krylov Subspaces and Multigrid approaches; in particular, what is the main theory behind them and how is it possible to choose at first one method over another one once the problem has been set. Does anyone knows some good starting reference points (possibly without diving too much in the maths of complex numerical methods books)?

Thank you!
xisluke is offline   Reply With Quote

Old   January 4, 2022, 04:33
Default
  #2
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,213
Blog Entries: 29
Rep Power: 41
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
One major source is https://www-users.cse.umn.edu/~saad/, where you will find for free the 2nd edition of his book. Honestly, this is a purely math topic, so don't expect free rides, but Saad keeps it at a very "normal" level.
xisluke likes this.
sbaffini is offline   Reply With Quote

Old   January 4, 2022, 06:57
Default
  #3
Member
 
Luca
Join Date: Mar 2021
Location: Italy
Posts: 58
Rep Power: 6
xisluke is on a distinguished road
Big thanks Paolo! I'll definitely have a look to this book. Another thing, in your opinion, how much is it important to have a good knowledge on these topics and, at the same time, how much is it necessary to deal with them on the field?
xisluke is offline   Reply With Quote

Old   January 4, 2022, 07:27
Default
  #4
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,213
Blog Entries: 29
Rep Power: 41
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by xisluke View Post
Big thanks Paolo! I'll definitely have a look to this book. Another thing, in your opinion, how much is it important to have a good knowledge on these topics and, at the same time, how much is it necessary to deal with them on the field?
It really depends from the tools you use or the job you do.

If you use some commercial solver, in my opinion, you really don't need this part, like at all. You need to know the physics, the numerics, how models work, but the linear system part is something you have very little control of. And I think this is correct, because that part really has nothing to do with the problem and the software vendor is the one in charge for correctly picking up the numerical algorithm to solve a pure math problem. Obviously, having a general understanding is always helpful, especially when things don't work as expected.

If you use some open source tool, things become slightly worst. Take OF as example. You have the choice, for each equation, to pick up a different linear solver among several available. But what you need to know is which one is suited for what, not how they work in detail. In the OF case, however, you are plenty of examples/tutorials where this choice has been already made so, in practice, you don't really need to know much.

Finally, if you actually develop a code, you really need to know what solver is suited for your equations but, besides that, you mostly end up using some library, so you don't really need to know the internal details. For example, I only developed my own SOR block solver and use, otherwise, PETSc. I have no idea how GMRES from PETSc works, I just know that it is ok for my equations.

This, of course, is a finite volume CFD biased view. There might be other PDE related math problems that lead to very specific needs.

In conclusion, take a dive into this book as it is certainly useful. The most important part is understanding the limitations of the solvers, which in CFD typically are for the symmetry of the matrix (Conjugate gradient -> Symmetric matrices only, GMRES/Biconjugate Gradient -> Non symmetric matrices allowed), their computational cost (also in parallel) and possibly the role of preconditioners.

Previous knowledge should not be necessary, but it is better if you already know how SOR/Jacobi methods work.
xisluke likes this.
sbaffini is offline   Reply With Quote

Old   January 4, 2022, 08:06
Default
  #5
Member
 
Luca
Join Date: Mar 2021
Location: Italy
Posts: 58
Rep Power: 6
xisluke is on a distinguished road
Thank you, this summary really helps me to identify what it is necessary to know! I asked it since also at the University, during the CFD course, we didn't care to much for linear solvers theory and I'd like to know a little bit more on the topic. In addition, also in Fluent it is possible to play with some of this stuff and I wanted to be more aware of that.
Attached Images
File Type: png AdvancedSolutionControls.png (46.8 KB, 24 views)
xisluke is offline   Reply With Quote

Old   January 5, 2022, 05:18
Default
  #6
Senior Member
 
sbaffini's Avatar
 
Paolo Lampitella
Join Date: Mar 2009
Location: Italy
Posts: 2,213
Blog Entries: 29
Rep Power: 41
sbaffini will become famous soon enoughsbaffini will become famous soon enough
Send a message via Skype™ to sbaffini
Quote:
Originally Posted by xisluke View Post
Thank you, this summary really helps me to identify what it is necessary to know! I asked it since also at the University, during the CFD course, we didn't care to much for linear solvers theory and I'd like to know a little bit more on the topic. In addition, also in Fluent it is possible to play with some of this stuff and I wanted to be more aware of that.
Well, for a number of reasons, engineering university courses can't really go that deep. I really don't know but, If I had to bet, I would say that less than the 1% of all the world engineering courses actually cover, properly, Krylov or AMG methods. Yet, SOR and Jacobi should be part of any reasonable, basic numerical analysis course.

Fluent, as you can see, just uses AMG for scalar and coupled equations. You have some control on most of the AMG parameters, but you can't really switch it with, say, GMRES or Biconjugate Gradient. Still, this is already far beyond what you typically find in other commercial solvers.
sbaffini is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error SIGSEGV using VOF and UDF JERC_UTFSM Fluent UDF and Scheme Programming 14 November 8, 2021 00:17
ofgpu v1.1: GPU Linear Solvers for OpenFOAM Released gocarts OpenFOAM Announcements from Other Sources 4 March 8, 2019 12:21
Convergence of steady linear solvers gigilentini8 OpenFOAM Running, Solving & CFD 2 November 27, 2016 17:31
First order in fvSchemes does not seem to work gerritgroot OpenFOAM Running, Solving & CFD 0 September 30, 2015 21:06
Oscillating behaviour when mesh gets too small james91 OpenFOAM Running, Solving & CFD 0 January 9, 2014 06:04


All times are GMT -4. The time now is 10:50.