[CFD] Relaxation in CFD (Part 1) - Explicit Relaxation, Under-Relaxation Factor

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

An introduction to relaxation and how it can be used to help improve convergence in CFD.
0:00 Introduction
1:32 Example Problem
7:48 Updating the Solution
12:39 Relaxation Factor (alpha)
13:46 Under and Over-relaxation
18:00 Stability and Speed
20:47 Compromise
24:35 Slow Divergence
26:42 Advice and Best Practice
30:55 Summary
32:24 Outro
#relaxation #fluidmechanics101 #cfd
============================================
Some useful references
============================================
1) Ferziger & Peric, 'Computational Methods for Fluid Dynamics', 3rd Edition, Springer-Verlag, Berlin, Heidelberg, New York, 2002.
www.amazon.co.uk/Computationa... [Page 118, 149]
2) S. Patankar, 'Numerical Heat Transfer and Fluid Flow', 1st Edition, McGraw-Hill, 1980. [Page 67]
3) ANSYS Fluent 12.0 User manual (18.4.4 Steady-State Iterative Algorithm)
www.afs.enea.it/project/neptu...
4) OpenFOAM: User Guide v2012. Under relaxation
www.openfoam.com/documentatio...
============================================
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.

Пікірлер: 92

  • @mkftagore5225
    @mkftagore52252 жыл бұрын

    Your videos are really helping me to teach the CFD thing.Thank you,Aiden!!

  • @rahatullah4232
    @rahatullah42322 ай бұрын

    Don't think anyone can do the explanation better than you. Thanks💞

  • @Van-HoangNguyen
    @Van-HoangNguyen2 жыл бұрын

    Thank you for such amazing and deep explanation Prof. Aidan. I hope you post Relaxation in CFD (Part 2) soon.

  • @CesarLopez-qt9mo
    @CesarLopez-qt9mo2 жыл бұрын

    Thank you for such amazing and deep explanation Prof. Aidan.

  • @Mercredification
    @Mercredification2 жыл бұрын

    Maybe have a series on "Partitioning"? A brief overview of the different approaches, what is the overhead, and maybe the differences between lets say 8 and 512 core partitioning strategy. With people working more and more on high node cluster systems, a series on highlighting the role of partitioning to achieve optimal speedup would be really cool.

  • @emlfluidm1159
    @emlfluidm11592 жыл бұрын

    I have been following you video for a few weeks and just subscribed. Thanks for the detailed explained videos :D

  • @curtismannheim
    @curtismannheim2 жыл бұрын

    The stars aligned so this video is released when I'm doing a Cybertruck simulation in Fluent and trying to get it to converge. I had no idea what those factors were and what they did. Thank you very much for your work.

  • @parthsavyasachi9348

    @parthsavyasachi9348

    2 жыл бұрын

    I am surprised that recently so many people are saying that they have issues in convergence in fluent. For me fluent was one of the most stable solver and the reason i worked into solver writing. Haven't used fluent last 10 years. Dunno what happened there.

  • @dekonildo

    @dekonildo

    2 жыл бұрын

    @@parthsavyasachi9348 Fluent is still VERY stable. What I think is one of the issues is that people have less and less knowledge of CFD when they use it (and other software). Not only this, but since computations became quite cheap, compared to what they were not too long ago, people tend to try to simulate things without taking the time to properly prepare geometries, create good meshes, etc. I don’t want to be a jerk, but doing simulations without even knowing what under relaxations factors are is the recipe for failure. Other than this, assuming the Cybertruck case is not transient, it’s quite likely it will never properly converge because of the mesh/geometry.

  • @parthsavyasachi9348

    @parthsavyasachi9348

    2 жыл бұрын

    @@dekonildo yes you are right. My main thinking is that these people are using coupled solver and it can be very unstable.

  • @naldofrasco1467
    @naldofrasco14672 жыл бұрын

    Another excellent presentation. Thanks Aidan.

  • @brandongleeson9903
    @brandongleeson99032 жыл бұрын

    Excellent lecture, thank you for sharing your knowledge!

  • @venukr937
    @venukr9372 жыл бұрын

    Excellent explanation 👍 Thanks Dr. Aidan. Waiting for your next lecture.

  • @ashokdarbhe5664
    @ashokdarbhe566411 ай бұрын

    so nicely poised video with perfect basics explanation complimented by deeper understanding in the end. Loved it, thank you

  • @sergniko
    @sergniko2 жыл бұрын

    Thank you for excellent talk! It was very usefull. Can't wait for the next part!

  • @31Dragibus
    @31Dragibus2 жыл бұрын

    Très clair et concis, bravo !

  • @Abuthi3
    @Abuthi32 жыл бұрын

    Thanks Dr.Aidan. It is really helpful and well explained.

  • @aurora1024
    @aurora10242 жыл бұрын

    Once again, and your first 10 minutes you reduced my uncertainty of running CFD greatly. If I may use the pun, you offer well posed explanations. :)

  • @fluidmechanics101

    @fluidmechanics101

    2 жыл бұрын

    😂😂

  • @nishantbhatta9081
    @nishantbhatta90812 жыл бұрын

    Loved it Dr. Wimshurst. The CFD community would be really grateful if you could upload two videos per month.

  • @fluidmechanics101

    @fluidmechanics101

    2 жыл бұрын

    I wish I could! It takes a long time to make a good video. I'd rather make sure the video is really good, rather than rush it

  • @murilozucatelli6243
    @murilozucatelli62432 жыл бұрын

    Adorei conhecer esse canal, tem me ajudado muito a fazer meu trabalho de conclusão de curso!!!

  • @nathanpitillion1349
    @nathanpitillion1349 Жыл бұрын

    Excellent video :)

  • @stefanomonti6581
    @stefanomonti6581 Жыл бұрын

    really good video, thank you very much!

  • @akashmalaviya4435
    @akashmalaviya4435 Жыл бұрын

    Thank you for a great explanation

  • @albanrajasingh4652
    @albanrajasingh4652 Жыл бұрын

    wonderful teaching bros

  • @TEDJES10
    @TEDJES102 жыл бұрын

    Great appreciation Dr.Aidan👌👌👌👌

  • @wysz2925
    @wysz29252 жыл бұрын

    Simple explanation for complex problems. I like it. Waiting for implicit unsteady and Your thoughts on inner iterations convergence.

  • @soroushasadian9100
    @soroushasadian9100 Жыл бұрын

    Outstanding lecture👌

  • @rpapa
    @rpapa Жыл бұрын

    Excellent explanation!!!!!!!!!!!!

  • @user-mu5wo4qu3j
    @user-mu5wo4qu3j Жыл бұрын

    Thank you. I was tring to change relaxiation factors a lot.. but it diverged every time. but you recommended me to change mesh, and after i did it, it finally works!

  • @fluidmechanics101

    @fluidmechanics101

    Жыл бұрын

    That's fantastic!

  • @souviksinghrathore5423
    @souviksinghrathore54232 жыл бұрын

    Love CFD

  • @akshayghorpade8624
    @akshayghorpade86246 ай бұрын

    great information and well explained sir

  • @mohame.k5399
    @mohame.k5399 Жыл бұрын

    Thanks Aiden

  • @Besselsquach
    @Besselsquach2 жыл бұрын

    I don’t think I’ve ever relaxed while doing CFD but that might just be me

  • @fluidmechanics101

    @fluidmechanics101

    2 жыл бұрын

    😂

  • @dekonildo

    @dekonildo

    2 жыл бұрын

    Well, let’s just say that full relaxation, as shown in the video, is not the standard in CFD.

  • @gmanken
    @gmanken Жыл бұрын

    Thank u sir

  • @nac9494
    @nac94942 жыл бұрын

    Handsome and smart, I might become gay if you continue with the channel Aidan. Now seriously, amazing explanation, i have been a couple of days trying to understand it and you really put it simple and easy. Very much appreciated the great deal of effort you put in.

  • @fluidmechanics101

    @fluidmechanics101

    2 жыл бұрын

    Fantastic! I'm glad you found it useful

  • @hernanjaviergomez-zambrano8610
    @hernanjaviergomez-zambrano8610 Жыл бұрын

    I have of the similar problem. I am trying to verify the reported wall shear stress of a model in Ansys Fluent. This two dimensional model uses standard k-e turbulent closure scheme with standard wall functions. The manual says that, it uses Launder and Spalding method. I tried to verify it with my result. However, the results do not match. Fluent results gives wall shear stress around 20.62 N/m2. If I follow the process explained in the Fluent manual, it gives me around 8.95 N/m2. Now, I am thinking what can be the source of discrepancy. I would appreciate if anyone can suggest me regarding this issue. The velocity in the first cell is 1.111 m/s, distance from the wall is 0.0008 m and kinetic energy at the point is 0.059828 m2/s2. Note: I would like to mention that my first cell from the wall is in the log-law region. I have around 2-3 cells in the log-law region. If I take yp as 0.0008 and corresponding x-velocity (up) as 1.11141 m/s, density= 998.2 kg/m3, dynamic viscosity= 0.001002, and C_mu= 0.09. y*=yp*c_mu^(0.25)*k^(0.5)*density/dynamic viscosity =107.14. taw_w becomes 8.95 N/m2. whereas Fluent gives about 20.62 N/m2. Is there something I am missing? Thank you again for looking in to the issue. Regards.

  • @olexiio2399
    @olexiio23992 жыл бұрын

    like it

  • @fathyhassan2160
    @fathyhassan21602 жыл бұрын

    Where is the other parts already? You are a master ❤️

  • @fluidmechanics101

    @fluidmechanics101

    2 жыл бұрын

    On their way! I am writing them now ☺️

  • @fathyhassan2160

    @fathyhassan2160

    2 жыл бұрын

    @@fluidmechanics101 ❤❤

  • @Mikey-mv5xn
    @Mikey-mv5xn2 жыл бұрын

    Amazing explanation..waiting for next part of this series. I would like to ask one question Sometimes in ANSYS CFX I got an error message that set your topology estimation factor to be 1.2 instead of default value of 1 I dont know what is meant that back into solution procedure. If you have any idea of this please let me know. Thanks in advance.

  • @fluidmechanics101

    @fluidmechanics101

    2 жыл бұрын

    Not sure. Could you ask ANSYS customer support?

  • @user-ii4ld4if5z
    @user-ii4ld4if5z18 күн бұрын

    what is the suitable under relaxation factor in the case of mixed convection?

  • @himanshubanait9166
    @himanshubanait91662 жыл бұрын

    Please make a video on Flux-Vector splitting schemes.

  • @francootaola9172
    @francootaola91722 жыл бұрын

    Hi Aidan, as always your videos are the best.... I would love to have this quality of material in other fields. I have 2 questions: 1. when we under-relax and we achieve "convergece" to ensure that the simulation did converged and it is not an illusion of the under-relaxation, what should we do? stop the simulation stop the under-relaxation and re run it from there? 2. could you give in the following talks some examples of over-relaxation? not in deep but just to see what cases could it be applied. maybe for the calculation of a potential flow? where we use to approximate an initial condition of our flow field? best regards.

  • @fluidmechanics101

    @fluidmechanics101

    2 жыл бұрын

    1) just run a few extra iterations to check that nothing changes. If you achieved convergence in say 3000 iterations, then running an extra 1000 (without changing the relaxation) is a good way to check. 2) you can use over relaxation within the solver itself (if you look at Gauss Seidel successive over relaxation) you can find an example there. Otherwise over relaxation is rarely used in CFD

  • @hardiksharda9673
    @hardiksharda9673 Жыл бұрын

    Amazing Talk! Thank You Dr. Aidan!! I always like your presentation style. What tool do you use for presentation?

  • @fluidmechanics101

    @fluidmechanics101

    Жыл бұрын

    Thank you ☺️ I use latex with the 'beamer' package and 'boadilla' style

  • @opencast1819
    @opencast18192 жыл бұрын

    Please notice at 17:00, that what you are showing in OpenFOAM that is a "matrix relaxation" when you under-relax your system of equations not the fields. To under-relax the fields you have to introduce a corresponding "fields" sub-dictionary: fields { p 0.2; .... }

  • @fluidmechanics101

    @fluidmechanics101

    2 жыл бұрын

    Yep, I am a bit rusty on my OpenFOAM. Sorry if my syntax was wrong!

  • @opencast1819

    @opencast1819

    2 жыл бұрын

    @@fluidmechanics101 no problem, just noticed that as an OF veteran) great lecture!

  • @user-oe6it3kb1c
    @user-oe6it3kb1c11 ай бұрын

    I have done a mixed convection in circular pipe, in the low Reynolds number, the convergence was very stable, but when increase Reynolds number to the limit of transition 2100 I showed the convergence was not stable, what do you do now

  • @ibonitog
    @ibonitog2 жыл бұрын

    26:00 Is the same pseudo stability true when using too little CFL values in compressible simulations?

  • @fluidmechanics101

    @fluidmechanics101

    2 жыл бұрын

    Similar yes

  • @berkecam7095
    @berkecam70952 жыл бұрын

    Hi Aidan, another great video on CFD. I have a question to ask if you dont mind?. I am simulating a steady state hydrogen leakage(pure hydrogen) case from a nozzle into a enclosed room. In my solution i start to get lots of fluctuations when it’s about to converge and doesn’t converge. I also get a reversed flow in the outlet. Do you have any recommendations for me to try?

  • @fluidmechanics101

    @fluidmechanics101

    2 жыл бұрын

    If you have reversed flow in the outlet, have a look at the solution and see what it is doing. Is it reversing for a reason? A fix which sometimes works is to move the outlet much further downstream. If your flow only has pressure boundaries, consider introducing a really slow cross flow across the outlet (velocity inlet and pressure outlet). This usually helps natural convection

  • @hyejeongcheon9664
    @hyejeongcheon96642 жыл бұрын

    So a helpful lecture =) How did you make figures in slides for example showing points on the grid? using Tikz?

  • @fluidmechanics101

    @fluidmechanics101

    2 жыл бұрын

    Hello! I make all my figures using inkscape. It's free and a really good tool for vector images. If you would like to learn how, I made a quick course to show exactly how I use inkscape www.udemy.com/course/inkscape-for-scientists-and-engineers/?referralCode=6C8957C2548D1DE7B338

  • @jasonchu852
    @jasonchu852 Жыл бұрын

    👍

  • @himess4782
    @himess47822 жыл бұрын

    Please , what is meant by the referance shear rate in the Comsol program according to the Herschel bulkley papanastasiou ,and how do I détermine its value , Please help me😞

  • @fluidmechanics101

    @fluidmechanics101

    2 жыл бұрын

    I think you might need to email the Comsol customer support. They should be able to tell you

  • @jeeloonghee3894
    @jeeloonghee3894 Жыл бұрын

    Save me. I am going mad soon lol. I am running a combustion modelling (i.e. comprising of species transport Natural Gas + P1 radiation + turbulence model standard ke-rez + shell conduction just 1 layer to account for heat transfer through the wall for energy balance and losses). It looks good as now there is heat losses so my domain should be 'closer' to realistic temperature. But the issue is with final converged solution, I been fiddling too much with URF I think every time I am doing that; my Total Sensible Heat Transfer is set back by a value of several thousand kilo watts. Should I stop change URF and stick with one value and run till it reduces down to hundreds of kilowatt? I was advised that the total sensible heat transfer value should be in the order of 2% NET to consider it reaches converged solution. Is it even possible for total sensible heat transfer value at REPORT tab to reach a very low value? URF too high at the start the solver exploded (for combustion), too low URF it takes forever. Changing URF incrementally step by step, the total sensible HT keep changing (i.e. up)! Lots of nice videos by the way. Dr Jee

  • @fluidmechanics101

    @fluidmechanics101

    Жыл бұрын

    It sounds like you might have some unsteady flow in your solution, which is causing an imbalance in your thermal power balance. Have you tried switching to a transient solver and running for a short period of time? If not, I would try simplifying your physics (turn off radiation, use 1st order turbulence etc) to get a stable solution and then slowly turn the physics back on

  • @mohamedelbouti6556
    @mohamedelbouti65562 жыл бұрын

    Thank you for this wonderful video, i just have a question, could we reduce the URF in transient calculation if we have a convergence problem ? or we have to only reduce the time step ?

  • @fluidmechanics101

    @fluidmechanics101

    2 жыл бұрын

    This should be explained in the next few videos when I actually go through pseudo transients. For now, if you have a true transient the only thing you have access to control is the time step and the number of iterations per time step. Try increasing the number of iterations per time step, that usually helps, particularly near the start of the calculation

  • @mohamedelbouti6556

    @mohamedelbouti6556

    2 жыл бұрын

    @@fluidmechanics101 Thank you for your answer, but i just want to know what happens if i reduce the URF in my transient calculations in order to reduce the residuals ?

  • @fluidmechanics101

    @fluidmechanics101

    2 жыл бұрын

    Should be fine, you might just need more iterations within each time step to get convergence 👍

  • @parthsavyasachi9348

    @parthsavyasachi9348

    2 жыл бұрын

    ​@@mohamedelbouti6556 "what happens if i reduce the URF in my transient calculations" Short answer is that you will then need lot more inner iterations per time step. Long answer is bit complicated. The way urf is applied in Fluent, Starccm etc is by dividing the diagonal term of matrix by the urf value. Now in case of transient simulation the temporal term also acts like an under-relaxation. So the total effect is urf due to time step size and then on top of that another urf that you apply. This could slow down convergence very much. In starccm there is a feature where it compares these two urf and applies the user urf in controlled manner not to apply too much of it. Because of this, it is more efficient to reduce the dt by half then to reduce the urf by half.

  • @kyremike9146
    @kyremike9146 Жыл бұрын

    very nice i have a question: if the calculation result is not around the true value , does the relaxation slow down the convergence ?

  • @fluidmechanics101

    @fluidmechanics101

    Жыл бұрын

    I am a bit confused by your question. What do you mean by 'true value' (the final converged value or the actual true solution) and 'slow down convergence' I assume you mean by reducing the relaxation factor? Could you give a bit more detail?

  • @kyremike9146

    @kyremike9146

    Жыл бұрын

    @@fluidmechanics101 very happy to see your reply and thank you for your wonderful video. What I mean is the relaxation is based on the fact that the calculation result is oscillating around the physical result with the iteration. So the relaxation can reduce the oscillation. If the iteration has a direction to be closer to the physical result, will it reduce the convergence speed? Or every simulation process is oscillating around the physical result because some reasons I don’t know. Last, you never know how grateful I am when I see your video.

  • @vittorioragno6621
    @vittorioragno66212 жыл бұрын

    Amazing teacher! One question, if we want to check quickly if the simulation diverge, could we temporarily rise relaxation factors? Thanks, I also recommend Udemy courses of Dr.Aidan.

  • @fluidmechanics101

    @fluidmechanics101

    2 жыл бұрын

    If you have the default relaxation factors (0.3 - 0.7) then you won't really need to do this. But if you have reduced them (to say 0.1 or below) then it is a good check to see if you have slow divergence or not. If you are running in Fluent you can always switch over to pseudo transient and run for a few more iterations and have a look at the residuals. That is another check you can do

  • @8cold8hot

    @8cold8hot

    2 жыл бұрын

    @@fluidmechanics101 Great information! While I did not fully get the trick of switching over to pseudo transient, how does it work? If it is turned on at the beginning for the coupled pressure-based solver, does it still work?

  • @fluidmechanics101

    @fluidmechanics101

    2 жыл бұрын

    Yep, that should work 👍

  • @sujaysawant868
    @sujaysawant8682 жыл бұрын

    Amazing explanation! Could you suggest some reference books to master CFD!?

  • @fluidmechanics101

    @fluidmechanics101

    2 жыл бұрын

    Sure thing. 'Computational Methods for Fluid Dynamics', by Ferziger and Peric is a great reference. Or 'Notes on Computational Fluid Dynamics: General Principles' by Greenshields and Weller is another great book

  • @sujaysawant868

    @sujaysawant868

    2 жыл бұрын

    Thanks man!

  • @elarabibabas6928
    @elarabibabas69282 жыл бұрын

    Sir , as i am knew to your lessons , i am trying to understand how CFD works and your lectures are similar with my professor's lectrures so i choose to follow yours due to the better explaining you do. Even though i have 2 questions , one concerning the lecture above and one concerning CFD in general. The first one is , how do you choose the Tcalc for every iteration . The value a is predecided and the old one is known , but what about the value of Tcalc. If you have already explained it in a previous lecture , could you please guide me through? And the second one , how do you think i should approach the CFD in general , knowing the fact that i have attained all my fluid mechanics lessons and turbomachinery applications and i actually try to apply all this knowledge to practical applications that dont use potential or simplified versions of flow. Thank you in advance , sir.

  • @fluidmechanics101

    @fluidmechanics101

    2 жыл бұрын

    1) Tcalc is the solution of the energy equation. The CFD code will calculate this for you. 2) I would just jump in and start doing tutorials in whatever CFD code you have access to. The tutorials in OpenFOAM, Fluent and Star CCM are all pretty good for learning

  • @elarabibabas6928

    @elarabibabas6928

    2 жыл бұрын

    @@fluidmechanics101 thank you sir i reallly appreciate your help.

  • @fluidmechanics101

    @fluidmechanics101

    2 жыл бұрын

    Happy to help ☺️

  • @mkacademy3908
    @mkacademy39082 жыл бұрын

    please make video on pimple algorithm

  • @alfonsos-q4634
    @alfonsos-q46342 жыл бұрын

    Sorry to reach you through here. I am a bit desperate. I sent you an email with a couple doubts about a project that maybe you could help. I would enormously appreciate. Thanks in advance. Alfonso.

  • @fluidmechanics101

    @fluidmechanics101

    2 жыл бұрын

    Hi Alfonso, yes I have seen your email and have sent you a reply. Have a look at your inbox and you should find the answers you are looking for ☺️

  • @user-ii4ld4if5z
    @user-ii4ld4if5z18 күн бұрын

    what is the suitable under relaxation factor in the case of mixed convection?

Келесі