|
[Sponsors] |
December 9, 2017, 08:50 |
Velocity Loss in simpleFoam, Turbulent Flow
|
#1 |
New Member
Soheil
Join Date: Mar 2014
Location: Helsinki
Posts: 21
Rep Power: 12 |
Hi,
I do appreciate any form of help regarding this case. I am really confused with this problem. We can assume that geometry is sort of a simple valley. flow moves in from two inlets. One at the left and the other one is at the top. there is one outlet. [Actually we can change the top inlet with outlet as well, but for now lets go with the first one.] Velocity Magnitude plot at different height along the geometry is shown here. Both inlet velocity and internalField are considered 2 m/s. What is the reason of velocity loss here? Why we lose velocity along the geometry? Is it because of turbulence or something else [mesh, boundary conditions, etc.]? All the files are attached as a ZIP. Solution is converged at 414 iterations. My version of OpenFOAM is 1706. I would be thankful for your help guys. |
|
December 10, 2017, 15:40 |
|
#2 |
Senior Member
Taher Chegini
Join Date: Nov 2014
Location: Houston, Texas
Posts: 125
Rep Power: 13 |
There are couple of problems with your case. Boundary conditions at the outlet are wrong. When you prescribe pressure at a boundary you should use pressureInletOutletVelocity for U and inletOutlet for the rest.
In fvSolution, consider setting relTol to 0 and play with the relaxation factors. They are very low, consider setting a value close to 1 as much as possible. Start with values close to 1 and decrease them if necessary. Regarding the loss, the closer to the wall the more loss you would expect. Part of it also could be related to numerical diffusion. |
|
December 10, 2017, 16:08 |
|
#3 | |
New Member
Soheil
Join Date: Mar 2014
Location: Helsinki
Posts: 21
Rep Power: 12 |
Quote:
Would you please, do me favor, and check whether what I've changed are correct or not and when you have time correct them if I specified them wrongly. Thanks, Regards. |
||
December 10, 2017, 22:29 |
|
#4 | ||||
Senior Member
Taher Chegini
Join Date: Nov 2014
Location: Houston, Texas
Posts: 125
Rep Power: 13 |
Sounds good. Give it a try and see how does it change the results. Typically a 0.7 relaxation factor for all the fields except for pressure is good. You can find some good values using foamSearch utility. For example you can go to the tutorials directory and do this:
Quote:
Quote:
Quote:
Quote:
|
|||||
December 11, 2017, 13:50 |
|
#5 |
New Member
Soheil
Join Date: Mar 2014
Location: Helsinki
Posts: 21
Rep Power: 12 |
OK!
Once again thanks for your help and your time. It means a lot. I did implement all the changes. Boundary conditions are updated now according to your advice. relaxation Factors are selected after some tries: p: 0.4 , U: 0.85, k|epsilon: 0.6. More than above values solver crashes. Maybe it's because of the mesh quality...It can be improved later if that's the case. However, after all these, there is no change in velocity at the end of the simulation! If everything is alright, then why we lose the velocity? This is the question that my supervisor asks me. My supervisor performed a similar geometry with ANSYS, as the contours display (figures attached), at the end of the simulation velocity is 2 m/s everywhere. But, with OpenFoam and these settings I lose velocity which is against the continuity equation I guess. If I impose a Uinlet of uniform (0 -2 0) at the "inlet2", which is at the top and uniform (2 0 0) at the left, result is completely different. Velocity increases and it won't be less than 2 m/s anywhere. But the problem is we want the velocity along X-Axis everywhere. So, I really don't know just why and what to do! Regards, Soheil; |
|
December 11, 2017, 16:22 |
|
#6 |
Senior Member
Taher Chegini
Join Date: Nov 2014
Location: Houston, Texas
Posts: 125
Rep Power: 13 |
I didn't notice, your case is 3D and it's relatively huge!
I think the main problem is the mesh, the aspect ratio is too high 63!, you should try to keep it close to 1. Most importantly, there is a reduction in cross section from left to right why do you expect to have a constant velocity? The simplest form of continuity equation says that flow rates should be the same not the velocities. When the area is increasing the velocity should decrease. |
|
December 12, 2017, 13:25 |
|
#7 |
New Member
Soheil
Join Date: Mar 2014
Location: Helsinki
Posts: 21
Rep Power: 12 |
Thanks!
It makes sense now. I attach two more pictures that exactly shows: "when the area is increasing the velocity should decrease." So, simulation and boundary conditions are alright for the case. I have to work on improving the mesh and trying to extend the problem to the next level: Modeling the flow when the velocity is almost zero but we have different temperature at left and right.. One more question. Any advice on how to improve the mesh without increasing the cell number to a huge number?! Getting an aspect ratio of almost 1 is challenging in a 3D geometry.. It has to be another way.. instead of just increasing the cell numbers along X,Y,Z axis...maybe adding more blocks somehow.. I do appreciate all your advice. Helped me a lot. Regards, Soheil; |
|
December 12, 2017, 13:56 |
|
#8 |
Senior Member
Taher Chegini
Join Date: Nov 2014
Location: Houston, Texas
Posts: 125
Rep Power: 13 |
Well, that's the difficulty of meshing, you should find a balance between accuracy and run time. What people usually do is mesh convergence study. It's the formal way of finding the smallest mesh size while maintaining the desired accuracy. You can google it, there are many good examples and papers on it.
What I would suggest in you case is to start from a smaller domain, say tenth of your current size. Then start running quick simulations with different mesh sizes and see how does it affect the results. |
|
December 14, 2017, 03:35 |
|
#9 |
Member
Anders Utnes
Join Date: May 2017
Location: Norway
Posts: 34
Rep Power: 9 |
An important factor is often the velocity relative to the cell size close to the wall. I advise you to play around with the command "simpleFoam -postProcess -func yPlus", as it will give you a dimensionless number called y+ that you might want to research. Basically you want it below 1 for a lot of CFD models, but some are valid for much higher values.
Many mesh generators allow you to spesify the mesh density at different places, allowing you to have a fine mesh close to the wall and much larger cells in the middle. |
|
December 17, 2017, 12:44 |
|
#10 |
New Member
Soheil
Join Date: Mar 2014
Location: Helsinki
Posts: 21
Rep Power: 12 |
Hello again!
I would be thankful if you could help me one more time. In previous posts all I wanted to see is how velocity works along the domain. The main objective of this project that I am working on is to see how the fluid behaves/moves along the domain when velocity is almost zero and when we have temperature difference at the inlet and outlet. I just want to simulate possibility of fluid movement and its velocity when we have temperature difference.. As this case is incompressible, the solver that I choosed is " buoyantBoussinesqSimpleFoam". It seems it's not enough for what I want...When Velocity is Zero it can not converge with the selected boundary conditions. Additionally, temperature difference is not the reason of flow movement... Do I have to use ideal gas model and compressible solvers (instead of incompressible flow) to see the flow movement when velocity is Zero? Because Energy Equations are located in compressible solvers. buoyantBoussinesqSimpleFoam solution, results and files are attached to this post. Velocity is considered 2 m/s. Any guidance is appreciated. Regards, Soheil; |
|
December 17, 2017, 13:22 |
|
#11 |
Senior Member
Taher Chegini
Join Date: Nov 2014
Location: Houston, Texas
Posts: 125
Rep Power: 13 |
I haven't done heat transfer simulations so I can't give you a definite answer but by some googling I found this website that gives you a basic understanding of the solver that can help you to decide if it fits your problem.
Using a compressib solver might be an overkill for your problem I think you can use Boussineq type solvers. |
|
December 17, 2017, 16:06 |
|
#12 |
Member
Anders Utnes
Join Date: May 2017
Location: Norway
Posts: 34
Rep Power: 9 |
Its hard to say without a better understanding of WHAT you are trying to model.
If you model water, any compressibility is usually negliblie. Air in atmospheric conditions are also fairly incompressible. But if you have a inlet of air into a empty space, then it will expand and fill it far faster than the inlet probably is designed for. And If it is introduced in a higher density, it may also expand! Further more, heating from the walls may be a problem, but if the velocity of the inlet is high enouch, this effect can be neglible. In short, you need to have a clear view if what effects you are looking for, in order to best simulate them. If not, you may end up cuasing problems for yourself. May I recommend drawing a sketch of all the important boundaries, the area, and what you are looking for? Then we may better be able to help you with what assumptions are valid. |
|
December 21, 2017, 13:02 |
|
#13 |
New Member
Soheil
Join Date: Mar 2014
Location: Helsinki
Posts: 21
Rep Power: 12 |
Thanks for the replies and all the help guys. I apologize for the late response. I was trying to figuring the things out and then update the thread. I think I've achieved what I wanted..but I don't know whether it's correct or wrong.
The geometry is a rectangular shape with one inlet (at the left), one outlet (at the right) and rest is wall. Fluid is air. I want to see when temperature at the inlet and outlet is different, how the fluid moves across the domain. [I want to put the flow into movement somehow]. So we need some kind of energy equation and a compressible solver for this. Also, due to buoyancy, density changes (because of temperature differences). So compressible changes needs to be taken to consideration. Thus, the solver "buoyantSimpleFoam" is selected. Attached figures display the Temperature, pressure and Velocity across the domain. Velocity at the inlet is considered fixedValue of zero. After simulation, because of the temperature difference, flow comes to movement. I would be thankful if you check the boundary conditions and let me know if I can improve it somehow? Residuals plot does not satisfying. So, there has to be some kind of mistakes.. Mesh is coarse..but as it's 3D, I just wanted to make it work for now... However, I tested it with 2D as well and results were the same. [frontAndBack: empty] I did the simulation with incompressible solver, buoyantBoussinesqSimpleFoam as well, but no velocity calculated. Any help is appreciated. Hope I was clear about the whole concept. |
|
December 21, 2017, 13:33 |
|
#14 |
Member
Anders Utnes
Join Date: May 2017
Location: Norway
Posts: 34
Rep Power: 9 |
You are currently looking at U Magnitude, which is total velocity regardless of direction. You should be able to find Ux, Uy and Uz in paraveiw.
It looks to me that the flow is currently flowing upwards at the left side, following the top to the right side, getting cooled down and sinking, and then getting pulled to the left again. This explains why the flow fluid in the center is still. Are you currently having any inlets or outlets? Looks to me like the flow is cycling in a circle. |
|
December 21, 2017, 13:48 |
|
#15 |
New Member
Soheil
Join Date: Mar 2014
Location: Helsinki
Posts: 21
Rep Power: 12 |
Pictures from U along X and Y direction is attached. Also uploaded two animation extraced from ParaView to dropBox. [Ux, U_Magnitude]
Yes. I have considered an inlet [at the left] and outlet [at the right]. inlet and outlet BC in the U file is as follows: [internalField uniform (0 0 0);] Code:
inlet { type fixedValue; value uniform (0 0 0); } outlet { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } Code:
inlet { type fixedFluxPressure; value uniform 101325; } outlet { type fixedValue; value uniform 101325; } Code:
inlet { type fixedValue; value uniform 350; } outlet { type fixedValue; value uniform 250; } |
|
December 21, 2017, 14:22 |
|
#16 |
Member
Anders Utnes
Join Date: May 2017
Location: Norway
Posts: 34
Rep Power: 9 |
Looks like the flow is moving well.
The inlet and outlets are basically heated/cooled walls right now, as long as you keep their velocity fixed as 0. Was this what you intended? |
|
December 21, 2017, 15:05 |
|
#17 |
New Member
Soheil
Join Date: Mar 2014
Location: Helsinki
Posts: 21
Rep Power: 12 |
Thank you.
Yes, for now this was defined for me to do; hope my professor accepts it! Actually, in the main case the top section has to be inlet as well. (Its picture is attached). I had some problems in understanding the Boundary Conditions in the beginning. |
|
December 24, 2017, 12:29 |
|
#18 |
Senior Member
Taher Chegini
Join Date: Nov 2014
Location: Houston, Texas
Posts: 125
Rep Power: 13 |
Something is not quit right with you BC. The way I see it, you defined the inlet as a wall then you defined the outlet as an outlet but with a fixed temperature which doesn't sound physical. If it's an outlet you should use a zero gradient or inletOutlet BC for T or if it's a wall you should use noSlip for U and fixedFluxPressure for p, just like the way you defined it at the inlet.
|
|
December 24, 2017, 13:15 |
|
#19 |
New Member
Soheil
Join Date: Mar 2014
Location: Helsinki
Posts: 21
Rep Power: 12 |
Thanks.
Yes, you are right. it's an "outlet" so I've changed it to inletOutlet BC for T. I tested it with zeroGradient for T as well. Residuals plot acts differently. I think with a zeroGradient it gives a better results but can't specify a value for T in this case (for example 295 Kelvin). Pictures are attached from two cases. |
|
December 25, 2017, 00:57 |
|
#20 |
Senior Member
Taher Chegini
Join Date: Nov 2014
Location: Houston, Texas
Posts: 125
Rep Power: 13 |
It shows that there is problem in your solution and/or schemes. I would suggest you to use the inletOutlet play with solution and schemes parameters like reduce the tolerances to 1e-8 for all the fields as well as the relaxation factors. Start by 0.3 for pressure and 0.7 for the rest. Also, in the schemes the normal gradient scheme for Laplacian and snGradSchemes are usually the same. Since your mesh is pretty simple you can orthogonal for both or limited 1 which in this case you need to set the nNonOrthogonalCorrectors in the solution to at least 1. I would suggest you to read this and this pages to get a better sense of the parameters.
|
|
Tags |
simplefoam, velocity |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFD by anderson, chp 10.... supersonic flow over flat plate | varunjain89 | Main CFD Forum | 18 | May 11, 2018 08:31 |
3-D parabolic velocity Inlet - Steady state - UDF Turbulent Flow | mohibanwar | Fluent UDF and Scheme Programming | 10 | May 18, 2015 11:34 |
How to get a plot of fluctuating velocity component{u'(t)} in a turbulent flow | TQIM | STAR-CCM+ | 7 | November 11, 2014 11:22 |
Time averaged velocity in turbulent pipe flow | tsero | FLUENT | 1 | November 2, 2012 04:19 |
Turbulent flow through a pipe with variable inlet velocity | lobstar | OpenFOAM Running, Solving & CFD | 8 | March 28, 2012 12:15 |