# Boundary conditions of nut in LES

 Register Blogs Members List Search Today's Posts Mark Forums Read

 October 21, 2019, 03:37 Boundary conditions of nut in LES #1 Senior Member   Ruiyan Chen Join Date: Jul 2016 Location: Hangzhou, China Posts: 162 Rep Power: 10 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

 October 21, 2019, 05:08 #2 New Member   Adam Join Date: Jan 2019 Posts: 21 Rep Power: 7 zeroGradient with LES makes only sense if you y+ value is below 1, otherwise you should use a wallmodel.

October 21, 2019, 22:42
#3
Senior Member

Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10
Quote:
 Originally Posted by boundary93 zeroGradient with LES makes only sense if you y+ value is below 1, otherwise you should use a wallmodel.
I agree with you, but what about fixedValue of 0? If my mesh is fine enough (y+<1 for the first cell center), it should be fixedValue or zeroGradient? In my view, physically, no turbulence is present at the wall, so nut should be 0 there.

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!

October 22, 2019, 03:43
#4
Senior Member

Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Quote:
 In my view, physically, no turbulence is present at the wall, so nut should be 0 there.
It's not your view, it is like that. The thing is that OPENFOAM implements integral wall models in a rather esoteric way: by changing viscosity instead of velocities at the wall hence one of the reasons why you need boundary values for nut.

Quote:
 What confuses me is that why nut needs boundary values?
This depends on what model you are using for turbulence. For instance, the SA model proposes a transport equation for nu (or a variant of nu), thus you need to specify boundary conditions for said equation.

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.

October 24, 2019, 04:47
#6
Senior Member

Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
Quote:
Hi,

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

 October 24, 2019, 12:15 #7 Senior Member   Guilherme Join Date: Apr 2017 Posts: 231 Rep Power: 10 For y+<1 I use 'calculated'...

 October 25, 2019, 05:18 #8 New Member   Adam Join Date: Jan 2019 Posts: 21 Rep Power: 7 When you have y+ lower than 1, its not important because the value of nut goes towards zero. At least that's my experience.

October 28, 2019, 22:54
#9
Senior Member

Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10
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?
Attached Images
 uplus.png (43.9 KB, 225 views)

 October 28, 2019, 23:03 #10 Senior Member   Ruiyan Chen Join Date: Jul 2016 Location: Hangzhou, China Posts: 162 Rep Power: 10 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!

October 29, 2019, 02:35
#11
Senior Member

Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
Quote:
 Originally Posted by cryabroad 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!
Hi,

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

October 29, 2019, 21:57
#12
Senior Member

Ruiyan Chen
Join Date: Jul 2016
Location: Hangzhou, China
Posts: 162
Rep Power: 10
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.
Attached Images
 ins_v.png (18.9 KB, 177 views)

October 30, 2019, 10:50
#13
Senior Member

Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
Quote:
 Originally Posted by cryabroad 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.

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

 October 30, 2019, 21:16 #14 Senior Member   Ruiyan Chen Join Date: Jul 2016 Location: Hangzhou, China Posts: 162 Rep Power: 10 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

 November 4, 2019, 03:58 #15 New Member   Adam Join Date: Jan 2019 Posts: 21 Rep Power: 7 For this kind of geometry I would recommend cyclic instead of mapped.

 March 6, 2020, 08:12 #16 Member   bany Join Date: Nov 2019 Posts: 50 Rep Power: 7 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.

April 12, 2020, 22:19
#17
Member

bany
Join Date: Nov 2019
Posts: 50
Rep Power: 7
Quote:
 Originally Posted by syavash 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
Hi, when i use the mapped BC, i cannot get a fully developed pipe flow. Because i do not want to use too many cells to ensure y+<1. Can i use the wall functions or which wall functions can perform well in LES?
You can get more details in a fully developed pipe flow in LES with mapped BC

 April 24, 2020, 06:39 #18 Senior Member   Ruiyan Chen Join Date: Jul 2016 Location: Hangzhou, China Posts: 162 Rep Power: 10 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. XJ_Wang and guanjiang.chen like this.

April 24, 2020, 08:00
#19
Member

bany
Join Date: Nov 2019
Posts: 50
Rep Power: 7
Quote:
 Originally Posted by cryabroad 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.

May 25, 2020, 09:12
#20
Member

Guanjiang Chen
Join Date: Apr 2020
Location: Bristol, United Kingdom
Posts: 54
Rep Power: 6
Quote:
 Originally Posted by cryabroad 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.
Hi,

You use nutwall function in the LES calculation. What model do you use?

Sincerely,
Guanjiang

 Tags les, nut, wall function