CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Closed loop pipe flow (http://www.cfd-online.com/Forums/openfoam-solving/79978-closed-loop-pipe-flow.html)

Closed loop pipe flow

1 Attachment(s)
Hello everybody,
for the first time I am dealing with pipe flow and I need some ideas and suggestions on how to set up my case properly.

I have a closed loop cooling system, where air passes through some pipes of different diameters: the smallest one has a diameter of some millimeters, while the largest one is of the order of meters, as shown in the attached picture. Air is moved by a fan placed in the mean diameter section. My main objective is to calculate the pressure drop in the system.

Here are my questions:
1. I assume the flow is turbulent, but the local Reynolds number is low due to the smallest pipe. What is the suggested turbulence model in this case? I read somewhere that SpalartAllmaras can be ok, but I never used it so I was thinking to use a low-Re k-epsilon approach, as LaunderSharmaKE. Is it correct?
2. If it is, ok, then I should design my mesh accordingly. Since I want to keep my cell number low, then I was thinking of using the newly nutLowReWallFunction, so I am not forced to have y+<1 as a low-Re mesh usually requires. Thus, I would generate my mesh with a prism boundary layer with y+>1 and use that nutLowReWallFunction. Is it correct?
3. In that case, what wall boundary condition should I use for k and epsilon? zeroGradient, as I usually do for a low-Re y+<1 mesh, or fixedValue \$internalValue as I do for a high-Re 30<y+<100 mesh?
4. And what about k and epsilon internal value? Should I use the one that are usually prescribed for the inlet, even if my system is a closed loop?
5. I guess that for fvSchemes and fvSolution I can use what I am used to do:
Code:

```grad        faceMDLimited Gauss linear 0.5; div        Gauss linearUpwind cellLimited Gauss linear 1; laplacian  Gauss linear limited 0.5;```
or are there any other suggestions?
These are only of the few questions that are running into my mind... Looking for someone that can shed some light on the subject.
Regards,

 nileshjrane September 10, 2010 11:37

i am not sure whether one should use wall functions with low Re models or not. But one can definitely negotiate the use of very fine mesh using wall function. But doesn't it sound more logical to use high Re model then in conjunction with wall function rather than using low-Re model??

Please correct me if i am wrong. And one more thing. Can you please tell me where we should specify the wall function like nutLowReWallFunction if i have to use it???

One more thing: i think k and eps BC should alwayz be this k=eps=0. And i suppose the wallfunctions internally make sure this condition is followed and the value u specify is actually value at the edge of say log layer. Is it correct or not??

 alberto September 11, 2010 14:29

Quote:
 Originally Posted by nileshjrane (Post 274769) Hi maddalena, i am not sure whether one should use wall functions with low Re models or not. But one can definitely negotiate the use of very fine mesh using wall function. But doesn't it sound more logical to use high Re model then in conjunction with wall function rather than using low-Re model?? Please correct me if i am wrong. And one more thing. Can you please tell me where we should specify the wall function like nutLowReWallFunction if i have to use it??? One more thing: i think k and eps BC should alwayz be this k=eps=0. And i suppose the wallfunctions internally make sure this condition is followed and the value u specify is actually value at the edge of say log layer. Is it correct or not??

Your last statement about the necessity of having k=eps=0 at all BC's is not correct, since in models relying on Boussinesq approximation it would lead to an undefined turbulent viscosity.

Best,

 alberto September 11, 2010 14:38

Quote:
 Originally Posted by maddalena (Post 274716) Here are my questions: I assume the flow is turbulent, but the local Reynolds number is low due to the smallest pipe. What is the suggested turbulence model in this case? I read somewhere that SpalartAllmaras can be ok, but I never used it so I was thinking to use a low-Re k-epsilon approach, as LaunderSharmaKE. Is it correct?
What is the average Re in the system?
In the small pipe probably the flow laminarizes. In theory a low-Re k-eps model that preserves the correct behaviour in laminar cases (double check the literature, you will easily find the values of the coefficients to obtain this in L-S model) could work.

Quote:
 If it is, ok, then I should design my mesh accordingly. Since I want to keep my cell number low, then I was thinking of using the newly nutLowReWallFunction, so I am not forced to have y+<1 as a low-Re mesh usually requires. Thus, I would generate my mesh with a prism boundary layer with y+>1 and use that nutLowReWallFunction. Is it correct?
You are solving a case for relatively low Re I guess. If so, I would simply respect y+ < 1, and wait a few more hours :)

