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

Boundary Condtions for Open Channel Flow with interFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 3 Post By vatavuk
  • 1 Post By vatavuk
  • 3 Post By vatavuk

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 23, 2017, 05:25
Default Boundary Condtions for Open Channel Flow with interFoam
  #1
New Member
 
Livia Adinolfi
Join Date: May 2017
Posts: 15
Rep Power: 8
liviaadi is on a distinguished road
Dear Foamers,

I am a begginer of CFD and OF. I am trying to simulate very simple cases.
Now I am struggling with an open flow channel, using interFoam.
I would like to specify a BC at the inlet for p_rgh in order to have an hydrostatic distribution. I found the option phaseHydrostaticPressure but I was not able to make it works and I didn't find examples of this.
I was wondering if someone used it or if someone knows a different approach.
Many thanks for your help.
liviaadi is offline   Reply With Quote

Old   August 29, 2017, 10:20
Default
  #2
Senior Member
 
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 196
Rep Power: 17
vatavuk is on a distinguished road
Hi Livia,

You don't need to specify a hydrostatic distribution. The variable p_rgh is pressure minus the hydrostatic pressure. So p_rgh is the non hydrostatic part of the pressure.
If you study the tutorials you will notice that the boundary condition fixedFluxPressure is used for all surfaces except for the atmosphere that uses totalPressure boundary condition.

Best Regards,
Paulo
tonnykz, liviaadi and davcrisp like this.
vatavuk is offline   Reply With Quote

Old   August 31, 2017, 07:37
Default
  #3
New Member
 
Livia Adinolfi
Join Date: May 2017
Posts: 15
Rep Power: 8
liviaadi is on a distinguished road
Dear Paulo,

many thanks for your answer. I really appreciate.

I was a bit confused about p_rgh.
I understand that it is the pressure related to the velocity.

My problem is that I would like to start the flow with a water level at the inlet which means a static pressure as boundary condition.
For what I am understanding this is not possible, or it is uncommon. According to the definition of p_rgh the condition that I had in mind to define should be:

inlet
{

type fixedValue;
value uniform 0;

}

Is this correct ?

Even though it seems that the best way to define BC at the inlet is to fix the velocity field rather then the pressure. This is the reason why I was trying the BC variableHeightFlowRateInletVelocity. It seems to work quite well.

Many thanks for your help.
liviaadi is offline   Reply With Quote

Old   August 31, 2017, 10:50
Default
  #4
Senior Member
 
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 196
Rep Power: 17
vatavuk is on a distinguished road
Hi Livia,

I'm not sure when the fixedValue condition should be used. If you look at the tutorials for interFoam you will notice that, at inlet surfaces, three conditions are used for p_rgh: zeroGradient, fixedFluxPressure and fixedValue. The zeroGradient condition can result in convergence problems so it's better not to use it.

To obtain a constant water level at the inlet you could prepare your simulation like it's done in the spillway tutorial that you can find at: https://www.hpc.ntnu.no/display/hpc/...llway+Tutorial

This tutorial is a bit old. You will need to make some adaptations to run it with newer versions of openFOAM.

Best Regards,
Paulo
vatavuk is offline   Reply With Quote

Old   September 1, 2017, 07:11
Default
  #5
New Member
 
Livia Adinolfi
Join Date: May 2017
Posts: 15
Rep Power: 8
liviaadi is on a distinguished road
Dear Paulo,

thanks again.
I was actually studying this tutorial, because this is exactly what I have to simulate for my dissertation.
The problem is that I am trying to understand the different types of BC, to set the correct ones. To this purpose I am exploring a number of cases and I want to compare them with analytical solutions.

Thanks a lot for your help, it is precious.
liviaadi is offline   Reply With Quote

Old   September 1, 2017, 07:56
Default
  #6
Senior Member
 
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 196
Rep Power: 17
vatavuk is on a distinguished road
Hi Livia,

In the 11th Openfoam Workshop there was a tutorial about interFoam and boundary conditions. You may find this tutorial at: https://drive.google.com/drive/folde...eg&usp=sharing

I'm an assistant professor at the University of Campinas, Brasil, and I'm supervising a group of graduate students that are working in the application of CFD in hydraulic structures. We are interested studying possible limitations in the use of CFD in free surface flows, applied to hydraulic applications. I would be interested in knowing more about your work.

Best Regards,
Paulo


Quick Moderator note: Link has been updated. For future reference, please refer to the archive website and look for "Learning how to use free surface flows in OpenFOAM 3.0" here: http://openfoam-extend.sourceforge.n...s/courses.html
GrivalszkiP likes this.

Last edited by wyldckat; May 25, 2022 at 05:47. Reason: See "Moderator note"
vatavuk is offline   Reply With Quote

Old   September 1, 2017, 09:25
Default
  #7
New Member
 
Livia Adinolfi
Join Date: May 2017
Posts: 15
Rep Power: 8
liviaadi is on a distinguished road
Dear Paulo,

