[CFD] Gauss-Seidel Method in CFD

  Рет қаралды 9,886

Fluid Mechanics 101

Fluid Mechanics 101

Күн бұрын

A physical explanation of the Gauss-Seidel algorithm that is used in modern CFD codes. The algorithm is explained using a basic example, with limited mathematics.
Time Stamps
0:00 Introduction
1:24 Example Problem
6:59 How does the algorithm work?
11:32 What does it physically mean?
13:31 The Gauss-Seidel formula
15:48 Solution propagation
18:28 Cell numbering
20:49 Cuthill-Mckee renumbering
23:16 Sweep direction
25:25 Symmetric Gauss-Seidel
26:11 Summary
27:40 Outro
References
Y. Saad. Iterative Methods for Sparse Linear Systems. 2nd edition. Society
for Industrial and Applied Mathematics, 2003. isbn: 978-0898715347
C. Greenshields, H. Weller 'Notes on Computational Fluid Dynamics: General Principles', Section 5.2. 2022.
doc.cfd.direct/notes/cfd-gene...
============================================
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.

Пікірлер: 44
@argcargv
@argcargv Жыл бұрын
For a thirty minute review, this is pretty good. I think a followup review could be helpful that connects the Gauss-Seidel method to the splitting where Ax=b is approximated assuming A=L+D+U where L is strictly lower triangular, D is a diagonal matrix and U is strictly upper triangular, then we can approximate the inverse of A by subdividing the matrix such that we have (L+D)x^k+1 + Ux^k = b, or alternatively Lx^k+(D+U)x^k+1 = b. The renumbering of the equations has the effect of moving the coefficients around between the L and U matrices. The triangular matrix has a trivial inverse (which is what is implemented by the sweeping approach described in this video). It is important to also note that *when* the coefficients come from an upwind scheme, then it is possible to number the equations such that there are many more zeros in either the L or U sub-matrices. This will result in a much more effective iterative scheme, whereas for coefficients from an elliptic system such as the heat equation give equal weight to the L and U parts. This usually means that the effectiveness of the Gauss-Seidel method will be more effective for upwind dominant systems often found in higher speed compressible flows compared to lower speed diffusion dominant flows. For diffusion dominant problems the Gauss-Seidel method will quickly stall and must be combined with a multigrid or Krylov subspace method to actually be useful.
@fluidmechanics101
@fluidmechanics101 Жыл бұрын
This is a really useful addition. Thank you! I have pinned the comment so everyone can benefit from your explanation
@sammartens1090
@sammartens1090 2 ай бұрын
This is gold. Much obliged good sir
@mikkomaki-iso
@mikkomaki-iso Жыл бұрын
Wow, this video is such a great explanation of the Gauss-Seidel algorithm! I really appreciate how it was broken down and explained using a basic example with limited math. As someone who is new to CFD, this was the perfect level of detail for me to understand the concept. Thank you for sharing!
@tiddlywinks497
@tiddlywinks497 Жыл бұрын
Thank you! I was just thinking about how little I knew about matrix methods
@Krzykid3432
@Krzykid3432 Жыл бұрын
These are very helpful! Thank you for these great videos and excited for conjugate gradient! I always see the preconditioned bi-conjugate gradients in openfoam and have zero clue what they do lol
@antares190
@antares190 Жыл бұрын
Amazing video, I really enjoyed it, thanks for delivering this high quality material
@jessbuildstech
@jessbuildstech Жыл бұрын
Yes, finally this is the video I have been waiting for from you Dr Aidan. Thank you, I can finally use the GS method properly.
@AJ-et3vf
@AJ-et3vf Жыл бұрын
Great video. Thank you
@FonsE42
@FonsE42 Жыл бұрын
Thank you for your great work! I would love to see a Video on the ANSYS Fluent Adjoint solver, for example on a lift/drag optimization. Keep it up!
@Jialei-dw3li
@Jialei-dw3li Жыл бұрын
Looking forward to the conjugate gradient and multigrid methods!
@fluidmechanics101
@fluidmechanics101 Жыл бұрын
Yes! They are going to follow on from the understanding that we have introduced here. The local averaging idea turns out to be very important...
@angelawu6077
@angelawu6077 Жыл бұрын
@@fluidmechanics101 Same! Your videos are so good and now I have hopes that I can finally understand conjugate gradient and multigrid methods! 😂 Looking forward to it!!
@lizarettflavour
@lizarettflavour Жыл бұрын
thank you 🙏🏻 new video here is always a good news, merry xmas, Aidan 🎄🎉❄️
@fluidmechanics101
@fluidmechanics101 Жыл бұрын
Thank you. Merry Christmas to you too!
@oskarelmgren
@oskarelmgren Жыл бұрын
Wow, that's a really basic algorithm! Very interested to review how these actually function! And what that actually means.
@sergniko
@sergniko Жыл бұрын
It was another very usefull talk :) More deeper understanding is gained :)
@dr_bodling
@dr_bodling 5 ай бұрын
Amazing video! Would be awesome if you did other linear solver videos like DADI or GMRES. :)
@benoitallard5516
@benoitallard5516 Жыл бұрын
While fairly obvious, but not explicitly mentioned herein, the convergence of this method will also depend on the initial guesses.
@chandupradeep2419
@chandupradeep2419 Жыл бұрын
Great explanation!!! Can you please come with an explanation for for solving non liner problems ?
@fluidmechanics101
@fluidmechanics101 Жыл бұрын
Yes, the usual approach in CFD is to linearise the non linear terms as much as possible. A linear contribution is added to the A matrix and the non linear component is added to the B vector (evaluated explicitly using values from the previous iteration). Relaxation is then used to stabilise the calculation, so that the non linear contribution is added slowly
@chandupradeep2419
@chandupradeep2419 Жыл бұрын
@@fluidmechanics101 do you have any example for this? A simple one would be a great help!! Or can you suggest a book to cover this particular topic?
@fluidmechanics101
@fluidmechanics101 Жыл бұрын
You could check out 'versteeg and malalasekeera'. Its a textbook with some simple examples which should demonstrate source term linearisation
@chandupradeep2419
@chandupradeep2419 Жыл бұрын
@@fluidmechanics101 thank you soo much ..!!!
@perzetterlund1805
@perzetterlund1805 11 ай бұрын
Thanks for a great series of videos! How is the Gauss-Seidel method (and other general solvers such as multi-grid) related to the SIMPLE and PISO you talked about early in this series? Are they just different ways to solve the NS equations? When do you prefer which methods?
@fluidmechanics101
@fluidmechanics101 11 ай бұрын
Gauss Seidel (and others) are used to solve the individual matrix equations. SIMPLE and PISO tell you the order that the matrix equations are solved in 👍
@andersr9545
@andersr9545 Жыл бұрын
I was listening to your talk with Jousef Murad and found it cool that you were would like to know how SpaceX does their supersonic and hypersonic computations. Are you going to make a video on compressible solvers at some point? That would be great! The landscape of compressible solvers is a complex one to navigate (density based vs pressure based, riemann solvers, etc.)
@fluidmechanics101
@fluidmechanics101 Жыл бұрын
That's the plan! I have almost finished the pressure based solvers for incompressible flows. Next I will be looking at the compressible solvers (much more difficult)
@andersr9545
@andersr9545 Жыл бұрын
@@fluidmechanics101 Great, looking forward to it!
@RamKumar-to5ip
@RamKumar-to5ip Жыл бұрын
nice lecture... please make similar ones for conjugate gradient and multi-grid methods
@fluidmechanics101
@fluidmechanics101 Жыл бұрын
Coming soon in 2023 🙂
@nunziomangione
@nunziomangione Жыл бұрын
@@fluidmechanics101 Can’t wait!
@fluidmechanics101
@fluidmechanics101 Жыл бұрын
Multi grid (Part 1): 7th May
@kuijaye
@kuijaye Жыл бұрын
Thanks! Do you use beamer + tikz/inkscape to create these beautiful slides?
@fluidmechanics101
@fluidmechanics101 Жыл бұрын
Yes! Beamer + Inkscape
@user-dj8vo9df3g
@user-dj8vo9df3g Жыл бұрын
Hello. Are you going to do some videos about chemically reacting flow in CFD? Or this is not your area of interest?
@fluidmechanics101
@fluidmechanics101 Жыл бұрын
Chemically reacting flows are quite advanced and I am trying to cover the basic topics first. Maybe when the basics are sufficiently well covered?
@lq_12
@lq_12 Жыл бұрын
I wanted to ask in the Q&A of the webpage but I think there isn't. Is it going to be a Christmas sale or something like that? I from LATAM and the courses are a bit expensive ( by no means I saying they wouldn't be worth the price just that the currency convertion :c )
@fluidmechanics101
@fluidmechanics101 Жыл бұрын
If you drop me an email (fluidmechanics101@gmail.com) I will see what I can do. The currency conversions are a bit tricky!
@lq_12
@lq_12 Жыл бұрын
@@fluidmechanics101 thank you very much Sir ☺️☺️☺️
@oliesting4921
@oliesting4921 Жыл бұрын
I really want to get into CFD career. Can you make a beginner friendly video lectures. I have enrolled into your fundamental but most of stuff is hard to grasp. I have to continuously look up scientific notations. I am fairly good with calculus 1, can you suggest prerequisite to the fundamentals course? Thanks
@fluidmechanics101
@fluidmechanics101 Жыл бұрын
I don't have anything specific, but any good course on vector calculus would be a good place to start! You really need to get used to using 'nabla' and the dot product
@TeeTeeNet
@TeeTeeNet Жыл бұрын
I think your presentation would benefit from pointing out, though notation, when a variable is assumed to be know from a previous iteration. E.g. your Eqn 11 is not the formula for Gauss-Seidel, it is missing appropriate notation and terms you mentioned but choose to ignore. You couldn’t code the method based on your talk. (This type of clear differentiation of variables through notation would also have really benefited your talk on the SIMPLE method.) Also, typically, algorithms are not deemed to be converged when the difference from iteration to iteration is small, but when some norm of the residual r:=b-Ax is also small. If only the differences are considered the algorithm may have stagnated without convergence. GS is not used alone, it is either used as a smoother in Multigrid or in some modified form as a preconditioner to a Krylov method; on its own the convergence rate is too slow. I too strongly recommend Youssef Saad’s freely available book on iterative methods to anyone interested in further exploring the linear algebra relevant to CFD. (Google “yousef saad iterative methods” for the pdf.)
@fluidmechanics101
@fluidmechanics101 Жыл бұрын
All good points, thank you. The book by Saad is one of my favourites, a great suggestion. I would highly recommend people having a read if they want more detail. I agree with your points on notation. The form I have used is deliberately simplified in places and can't really be used to code an algorithm. However, this was deliberate. There are plenty of detailed sources on the internet for the detailed mathematics of GS and how to code it. My intention was to provide some of the understanding which was clearly missing from these descriptions, as most often CFD engineers only need the understanding to choose the right method (rather than coding it themselves). The understanding that GS uses a local average is the key point here, as it will help us later when we look at multi-grid. So yes, the talk is not a full treatment of the topic, but I hope people have found the 30 minutes of selected material useful 🙂
[CFD] Hexcore Meshes for CFD
30:55
Fluid Mechanics 101
Рет қаралды 8 М.
Heartwarming: Stranger Saves Puppy from Hot Car #shorts
00:22
Fabiosa Best Lifehacks
Рет қаралды 18 МЛН
Gauss-Seidel Method | Numerical Methods
4:51
StudySession
Рет қаралды 32 М.
Adaptive Mesh in Multi Phase Flow Simulation Using Ansys Fluent
14:21
Alpha Omega Product Development Systems
Рет қаралды 31 М.
[CFD] Conjugate Gradient for CFD (Part 1): Background and Steepest Descent
45:01
Mathematicians vs. Physics Classes be like...
7:55
Flammable Maths
Рет қаралды 2,9 МЛН
[CFD] What is Mesh Non-Orthogonality?
32:27
Fluid Mechanics 101
Рет қаралды 27 М.
Lecture -- Jacobi Iteration Method
11:13
EMPossible
Рет қаралды 56 М.
[CFD] Meshing Guide for Pipes and Ducts (O-grid, hexcore, polyhedra)
53:40
Fluid Mechanics 101
Рет қаралды 17 М.
Lecture 4 Gauss Seidel method
11:25
Vipul Patel
Рет қаралды 9 М.
12 Parallel Gauss Seidel  & Efficient OpenMP
42:18
Dalon Work
Рет қаралды 3,2 М.
Неразрушаемый смартфон
1:00
Status
Рет қаралды 2,3 МЛН
Simple maintenance. #leddisplay #ledscreen #ledwall #ledmodule #ledinstallation
0:19
LED Screen Factory-EagerLED
Рет қаралды 22 МЛН
Hisense Official Flagship Store Hisense is the champion What is going on?
0:11
Special Effects Funny 44
Рет қаралды 2,6 МЛН