The rest seems fine. Numerical schemes are standard, the initial condition does not matter if you want a steady state solution.

Best,

 nileshjrane September 11, 2010 15:02

Hello Alberto,

I apologize for the untidiness. :( I was actually trying to answer the questions of maddalena. Just telling my thoughts. I thought may be i can correct my knowledge through some discussion. Thats it...Otherwise i do open my own threads separately for my issues..

Sorry again..:)

 alberto September 11, 2010 18:41

Not a prob. Just trying to spread good practices ;-)

For example, too often very old threads (not this case) are bumped to ask questions, while a new thread would help to keep things cleaner. Repetitions are not avoided anyway on a forum. :)

Hi Alberto,
and thanks for your quick and useful answer (as usual). You are one of the few expert member that helps the younger to address their question and gain their experience in this forum, and I really appreciated that.
Now the questions...
Quote:
 Originally Posted by alberto (Post 274853) What is the average Re in the system?In the small pipe probably the flow laminarizes.
The Reynolds number in the different pipes is varying a lot. The smallest pipe has a Re = 35000 and an average velocity of 15 m/s. That has been obtained with the hydraulic diameter. I think I can consider the flow as fully turbulent, or am I wrong?
Quote:
 Originally Posted by alberto (Post 274853) In theory a low-Re k-eps model that preserves the correct behaviour in laminar cases (double check the literature, you will easily find the values of the coefficients to obtain this in L-S model) could work.
So, let's go with literature search..
Quote:
 Originally Posted by alberto (Post 274853) You are solving a case for relatively low Re I guess. If so, I would simply respect y+ < 1, and wait a few more hours :).
... the mesh has already 1M cells and I have a mesh for having y+=30... I guess they are few more days...
Quote:
 Originally Posted by alberto (Post 274853) The rest seems fine. Numerical schemes are standard, the initial condition does not matter if you want a steady state solution.
That is exactly the point... I also thought that the initial condition does not matter. However, I experienced a strong influence of the internal value initial condition for the solution stability. On a similar case (but not with so much difference on the pipe diameters) I could not get a solution for k and epsilon values obtained from the fluent formulas, while I succeeded using them one order of magnitude higher... No guess why. Ideas?
Thanks one more time for your help.
cheers,

Hello,
Quote:
 Originally Posted by nileshjrane (Post 274769) i am not sure whether one should use wall functions with low Re models or not. But one can definitely negotiate the use of very fine mesh using wall function. But doesn't it sound more logical to use high Re model then in conjunction with wall function rather than using low-Re model??
My first post and discussion on the use of nutLowReWallFunction is based on this post. Maybe you will find some ideas and answers there.
Enjoy

 alberto September 13, 2010 10:45

Quote:
 Originally Posted by maddalena (Post 274932) Hi Alberto, and thanks for your quick and useful answer (as usual). You are one of the few expert member that helps the younger to address their question and gain their experience in this forum, and I really appreciated that.
Hmm does this mean I am old? :D :p

Quote:
 The Reynolds number in the different pipes is varying a lot. The smallest pipe has a Re = 35000 and an average velocity of 15 m/s. That has been obtained with the hydraulic diameter. I think I can consider the flow as fully turbulent, or am I wrong?
Yes, I would say so.

Quote:
 ... the mesh has already 1M cells and I have a mesh for having y+=30... I guess they are few more days...
That's when you have to decide to make a compromise. If you opt for wall-functions, you can try with the low-Re ones (you need wall functions also for k and eps).

Quote:
 That is exactly the point... I also thought that the initial condition does not matter. However, I experienced a strong influence of the internal value initial condition for the solution stability. On a similar case (but not with so much difference on the pipe diameters) I could not get a solution for k and epsilon values obtained from the fluent formulas, while I succeeded using them one order of magnitude higher... No guess why. Ideas? Thanks one more time for your help.
That's normal. The initial condition does not affect the solution at steady state, but this does not tell you anything about how the numerical method will behave. Generally a good initial condition is recommended in order to improve stability and convergence for this reason.

Best,

