CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Boundary conditions of nut in LES (https://www.cfd-online.com/Forums/openfoam-solving/221521-boundary-conditions-nut-les.html)

cryabroad October 21, 2019 03:37

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

boundary93 October 21, 2019 05:08

zeroGradient with LES makes only sense if you y+ value is below 1, otherwise you should use a wallmodel.

cryabroad October 21, 2019 22:42

Quote:

Originally Posted by boundary93 (Post 747546)
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!

Santiago October 22, 2019 03:43

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.

cryabroad October 22, 2019 22:29

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!

syavash October 24, 2019 04:47

Quote:

Originally Posted by cryabroad (Post 747745)
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!

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

gu1 October 24, 2019 12:15

For y+<1 I use 'calculated'...

boundary93 October 25, 2019 05:18

When you have y+ lower than 1, its not important because the value of nut goes towards zero.

At least that's my experience.

cryabroad October 28, 2019 22:54

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?

cryabroad October 28, 2019 23:03

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!

syavash October 29, 2019 02:35

Quote:

Originally Posted by cryabroad (Post 748289)
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

cryabroad October 29, 2019 21:57

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.

syavash October 30, 2019 10:50

Quote:

Originally Posted by cryabroad (Post 748394)
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

cryabroad October 30, 2019 21:16

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

boundary93 November 4, 2019 03:58

For this kind of geometry I would recommend cyclic instead of mapped.

bany March 6, 2020 08:12

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.

bany April 12, 2020 22:19

Quote:

Originally Posted by syavash (Post 748458)
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 https://www.cfd-online.com/Forums/op...mapped-bc.html

cryabroad April 24, 2020 06:39

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.

bany April 24, 2020 08:00

Quote:

Originally Posted by cryabroad (Post 767156)
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.

OK, thanks for your replying! I will have a try.

guanjiang.chen May 25, 2020 09:12

Quote:

Originally Posted by cryabroad (Post 767156)
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


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