CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Spillway Analysis Fixed Water Surface Boundary Condition

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 28, 2011, 13:13
Default Spillway Analysis Fixed Water Surface Boundary Condition
  #1
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
Hello All,

I have a question regarding boundary conditions for free surface (VOF) simulations using the interFoam solver (v1.7). This is my first real adventure into CFD - I am still learning. I am trying to set up and run a spillway validation case against the physical model results from the Army Corps of Engineers for a standard WES ogee spillway, as has been done with other commercial codes. So far I have successfully generated the mesh at a few different resolutions, and have been able to run the simulation and view the results for both laminar and RAS turbulence models. However, and this is where my question comes in, I have only been able to set up the case with a fixedVelocity inlet and zeroGradient outlet. This approach seems to be okay if the flow rate is known and the performance for that flow rate is needed. What I am having trouble figuring out is how to specify a fixed inlet water surface elevation boundary condition. I presume that it would be a pressure type boundary condition, but haven't had any success figuring it out.

Does anyone have any suggestions on how to set this up? I have searched extensively through the forums and have tried to look at the source code to figure it out without success.

Also I am in search of a good CFD reference to help me really understand the subject if anyone knows of one.

FYI - using the velocity inlet the results are quite good - I believe after some work with the boundary conditions the results will be very good.

Thanks,

Matt
mgdenno is offline   Reply With Quote

Old   April 1, 2011, 11:40
Default
  #2
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
Hello Again,

Thanks to everyone who has read my post.

Could someone provide a little feed back? Was my question not clear? Is it not possible using current solvers? Is the answer obvious and I am just not searching for the correct terms?

Thanks,

Matt
mgdenno is offline   Reply With Quote

Old   April 3, 2011, 10:35
Default
  #3
Senior Member
 
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 196
Rep Power: 17
vatavuk is on a distinguished road
Hi Matthew,
About the boundary condition, the whole problem setup must satisfy the continuity equation. That means that the water that flows through the spillway must be replaced somehow. One way to do it is having an inflow condition in some surface, like you did. I suppose another option would be having big reservoir such that it’s level slowly decreases as the water flows out. I think it’s also possible to implement a volumetric source of fluid in the reservoir. This source would then replace the fluid that is flowing out. I don’t know if these other options would be easy to implement, perhaps the best alternative is to use the inflow condition, like you did.

About the cfd references, I would recommend, in increasing level of difficulty and completeness:
1) Numerical Heat Transfer and Fluid Flow by Patankar
2) Computational Methods for Fluid Dynamics by Ferziger and Peric

I also suggest that you look at this tread: http://www.cfd-online.com/Forums/ope...ulic-jump.html

Last edited by vatavuk; April 3, 2011 at 10:40. Reason: correct small typing errors
vatavuk is offline   Reply With Quote

Old   April 3, 2011, 21:47
Default
  #4
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
Hi Paulo,

Thank you very much for the reply. I understand what you are saying regarding the continuity equation - maybe the approach I have taken is the best, however, the Waterways Experiment Station (WES) standard spillway shape and the expected nappe profile are all based on head and not flow. I would prefer to not go through an iterative procedure varying flows until I get the head correct - although I will if I have to. I think I would like to look into setting an upstream water surface elevation (at the inlet) a little more, and maybe with your help and the input of others we/I can come up with a way - I think it must be possible.

What do you think about creating a boundary face at the inlet that is the height of the desired water surface elevation and setting the alpha for that patch to be equal to 1 (where 1 is water and 0 is air), then setting the velocity to some type that would allow the required flow to enter the system to maintain the required water surface elevation. Thoughts?

Thanks again for your help.

Matt
mgdenno is offline   Reply With Quote

Old   April 4, 2011, 13:04
Default
  #5
New Member
 
Dave West
Join Date: Mar 2011
Location: US
Posts: 12
Rep Power: 15
Terp is on a distinguished road
Maybe a horizontal inlet patch at the bottom of the reservoir with constant p = rgh where h is the height of the desired level. Makes sense to me, but I don't know if it can be implemented to be stable.
Terp is offline   Reply With Quote

Old   April 5, 2011, 10:10
Default
  #6
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
Terp,

