CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Grid refinement with wall functions (https://www.cfd-online.com/Forums/main/2051-grid-refinement-wall-functions.html)

Mark Render April 25, 2000 08:02

Grid refinement with wall functions
 
Hello,

when you refine a grid systematically (a factor of 8 in 3D at every stage) you will obtain a grid independent result after sufficient refinement stages. In other words the differences in results between two grids will decrease while increasing grid refinement. So now my question. Does this hold for using standard k-eps model with wall function ? Every time you refine the grid you will get a different b.c. at the wall due the the log-law, won't you ? So is it right, that you can't expect a classical grid convengence in that case ? (In addition you are restricted in your systematcal refinement due to the y+ value)

Please give some comments on that.

Mark


John C. Chien April 25, 2000 10:15

Re: Grid refinement with wall functions
 
(1). The grid refinement should work for any equations and models. There is no trick there. Naturally, if you go beyond the single precision math, you will have problems. But I think, any sutdent of a programming language should have learned the double-precision math long time ago. (2). The wall function is also straight forward. The matching point must be located in the common law of the wall region (a single parameter family of log-curve). The refinement of interior grid has nothing to do with this analytical matching process. And does not affect the location of the matching. The missing wall shear stress must be obtained from the solution of the interior points. And by refining the interior grid, you should be able to get more accurate value of the wall shear stress.(the wall function assume that the wall shear stress is constant throughout the law of the wall region. (3). Whether you will be able to get the law of the wall behavior from the interior point solution or not is part of the turbulence model used. So, you need to make sure that such behavior will be part of the particular model you use. This is the only uncertainty in the whole process. (see my previous message on the black art of wall function.)

Dr. Hrvoje Jasak April 26, 2000 07:49

Re: Grid refinement with wall functions
 
Hi,

You have hit an exception: wall-functions do not naturally lead to a grid-independent result; if you force the issue, you might get grid-independence, but the result will be wrong!

The problem is this: in order for the wall functions to work well (read: low modelling error) y+ needs to be in the order of 30-50. Once you start refining below that, you decrease the discretisation error (the gradients are invariably next to the wall), but increase the modelling error. Once you hit the (in)famous y+=11.6 switch, wall functions "switch off" and the model is no longer mesh dependent. BUT, because there is no "low-Re" correction on the turbulence model, you get the wrong k and epsilon profiles next to the wall, which gives you the incorrect drag. The only way out is to use a low-Re turbulence model from the start, but you won't believe the amount of mesh you'll need next to the wall. I did a flow over a hill starting on 15000 CVs in 2-D and hit 300k CVs before the error STARTED going down.

Have fun,

Hrv


John C. Chien April 26, 2000 10:52

Re: Grid refinement with wall functions
 
(1). I am going to say this only once. Anyone else is free to practice his own version of black art of wall function. (2). Step-one: take the complete solution of the turbulent fully developed channel flow and profiles and plot the velocity profile in the semi-log format, as in the law of the wall. (3). Step-two: you should be able to see the straight-line profile of the log-curve. (the log-profile becomes linear in semi-log scale) (4). Step-three: pick a point on the log-curve, say Y+=100, as the matching location. In your physical domain, you should also have the corresponding y value measured from the wall. (5). Step-four: chop off the flow region from the wall to the matching location, and use the matching location as the boundary point to replace the original wall boundary point. Notice that matching point is physically located at a difference place from the wall. This is very important. (6). Step-five: define the computational domain between the two matching locations (these are the boundary points for the channel flow problem now), and create the mesh as usual, then solve the flow field in between. (7). Step-six: compute the new shear stress at the matching point based on the computed result, and use this to update the solution between the wall and the matching point. Basically, this will update the velocity through the log-law formula. The updated velocity at the matching point can then be used as a new boundary condition at the matching point for the interior flow field calculation. (8). So, you see, when the region between the wall and the matching point location is chopped off, you no longer have to worry about it in grid generation. (9). Whether you will be able to obtain the mesh independent solution depends, then on how these steps are implemented. In other words, if you did not follow these steps, it is likely that you are not going to get the mesh independent solution. So, it is very important to review your numerical formulation, your matching procedure first. And if you link the matching point location to the mesh of the interior points, you can also get into troubles. Remember that between the wall and the matching point, the distance is finite, the mass flow is finite, the only thing you have done is assuming that the solution is given by the law of the wall, with single unknown of the wall shear stress. (10). For this problem, you can also move the matching point to Y+=300, and still stay on the log-law curve. You must realize that y+=300 is greater than y+=100, and the physical spacing between the wall and the matching point location will be bigger. This is important because the mass flows through the interior points for both cases are not the same. (you are likely to run into trouble if you blindly use a code ,especially using FVM)

Mark Render April 26, 2000 11:55

Re: Grid refinement with wall functions
 
Dear Hrvoje,

did I understand you correctly that refining the grid with a wall function approach won't make too much sense because of the rising modelling error that I introduce while refining ?

Mark

Dr. Hrvoje Jasak April 26, 2000 12:36

Re: Grid refinement with wall functions
 
That is correct. Wall functions are at their best for y+ = 30 to 50; higher than that increases the MODELLING error (note: this is not the same as the discretisation error!). As for John, he's doing something subtely different, with different consequences (effectively adjusting the shape of the domain such that y+ does not change).

Hrv


clifford bradford April 26, 2000 15:45

Re: Grid refinement with wall functions
 
from what others have told me Dr. Jasak is right. most wall functions require the first grid point to be away from the wall. even thought this doesn't seem to necessarily make sense (ie that a finer grid doesn't help accuracy) that's just how it goes. as my teacher in turbulence modelling said "it's done that way because it works"

John C. Chien April 28, 2000 00:39

Re: Grid refinement with wall functions
 
(1). The truth is, in the wall function approach, the solution in the region between the wall and the matching point (Y+ in the log-law region) is given by the one parameter law of the wall log-function. This region is not covered by the mesh. (2). The region away from the matching point is covered by the mesh, which can be refined in any way to provide mesh independent numerical solution. The solution from this region will also provide the shear stress information at the matching point, which can then be used in the wall function region to update its velocity profile analytically. This is possible because the log-law solution is implicitly build in the turbulence model. So, it is a requirement that the turbulence model must contain this solution in the first place for the wall function method to work. You can not use wall function method on the turbulence model which can not reproduce exactly the same log-law. This is the principle of matching. There must exist a "region" where the solution is commonly valid. (3). In most published papers and codes, this practice is not followed, thus, mesh refinement in the outer region in most cases will also reduce the matching point location automatically, I guess. If this happens, then the lower limit will kick in automatically and stop the mesh refinement process.(that is you run into region Y+ less than 30~50) (4). So, it is important to remember that the matching point is in the flow field, and it is not connected to the wall. The wall function is for the region between the wall point and the matching point. So, there is a region where it is not covered by the mesh. (5). I hope this is clear enough and should settle the issue forever. By the way, it is still all right to use your own method, as long as you observe the limitations. (if you are in the sublayer linear solution region, and try to match to the external solution which has high Reynolds number capability only, then it will fail because the high Reynolds number model can not yield linear solution at the matching point.) This is an interesting research field which has practical applications, and the above procedure was used in my code development since early days in 70's. So, it was used in the numerous programs and checked out more 25 years ago.

Cfd May 2, 2000 08:09

Re: Grid refinement with wall functions
 
There is another aspect of KE Model with wall functions which seems to have been overlooked by my collegues. That is, unless you do something special, the standard KE model is simply not valid in the limit of laminar flow. It does not tend to the correct limiting values. So the momemt the mesh starts to crowd into the laminar sublayer, you get totally incorrect values for the K and Epsilon. This is the reason for the wall function matching process in the first place!

If you insist on KE model in the free stream and fine mesh near the wall, the way to go is to use one of the two layer models, where the inner layer is treated differently. In this case, you can refine the grid to get grid independance


All times are GMT -4. The time now is 10:19.