|
[Sponsors] |
Strange Results at Tank Outlet with InterFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 19, 2013, 23:51 |
Strange Results at Tank Outlet with InterFoam
|
#1 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
Hello,
I am experiencing weird results at the outlet of a tank I am trying to simulate. The simulation is a tank that is open to the atmosphere at the top and has two pipes in the bottom, one is the inlet (taller one) and one is the outlet (shorter one). Solver is interFoam. Overview Both the inlet and outlet pipes have fixed value velocities of 0.77 m/s in the z-direction. The inlet seems to work as needed but the outlet does not. It appears (I believe) that because the outlet boundary is a vector acting in the negative z-direction, the y-direction and x-direction components of the flow approaching the outlet ultimately get reflected back upward back into the domain. Does this makes sense? See the following images and boundary conditions. Based on what I am seeing it appears that the fixed value outlet boundary is not correct for what I am trying to achieve. Is there an average magnitude outlet boundary such that the outlet flow rate is maintained but the direction of the velocity vector is not limited to being normal to the patch? Any other suggestions? I would like to be able to control both the inlet and outlet flow rates. Alpha1 Slice Velocity Slice Velocity Slice Close-up U Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inlet { type fixedValue; value uniform (0 0 0.7700); } outlet { type fixedValue; value uniform (0 0 -0.7700); } "walls_.*" { type fixedValue; value uniform (0 0 0); } atmosphere { type pressureInletOutletVelocity; phi phi; value uniform (0 0 0); } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type buoyantPressure; value uniform 0; } outlet { type inletOutlet; inletValue uniform 0; value uniform 0; } "walls_.*" { type buoyantPressure; value uniform 0; } atmosphere { type totalPressure; p0 uniform 0; U U; phi phi; rho none; psi none; gamma 1; value uniform 0; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.2.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object alpha1; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //. dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type fixedValue; value uniform 1; } outlet { type inletOutlet; inletValue uniform 1; value uniform 0; } "walls_.*" { type zeroGradient; } atmosphere { type inletOutlet; inletValue uniform 0; value uniform 0; } } // ************************************************************************* // |
|
June 20, 2013, 19:25 |
|
#2 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings Matthew,
From what I could very briefly see, specially when I look at "p_rgh", I think you should read this: http://www.cfd-online.com/Forums/ope...tml#post404292 post #7 Best regards, Bruno
__________________
|
|
June 20, 2013, 23:38 |
|
#3 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
Bruno,
Thank you for the suggestion. I have initialized the p_rgh field using funkySetFields. I will post back with my findings. Matt |
|
June 26, 2013, 22:08 |
|
#4 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
Just a quick update: I ran the simulation after initializing the the p_rgh field, but unfortunately it did not change the result.
Any other thoughts? |
|
June 27, 2013, 18:43 |
|
#5 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Matthew,
Can you show the snapshot of the "p_rgh" field at time "0" and another from a time a little bit later? In addition, a snapshot that shows what the mesh looks like. Best regards, Bruno
__________________
|
|
June 27, 2013, 23:58 |
|
#6 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
Hi Bruno,
Thanks for your interest in my problem. I have created the screen shots that you requested, and a few extras too. Here is of the p_rgh field at t=0 seconds . This reflects to field values that I set using setFields which I calculated in a spreadsheet shown here. Here is the p_rgh field at t=1 second re-scaled to show the full range of values. Here is a closeup of the mesh and the velocity field. Here is a screen shot (at t=1) only showing the range of p_rgh values between the maximum value at t=0 and the maximum value at t=1, and here is a similar close-up of the outlet. Thanks again. Matt |
|
June 28, 2013, 16:47 |
|
#7 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Matthew,
From the image with Uz of the mesh at the outlet, it looks like you've got serious mesh resolution problem. Basically you're seeing the opposite of a jet stream. I'll try to explain without images:
Another advice is to first simplify you case into a 2D case. This way you can first diagnose what you need to do in this case, for the mesh and the boundary conditions. Best regards, Bruno
__________________
|
|
June 30, 2013, 23:38 |
|
#8 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
Bruno,
Thank again for your help. I had considered setting up a 2D version for this case, but thought that this one was going to be straight forward. That was foolish of me . Anyway, I have now setup a 2D case with the same mesh refinement as the 3D case. Oddly, it doesn't suffer the same problem as the 3D case, but this may be because the flow patterns in the 2D case are quite different than the 3D case due to the inlet and outlet pipes obstructing the entire domain instead of just a small part like in the 3D one. Here is a screen shot of the 2D case. I think I will try adding refinement to the 3D case and try that. I will report back with my results. Matt |
|
July 3, 2013, 23:40 |
|
#9 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
Hi Bruno,
So, I added some more refinement near the inlet and outlet of the tank. The resulting velocity (in the z direction) is here and a close-up showing the mesh refinement is here. At this point the cells nearest the outlet are approximately 0.01 meters and the velocity through the outlet is 0.77 m/s. Unfortunately the behavior seems to be the same only more well defined. Do you think that the mesh needs more refining? Or maybe the wrong boundary condition? Or as I am writing this I am thinking that I haven't really tried any different discretization schemes. I currently have for the velocity: Code:
div(rho*phi,U) Gauss upwind; Matt |
|
July 4, 2013, 05:11 |
|
#10 | |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
Quote:
- Anton
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
||
July 5, 2013, 02:59 |
|
#11 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
setting velocity at outlet isn't correct.you better set there the pressure.
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
July 14, 2013, 22:48 |
|
#12 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
Sorry for the delayed response. I appreciate your feedback, but got wrapped up in some other projects.
@Anton You are correct. The schemes had little to no affect on the behavior that I am seeing. I also suspected that this would be the case, but thought that I would see for myself. Thanks for the recommended tutorial case. I have run quite a few what I will call "open channel" cases successfully in the past, unfortunately, this tank case with a specified outlet flow rate has some interesting (unwanted) behavior at the outlet. I feel certain that it is an issue with the outlet boundary condition; in order to specify a flow rate it appears that the available BCs assume the flow is normal to the face. I believe that this is the source of my problems. @immortality I have tried the pressure boundary in the past and it works fine, except it doesn't give me the easy control over the outlet flow rate that I was hoping for. However, I may have to reconsider the setup such that I can use the pressure boundary instead. Thanks Matt |
|
July 16, 2013, 18:20 |
|
#13 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
@Matt: I was going to suggest that you set the pressure BC on the inlet and outlet to zero gradient, but then it came to me:
Best regards, Bruno
__________________
|
|
July 17, 2013, 07:11 |
|
#14 |
Senior Member
Ehsan
Join Date: Oct 2012
Location: Iran
Posts: 2,208
Rep Power: 27 |
Hi Bruno
whats gruesome water effects?
__________________
Injustice Anywhere is a Threat for Justice Everywhere.Martin Luther King. To Be or Not To Be,Thats the Question! The Only Stupid Question Is the One that Goes Unasked. |
|
July 21, 2013, 06:38 |
|
#15 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Ehsan,
Well... imagine any task you do every day, such as opening a door or picking up a glass. Now imagine that you use 1000 times the nominal force you usually use. What would happen to the door and glass? This is the kind of image I was trying to convey. By using 0.77 m/s on an inlet or outlet, where the size of said inlet/outlet are 1000 times smaller then they were meant to be, then it means that the fluid will have to be sort-of-squished 1000 times more than it was originally intended. Which is what I deduce that is what's occurring in this case, since the outlet is squeezing a massive jet of fluid in the wrong direction! Or imagine the opposite: if the geometry was at the right scale, but the fluid were set to move 1000 times faster, that would mean 770 m/s. Water at this speed is... well... extremely dangerous? Best regards, Bruno
__________________
|
|
July 31, 2013, 00:12 |
|
#16 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
Hi Bruno,
I believe that my geometry is in meters as intended and that the fluid properties are correct (water and air). I have checked the dimensions in paraview and they are appear to be correct. While using a pressure outlet boundary seems to solve the issue of the flow being reflected back into the domain, I was hoping to eventually be able to specify time series inflow and outflow pumping rates and see how the flow patterns in the tank change. This would require that I be able to specify flow rates at both the inlet and the outlet to the tank. I am thinking that in order to specify a flow rate at the outlet I may need to change the extent of my domain to include part of the outlet pipe, such that the point where the flow is converging to exit the tank is not at the boundary. Thoughts? The case can be found here if anyone is interested. This case is not a real project case, but just a test case to iron out this kind of issue before starting any "real" cases. Any feedback is welcome. Matt |
|
August 17, 2013, 17:35 |
|
#17 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Matt,
Many thanks for sharing the case! I think I found the reason why you have the outlet re-injecting flow back into the tank Remember when we talked about mesh resolution? Well, there are two more details you should have checked:
So, what I did for examining this case, was:
The explanation of what happened is as follows:
In a few minutes I'll upload the modified case to my Dropbox account, along with some images of the flow. edit: The links to the files on my Dropbox:
Best regards, Bruno
__________________
Last edited by wyldckat; March 26, 2017 at 16:40. Reason: see "edit:" | repaired links |
|
August 18, 2013, 22:18 |
|
#18 |
Senior Member
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16 |
Wow, Bruno thanks for looking at the case and for providing such a detailed description of what is happening and how you came to the conclusion. I am just getting back from traveling (away from the internet ). I am going to download the files you uploaded right now an dig into them. I will post back after I have had a chance to process.
Also, I am almost done developing a new mesh that also includes the outlet pipes. It should be interesting to see how the solution for the new mesh compares. I will share it once it is "done". |
|
November 29, 2019, 00:05 |
|
#19 |
Senior Member
Join Date: Jul 2019
Posts: 148
Rep Power: 7 |
Hi,
I am wondering if the mesh refinement worked for you to resolve the case of vortex initiation. Thanks and looking forward to hearing from you. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
strange curvature with interFoam (comparison with Brackbill work) | duongquaphim | OpenFOAM Running, Solving & CFD | 23 | July 25, 2013 02:03 |
interFoam 2.1.x gives wrong results on low Froude numbers | lt.quibbler | OpenFOAM Running, Solving & CFD | 12 | June 14, 2012 09:06 |
Strange behaviour on outlet boundary using LES | segersson | OpenFOAM Running, Solving & CFD | 0 | December 9, 2009 04:57 |
Outlet boundary condition for pd in InterFoam | gopala | OpenFOAM Running, Solving & CFD | 0 | March 19, 2008 10:26 |
VOF Outlet boundary condition in cfd - ace | JM | Main CFD Forum | 0 | December 15, 2006 09:07 |