Thanks for the reply. I think I will give that a shot next. On my currently running model I do have it fed from the bottom, but using velocity not pressure. I think you are right, using pressure (if it will run ok) sounds like it would give me the ability to control water surface elevation. What is the best boundary condition type to use for this? pressureInletVelocity? or maybe pressureInletOutletVelocity?

Thanks again for your help.

Matt
mgdenno is offline   Reply With Quote

Old   April 5, 2011, 14:26
Default
  #7
New Member
 
Dave West
Join Date: Mar 2011
Location: US
Posts: 12
Rep Power: 15
Terp is on a distinguished road
Matt,
I would try pressureinletvelocity first. But I can't seem to find any examples of it working. This person tried it for a natural convection inlet, and gave up.

http://www.tfd.chalmers.se/~hani/kur...rial_Shiri.pdf

Let me know if you try it!
Terp is offline   Reply With Quote

Old   April 5, 2011, 16:06
Default
  #8
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
I will update the post with some results if I get it working.
mgdenno is offline   Reply With Quote

Old   April 6, 2011, 14:24
Default
  #9
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
So, it appears that the pressureInletVelocity BC is only a valid boundary of the for the velocity (U) boundary. Any idea what the best boundary to use for the pressure is and how to calculate the value?
mgdenno is offline   Reply With Quote

Old   October 19, 2012, 12:36
Default
  #10
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
Hello,
I just wanted to check in on this thread and see if anyone has been able to implement a fixed water surface elevation inlet where the water surface elevation is specified (maybe using groovyBC) and OpenFOAM will calculate the inlet velocity. In my case I want to specify a water level behind a spillway and have OF calculate the velocity at the inlet. I have tied quite a few combinations of p_rgh (fixedValue, totalPressure, buoyantPressure, and groovyBC with different fixedValues for air and water) and U (pressureInletVelocity, zeroGradient, pressureInletUniformVelocity), but with no success. I am now thinking that maybe the answer lies in using a combination of groovyBC and sampledSets to monitor the gradient of the water surface through the inlet and adjust the velocity to keep it flat? Just wanted to throw it out there and see if anyone has any thoughts that they want to share.
Matt
mgdenno is offline   Reply With Quote

Old   October 19, 2012, 15:03
Default
  #11
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by mgdenno View Post
Hello,
I just wanted to check in on this thread and see if anyone has been able to implement a fixed water surface elevation inlet where the water surface elevation is specified (maybe using groovyBC) and OpenFOAM will calculate the inlet velocity. In my case I want to specify a water level behind a spillway and have OF calculate the velocity at the inlet. I have tied quite a few combinations of p_rgh (fixedValue, totalPressure, buoyantPressure, and groovyBC with different fixedValues for air and water) and U (pressureInletVelocity, zeroGradient, pressureInletUniformVelocity), but with no success. I am now thinking that maybe the answer lies in using a combination of groovyBC and sampledSets to monitor the gradient of the water surface through the inlet and adjust the velocity to keep it flat? Just wanted to throw it out there and see if anyone has any thoughts that they want to share.
Matt
Can't comment whether it will solve your physical problem but measuring the height with sampledSets and feeding it back to the inlet is possible with swak4Foam/groovyBC. See for instance the fillingTheDam-example that comes with swak which has all the ingredients you need: measuring the height with a sample-line and controlling a BC with it. The tricky thing in your problem might be that the measurement line sees the result of the changed inlet 7.93 seconds (my estimate) after the fact. So you've got to be careful with your control mechanism to not "overreact".

BTW: you said spillway. Just recently stumbled upon this nice tutorial that uses swak for simulating one:
https://www.hpc.ntnu.no/display/hpc/...AM+-+swak4Foam
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   October 21, 2012, 09:35
Default
  #12
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
Thanks Bernhard for your input. I think as you pointed out, (and I agree) that "overreacting" to changes may be a problem with this approach. I was thinking of possibly using some kind of "limiter" to prevent large changes to the inflow velocity. Maybe even a rolling average... I guess at this point I really just need to stop procrastinating and try it.
mgdenno is offline   Reply With Quote

