[CFD] Conjugate Gradient for CFD (Part 1): Background and Steepest Descent

Ғылым және технология

An introduction to the conjugate gradient method and other gradient descent based methods (steepest descent method) for CFD. This is Part 1 of a 2 Part lecture series.
Time stamps
0:00 Introduction
2:53 Gauss-Seidel Recap
7:20 Quadratic Form
14:48 Gradient of f
19:37 Finding the minimum
24:00 General algorithm
25:53 Steepest descent method
29:50 Search direction (pk)
32:25 Search distance (alphak)
39:55 Steepest descent summary
41:33 Conjugate gradient motivation
43:02 Summary
44:33 Outro
References
J. Shewchuk 'An Introduction to the Conjugate Gradient Method Without the Agonizing Pain', Edition 1 1/4, 1994.
www.cs.cmu.edu/~quake-papers/...
============================================
Want to learn more?
============================================
Grab a copy of my CFD Fundamentals Course (for beginners):
www.udemy.com/course/computat...
Learn how to write your own CFD code in MATLAB and python (for intermediates):
dr-aidan-wimshurst-s-school.t...
Learn how I draw my figures and diagrams in Inkscape (for everyone):
dr-aidan-wimshurst-s-school.t...
============================================
Did you like the video?
============================================
Download the lecture slides from my website:
www.fluidmechanics101.com/pag...
Buy me a coffee to say thanks:
www.buymeacoffee.com/NKEZrhvg0
Support the channel on Patreon (and get useful extras for your CFD studies):
/ fluidmechanics101
============================================
Donations:
============================================
1) PayPal
www.paypal.me/fluidmechanics101
==================================
Disclaimer
==================================
The methods, algorithms, equations, formulae, diagrams and explanations in this talk are for educational and demonstrative purposes only. They should never be used to analyse, design, accredit or validate real scientific / engineering / mathematical structures and flow systems. For such applications, appropriate trained, qualified and accredited (SQEP) engineers / scientists should be consulted along with the appropriate documentation, procedures and engineering standards. Furthermore, the information contained within this talk has not been verified, peer reviewed or checked in any way and is likely to contain several errors. It is therefore not appropriate to use this talk itself (or any of the algorithms, equations, formulae, diagrams and explanations contained within this talk) as an academic or technical reference. The reader should consult the original references and follow the verification and validation processes adopted by your company / institution when carrying out engineering calculations and analyses. Fluid Mechanics 101 and Dr. Aidan Wimshurst are not accountable or liable in any form for the use or misuse of the information contained in this talk beyond the specific educational and demonstrative purposes for which it was intended.

