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

Setting BCs for Riverine Flows using Interfoam

Register Blogs Community New Posts Updated Threads Search

Like Tree21Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 2, 2013, 06:59
Default manning's roughness coefficient in OpenFoam
  #21
New Member
 
ali naqi mohammadi
Join Date: Dec 2012
Posts: 6
Rep Power: 13
ali naqi is on a distinguished road
Quote:
Originally Posted by trinath2rao View Post
Dear Foamers,

I am working on dambreak flow in an open channel. can any one help me how to specify manning's roughness coefficient in OpenFoam.

I checked manual and code, no success.

Is there anyway to specify bottom friction in OpenFoam ?

Thank You in advance.

Regards,
Trinath Rao
hi ,in the OF you should obtain roughness effect by Ks and Cs. you may find them in nut. for example:
walls
{
type nutkRoughWallFunction;
value uniform 0;
Ks uniform .0014;
Cs uniform .5;
}
ali naqi is offline   Reply With Quote

Old   April 25, 2014, 11:47
Default
  #22
New Member
 
Benjamin
Join Date: Apr 2014
Location: Zürich
Posts: 27
Rep Power: 12
Benji is on a distinguished road
Hey all,
I'm working at a similar problem at the moment and hope anyone could help me. I have a free surface flow channel with a narrowing. Like before I want to give the inlet velocity (here 0.5 m/s), but I need to give a predefined outlet-pressure somehow (because I need to be able to calculate for a given water elevation at the outlet).

I thought I couldn't define a pressure for the whole outlet, so I chose to define it only at the bottom of the river bed (over the last m of the channel before the outlet). The idea was to be able to give a certain hydrostatic pressure at the ground, which should define the water level.
  • Inlet: alpha = fixedValue (1), U = fixedValue (0.5 0 0), p_rgh = fixedFluxPressure (0)
  • Outlet: alpha = inletOutlet (0), U = pressureInletOutletVelocity (0 0 0), p=fixedFluxValue (0)
  • Outlet (bottom): p = phaseHydrostaticPressure;
    phaseName alpha.water;
    rho 1000;
    pRefValue 3000;
    pRefPoint (0 0 0);
    value uniform 0;
I wasn't sure how to define that, has anyone ever tried this or would do it for me? Or are there other solutions? I also get problems with alpha reflecting at the outlet sometimes...

Casefiles (currently negative x-axis, to avoid the problem of reflecting -.-):


Thanks and have a nice WE,
Benji
Benji is offline   Reply With Quote

Old   November 5, 2014, 07:07
Default fixed depth water at outlet
  #23
New Member
 
ali naqi mohammadi
Join Date: Dec 2012
Posts: 6
Rep Power: 13
ali naqi is on a distinguished road
for implementation of fixed depth at outlet, first you should divide the mesh block into two blocks: one with height of the outlet depth and the other for air.
so we will have two outlet: waterOutlet and airOutlet.
zeroGradient boundary condition for waterOutlet .
atmosphere boundary condition for airOutlet.
Mahmoud Abbaszadeh likes this.
ali naqi is offline   Reply With Quote

Old   November 5, 2014, 08:17
Default
  #24
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
Hi Benji,

have you tried just
outlet
{
type buoyantPressure;
value uniform 0;
}
for p_rgh ?
vonboett is offline   Reply With Quote

Old   November 10, 2014, 05:49
Default
  #25
New Member
 
Antonio
Join Date: Jan 2013
Posts: 11
Rep Power: 13
avigrod is on a distinguished road
Hi Benji,

Have you tried Kflora suggestion. I have used in some steady open flows succesfully. I would suggest to enlarge the end of the channel to reduce influence of using a uniform 1D velocity profile.

Her suggestion is to use a fixed velocity bc of water flow rate input/ water depth aim. Being it applied to all the outlet surface (water and air)



Quote:
Originally Posted by Benji View Post
Hey all,
I'm working at a similar problem at the moment and hope anyone could help me. I have a free surface flow channel with a narrowing. Like before I want to give the inlet velocity (here 0.5 m/s), but I need to give a predefined outlet-pressure somehow (because I need to be able to calculate for a given water elevation at the outlet).

I thought I couldn't define a pressure for the whole outlet, so I chose to define it only at the bottom of the river bed (over the last m of the channel before the outlet). The idea was to be able to give a certain hydrostatic pressure at the ground, which should define the water level.
  • Inlet: alpha = fixedValue (1), U = fixedValue (0.5 0 0), p_rgh = fixedFluxPressure (0)
  • Outlet: alpha = inletOutlet (0), U = pressureInletOutletVelocity (0 0 0), p=fixedFluxValue (0)
  • Outlet (bottom): p = phaseHydrostaticPressure;
    phaseName alpha.water;
    rho 1000;
    pRefValue 3000;
    pRefPoint (0 0 0);
    value uniform 0;