Old   October 21, 2012, 10:00
Default
  #13
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by mgdenno View Post
Thanks Bernhard for your input. I think as you pointed out, (and I agree) that "overreacting" to changes may be a problem with this approach. I was thinking of possibly using some kind of "limiter" to prevent large changes to the inflow velocity. Maybe even a rolling average... I guess at this point I really just need to stop procrastinating and try it.
Something like a rolling average could be done with a stored variable (see examples and the presentation from the 6th Workshop). More sophisticated control strategies might be implemented using either the pythonIntegration-functonObject or the swakCoded-functionObject (both of them allow getting and setting global swak variables). Personally I'd go for Python because dynamicLists etc might be easier there.

What MIGHT be useful also is the function object that solves a transport equation as with this you might solve an equation for the residual time (I think the pulsedPitzDaily-example does this) and you can "measure" the time it takes the fluid to reach the "sensor". But that is just an idea
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   April 7, 2014, 10:58
Default
  #14
New Member
 
Rod
Join Date: Apr 2014
Posts: 1
Rep Power: 0
hotrod950 is on a distinguished road
Quote:
Originally Posted by mgdenno View Post
Thanks Bernhard for your input. I think as you pointed out, (and I agree) that "overreacting" to changes may be a problem with this approach. I was thinking of possibly using some kind of "limiter" to prevent large changes to the inflow velocity. Maybe even a rolling average... I guess at this point I really just need to stop procrastinating and try it.
Hello Mathew,

I am just wondering if you succeeded with your boundary conditions for the case of fixed WSE? I am going through the same type of situation.

If you could shed any light, it would be much appreciated.

Thank you,
hotrod950 is offline   Reply With Quote

Old   December 9, 2018, 09:51
Default Solutions anyone?
  #15
Member
 
Akshay Patil
Join Date: Nov 2015
Location: Pune, India
Posts: 34
Rep Power: 10
Akshay_11235 is on a distinguished road
Hello everyone,
Its baffling that after 7 years the problem still seem to be not solved (?). I am stuck with a similar issue and I am wondering if anyone managed to solve this problem. I came across three threads (two were posted by me) where I was looking for answers (see below). However, there seems to be no general solution available. I have been reaching out to a few PhD's at my university, a few professors, and no one seems to have a definitive answer to this problem using OpenFOAM. Fundamentally the problem should be solvable (fluent and flow-3d can do it) so I am wondering what goes on in OpenFOAM/Fluent which makes it not work/work.


Inlet Boundary Condition for Open Channel type flow


Pressure driven flow interFoam (openchannel flow)


Pressure inlet boundary conditions for open channel flows




Any input would be highly appreciated. Thank You!
Akshay_11235 is offline   Reply With Quote

Old   December 9, 2018, 09:57
Default Solutions anyone?
  #16
Member
 
Akshay Patil
Join Date: Nov 2015
Location: Pune, India
Posts: 34
Rep Power: 10
Akshay_11235 is on a distinguished road
Hello everyone,
Its baffling that after 7 years the problem still seem to be not solved (?). I am stuck with a similar issue and I am wondering if anyone managed to solve this problem. I came across three threads (two were posted by me) where I was looking for answers (see below). However, there seems to be no general solution available. I have been reaching out to a few PhD's at my university, a few professors, and no one seems to have a definitive answer to this problem using OpenFOAM. Fundamentally the problem should be solvable (fluent and flow-3d can do it) so I am wondering what goes on in OpenFOAM/Fluent which makes it not work/work.


Inlet Boundary Condition for Open Channel type flow


Pressure driven flow interFoam (openchannel flow)


Pressure inlet boundary conditions for open channel flows




Any input would be highly appreciated. Thank You!
Akshay_11235 is offline   Reply With Quote

Old   December 9, 2018, 14:06
Default
  #17
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 354
Rep Power: 15
Santiago is on a distinguished road
Quote:
Originally Posted by Akshay_11235 View Post
Hello everyone,
Its baffling that after 7 years the problem still seem to be not solved (?). I am stuck with a similar issue and I am wondering if anyone managed to solve this problem. I came across three threads (two were posted by me) where I was looking for answers (see below). However, there seems to be no general solution available. I have been reaching out to a few PhD's at my university, a few professors, and no one seems to have a definitive answer to this problem using OpenFOAM. Fundamentally the problem should be solvable (fluent and flow-3d can do it) so I am wondering what goes on in OpenFOAM/Fluent which makes it not work/work.


