
[Sponsors] 
January 17, 2013, 05:48 
interFoam  Hydraulic Jump  Correct boundary condition p_rgh

#1 
Member
Join Date: Oct 2012
Posts: 30
Rep Power: 4 
Dear fellows,
at the moment, i want to simulate the openchannelflow over some kind of "ramp". I expect that under certain flow conditions, a wave occurs (i think the correct term for this flow phenomena is "hydraulic jump", please correct me if i am wrong). Below, you will find a picture: The inlet is at the left side, outlet is on the right side. The inletboundaryconditions are: Code:
/** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.1.1   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { inlet { type fixedValue; value uniform (0 0 0); } outlet { type zeroGradient; } ground { type fixedValue; value uniform (0 0 0); } atmosphere { type pressureInletOutletVelocity; value uniform (0 0 0); } front { type empty; } back { type empty; } ramp { type fixedValue; value uniform (0 0 0); } lower_inlet { type fixedValue; value uniform (2 0 0); } } // ************************************************************************* // Code:
/** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.1.1   \\ / 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 buoyantPressure; value uniform 0; } ground { type buoyantPressure; value uniform 0; } atmosphere { type totalPressure; p0 uniform 0; U U; phi phi; rho rho; psi none; gamma 1; value uniform 0; } front { type empty; } back { type empty; } ramp { type buoyantPressure; value uniform 0; } lower_inlet { type buoyantPressure; value uniform 0; } } // ************************************************************************* // Code:
/** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.1.1   \\ / 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 outletInlet; value uniform 0; outletValue uniform 0; } ground { type buoyantPressure; value uniform 0; } atmosphere { type totalPressure; p0 uniform 0; U U; phi phi; rho rho; psi none; gamma 1; value uniform 0; } front { type empty; } back { type empty; } ramp { type buoyantPressure; value uniform 0; } lower_inlet { type buoyantPressure; value uniform 0; } } // ************************************************************************* // Both animation represent a time of 20 seconds. You can see, that the different p_rghboubdarycondition at the outlet yield different result. To be honest, none of theses results look senseful for me. Do you have any hints concerning boundary conditons (or general remarks to this simulation)? One option of preventing the fluid from flowing out of the domain would be to construct a small step / wall at the outlet. Because this is physically not valid, i am not so happy with this solution, what is your opinion? Best Regards, Mathias Last edited by pythag0ra5; January 17, 2013 at 06:42. 

January 17, 2013, 06:52 

#2 
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 10 
Hey Mathias,
I had to do something similar for my thesis. my BCs were: Code:
U prgh alpha1 airInlet fixed Value zeroGrad fixedValue 1 waterInlet fixed Value zeroGrad fixedValue 0 outlet zeroGrad zeroGrad zeroGrad Top and Bottom slip zeroGrad zeroGrad front and Back empty empty empty about the pressure) So specifying the top with atmospheric pressure might help as well as using buoyantPressure for the bottom. But using zeroGradient at the outlet in my opinion is necessary. Alternatively you can specify a point or cell in the mesh with a fixed value for the pressure which gives the system a starting point (specified somewhere in fvSolution), if the system is illdefined. I hope I could contribute regards 

January 17, 2013, 08:53 

#3 
Member
Join Date: Oct 2012
Posts: 30
Rep Power: 4 
Hello Colin,
thank you very much for your reply. I also found this post: interFoam vs. simpleFoam channel flow comparison where also some bc are given. According to your tabel Top and Bottom are defined as slip walls (?), why did you do this? I would expect that the velocity at the walls is zeroGrad. Again, i would expect that there exist a "statinoary wave" behind the ramp, this has something to do with the so called "FroudeNumber". But neither in the "onstantcase" nor in the "decreasingcase" this wave occurs . Thanks a lot Mathias 

January 17, 2013, 09:40 

#4 
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 10 
Hi Mathias,
I defined the top and bottom with slip, since I didn't want to have any friction/ boundary layer there. However if you modell the boundarylayer you would use fixedValue 0 on the bottom. Also my Reynoldsnumber was rather low for I was using a laminar flow. But in general the BCs should be the same only the initial condition of the fluids properties should differ. From what I just saw: your internal field is 0 so your flow has to develop. Secondly your speed is 2m/s at the inlet, this seems to be rather slow for a hydraulic jump, however I don't know your domain dimensions. My recommendation is to increase the speed and also set the internal speed to the value you use at the inlet. I hope I got everything alright what you were asking. regards 

January 21, 2013, 20:05 

#5 
Member
Join Date: Oct 2012
Posts: 30
Rep Power: 4 
Dear Collin,
sorry for being late with my reply, i tried to implement your suggestions into my model. First of all, some general remarks:  The length before the (reverse) ramp is 50m  The length behind the ramp equals 100m.  The ramp itself is 5m long and 1.5m high  The waterInlet is 1m high. To ensure a hydraulic jump, i assumed the Froude number to be 2, therefore the velocity has to be: v = sqrt(9,81m/sē * 1m) * Fr = 6,2641m/s  The total time simulated is 120 seconds.  I defined the boundary conditions as shown below: Again, i prepared a video for you: people.fhlandshut.de/~mehrenwi/video1.avi Does this make sense to you? To be honest, not for me, especially the decreasing waterInlet (starting at 1 Minute / 10 seconds). I'm looking forward to hearing from you again! Best regards, Mathias 

January 23, 2013, 09:10 

#6 
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 10 
Hi Mathias,
on a short note: did you initialize the internal filed with the same velocity as the inlet? For there seems to occur a blockage in the end part of your domain. I hope that helps regards Colin Edit: What might also help is to not set the velocity of the air to 0 but the same value as the water to avoid friction / wave making between the two liquids. At least it minimizes the effect. Last edited by colinB; January 23, 2013 at 09:13. Reason: Air inlet / Air field 

January 23, 2013, 11:02 

#7 
Member
Join Date: Oct 2012
Posts: 30
Rep Power: 4 
Hi Colin,
thank you very much for your reply! Just to ensure you got my problem right, i want to see the waves in the area of the ramp. Can you tell me how to set an initial velocity of the water? I will simulate then the problem with your suggestions an let you know the results. Thank you very much for your help! Best regards, Mathias 

January 24, 2013, 05:35 

#8 
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 10 
Dear Mathias,
please follow this link: http://www.openfoam.org/docs/user/ba...181020004.2.8 look in this section for the keyword: internalField, where you can specify a velocity vector. Commenting the waves you are expecting: I would expect in the outlet section a fast drop of the water level, since the cross section of the outlet covered with water is bigger than the cross section on the inlet. Later when the flow and the water level has stabilized one should see the hydraulic jump in the end part of the domain. Waves I also would only expect in the end of the domain but not in the beginning or on the ramp where the water is rather fast. (correct me if I'm wrong!) regards Colin 

January 24, 2013, 16:36 

#9 
Member
Join Date: Oct 2012
Posts: 30
Rep Power: 4 
Dear Colin,
thank you very much for your feedback. Meanwhile, i resimulated my problems with the interFieldvariable, please find attached the latest video of my simulation: http://people.fhlandshut.de/~mehrenwi/global.avi (this shows the whole geometry) http://people.fhlandshut.de/~mehrenwi/local.avi (this shows just the relevant part, the ramp) In my first post, i posted a video where you can see the decreasing of the fluid at the outlet. Maybe i should explain a little bit more to my project: In Munich, there exist two places, where Surfers can surf on rivers. At the moment, i am writing my Master Thesis, the main part of this work will be the simulation of this phenomena with OpenFOAM. Below, you can see a pictue of the Münchener Floßlände, which is (next to the well known Eisbach) a famous surfspot for surfing on rivers. (Source of this image: http://www.igsurfenmuenchen.de/files/FL_lines.jpg) Under http://www.wellenfürmünchen.de/spots/flosslaende you can find also other interesting material. You can see, that the surfers ride the standing wave at the place where the ramp is place int the riverbed. From a very theoretical point of view, this makes sense to me, because: At the upper side, you have a high velocity and a low water level, whereas at the lower part you have a higher water level and a very low velocity of the water. Therefore, the Froude Number at the upper side seems to be >1 and <1 at lower side, which is the basis for a standing wave. Therefore, I would expect this wave at the same place as in reality. But unfortunately, none of my simulation could cover this flow phenomena. First of all, it is not realistic that my domain is "leaking out", because in reality it is a river. Second, i can not establish any kind of wave (neither close to the outletregion as you mentioned, nor at any other area of the fluid domain). It would be great if you have any further help for me! Thanks a lot Mathias 

January 25, 2013, 04:50 

#10 
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 10 
Dear Mathias,
What I expected actually you can see from the attached drawings. Basically I thin we are talking about the same, but I expressed myself a little but clumsy. I had a look at your videos and they look pretty realistic to me. However the explanation to these videos you might find here: http://en.wikipedia.org/wiki/Hydraul...ic_conclusions Your geometry or your water depth simply might not provide the condition for an hydraulic jump to occur. (refer to row 1 of the table in the above mentioned link) Eventually you want to introduce a backwards slope from the ramp to the end part of the domain to slow down the water and force a decrease in Fn which should cause a hydraulic jump. I hope I could contribute regards Colin 

January 26, 2013, 06:31 

#11  
Member
Join Date: Oct 2012
Posts: 30
Rep Power: 4 
Dear Colin,
thank you very much for your reply. I am in contact with some of Munich Surfers, and it seems to be correct, no hydraulic jump can occur at my system because my geometry simply does not cover the reality. I am pretty sure, that my boundary conditions now are set up correct. Therefore, i will go one step backwards and make a more general assumption: Think about a well known geometry, the backward facing step. I want a little bit to play around with this geometry, because the backward facing step seems to be a special case of my problem. The stepheight will be set to 1m, the height of the waterinlet also should equal 1m. Now, my question is: Which value is necessary for the inletvelocity of the water in order to get a hydraulic jump? Some days ago, i wrote: Quote:


January 28, 2013, 03:30 

#12  
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 10 
Good Morning Mathias,
Quote:
hydraulic jump it might be better to increase the Fn. In my previous post I linked a wikipedia article where a table is mentioned which gives you some numbers as well as a good description of what will happen. I strongly recommend you to read that table, for it explains what is happening now within you domain as well as what you should do to get towards your desired results! Concerning the boundary conditions, they indeed seem to be correct. regards 

January 28, 2013, 07:55 

#13  
Member
Join Date: Oct 2012
Posts: 30
Rep Power: 4 
Dear Colin,
i read through your article, thank you very much! There is a ratio called height after to height before jump which is not clear to me right now: Is this the height of the water before / after the "step" (or whatever thing which may be the reason for the standing wave) ? Nevertheless, i prepared a video for you again, unfortunately the explanations given in the video are quite fuzzy because of the bad resolution: http://people.fhlandshut.de/~mehrenwi/backward_facing_step.mpg I tried to simulate the Froude Numbers from 1 to 5 for a backwardfacingstep (Height of the step = 1m). Later, these simulations are made for a slightly different setup which my professor was interested in. The positive thing is, that the flow behaves exactly like you forecasted it some posts above in your drawing, which means: First the initial waterlevel decreases abruptly as the simulation begins. Then, some waves occur (depending on the corresponding FrNumber). In the end, the final waterlevel at the output is reached, for me interesting is the fact that this water level seems to be constant no matter what inletvelocity is present. The negative thing (once again) is that i cannot establish a standing wave. Today in the evening i will try to simulate the same geometry with some turbulencemodel, i am excited about the results. Quote:
Thank you very much! Best regards, Mathias 

January 28, 2013, 08:44 

#14 
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 10 
Hey Mathias,
the video looks quite promising. In the first series of calculation the problem appears to be that in the end part of the domain, the Fn cannot decrease fast enough so the water is flowing smoothly out of the domain. To roughly explain the phenomena you are waiting for: the water comes with a certain speed into the domain and then due to the roughness of the bottom it looses speed. If you apply now the Bernoulliequation leaving the pressure constant, since you are dealing with an incompressible flow, the water level rises. In the first serious the roughness is too "smooth" so you don't get a drop of the speed and hence the water level stays the same. I couldn't grasp the changes you applied in the second serious, for the picture was too blurry, however these changes seem to overcome this smoothness and produce a standing wave. If you would extend your domain in the end you could see this better. Understanding the terms specified in the table refer to the beginning of the article where a sketch is shown with the terms explained. My suggestions to reduce the speed in the end part:  rise the ground level in the end of the domain so you get another slope so the gravity helps you to reduce the speed  extend the domain in the end so the surface can increase its influence on the water and decrease its speed. Furthermore: what is the speed of the air in your domain? if it is zero you might want to give it the same speed as the water to avoid friction between the water layer and the air layer, causing waves and spray in the opposite direction, you observed in the first serious. So this is a quite extensive explanation to your problem I hope it helps. regards 

January 30, 2013, 12:23 

#15 
Member
Join Date: Oct 2012
Posts: 30
Rep Power: 4 
Hi Colin,
sorry for the late response. For your information: The difference in the results (see the video above) just was a different definition of the "ground"boundary condition. If you have a sharp look on the pictures below, you can see it near the outlet: As i promised, i made 3 simulations (Fr = 1, kepsilon model is active), you can find the video below. Each simulation is about 60 seconds, the first one show a "normal" backward facing step (definition of boundary conditions according to first picture), the second is like flowing into a lake (definition of boundary conditions according to second picture), the third one is a flow over a backward facing step followd by some kind of slope: http://people.fhlandshut.de/~mehrenwi/Backward_Facing_Step.avi Is there any option to increase friction on ground with some boundaryconditions? I interessted in yout opinion concerning the video! Best reagards, Mathias 

February 4, 2013, 05:03 

#16 
Senior Member
Join Date: Aug 2010
Location: Groningen, The Netherlands
Posts: 216
Rep Power: 10 
Hi Mathias,
sry for my late reply, and just on a short note: increase friction:  what are the boundary conditions on the lower wall? You might want to set U to fixed value = 0 if you haven't done it already.  what might also help is introducing a moving wall (see tutorial Lid driven cavity) which is moving in the opposite direction (however i'm not sure about this and I don't know how this setup deviates from the reality)  another suggestion is to use the kw turbulence model which is better for near wall effects than kepsilon Concerning the video: I didn't have a look at it, for I don't have too much time currently for cfdwork. Maybe a comment is following later, if I can make some time free, but I won't promise. regards 

February 4, 2013, 19:16 

#17 
Senior Member
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,111
Blog Entries: 6
Rep Power: 19 
Hi you both,
well I want to engagement me into the discussion. First of all. Like Colin told you should use the komega model for near wall flows. In my opinion you should take the komegasst model. In my simulation I used that one: Video: http://www.holzmanncfd.de/index.php/brueckensimulation To set internal fields you can specify it in the first line by Code:
internalField uniform (2 0 0); And notice that 2D does not represent every effect! Maybe a 3D simulation would be better? PS: Video is not working ? maybe it depends on my computer ! 

September 5, 2014, 04:31 

#18 
Senior Member
Tobias Holzmann
Join Date: Oct 2010
Location: Leoben (Austria)
Posts: 1,111
Blog Entries: 6
Rep Power: 19 
Hi all,
I had time to check out the wave flow in a 2d channel. The result is given here: https://www.youtube.com/watch?v=rfRFn_Gd420 Enjoy. I used a time dependend flow inlet boundary condition to show the influence of wave characteristics due to mass flow rate. Kind regards Tobi
__________________
Best regards, Tobias Holzmann Some interesting OpenFOAM tutorials and videos on www.Holzmanncfd.de 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Mixed/Robin boundary condition  aaev  OpenFOAM Bugs  2  December 15, 2011 15:03 
asking for Boundary condition in FLUENT  Destry  FLUENT  0  July 27, 2010 00:55 
pressure jump in fan boundary condition  Vijay  FLUENT  0  February 12, 2009 19:19 
porous jump boundary condition  koh  FLUENT  1  March 23, 2005 08:02 
The Boundary Condition about the Flat Plate  boing  Main CFD Forum  1  January 6, 2002 17:53 