[CFD] Inflation Layers / Prism Layers in CFD
HTML-код
- Опубликовано: 29 июн 2024
- An introduction to inflation layers / prism layers, which can be generated by the majority of unstructured mesh generators (ICEM CFD, ANSA, ANSYS Workbench, SnappyHexMesh). The following topics are covered:
1) 02:00 Why do we use inflation layers in CFD?
2) 13:34 How do we choose the number of inflation layers (N) and the geometric growth ratio (G)?
3) 32:45 Why does the cell volume transition from the final layer to the freestream mesh need to be small?
#inflationLayers #fluidmechanics101 #meshing
*******************************************************
Check out the calculator on my website for calculating the growth ratio and the first layer height:
www.fluidmechanics101.com/pag...
*******************************************************
Some useful references
1. Computational Fluid Dynamics Blog - Leap Australia
'What y+ should I use? Part 3 - Understanding impact of y+ and the number of prism layers for flow resolution'
www.computationalfluiddynamic...
2. Wikipeda - Geometric Series
en.wikipedia.org/wiki/Geometr...
NOTE: the formula for the geometric series needs to extend from k=0 to N-1, not k=0 to N.
============================================
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. Наука
Congratulations, excellent contribution!
We can also consider a constraint on the size of the element of the last layer, to provide a smooth transition between the elements of the layer and the surrounding mesh.
It is common to choose the average size of the surrounding mesh elements. For a 2D mesh with triangular elements, let's imagine that the area of the last element of the layer has to be approximately the area of the triangular element of the mesh just around the layer, so:
Area of last layer element: A = (x1+x2)*y_last, where y_last = y*G^(N-1).
Area of surrounding mesh element: A = (x1+x2)*h/2
Therefore:
h=2*y*G^(N-1)=2*y*(G^N)/G (for square elements h = y*G^(N-1)).
Substituting G^N into equation (13), and rearranging:
G = (δ-y)/(δ - h/2)
and,
N = 1 + log(0.5*h/y)/log(G), in previous equation note that h/2 < δ.
We round off the number of layers and recalculate the growth rate:
G = (0.5*h/y)^(1/(N-1))
This is awesome. I'm going to pin the comment for everyone to see
If you write a book I will be the first to buy a copy!
I was revisiting this video and I have just realized that we don't actually need to use root-finding algorithm such as Newton-Raphson to solve equation (13) shown at 28:40.
We can rearrange that equation and then apply logarithm to both sides, ending with:
N = Ln (CG-C+1) / Ln (G).
With C = delta_99 / y_H
Common values for G are 1.1 or 1.2 (which is in the range you presented in the slides), so the solution is straight forward.
Btw I have already implemented this new equation to my Excel sheet.
Well spotted! I spent ages trying to rearrange it into a closed form solution 😄 I have pinned your comment so everyone else can see as well
Great video, very very useful. I recently completed my Master's Degree in Aeronautical Engineering and my thesis was a CFD simulation of flow around thick airfoil. I was misunderstanding the process of mesh generation and now a lot seems more clear to me. Really great work, I hope you continue posting more and more videos and my answer to your question on whether you should continue videos on mesh generation - definitely !
Solid work! Thanks a lot for sharing your knowledge with us! Cheers!
Really enjoyed that, super interesting - as per normal! And yes, would love to see more on meshing
Really appreciate your efforts for putting this valuable knowledge online.
Just by the time I started learning CFD you started to add content that i had questions about. Thank you :)
This is groundbreaking to me, I´m learning so much from you!
Dr. Aidan, you are a blessing. Thank you for your contributions.💙
i really need this to complete my undergraduate project. thank you so much.
Very useful, thank you. Looking forward to see other mesh related videos
Absolutely amazing work, thank you!
This video helped me to understand meshing better and concept of inflation layer covered in this video was what I was searching on youtube. Looking forward to learn more about CFD and fluid dynamics with your help.
Thank you for the helpful in-depth explanation !❤
Your video was exactly what I needed to learn about inflation layers
Wonderful video. Captured every detail.
It is very useful for me, and I really hope you can give more talks like this.
dude, i love you so much, thank you for all of your amazing videos
Amazing video, I love your channel! As a high school student finding videos on fluid dynamics which are understandable is so hard, but this was perfect
I totally agree with your opinion... There isn't too much information on how to to do a great mesh!!! Unhappilly I've found your content just now
Outstanding Video! thank you for making these!
Damn... Just started working on quite big project with approx. 150 layers on the airfoil profile. I think I will find this talk EXTREMELY USEFUL ;) thanks for well done job. Regards
Thank you! I would say this topic is essential. I looked at my meshes and it was immediately clear they need to be completely remeshed.
Thanks for this interesting and helpful tutorial. I really enjoyed it.
I really loved the talk, Thank you very much.
You are the MVP! I am working on my Bachelor Thesis and you are saving me from reading loads of dry and boring literature which I would struggle to understand.
Thank you!
How I wish I knew this years ago! Great information as I do my PhD by the way!
Thank you so much sir!
Thank you so much. Would love to see more mesh related videos.
I have seen most of your videos and they are really very very helpful for CFD problem solving . So thank you very much for posting your videos . We would be more happy if you also post some videos on errors in CFD solvers and some more videos on the CFX or fluent software as well as how to solve errors which will not be straight forward at all . Hope to see them soon , thank you 🙏
Very good information.... Cleared lot of doubts in layer generation...
Loved this work!!
Brilliant presentation, absolutely. Thank you so much. I would like to see more videos on Ansys Fluent Meshing, especially on local sizing including & 3D visualization of unstructured meshing and grid optimization.
Great video, very useful. Please keep on .
It is quite useful!
appreciate your work.
Excellent delivery
no matter what topic you go through, I like what you say
thank you very much for your generosity in sharing this knowledge.
very informative, thank you for your expertise!
Learnt some valuable info for my dissertation, thanks 👍
I'm really looking forward on a video about Enhanced Wall Treatment in Fluent. Keep up the great work!
there is one already uploaded on his channel!
Great video, thanks! This knowledge I needed :)
This lecture is great!! thank you very much!!
Amazing Lecture, most useful for an engineering student like myself. It would be much appreciated if further meshing methodolgy videos could be uploaded. Thank you once again and keep up the excellent content.
I'm really fascinated with all of your videos. Big thanks! By the way, a topic "How should we do a mesh refinement study" would be very useful. In many research papers, authors do comparision base on the number of cells but not the meshing parameters
Thanks sir for great explanations and issues
Amazing video! Thanks.
Thanks for the informative video
This is really really useful thanks for making this video!!!!
Very clear ! Without wall function
Another problem with large volume transitions is that these volumes appear in the system matrix. Large volume transitions can result in much stiffer system matrices yielding poor iterative performance, and sometimes solver divergence.
I've pinned your comment, as this is another great point that was missed out 👍
This video was extremely helpful. Thank you. For anybody generating meshes with Pointwise, they use the term TRex instead of inflation layers, but it's the same idea. Also, to avoid the volume ratio problems, the inflation layers (TRex) grow until the cells/prisms reach isotropy. I'm looking forward to watching more of your videos. Keep up the great work!
Exactly! Thanks for your input 🙂
Amazing Job!
thank you so much you saved us a lot of time . the explication was so useful
... I really appreciate ur work u have all my thanks 🙏🙏🙏🙏
you are just amazing sir
Please consider put Star CCM+ on your CFD software list :)
Amazing Content!
This is a really good talk
Excellent talk
Very useful!
so helpful, thank you soooo much 😘
Great job. Thanks for the video. I have my own excel file to calculate y+ and I guess I'll add these formulas to help me estimate my first guess for the inflation mesh =)
Awesome!
great one bro
Thank you so much sir!
very useful thank you!
Thank you!
Thank you so much sir
Brilliant.. Thanks.!
hello Aiden sir
Very nice video
please make the next video on CFD of combustion
Thank you so much...
Thank you
Great video! I would like to let you know that there is another channel called "ANSYS TUTORIAL | ANSYS COURSE | SIMULATION " that has uploaded this video. The name of the video is "Ansys | Inflation Layers Prism Layers In CFD".
Thanks for letting me know. I really appreciate it
As I expected, it was super informative video and I would love to see more from Ypu about meshing strategy! Maybe I missed something, but why huge number of layers can impact resolution of the simulation? I thought that it can only unnecessary increasy the computation time. Again Thank You for the contribution Sir!
Ah sorry for the misunderstanding. Less layers can impact resolution. More layers increases computational time
Some points I wanted to highlight:
1. If total thickness of your prismatic layers is greater then delta_99 then sudden cell volume increase shouldn't make any significant effect on friction coefficient, as friction is mostly generated in boundary layer.
2. In internal flows boundary layer usually spreads across the whole cross-section of a channel. So following your recommendations, meshes for internal flows should consist only of prism layers...
Yes to both. For 2) you normally have to have a few unstructured cells near the middle of the pipe to finish the mesh off (have a look for butterfly meshes, these are pretty popular for pipes)
Great summary of the topic. I'd be interested in any suggestions for meshing with a stalled wing arise. I've read some allusions to meshes being to fine. In practice reducing element size in the x direction led to stall not being apparent from the simulation. I understand that no turbulence model properly predicts stall but any advice would be good. It seems like a nebulous topic like the inflation layers.
Perfect
Thank you for a nice explanation.
Finally, I got a better understanding on defining a Y+.
But, how to estimate Y+ for a complex geometry where flow accelerates/decelerates and defining dimension varies?
Just use your best guess. What is a representative length? How fast is the flow (roughly)? The important thing is to get the order of magnitude, not the actual value
This video was really helpful. please do a video on mesh independent study using Richardson extrapolation technique
I go through Richardson extrapolation in a lot of detail in my course 'CFD for Professionals'. You can find it on Udemy or from my website. I think it is exactly what you are looking for 🙂
@@fluidmechanics101 i will look into that
@@fluidmechanics101 Hi Dr Aidan,
Thanks for the reply to the earlier post and I have joined for your course in udemy. I have one more doubt. I tried y+ = 1 and generated mesh in Starccm+ as per your video. When I closely observe cells in the vicinity of wall, aspect ratios are getting destroyed to a greater extent as you said in video. So my doubt is, Is there any recommended range for aspect ratios especially for cells adjacent to wall.
I'm not sure about Star CCM but most CFD codes are happy if the aspect ratio is less than 2000. You can always just try running your case and see if it runs ok? If not then try reducing the aspect ratio until you are able to get a stable solution. You can then use this solution as an initial condition for a finer mesh 👍
Amazing!
Your videos are helping me build a strong foundation in CFD as a beginner.
I have sent you a LinkedIn request. I would like to discuss and clear few doubts regarding Masters in CFD.
So if you are okay with it please accept my request 🙃🙂
Thank you Dr. Aidan.
Really appreciate the efforts!
I don't really use LinkedIn, so best to post your questions as precisely as possible in the comments or just send me an email (fluidmechanics101@gmail.com)
@@fluidmechanics101 Thank you Dr. Aidan
Hello mr. Hardik Sharda
Your comments were really helpful for me to achieve proper results in cfd
Thank you so much for helping me
Hello really enjoy your CFD talk in your channel. can I ask to discuss a topic about the fundamental of 6-DoF. Thankyouu
In case of the upstream flow condensation in a vertical duct, the inflation layer should cover both condensate film and boundary layer on the film surface? What would be the correct approach? Here I am talking not about the stable upstream flow where one would have stable falling film, but rather the case, where the flow velocity increases that much, that condensate begins to accumulate inside the pipe and liquid would be present across whole cross-section. Any comment would be useful. Thank you & great job with video lectures!
It sounds like you might need a pretty fine mesh resolution across your entire geometry, as you need accurate gradient calculation everywhere (you don't have a uniform freestream, which is usually assumed for boundary layer flow over a flat plate). For your case it sounds like a fully structured mesh in ICEM CFD or a hexcore mesh would be a good idea 👍
For a rans calculation with refinement regions, does the same suggestion apply with regards to the cell volume transition? More specifically, the transition area should be placed in an area with low gradients?
Also if a case has a high cell volume translation after the inflation layers, but the inflation layers span well beyond the boundary layer, is the concern lower because of the relatively low gradients?
Thanks for the education!
Yep, that seems sensible. You can get away with a sudden volume transition if you are away from the areas with high gradients that you care about 👍
@@fluidmechanics101 fantastic. I am really looking forward to more videos on meshing, the more CFD I do the more I realize the importance of meshing.
Topics I have been asked a lot about and find interesting involve moving mesh and AMR. for AMR maybe you could talk about the different data structures and time marching techniques associated (global vs local), along with pros, cons, etc..
Hello Dr. Aidan,
Thanks a lot for all your videos, which my colleagues and I find extremely useful! Thank you for all the time and effort you are investing in it, for the high-quality material you are producing and the clear explanations!!
I have two questions regarding the topic of inflation layers:
1. When you say in pipe flow it is common practice to size the prism layers to cover 20% of the diameter, is this the height of the actual prism layer on the inner pipe wall? (which would give 40% of the diameter of the pipe covered by inflation layers if we take the layer on the opposite side, along the diameter) Or is it 20% in total, which means 10% on each "side" (10% of the diameter is the actual thickness of the prism layer)
2. In the Inflation Layer Calculator on your website (and also in the course video), I am a bit confused about the term "maximum growth ratio" : if I understand correctly, that value of G is actually calculated from the equation $ \delta_{99} = y_H \frac{1-G^N}{1-G} $. This is the value that allows the total height of the prism layers to match exactly the estimated boundary layer thickness $\delta_{99}$, with a given number of layers N chosen by the user. If I take for G a value higher than the calculated value, then my boundary layer will SURELY be contained within the inflation layers (which was actually the objective). I know it will make the mesh unnecessarily large, but I'm just saying that the objective is still fulfilled. On the other side, if I take for G a value smaller than the calculated one, the condition is not fulfilled anymore. The prism layers will not contain the entire boundary layer.
So, according to my understanding, if the objective is that the inflation layers contains the entire boundary layer, shouldn't the value we are calculating actually be called "Minimum Growth Ratio" ?
Thanks a lot in advance, I really highly appreciate your work and your videos.
For anyone who might have the same questions, here is the reply I received from Dr. Aidan:
Hi Theo
1) It's been a long time since I wrote this video, but I'm guessing 20% means 10% on each wall.
2) I think the implication is that if you adopt a higher growth ratio than the calculated value then there would be fewer layers between the wall and the edge of the boundary layer. This would give poor accuracy.
For example, if you took an extreme case and went with a growth ratio of 5, you might only have 2 or 3 layers between the wall and the boundary layer thickness. This would give a really inaccurate answer, so you should reduce G and add more layers.
Kind regards
Aidan
Thank you for making this video it clarify a lot of things for me. I have one question, to define the boundary layer thickness, we have to calculate Re and L, for a simple case of a flat plate, L is the length of the plate, and for pipe, its a hydraulic diameter. But in engineering application, the geometry is quite complex, if we take an example of formula 1 or engine cooling jacket, What value of L we should consider/ calculate?
The length of the car would probably be a good guess 👍 Remember that this is all to create a good initial mesh. After you have run your initial simulation it is worth looking at the mesh and checking to see if it is any good. (I.e check y+ and the velocity profiles close to the wall to see if the boundary layer is contained within the inflation layers)
Thank you so much for the wonderful video. You are a great teacher. I have one question reagrding the calculation of growth ratio. Since the growth ratio G is above 1, shouldn't the formula in (6) be yH*(G^N-1)/(G-1)?
Hello sir, thank you for the video.
For guessing the number of inflation layer and its geometric growth rate, can we just make a layer height column in spreadsheet, next its total height up to each column number, and next its error% relative to delta_99? Then, simply try different growth rate values and pick whichever combination of N and G gives the smallest positive error% (a negative error% means the inflation layer doesn't capture the boundary layer). My initial thought is that this eliminates the hassle of using root finding methods or using arithmetic and logarithmic manipulation.
Hey, what do you think about mesh quality of the first layers of the inflation? I have performed some cases using inflation for an external flow simulation and the first layers of inflation (wedge element, similar to a pizza slice) get a low quality value. Despite of that, the flow behavior near to the ground is totally better than only using tetras. Thanks for this valuable information. Thumbs up!
Yes, the first layer often has bad quality because the cells are so thin. Usually most CFD codes are happy if the aspect ratio is less than 2000. For quality, it is worth zooming in and looking at the cells close to the wall. If the mesh lines are roughly perpendicular to the wall, then the cell quality should be fine. The difficulties tend to occur when the mesh lines close to the wall are skewed AND the aspect ratio is high. Good luck with your simulations! Don't get too put off my low quality, your simulation may still run successfully .... Give it a try!
Very informative video Dr Aidan. I have doubt, if my cfd analysis involve blade with hub and shroud, do i still need to put the prism layer on the hub and shroud?
Yes, if you want to calculate the total drag (and hence pressure loss) correctly
@@fluidmechanics101 thanks for the reply Dr Aidan
Nice explanation video. a question, it is not necessary to put layers in walls far from the surface/zone of interest or every wall in my domain must have boundary layers?
You should put the layers on the walls where you need an accurate solution for heat transfer, forces, lift, drag and where you need an accurate boundary layer to develop (such as the inside of pipes and the walls / floor approaching your object of interest) . Usually you will need to put them on the majority of your surfaces, unless the surface is unimportant for the accuracy of your solution.
Hello Dr Aidan, You are doing a great work, thank you. I only have a side question, that is what are the softwares used to create plots, diagrams and figures in your presentations, thank you.
I make all my figures in inkscape. You can get it for free and use it on any operating system. Would definitely recommend inkscape!
Thank you Dr. Aidan, absolutely going to use it for my future projects 😀
You are totally wrong man , we should thank you not the inverse , what a great lesson thanks a lot
thanks, Dr. Aydan so please can you explain that in Ansys fluent program
Great video, so much to learn here. I have a question regarding the variation of y+ for mesh refinement studies though. How much do you advise the variation of y+ in different cases? for eg: for a case where I am targeting y+30, shall I take 30, 40 and 50? it would be a great help if you can clarify this. Thanks!
I think that covering an order of magnitude with your changes in y+ is a good idea. So y+ = 0.1, 0.2, 0.5 and 1.0 would be a good idea, or y+ = 30, 50, 100, 300. If you make the values too close together, then it can be difficult to see the changes in the solution. For example, y+ = 30, 35, 40, 45 probably wouldnt be as useful as 30, 50, 100 and 300. If you then find that the changes are large, you could refine you search afterwards. For example, if you tried 30, 50, 100 and 300, and the results change a lot, then you could add extra data points and try 35, 40, 45 and 55 afterwards. This is likely to be case dependent, so try it out and see what you find!
@@fluidmechanics101 Thanks a lot for explaining it so clearly.
Does anyone know where can I find empirical values of Boundary Thickness Layer for a fully developed turbulent pipe flow? Thanks!
... technically when the flow is fully developed the boundary layer fills the entire pipe. However, for meshing the inflation layers normally a good choice is 10% of the pipe diameter
Can you please make a video on region refinement 🙏
Can you make a video about size function and mesh density distribution?
Just to be pedantic, it is large Hessians not large gradients that require refinement. If you have a large uniform gradient the function is linear despite the magnitude. However if the gradient changes quickly you need refinement.
Yes Exactly! I suppose I was a bit sloppy with my explanation 😃
@@fluidmechanics101 I think we are all sloppy about this. Usually when we say large gradients it means large compared to the local neighborhood. But the confusion can lead us astray... for example a laminar boundary layer will actually need points at the outer edge as the function is linear near the wall. The exponential growth really best matches a turbulent bl because it is characterized by a thick logarithmic layer. Heat transfer is more complex because thermal and displacement thicknesses are independent. That is why the recommendation for heat transfer is often for y+ to be less than one. In a sense this is overrefining the bl to get the right refinement throughout.
... it's even more fun when you have a liquid metal with a crazy Prandtl number. The boundary layer thicknesses are all over the place 😂 very confusing
Hi Aidan. Thanks for this wonderful lecture. I have one question regarding meshing for capturing turbulent boundary layer. Can we do away with the inflation layer and extend our tetrahedral or polyhedral cell mesh right up to the wall and still capture turbulent boundary layer?
You could ... But your cells would have to be very small, resulting in a very large cell count. Also, near the wall we know that the flow is parallel to the wall (for attached flows with low body forcing) so you would want to have thin hexahedral cells (inflation layers) that are aligned with the flow for better results. So you might have a degradation of results if you brought your tets / polys close to the wall. Also .... every reviewer of your work would be unhappy and ask you to explain yourself / redo the work. This isn't very fun for you and probably best to be avoided
@@fluidmechanics101 Thanks Aidan !
You mentioned that for RANS, we want to avoid a large volume transition as it can lead to an error in the local gradients. Isn't the error dependent on the size of the cells, rather than on the growth rate? E.g. could you not have really small cells with a large growth rate, and still have small gradient error as long as the cells continue to remain small enough?
Does anyone know the previous video he is mentioning where he covered the y+ understanding?
Thanks,