CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Y+ vs meshing for very high Reynolds number (https://www.cfd-online.com/Forums/main/255724-y-vs-meshing-very-high-reynolds-number.html)

cratermons April 25, 2024 10:43

Y+ vs meshing for very high Reynolds number
 
Hi everyone,

Fairly new to the world of turbulence CFD and I am hoping to bug y'all with a question.

Let's assume liquid water is flowing within a perfectly straight 1 km long pipe with a diameter of 1 m at 10s of m/s velocity. The Reynolds number in this case will be extremely large (more or less 10^5-10^9). The primary goal is to look at how turbulent flow affects the temperature distribution of the water as it flows in the pipe. The temperature external of the pipe can increase or decrease as a function of the length. (just imagine a 1 km long pipe drilled into Earth's crust for geothermal energy). So I am coupling turbulent flow with heat transfer on COMSOL. I hope this image gives a clearer sense of what I am describing here:

https://imgur.com/a/JHP3r1m

Based on what I have read so far, one should strive for a y+ value of unity to resolve the viscous layer. To achieve y+ value of 1 or something close to 1, one would have to create an extremely, extremely fine mesh. I just used the cfd calculator to compute the mesh requirements:

https://www.cadence.com/en_US/home/t...cs/y-plus.html

My first element will have to be at ~1E-7 m. Given the extreme aspect ratio in this scenario, I am facing quite a lot of difficulty trying to get a y+ value of 1. My current mesh is a custom build one, where I don't use a boundary layer but divide my domain into a thick x=0.99 m region and a smaller domain with a width of 0.01 m. It looks something like the following.


I have spent a lot of time tweaking my mesh but I am getting nowhere close to y+ of 1. I am just wondering if I am going about this completely wrong. Any advice would be much appreciated.

agd April 25, 2024 14:54

I don't know any details about COMSOL, but typically wall functions are used for modeling high Reynolds number flows. Well-implemented wall functions (which basically model the sublayer and provide a boundary condition for the turbulence model) will allow you to use much larger y+ values and get good boundary layers. On the other hand my experience has been that if you want to get really accurate heat transfer you need small y+ values. So you have to pick your poison, as they say. You can use wall functions and get (hopefully) acceptable results, or grid to the wall and get better results.

cratermons April 25, 2024 22:42

Quote:

Originally Posted by agd (Post 868302)
I don't know any details about COMSOL, but typically wall functions are used for modeling high Reynolds number flows. Well-implemented wall functions (which basically model the sublayer and provide a boundary condition for the turbulence model) will allow you to use much larger y+ values and get good boundary layers. On the other hand my experience has been that if you want to get really accurate heat transfer you need small y+ values. So you have to pick your poison, as they say. You can use wall functions and get (hopefully) acceptable results, or grid to the wall and get better results.

Thank you. Right. I was wondering if there was a way around this issue, but it seems like I do have to pick my poison here. Getting boundary layer functionality in COMSOL to behave has also been a huge issue due to the humongous aspect ratio of the mesh. Here goes away one more week getting this to work.

CFDfan April 29, 2024 02:40

Quote:

Originally Posted by agd (Post 868302)
I don't know any details about COMSOL, but typically wall functions are used for modeling high Reynolds number flows. Well-implemented wall functions (which basically model the sublayer and provide a boundary condition for the turbulence model) will allow you to use much larger y+ values and get good boundary layers. On the other hand my experience has been that if you want to get really accurate heat transfer you need small y+ values. So you have to pick your poison, as they say. You can use wall functions and get (hopefully) acceptable results, or grid to the wall and get better results.

My experience is the same and the mesh gets huge. So the options seem to be: very large mesh, or wall functions with questionable accuracy. Another options is to use LES with transient analysis, because as far as I remember this turbulent model is insensitive to the Y+ values. I always wander why the CFD professionals here are shy to give their input on practical problems like this.

arjun April 29, 2024 03:07

Quote:

Originally Posted by cratermons (Post 868315)
Thank you. Right. I was wondering if there was a way around this issue, but it seems like I do have to pick my poison here. Getting boundary layer functionality in COMSOL to behave has also been a huge issue due to the humongous aspect ratio of the mesh. Here goes away one more week getting this to work.



This is my opinion based on implementing wall functions in Wildkatze solver.

The most problematic part of this is where there has to be blending between low Re and High Re values. There is no fixed formula for it and every software does this blending their way.

When you are in Low Re region or where the yplus is below 5, things are simple. When you are in log region, things are estimated by log formulation but this comes from experiments etc.


So in my opinion as long as you are not in blending area things have basis and you shall be good.

So if you can't get yplus of 1 then try to get yplus of 30 to 60 and allow wall quantities to be calculated by wall functions.


PS: I have a simple pipe case that demonstrate it very good. Coarse mesh with log region gets correct pressure drop. Another finer mesh case with first cell in blending region, all solvers struggle (other than Wildkatze). For this case, only standard K Omega from Starccm gets correct results. All other models (in starccm) get pressure drop wrong.


PS: In Wildkatze we have worked hard to remove this effect still we are not perfect. We are just better.


Best just to avoid this region of yplus.

Gerry Kan April 29, 2024 09:58

For the geometry you have shown, you should not need to resort to low Reynolds number models to get reasonable results. The incoming flow is already fully turbulent, and you are not expecting separation or relaminarization.

Having said that, if you are using wall functions, the centroid of your first cell should still be within a y+ of about 25. While this is still very fine, you can still manage it.

Of course, it is interesting to see how the wall function and low-Reynolds number model compare.