Ok, summarizing:
1. the flow is fully turbulent -> no laminar transition -> no modification to the LaunderSharmaKE coefficients, whose have already been chosen as a low-Re turbulence model.
2. low-Re with no wall function are suggested. However, I can use low-Re with wall function for k and epsilon -> nut set as nutLowReWallFunction, k as kqRWallFunction and epsilon as epsilonWallFunction -> is this correct?
3. the solution is k and epsilon independent, however the convergence needs to properly tune them -> is a good choice to use "inlet" k and epsilon to initialize the flow?
One more question regarding mesh generation: I am having hard time to obtain nice cells on the zones connecting the two pipe sections, i.e. at the inlet and the outlet of the small pipe. I was thinking about using a cell extrusion normal to the flow to keep the orthogonality as high as possible. However, This seems difficult to obtain and in the end I move the bad quality cells from the inlet or outlet to the domain at a some distance from the inlet or the outlet itself. Is there any particular strategy on the subject? How can accomplish the mesh quality criteria on that position?

Cheers,

 nileshjrane September 13, 2010 16:14

Quote:
 Originally Posted by maddalena (Post 274933) Hello, My first post and discussion on the use of nutLowReWallFunction is based on this post. Maybe you will find some ideas and answers there. Enjoy mad

Yeah...I had looked into the source code and got that thing right after i posted here.

Quote:
 low-Re with no wall function are suggested. However, I can use low-Re with wall function for k and epsilon -> nut set as nutLowReWallFunction, k as kqRWallFunction and epsilon as epsilonWallFunction -> is this correct?
seems ok to me.

Quote:
 the solution is k and epsilon independent, however the convergence needs to properly tune them -> is a good choice to use "inlet" k and epsilon to initialize the flow?
I hope you are talking about only steady state simulations, as k-eps model is known to be somewhat sensitive to initial k and eps values otherwise. And inlet values are good starting guess.

Quote:
 That is exactly the point... I also thought that the initial condition does not matter. However, I experienced a strong influence of the internal value initial condition for the solution stability. On a similar case (but not with so much difference on the pipe diameters) I could not get a solution for k and epsilon values obtained from the fluent formulas, while I succeeded using them one order of magnitude higher... No guess why. Ideas?
I have same kind of experience. Turb intensity and mixing length are very general way of guessing k and eps values. It may not be good guess everywhere (in my experience). I have used some other formulae which give larger values for both k and eps. See if you could find them useful. Note that eps values will be quite huge with this formula in general.

k = 0.002U^2
eps = 0.1 (Cmu x rho x k^2)/ mu...........(Cmu = 0.09)

Hope it helps,
Nilesh..:)

 nileshjrane September 13, 2010 16:22

Quote:
 Originally Posted by maddalena (Post 274996) One more question regarding mesh generation: I am having hard time to obtain nice cells on the zones connecting the two pipe sections, i.e. at the inlet and the outlet of the small pipe. I was thinking about using a cell extrusion normal to the flow to keep the orthogonality as high as possible. However, This seems difficult to obtain and in the end I move the bad quality cells from the inlet or outlet to the domain at a some distance from the inlet or the outlet itself. Is there any particular strategy on the subject? How can accomplish the mesh quality criteria on that position?
What utility you are using for meshing?? Hex or tet mesh?? How are you joining the meshes at the pipe juctions??

Hello,
Quote:
 Originally Posted by nileshjrane (Post 275035) What utility you are using for meshing?? Hex or tet mesh?? How are you joining the meshes at the pipe juctions??
I am using a commercial software, Pointwise. On the small pipe, I have a prism layer 8 cells thick and a tetra "core". The quality is not really high, but still acceptable. On the other two pipes, I do not need to model accurately the boundary layer, so I use only tetra.
The junction is the real problem. I though I could extrude the pipe mesh for a while, in normal direction, but the mesh quality is not good. Do you have any suggestions on this point?
Thank you!

 nileshjrane September 13, 2010 17:21

Quote:
 Originally Posted by maddalena (Post 275037) Hello, I am using a commercial software, Pointwise. On the small pipe, I have a prism layer 14 cells thick and a tetra "core". The quality is not really high, but still acceptable. On the other two pipes, I do not need to model accurately the boundary layer, so I use only tetra. The junction is the real problem. I though I could extrude the pipe mesh for a while, in normal direction, but the mesh quality is not good. Do you have any suggestions on this point? Thank you! mad
Well that explains...I also gave up on tet meshes because of the same reason and switched to blockmesh..One thing for sure, extrusion doesn't change much of the quality, in fact i used engrid which worsened the quality by extrusion. one thing i have observed in engrid that when you extrude tet mesh is squeezes the tet cells next to the prism layer in the core region and make the things worse.