I wasn't sure how to define that, has anyone ever tried this or would do it for me? Or are there other solutions? I also get problems with alpha reflecting at the outlet sometimes...

Casefiles (currently negative x-axis, to avoid the problem of reflecting -.-):


Thanks and have a nice WE,
Benji
avigrod is offline   Reply With Quote

Old   January 11, 2016, 02:17
Default
  #26
Member
 
Fatemeh
Join Date: Dec 2015
Location: Isfahan,Iran
Posts: 39
Rep Power: 11
fatemehfarshi62 is on a distinguished road
Hi every one!
I have a similar problem.
I have a 3D open channel which has a curved route. I want to enter a fully developed flow in the inlet and don't know how it will be at the outlet.
can any one tell me what are the right boundary conditions for inlet, outlet and free surface? thanks a lot.
Bashar likes this.
fatemehfarshi62 is offline   Reply With Quote

Old   February 11, 2017, 13:50
Default
  #27
Member
 
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 11
Bashar is on a distinguished road
Quote:
Originally Posted by fatemehfarshi62 View Post
Hi every one!
I have a similar problem.
I have a 3D open channel which has a curved route. I want to enter a fully developed flow in the inlet and don't know how it will be at the outlet.
can any one tell me what are the right boundary conditions for inlet, outlet and free surface? thanks a lot.
Hi,

I am facing similar issues, I am working of flow past plate . Did you mamnge to make this work for you ?
Bashar is offline   Reply With Quote

Old   February 12, 2017, 00:42
Default
  #28
Member
 
Fatemeh
Join Date: Dec 2015
Location: Isfahan,Iran
Posts: 39
Rep Power: 11
fatemehfarshi62 is on a distinguished road
Quote:
Originally Posted by Bashar View Post
Hi,

I am facing similar issues, I am working of flow past plate . Did you mamnge to make this work for you ?

Hi! for velocity, enter flowRateInletVelocity for inlet and inletOutlet for outlet.
for Pressure, zeroGradient for inlet and fixedValue for outlet.
Bashar likes this.
fatemehfarshi62 is offline   Reply With Quote

Old   February 12, 2017, 00:50
Default Setting BCs for Riverine Flows using Interfoam
  #29
Member
 
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 11
Bashar is on a distinguished road
Quote:
Originally Posted by fatemehfarshi62 View Post
Hi! for velocity, enter flowRateInletVelocity for inlet and inletOutlet for outlet.
for Pressure, zeroGradient for inlet and fixedValue for outlet.


Thanks a lot for the info.Will be ok for you to share the case file ?
But thanks anyway,I will try your BC.I am using single inlet patch,I saw some cases where they use two separate inlet patches,one for air and the other for water. Did you use single inlet?


Thanks

Sent from my iPhone using CFD Online Forum mobile app

Last edited by Bashar; February 14, 2017 at 14:35.
Bashar is offline   Reply With Quote

Old   February 12, 2017, 01:23
Default
  #30
Member
 
Fatemeh
Join Date: Dec 2015
Location: Isfahan,Iran
Posts: 39
Rep Power: 11
fatemehfarshi62 is on a distinguished road
Quote:
Originally Posted by Bashar View Post
Thanks a lot for the info.Will be ok for you to share the case file ?
But thanks anyway,I will try your BC.I am using single inlet patch,I saw some cases where they use two separate inlet patches,one for air and the other for water. Did you use single inlet?



Sent from my iPhone using CFD Online Forum mobile app
No, I just have one inlet.
Bashar likes this.
fatemehfarshi62 is offline   Reply With Quote

Old   February 12, 2017, 01:29
Default
  #31
Member
 
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 11
Bashar is on a distinguished road
Quote:
Originally Posted by fatemehfarshi62 View Post
No, I just have one inlet.


Thanks , I will try it .


Sent from my iPhone using CFD Online Forum mobile app
Bashar is offline   Reply With Quote

Old   February 14, 2017, 16:18
Default
  #32
Member
 
Bashar
Join Date: Jul 2015
Posts: 74
Rep Power: 11
Bashar is on a distinguished road
Quote:
Originally Posted by fatemehfarshi62 View Post
Hi! for velocity, enter flowRateInletVelocity for inlet and inletOutlet for outlet.
for Pressure, zeroGradient for inlet and fixedValue for outlet.
Sorry to bother you again . I have another question, if I used single inlet patch for the channel, is there away to specify the speed of the air? I am currently specifying only one speed which is the water speed.So, the water and the air will have same speed, but I want to know how I can give them different speed while using one inlet patch.

Also, what setting should alpha.water get, i.e. BC.

Bashar

Last edited by Bashar; February 22, 2017 at 11:00.
Bashar is offline   Reply With Quote

Old   September 13, 2018, 08:18
Default Channel Flow Depth outlet BC - resurrected
  #33
New Member
 
