[CFD] Multi-Grid for CFD (Part 1): Smoothing, Aliasing and the Correction Equation
Ғылым және технология
An introduction to the multi-grid method that is used in the majority of finite volume based CFD codes to solve sets of linear algebraic equations.
Time stamps
0:00 Introduction
1:42 Example problem
3:17 Gauss-Seidel iterative solution
5:41 The iteration error
9:04 Spatial error frequencies
12:13 Coarse mesh frequencies
13:48 Aliasing
15:57 Smoothing and solving
18:28 The residual
22:37 Standard Gauss-Seidel algorithm
24:33 The correction equation
28:03 Alternative algorithm
30:37 Summary
31:47 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.17. 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.
Пікірлер: 43
It is unbelievable how you have made this so easy to understand. Thank you!
This is incredible. I am shocked at how you managed to explain this hard topic in really simple terms. Thank you so much
Thank you for this! The lecture was clear and the figures made the topic very intuitive.
I'm so lucky to have this video in my PhD!
Thanks! I have been reading on this topic from journal articles that mainly provided verbal descriptions and equations. Those visuals/diagrams really helped clarified the process!
I found this talk very usefull! Now I got some more understanding in vast field of parameters of CFD code. Thanks a lot for your efforts!
By far the best Video on this topic! Thank you very much.
Amazing class, congratulations!
brilliantly done
Awesome lecture. Thank you, sir!
Amazing content!
Very good lecture!
Postponed a movie plan to watch your lecture and I am glad I made the correct choice😀
excellent!
easy to understand
Thank you so much for such detailed and elaborate explanation of Multigrid. I am curious to know relation between spatial error field and boundary condition. Is there a way to develop a predictive error field just with available boundary and initial condition?
Hi Aidan thank you for these amazing videos on Multigrid! What about boundary conditions? Can AMG be applied exactly in the same way to a domain with only neumann BC and to a domain with dirichlet BC? thank you in advance! Giacomo
Absolute GOAT as always. I was wondering if the multi grid method that you are talking about here is the same thing as overset meshing that I have seen in ANSYS Fluent.
@fluidmechanics101
Жыл бұрын
I think overset meshing is different. It is an old technique that is used to patch structured meshes together
I wonder what your views are on how to pre-condition a matrix free pressure solver.
Why is it better to use the correction error instead of simply using the Gauß Seidel method in the multi-grid method? In both cases the matrix would be smoothed.
Hello, I am working on a CFD Problem where I want to estimate the Drag Force on a camera mount on a rocket body for our student space team. I cannot do a 2D simulation for this case and the mount has a lot of round edges and also corners. I am adding inflation layers over the whole rocket body to propperly capture the boundary layer. However as those elements are very thin, yet long and wide, the element quality for those near body elements is awful. This is probably the reason for the non-converging solution I think. Is there any other way to solve this problem, without making the elements at the wall extremely small so that those inflation layer elements are as wide and long as they are thin? I would love some help and please keep the great videos going!
@fluidmechanics101
Жыл бұрын
You could make a very rough first estimate by modelling the object as a cylinder (or square cylinder) of approximately the same size, and then look up the drag coefficient at that Reynolds number, and calculate it by hand. You could even include this (very smoothed out) blob in your simulation. If this works and you are happy, you could slowly add detail or develop a sub-model with a higher resolution object, to get a bit more detail. With such a tricky shape, you will never get the exact answer. You just want to get a number that is accurate enough for what you are doing
Great talk as always! Do you have any plans to talk about LBM solvers?
@fluidmechanics101
Жыл бұрын
Not yet. Maybe in the future? I've got so many detailed topics to cover!
@AbiRizky
Жыл бұрын
@@fluidmechanics101 that's okay, the topics you've covered so far have been great and helped a lot!
Love your channel! I´m learning so much with your videos 😍 Do you have any video where you talk about performing a mesh convergence study?
@fluidmechanics101
Жыл бұрын
Sadly not yet 👍
@sergniko
Жыл бұрын
@@fluidmechanics101 I would be very usefull talk :)
@1992Nereida
Жыл бұрын
@@fluidmechanics101 Hoping you will post a video talking about that topic some day 🙏
Hi. I solved several problems in my code watching this channel. But i have a new one, and maybe you can help: i'm simulating an astrophysical jet in 2 dimensions(r,z). I use(mainly) finite differences to write the parts of the code. My problem is the jet is travelling ok until it reaches the boundary. But in the boundary(it is travelling in the z direction, so the boundary is at certain value of z), is reflected(obviously, because im using reflecting boundary conditions because is easier, normal derivative equal to 0). But this is a problem, because it changes the evolution of the system a lot. Sadly, i dont know how to write a non-reflecting boundary condition. Do you know the name of a paper, or a video that can help me with this? Because I found some, but they are not case specific, and it makes them difficult to understand.
@fluidmechanics101
Жыл бұрын
I don't have anything specific for non reflecting boundaries but you could try 'Notes on Computational Fluid dynamics; general principles' by Greenshields and Weller. There is a great chapter on boundary conditions with lots of detail that might help you out? I think it had something on non reflecting boundaries but I can't quite remember!
Hi , Aliasing effect is basicly called Restriction or Injection right? (Moving from Fine Grid to Coarse Grid) and moving back to Fine grid is called Prolongation or Interpolation?
@fluidmechanics101
7 ай бұрын
Yes 👍
i use multigrid methods for electrostatic problems and i am kind of self taught in the topic. When reading for example on the V cycle it was confusing to me what operators you would use for smoothing or restriction. Linear interpolators between matrix values seemed best for me for example but i really enjoyed your video. I prefer to stick with explicit b-vector iteration instead of implicit matrix algebra because it handles boundary conditions in much simpler ways. For example when you have very complex shapes input by the user. It also makes the memory usage much simpler because you only need to save the weights of the A matrix in a convolution kernel. Ofc you can use a sparse A (if your A is sparse) but ye
@Roxas99Yami
Жыл бұрын
my question is here when for example does the algorithm decide to stop restricting the mesh? Because realistically would you go down to 4 elements ?? Even if you have multiple objects with multiple boundary conditions ?
@fluidmechanics101
Жыл бұрын
That's a good question, and I don't know the answer. I expect the answer might be code specific?
@Roxas99Yami
Жыл бұрын
@@fluidmechanics101 i have been struggling with this in my explicit v-cycle algorithm for electrostatics and the best i could come up with was this algorithm: 1- decide how many restrictions the mesh will undergo. usually user input. 2- decide a restriction factor. For example 0.5 will half the nr of indexes on each axis. 3- Since i am using the secondary array as a boolean Mask for dirichlet conditions, restrict the Dirichlet Mask and its geometries. 4- Save all the restricted Masks beforehand in a structure. This is where i had to make choices between doing multiple V-Cycle iterations vs doing 1 V-Cycle with many inner SOR iterations. I went with option 2 for reasons that made the code more readable. I logiced for a restriction condition like this. Say for example i am measuring the residual with a method of my choice. In my case i use the L2 norm of the whole potential matrix. The difference between current iteration vs last, If the user wants the L2 difference to be for example = 1.0, and on step 1 i decide on 4 restrictions, the algorithm will move down in mesh size if L2diff / nr.restrictions is reached as an error. This "pesudo guarantees" that you have a reliable error once you move up in mesh size again for the final result. But it gives results that are more off from the analytical solution or straight up doing 4000 SOR iterations
Hi Dr.Aidan, what is AMG linear solver in starCCM+, i am alway confused.
@fluidmechanics101
9 ай бұрын
Algebraic multigrid. It is still a multigrid solver, but the agglomeration (see Part 2) is done directly on the equations, rather than the cells in the mesh
Hello, it is very detailed video about multigrid, I like it so much. But after watching I have some question remained. Why should we use mutligrid method with GS method for solving SLAE, when we can consider GMRES, or BiCGstab for this purpose? Will multigrid be faster that suggested algorithms? Or will it be easier to code? Can we use another algorithm for multigrid, not GS? In the video there is a strong emphasis is on the specifics of GS (it behaves like smoother and etc). Thakn you for your channel, it's аwesome
@fluidmechanics101
Жыл бұрын
To be honest, the choice of smoother is a bit beyond my understanding. I am sure this is something that the CFD code manual can recommend for different problems
@fluidmechanics101
Жыл бұрын
To be honest, the choice of smoother is a bit beyond my understanding. I am sure this is something that the CFD code manual can recommend for different problems