Inlet Boundary Condition for Open Channel type flow


Pressure driven flow interFoam (openchannel flow)


Pressure inlet boundary conditions for open channel flows




Any input would be highly appreciated. Thank You!
There is no such "problem" to begin with, just a misunderstanding on how should the physics being solved behave.

Comments:
(1) VoF is just a particular density-based solver with an "active" scalar. That being said, the inlet condition is an essential, Dirichlet, condition. Different commercial softwares will set a velocity field fo EACH INDIVIDUAL PHASE using laws/formulas hidden to the user. However, that means that for air and water you need to make two inlets. On that respect, openfoam is no different.

(2) If your flow is subcritical at the inlet, then the control is your weir so you may be able, using elemental formulas, to calculate the height of the water inlet.

(3) Are the entrance conditions important for the flow IN THE WEIR? Most probably a potential solution up to the vicinity of the weir is enough. Whats the point of simulating recirculating flow of a reservoir?
Santiago is offline   Reply With Quote

Old   December 9, 2018, 17:37
Default Concern with inlet velocity and pressure boundary condition
  #18
Member
 
Akshay Patil
Join Date: Nov 2015
Location: Pune, India
Posts: 34
Rep Power: 10
Akshay_11235 is on a distinguished road
Hello Santiago,
Interesting! I am suspecting the Fluent also employs a similar air and water inlet (just that we cannot know). The problem I am solving with OpenFOAM has already been modeled in fluent and I have had really good results (4% error margin with experimental studies) good enough considering I used a desktop to do everything. That aside, my issue with solving free surface flows is as follows:


1. The only information I have to model the system are the water levels upstream and downstream of the weir. I have tried a variety of boundary conditions for the inlet and nothing seems to work. In interFoam, the pressure boundary condition is specified using the p_rgh value, and I am not sure which boundary condition should I use so that the hydrostatic pressure stays as initialised (see initialConditions.png) and the velocity is calcualted according to the out flow condition. I have no velocity information, as a result, I would like velocity at the inlet to be computed (by openfoam). In my opinion, the problem is that, if I initialise the inlet velocity as fixedValue uniform (0 0 0), then there is no incoming flux, this basically just becomes just a tank draining problem. That is not what I want. I want the out going flux to be maintained at the inlet with the correct velocity computed as a result.



2. My aim is to assess the discharging capacity of the structure. As a result, I cannot impose a discharge condition (or velocity condition) at the inlet. I have attached the most stable (non-converging) boundary conditions for the inlet and the outlet (See 0.zip). Right now I am using phaseHydrostaticPressure. The reference point for the pressure is taken just below the free surface level that should be sustained in the long term.


3. As you point out, I have not used a split inlet for water and air in this case. The entrace condition are important as the flow near the inlet region is of interest, especially to design the bottom profiles.


To summarise, I want to understand which inlet and outlet pressure condition should I use in OpenFOAM to replicate what I get in Ansys-Fluent. In Fluent, I used pressure inlet at the inlet with open channel flow selected. The outlet condition was simply pressure outlet with gauge pressure 0. I am trying to look for the right BC's in OpenFOAM to the best of my capabilities, however, I have not had any success.



I am wondering if there is something fundamentally wrong in my approach to setup the model. Looking forward to hearing from you about this.



Thanks a lot for the comments and suggestions, this particular problem (?) has been a real nightmare for me for the past two weeks now.
Attached Images
File Type: png initialCondition.png (1.4 KB, 65 views)
Attached Files
File Type: zip 0.zip (14.4 KB, 29 views)
Akshay_11235 is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Surface reaction boundary condition Raph OpenFOAM Running, Solving & CFD 3 June 19, 2013 12:24
Fan Boundary Condition OR Fixed Values or Source Terms SolarX FLUENT 1 June 9, 2011 04:13
[Gmsh] Import problem ARC OpenFOAM Meshing & Mesh Conversion 0 February 27, 2010 10:56
Boundary condition setting for water hammer proble yizhou FLUENT 1 October 12, 2007 12:16
boundary condition at free surface mike Fidelity CFD 3 June 8, 2006 06:23


All times are GMT -4. The time now is 22:53.