Пікірлер: 32

  • @matthias1991
    @matthias19913 ай бұрын

    I was deterred from watching the video for the longest time because of the name of the channel, because I'm not studying Fluid Mechanics but honestly this is the best explanation of CG I found on youtube! You're really breaking it down into bits that are easy to understand and explain the relevant concepts from basics and built up on that. It only required attention but I finally understand it now. Thank you so much! :-)

  • @bartosh3959
    @bartosh39597 ай бұрын

    Could not be more clear, thanks!

  • @sammartens1090
    @sammartens10902 ай бұрын

    I really, really like your approach of explaining things. Like when you go through concrete examples with numbers instead of variables or explain physical meaning also circling back to the basics when needed, it makes it possible to understand this even for people like myself, who has very little experience if CFD solvers. Thank you very much.

  • @bsreekanthreddy2622
    @bsreekanthreddy26223 ай бұрын

    The best explanation, anyone could ever find

  • @k0185123
    @k018512310 ай бұрын

    what a great introduction to steepest descent method! Looking forward to your next lecture on CG and perhaps GMRES :D

  • @jessbuildstech
    @jessbuildstech11 ай бұрын

    A fantastic video mini series, I'm excited for the Part 2!

  • @aminfathi9116
    @aminfathi91167 ай бұрын

    Best lecture I found on the Internet. Thank you so much. Now, I'm forwarding to the next lecture.

  • @felipelopez5656
    @felipelopez56567 ай бұрын

    Great explanation to begin with gradient methods! Thank you for this video 😀

  • @giahuypham1857
    @giahuypham18574 ай бұрын

    thank you for the clear instructions. You are more than a god to me

  • @isaacpaten1495
    @isaacpaten14956 ай бұрын

    Great lecture, thanks so much. You took time to explain lots of things which other videos just stated.

  • @user-rw1py2wq8w
    @user-rw1py2wq8w11 ай бұрын

    Great effort, thanks

  • @AC-tn4it
    @AC-tn4it4 ай бұрын

    Wow, this was such an amazing explanation

  • @falanger6659
    @falanger66596 ай бұрын

    Great video, helped me a lot. Big thanks to you!

  • @heloisacristina8688
    @heloisacristina868810 ай бұрын

    Woooow! Very nice class! Please send the part 2!

  • @aderstaarey3438
    @aderstaarey34389 ай бұрын

    Great work

  • @bushraw66
    @bushraw663 ай бұрын

    I wish you had solved some examples, your explanation is great but hands on practice would really drill the method into my brain, specially that there is very few examples on youtube about those methods

  • @weigleec
    @weigleec11 ай бұрын

    Very nice class! Steepest gradient is a lot like gradient descent (used in neural networks).

  • @naimaabdallah3490
    @naimaabdallah34904 ай бұрын

    So nice 🎉

  • @opencast1819
    @opencast181911 ай бұрын

    Thank you Aidan, a great lecture! Currently I have encountered in my multi-phase magneto-hydrodynamics simulation using OpenFOAM convergence problems for the Poisson equation for the electric potential due to the presence of a low conductive phase. Algebraic multi grid (GAMG in OpenFOAM) was fast, but it stuck at low convergence level. Conjugated gradient (PCG in OpenFOAM) managed to converge (I need 1e-18 absolute tolerance at least), but it takes ~800 iterations. The great solution appeared to be a combo of PCG solver with GAMG preconditioner with Fast-DIC smoother. It allows to converge in 16 (only!) iterations. Would be nice to have some lecture on such hybrid approaches. Thank you in advance!

  • @fzigunov
    @fzigunov11 ай бұрын

    Really nice. I just implemented this algorithm (CG) for a problem I was working on, so it's really cool to see your take on it! Very detailed and beginner-friendly! Edit: why does it sometimes diverge? Maybe you can discuss that in the next lecture?

  • @wile9763

    @wile9763

    11 ай бұрын

    CG methods are a member of a class of linear solvers called Krylov subspace methods. The iteration error of these methods can be shown to depend on the condition number of the matrix which is in turn determined by the eigenspectrum of the matrix. So, in short, if a linear system is sufficiently poorly conditioned, Krylov methods will diverge. Preconditioners are used to remedy this problem and represent a large area of interest in the literature.

  • @fluidmechanics101

    @fluidmechanics101

    11 ай бұрын

    Exactly! Great response. I didn't want to get into condition number and pre-conditioners here, as I wanted to focus on actually understanding the method first. Hopefully I have succeeded!

  • @fzigunov

    @fzigunov

    11 ай бұрын

    @@wile9763 Thanks for the easy-to-understand response! This is also nice to know so I can improve my solver 🙂

  • @opencast1819

    @opencast1819

    11 ай бұрын

    @@wile9763 great answer! You can find some related experience in my comment above. Cheers!

  • @mohmmedabdghany5696
    @mohmmedabdghany569610 ай бұрын

    Nice lecture, can you took about multiphase, vaporization and condensation ?

  • @user-yr8ze2zb7j
    @user-yr8ze2zb7j7 ай бұрын

    Hello, thank you very much for your video. However, in your video 34:20, you mentioned that all residuals point towards the global minimum. I would like to know, is this a special case or an inevitable situation? Because the residual equals the gradient,but the gradient does not necessarily point towards the global minimum.

  • @freevoice6611
    @freevoice66117 ай бұрын

    These methods also solve the storage issue of sparse Matrix.. but how? Can someone please explain?

  • @brandon7939
    @brandon79397 ай бұрын

    I find that u look like Sheldon

  • @fluidmechanics101

    @fluidmechanics101

    7 ай бұрын

    😂😂

  • @caleb4485
    @caleb44859 ай бұрын

    Promo_SM

  • @murat9268
    @murat926810 ай бұрын

    There is better alternative to gauss seidel method. LUSGS method, gauss seidel method with approximate LU factorization.

Келесі