May not be relevant to your software, but just in case this is the reason: If you mesh the domain with tet volume mesh and then extrude the surface mesh for prism layer, then in that case keep tet cells coarse at walls as compared to the core area. then extrude the surface layer. And try keeping least possible prism layers. This is what i would have done.

just my opinion. I am no expert of this, but I hope it solves your problem.

Nilesh:)

 alberto September 14, 2010 00:59

Quote:
 Originally Posted by maddalena (Post 275037) Hello, I am using a commercial software, Pointwise. On the small pipe, I have a prism layer 14 cells thick and a tetra "core". The quality is not really high, but still acceptable. On the other two pipes, I do not need to model accurately the boundary layer, so I use only tetra. The junction is the real problem. I though I could extrude the pipe mesh for a while, in normal direction, but the mesh quality is not good. Do you have any suggestions on this point? Thank you! mad
Is it possible to add a pre-defined layer of cells around the junction, so that you have a smoother transition in the mesh?

Best,

Good morning!
Quote:
 Originally Posted by nileshjrane (Post 275041) May not be relevant to your software, but just in case this is the reason: If you mesh the domain with tet volume mesh and then extrude the surface mesh for prism layer, then in that case keep tet cells coarse at walls as compared to the core area. then extrude the surface layer. And try keeping least possible prism layers. This is what i would have done.
Mmm... Ok so I can lower the prism layer number on the small pipe to improve my pipe mesh. However, the main problem is with the junction.
Quote:
 Originally Posted by alberto (Post 275066) Is it possible to add a pre-defined layer of cells around the junction, so that you have a smoother transition in the mesh?
Not sure of what you mean...Is that a sort of "ring" around the hole? To add difficulties to the problem, I should add that the small pipe has a trapezoidal section...

Thanks to both of you!

 nileshjrane September 14, 2010 05:18

In Gambit, one can define the surface mesh on junction face, with boundary layer on it. Can you do that in your software?? What i do in such case is, when i can, i define a good quality surface mesh on the junction interface. Then the volume mesh is generated based on this surface mesh and thus i have good quality nice mesh around that interface. This basically puts the constraint on the volume mesh. You can give good quality evenly based mesh on the face. I dont think it would be impossibly difficult to get good quality mesh on your geometry.

I think Alberto also want to say something like this.

Edit:

Just googled a bit on pointwise. If its similar to gridgen, then i am sure there must be a way to define low level constraints (meaning surface or line mesh) on the volume mesh. I have used gridgen for sometime for simple geometry, but i know it has the capability. i am expecting pointwise must also be having the same.

Nilesh...

2 Attachment(s)
Hello.
Quote:
 Originally Posted by nileshjrane (Post 275114) Just googled a bit on pointwise. If its similar to gridgen, then i am sure there must be a way to define low level constraints (meaning surface or line mesh) on the volume mesh. I have used gridgen for sometime for simple geometry, but i know it has the capability. i am expecting pointwise must also be having the same.
Sure it has. First I define the line mesh, then it creates the surface mesh which has max dimension as the max dimension of its generating lines. With the same criteria, I can assemble faces to form volume mesh.
Quote:
 Originally Posted by nileshjrane (Post 275114) What i do in such case is, when i can, i define a good quality surface mesh on the junction interface. Then the volume mesh is generated based on this surface mesh and thus i have good quality nice mesh around that interface. This basically puts the constraint on the volume mesh. You can give good quality evenly based mesh on the face. I dont think it would be impossibly difficult to get good quality mesh on your geometry.
Thus, if I understand right, you suggest to generate a boundary layer mesh over the junction and then create the volume mesh accordingly. See geomExtr1.png. This is what I meant when I spoke of "extrusion" above. I also tried to open the mesh on the most advanced position to preserve the mesh orthogonality, see geomExtr2.png. However I failed with this approach as well.
Maybe the only thing I need is to refine the mesh...
Regards

 alberto September 14, 2010 09:52

Quote:
 Originally Posted by maddalena (Post 275121) Thus, if I understand right, you suggest to generate a boundary layer mesh over the junction and then create the volume mesh accordingly.
Yes. You might want to try to add the layer surrounding the trapezoidal section. Just be careful that cell size changes very smoothly, or it might end up giving you worse results than an automatically generated tet mesh.

 nileshjrane September 14, 2010 18:59

Hi,

I meant meshing the whole face where the two pipes meet, boundary layer as well as central part of the face. And the more constraints you specify the better mesh you get.

All times are GMT -4. The time now is 05:29.