thanks a lot.
I am an italian PhD student at Strathclyde University (Glasgow). My hydraulic background I have to say it's not great, since I come from a Structural and Geotechnical Engineering Department. Now I am studying the erosion processes on earth-made embankments (fine grain geomaterials) during overflowing and overtopping. I want to perform a CFD analysis to obtain the shear stresses distributions along the downward slope.

This is the reason why |I have to understan how to set the problem, mainly the boundary conditions. Now I have to start introducing the turbulence properties. Actually I am quite desperate, because I am doing these only for few months and I am not able to understand this BC.

Thanks a lot for your help and I hope that we can share our findings !
liviaadi is offline   Reply With Quote

Old   September 18, 2017, 03:45
Default
  #8
New Member
 
Join Date: Aug 2017
Location: Milan Area, Italy
Posts: 10
Rep Power: 8
Teosim is on a distinguished road
When I simulate over-weir flow I often use a variableHeightFlowRateInletVelocity for U and a zeroGradient for p_rgh at the inlet. I know some may argue with zeroGradient inlet BC but so far it worked well for me.

You could refer to the interFoam weirOverflow tutorial for a quick view.

Please let us know if you find a better setup.
Teosim is offline   Reply With Quote

Old   March 11, 2020, 15:13
Default
  #9
Member
 
Muhammad Kashif Jawad
Join Date: Oct 2019
Location: Pakistan
Posts: 48
Rep Power: 5
mkjmalik is an unknown quantity at this point
hi

i want to know when to use variableHeightFlowRateInletVelocity?
mkjmalik is offline   Reply With Quote

Old   January 22, 2021, 07:20
Default river simulation
  #10
Member
 
Grivalszki Péter
Join Date: Mar 2019
Location: Budapest, Hungary
Posts: 39
Rep Power: 7
GrivalszkiP is on a distinguished road
Quote:
Originally Posted by vatavuk View Post
Hi Livia,

In the 11th Openfoam Workshop there was a tutorial about interFoam and boundary conditions. You may find this tutorial at: https://drive.google.com/drive/folde...eg&usp=sharing

I'm an assistant professor at the University of Campinas, Brasil, and I'm supervising a group of graduate students that are working in the application of CFD in hydraulic structures. We are interested studying possible limitations in the use of CFD in free surface flows, applied to hydraulic applications. I would be interested in knowing more about your work.

Best Regards,
Paulo


Quick Moderator note: Link has been updated. For future reference, please refer to the archive website and look for "Learning how to use free surface flows in OpenFOAM 3.0" here: http://openfoam-extend.sourceforge.n...s/courses.html
Hi Paulo!

This tutorial is really usefull, thank you very much!

However, I have problems with my setup: I want to simulate a fictitious river (2 km long, 300m wide with 1cm/km slope). I have a rectangular mesh with dx=dy=5m, dz=1m. The discharge is 2000 m3/s, for this, I have 5 m downstream water level (so the average velocity is 1,3334 m/s). If I use the suggested BCs from this workshop, water flows out the domain faster than it arrives. Somehow I have to fix the outlet water level. I have already tried everything I found information about, none of them worked correctly.

I need this dummy river model in order to make sure that the estimated velocity profiles and the free surface slope is calculated correctly. I tried plenty of setups without success. In the future I want to place structures in this river to analyze their effects on free surface and velocities.

Do you have any suggestions?

Thank you, in advance!

Peter

Last edited by wyldckat; June 24, 2022 at 05:28. Reason: Updated quote with respective link
GrivalszkiP is offline   Reply With Quote

Old   January 22, 2021, 09:10
Default
  #11
Senior Member
 
Paulo Vatavuk
Join Date: Mar 2009
Location: Campinas, Brasil
Posts: 196
Rep Power: 17
vatavuk is on a distinguished road
Hi Peter,

The tutorial recommends the zeroGradient boundary condition for U. It seems to me that this boundary condition will make the flow critical (Froude = 1) at the outlet.

To have a fixed depth at the outlet, you can try the fixedValue boundary condition for U. The idea is that, since you have a constant inlet flow rate Q, using a constant velocity at the outlet will result in a constant area of liquid at the outlet, because Q=V.A. So you have to choose the value of the velocity V, to have an area A=Q/V, that corresponds to the depth that you want.

Using this boundary condition for U, you must be careful with the outlet boundary condition for p_rgh. The tutorial recommends the use of the fixedFluxPressure, but I’ve seen a case in which this condition crashes the simulation after a few seconds. The problem was resolved using the zeroGradient condition for p_rgh at the outlet.

I hope this helps. Please tell me if this solution works, I'm curious about it.

Best regards,
Paulo
vatavuk 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
3D Windturbine simulation in SU2 k.vimalakanthan SU2 15 October 12, 2023 05:53
CFD analaysis of Pelton turbine amodpanthee CFX 31 April 19, 2018 18:02
Basic Nozzle-Expander Design karmavatar CFX 20 March 20, 2016 08:44
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 06:20
Outlet boundary condition in channel flow solving with interFoam liuzhw OpenFOAM Running, Solving & CFD 0 November 29, 2005 21:07


All times are GMT -4. The time now is 11:27.