Jeff DeGraff
Join Date: Apr 2018
Posts: 3
Rep Power: 8
jdegraff is on a distinguished road
An old post with a lot of good information.

I am modeling a river and would like to know if there are any additional tips on setting the downstream flow depth. I used Kflora's work around for simple rectangular channels but would like to know if there are work arounds for irregular shapes.

Last edited by jdegraff; September 13, 2018 at 09:23. Reason: Wrong title
jdegraff is offline   Reply With Quote

Old   September 13, 2018, 09:26
Default
  #34
Member
 
Honza Höll
Join Date: Mar 2016
Location: Brno, CZ
Posts: 37
Rep Power: 10
indy07cz is on a distinguished road
Maybe a good option is to make river a little bit longer (to the point where results from new cross section dont influence results in the initial location of downstream BC) and there use regular shape.
indy07cz is offline   Reply With Quote

Old   September 18, 2018, 15:13
Default
  #35
New Member
 
Jeff DeGraff
Join Date: Apr 2018
Posts: 3
Rep Power: 8
jdegraff is on a distinguished road
indy07cz - Good suggestion. That worked for most cases.

Now what I am finding is that there isn't a constant inlet flow. I tried setting the inlet alpha to 0 (all water) but found that I still get "separation" in the stream.

Does anyone have any suggestions?
jdegraff is offline   Reply With Quote

Old   September 20, 2018, 12:35
Lightbulb
  #36
New Member
 
Jeff DeGraff
Join Date: Apr 2018
Posts: 3
Rep Power: 8
jdegraff is on a distinguished road
Quote:
Originally Posted by indy07cz View Post
Maybe a good option is to make river a little bit longer (to the point where results from new cross section dont influence results in the initial location of downstream BC) and there use regular shape.
This was a good idea which lead me to another idea. OpenFOAM V2 does not appear to be "good" at determining a proper inlet and outlet boundary condition (fixedFluxpressure, Volumetric Inlet flow) for complex geometries. But it does a decent job for simple geometries such as a rectangle. Thus I added a rectangular channel far enough upstream and downstream so that it doesn't effect the solution. Once I feel comfortable with the results, I will post them.

Again, if there is a better way of defining boundary "open channel flow" boundary conditions, please let me know. I feel that there is a lot of Foamers that deal with this issue.
jdegraff is offline   Reply With Quote

Old   October 19, 2021, 11:38
Default
  #37
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
In case you are using atmosphere boundary conditions for the top, make sure the water does not contact it. Single drops are OK but interFoam can't handle the water/air density difference at the atmospheric boundary condition.
vonboett is offline   Reply With Quote

Old   October 19, 2021, 11:44
Default
  #38
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
Quote:
Originally Posted by jdegraff View Post
This was a good idea which lead me to another idea. OpenFOAM V2 does not appear to be "good" at determining a proper inlet and outlet boundary condition (fixedFluxpressure, Volumetric Inlet flow) for complex geometries. But it does a decent job for simple geometries such as a rectangle. Thus I added a rectangular channel far enough upstream and downstream so that it doesn't effect the solution. Once I feel comfortable with the results, I will post them.

Again, if there is a better way of defining boundary "open channel flow" boundary conditions, please let me know. I feel that there is a lot of Foamers that deal with this issue.

By the way, I use fixedFluxPressure with complex inlet geometries, combined with fixedValue at the inlet and inletOutlet at the outlet for U. For the atmospheric top I use totalPressure with the corresponding settings and pressureInletOutletVelocity. It works well for mountain torrents
Mahmoud Abbaszadeh likes this.
vonboett is offline   Reply With Quote

Old   July 27, 2022, 07:51
Default
  #39
Member
 
Mahmoud
Join Date: Nov 2020
Location: United Kingdom
Posts: 43
Rep Power: 6
Mahmoud Abbaszadeh is on a distinguished road
Quote:
Originally Posted by ali naqi View Post
for implementation of fixed depth at outlet, first you should divide the mesh block into two blocks: one with height of the outlet depth and the other for air.
so we will have two outlet: waterOutlet and airOutlet.
zeroGradient boundary condition for waterOutlet .
atmosphere boundary condition for airOutlet.
Have you tried this actually? This has not solved the problem in my case
Mahmoud Abbaszadeh is offline   Reply With Quote

Reply

Tags
interfoam, openfoam, river, vof


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
Setting up interFoam for sloshing santiagomarquezd OpenFOAM Running, Solving & CFD 2 August 11, 2017 05:08
[ICEM] Setting the BCs sreekargomatam ANSYS Meshing & Geometry 1 July 12, 2011 20:28
Cells with t below lower limit Purushothama Siemens 2 May 31, 2010 22:58
BC's for free flows kev FLUENT 0 November 9, 2005 00:02
Warning 097- AB Siemens 6 November 15, 2004 05:41


All times are GMT -4. The time now is 08:48.