Boundary conditions of nut in LES
Hello Foamers,
From OpenFOAM tutorials, for most LES cases, zeroGradient is used at inlets, outlets and walls for nut (the turbulent viscosity). Why does nut behave like zeroGradient at the walls? Theoretically, I would think it should equal to 0. I ask this question because when I simulate air flow inside a circular pipe (bulk velocity 66 m/s, so subsonic flow. Re is around 15,000), by using zeroGradient for nut, I always end up with a velocity profile that has large velocity at the center, which looks like a laminar flow. By using fixedValue of 0 for nut, I get a flatter velocity profile, which makes more sense because it is turbulence. I'm guessing that this should also have something to do with the mesh resolution. Maybe zeroGradient works fine if the mesh is very fine near the wall? One thing I've noticed is that for RANS, calculated is used for nut, and a wall function is often specified. What if I use these wall functions in LES? Is that physically right? Thanks in advance, Ruiyan |
zeroGradient with LES makes only sense if you y+ value is below 1, otherwise you should use a wallmodel.
|
Quote:
What confuses me is that why nut needs boundary values? How are they used? I'm always under the impression that nut only has internal values, which should be enough for calculating velocities. Still waiting for other people to shed some light on this topic! |
Quote:
Quote:
On the other hand, the Smagorinsky family of models does not require boundary values for nut, since this is obtained by algebraic operations. In that case, your BCs must be 'calculated', unless you use wall models. |
Thank you for your input, it is very helpful!
For your first point about nut being 0 at the wall, I guess you are mainly talking about RANS? I come across this article (http://www.tfd.chalmers.se/~hani/kur...nfoamFinal.pdf) that explains the idea of changing viscosity instead of velocities in OpenFOAM, which is exactly what you mentioned. I think one needs to be very cautious when using these BCs in RANS. Most of them seem to work properly only for a certain mesh. As for your second point, I am doing LES, so it points to me the right direction I think. Right now I'm testing results by using zeroGradient or fixedValue of 0. I'm also thinking about using nutUSpaldingWallFunction. From the article I mentioned above, it is said that this BC is kind of a "generic" boundary condition, in the sense that it automatically detects the y+ of the first cell center and operates in different modes based on your 1st cell y+. What I should test is actually calculated! |
Quote:
As it was previously mentioned, calculated is a reasonable choice for algebraic eddy-viscosity models. As a suggestion, you can test the nut BCs on the channel395 tutorial. Mesh is small and the results are quick to obtain. Nevertheless, I would expect to see identical results from zeroGradient and calculated. Regards, Syavash |
For y+<1 I use 'calculated'...
|
When you have y+ lower than 1, its not important because the value of nut goes towards zero.
At least that's my experience. |
1 Attachment(s)
I can confirm this behavior, at least for my little circular pipe calculations. I used a grid that has y+ around 0.5, and fixedValue of 0 and zeroGradient give me exactly the same results. See attached figure of u+ vs. y+. The velocity profile differs from the expected theoretical line though, and I'm trying to figure out the reason.
One quick question though, how do we get the friction velocity from OpenFOAM? My way of doing it is to use the post processing tool to calculate wallShearStress, and based on it the friction velocity can be calculated, the square root of the wallShearStress at the wall in this case (incompressible). Any better ways? |
Thank you syavash, I end up of doing several tests on my simple circular pipe instead of the channel case. The results seem to show that, for not very fine mesh (y+ ~ 15), calculated does give almost the same u+ vs. y+ line compared to fixedValue of 0, but not zeroGradient. I'll post the results after I run some additional simulations to confirm this.
I'm getting a feeling that for a coarse mesh, maybe zeroGradient is not a good choice. Any other BCs (calculated, the various wall functions for nut in OpenFOAM) may work better. It makes sense though, otherwise there won't be people developing all these wall functions to make the velocity profile more realistic. Any comments are welcome! |
Quote:
Thanks for sharing your results. I never tried such a coarse mesh with y+~15 at the wall. Regarding your results, are you certain that the flow has become turbulent? Can you provide some snapshots of instantaneous velocity contours? The way you calculate u_tau is correct. However, I use the averaged velocity field for calculating tau_wall. Regards, Syavash |
1 Attachment(s)
That's the thing I'm thinking about as well! Please see the attached instantaneous velocity contour, and I don't think that signals strong turbulence? Flow (Re around 15000) is from left to right, top and bottom are walls, with nut set to calculated. In the axial direction I used 125 cells for a length of 50mm, and about 30 cells in the radial direction. I applied the 1/7 power law velocity profile at the inlet, and used the LEMOS inflowGenerator from Rostock. It basically injects Lagrangian vortons (as they called) into the domain with prescribed length scale and Reynolds stress.
The reason I'm using this coarse mesh near the wall is that this short circular pipe will be served as a short inlet tube for a combustion chamber behind, and we are mainly interested in mixing of things inside the chamber. The short inlet pipe is needed because swirl flows will be introduced as well (in the long term) so it would be great if we have this pipe and let the flow develop before entering into the chamber. Basically, the output of the pipe calculation is to provide a reasonable (at least not totally wrong) input for the chamber. So, we want to use as less cells as possible to achieve that. Maybe in the end this will be found impossible and I might as well just use as many cells as possible for this inlet pipe, but it would be ideal to use less cells there. |
Quote:
I guess it has not become fully turbulent yet. Why use LeMOS though? A better and more efficient way is using mapped boundary condition to develop turbulence for this geometry. See pitzDaily tutorial. Regards, Syavash |
Thanks, I will definitely look into the mapping method!
I use LeMOS because it is similar to the vortex method in FLUENT. I have used FLUENT before and it works well, so I decided to use a similar inlet method. Regards, Ruiyan |
For this kind of geometry I would recommend cyclic instead of mapped.
|
Hi, Ruiyan. I think i have same problem that how to obtain a fully developed turbulence. And my domain is a cylinder too. Did you obtain a fully developed turbulence? mapped or cyclic? And what was your nut BC?
Thank you very much. |
Quote:
You can get more details in https://www.cfd-online.com/Forums/op...mapped-bc.html |
I end up using the inflow generator I mentioned in previous posts, the one that comes with LEMOS. Here is the link: https://github.com/LEMOS-Rostock/LEM...nflowGenerator
For nut I used nutUSpaldingWallFunction on solid walls, and calculated on other boundaries. I have to say though, that I'm not doing very rigorous confined flow simulation. I'm more interested in the large chamber behind the feeding pipes, so as long as I have a more or less correct velocity profile at the end of the pipe (which connects to the chamber) together with some turbulence I'm fine. It may not be your case. |
Quote:
|
Quote:
You use nutwall function in the LES calculation. What model do you use? Sincerely, Guanjiang |
All times are GMT -4. The time now is 17:10. |