I also know that there will be a lot of CFD fundamentalists who will try to convince you to bring the y+ down. The fact is, wall functions have been around for a very long time. If they were not able to reflect the physics of even the simplest flow geometries, such as one you shown here, no one would use them in the first place.

Gerry.

JBeilke April 29, 2024 13:43

When we deal with the flow in geological regions, we should keep in mind, that all boundary values are just guesses. There are usually anomalies in the temperature field. So we should not even attempt to get 100% correct results.

Simulating a 1 kilometer long pipe with a 3d code is very challenging. Even a 100 meters pipe requires some magic to get the simulaton started. In ccm+ I had to use the coupled solver for some iterations before switching to the segregated solver.

So either use a 1d code for your problem or simply reduce the length of your domain to something much shorter (maybe 10 to 20 meters at first) and see, what results you get.

Should this be a horizontal of a vertical pipe? In case of a vertical pipe you have to isolate the pipe, that goes upwards. Otherwise all the heat you collect on your way down will be lost on the way back to the surface :-)

cratermons April 29, 2024 13:47

Quote:

Originally Posted by CFDfan (Post 868448)
My experience is the same and the mesh gets huge. So the options seem to be: very large mesh, or wall functions with questionable accuracy. Another options is to use LES with transient analysis, because as far as I remember this turbulent model is insensitive to the Y+ values. I always wander why the CFD professionals here are shy to give their input on practical problems like this.

Thanks for your suggestion. I think moving to LES is an option, but I feel like it is a whole another beast of its own. If possible, I'd like to get some prelim results from RANS and then proceed.
Perhaps prompted by your query, it seems that more CFD professionals have now provided their input and hopefully I can proceed with some game plan.

cratermons April 29, 2024 13:49

Quote:

Originally Posted by arjun (Post 868449)
This is my opinion based on implementing wall functions in Wildkatze solver.

The most problematic part of this is where there has to be blending between low Re and High Re values. There is no fixed formula for it and every software does this blending their way.

When you are in Low Re region or where the yplus is below 5, things are simple. When you are in log region, things are estimated by log formulation but this comes from experiments etc.


So in my opinion as long as you are not in blending area things have basis and you shall be good.

So if you can't get yplus of 1 then try to get yplus of 30 to 60 and allow wall quantities to be calculated by wall functions.

Interesting. I'll rerun the simulation with the goal of obtaining yplus in this range. Thank you for the tip.

cratermons April 29, 2024 13:53

Quote:

Originally Posted by Gerry Kan (Post 868469)
For the geometry you have shown, you should not need to resort to low Reynolds number models to get reasonable results. The incoming flow is already fully turbulent, and you are not expecting separation or relaminarization.

Having said that, if you are using wall functions, the centroid of your first cell should still be within a y+ of about 25. While this is still very fine, you can still manage it.

Of course, it is interesting to see how the wall function and low-Reynolds number model compare.

I also know that there will be a lot of CFD fundamentalists who will try to convince you to bring the y+ down. The fact is, wall functions have been around for a very long time. If they were not able to reflect the physics of even the simplest flow geometries, such as one you shown here, no one would use them in the first place.

Gerry.

This was exactly my thought process. However, it was pointed out to me by a colleague at a conference that since I am primarily interested in looking at the heat exchange between the flowing water and the temperature surrounding the pipe, that I should really strive for a y+ of 1.

Their reasoning (if I remember correctly) is that the presence of the boundary layer where velocity is 0 would dampen the heat exchange between the flowing water and the pipe. Even an order of magnitude estimate would be OK for my work, but I am confused by so many CFD folks telling me so many different answers. :)

cratermons April 29, 2024 13:58

Quote:

Originally Posted by JBeilke (Post 868485)
When we deal with the flow in geological regions, we should keep in mind, that all boundary values are just guesses. There are usually anomalies in the temperature field. So we should not even attempt to get 100% correct results.

Simulating a 1 kilometer long pipe with a 3d code is very challenging. Even a 100 meters pipe requires some magic to get the simulaton started. In ccm+ I had to use the coupled solver for some iterations before switching to the segregated solver.

So either use a 1d code for your problem or simply reduce the length of your domain to something much shorter (maybe 10 to 20 meters at first) and see, what results you get.

Should this be a horizontal of a vertical pipe? In case of a vertical pipe you have to isolate the pipe, that goes upwards. Otherwise all the heat you collect on your way down will be lost on the way back to the surface :-)

Absolutely. I am currently running a similar simulation for a 20 meter 'pipe'.
This is a vertical 'pipe'. In reality, what I am simulating is a dike system where hot water from some deep layer (on icy moons of the solar system) is ascending toward the surface. The goal is to assess if it solidifies on its ascent or able to penetrate the surface in liquid form.

JBeilke April 29, 2024 14:33

Are you sure, that the water on these moons has the same properties as our standard-water here on earth. Maybe the moonies put in some salt to delay freezing.

cratermons April 29, 2024 14:36

Quote:

Originally Posted by JBeilke (Post 868493)
Are you sure, that the water on these moons has the same properties as our standard-water here on earth. Maybe the moonies put in some salt to delay the freezing?

Absolutely possible. We can definitely play around with the melting point depression associated with salt content of the water. But the point is to look at what happens to the water (with some initial temperature T) as it enters the 'dike'. Is turbulent heat transfer efficient at cooling the water substantially? Or is it that even when turbulence is considered liquid water does not freeze en route.


All times are GMT -4. The time now is 16:33.