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

Channel flow using InterFOAM

Register Blogs Community New Posts Updated Threads Search

Like Tree21Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 11, 2013, 09:28
Default
  #21
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
If you know the downstream water level and want to use it as a boundary constraint, a good approach is the setup of kflora in Setting BCs for Riverine Flows using Interfoam. If you want the outflow flow depth be dependent on your simulation, you can use U: pressureInletOutletVelocity and p_rgh: totalPressure at the outlet because that even allows to have inflow at the outlet if the local pressure field demands it. So this BC is self stabilizing and rise or fall of surface do not occur even in long time runs.
vonboett is offline   Reply With Quote

Old   April 12, 2013, 08:01
Default
  #22
Member
 
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 14
pedroxramos is on a distinguished road
Hi!

I did what you told me: "U: pressureInletOutletVelocity and p_rgh: totalPressure at the outlet" and this happens: https://dl.dropboxusercontent.com/u/...ier9abril3.avi

The problem in the outlet is the same. Do you have any suggestion? Perphaps the problem isn't in the BC of outlet?
pedroxramos is offline   Reply With Quote

Old   April 16, 2013, 16:10
Default
  #23
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
could you tell what values you used for U and p_rgh at the outlet? Upper left in the video shows the free surface with colours representing velocity? Please give aswell your viscosity value and courant number. Is the flow height getting zero at the outlet? U performs with zero gradient at the outlet which makes sense, but the (too high?) acceleration towards the outlet might be due to too high g or due to too small viscosity. Do jou have a no-slip boundary condition for U at the slope?
vonboett is offline   Reply With Quote

Old   April 19, 2013, 13:32
Default
  #24
Member
 
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 14
pedroxramos is on a distinguished road
Hi again! I already solved the problem... it was a bad definition in the mesh (outlet).

but now there is another problem. it seems to be in the inlet. see the video please:

http://www.youtube.com/watch?v=G_dtw...yer_detailpage

how i should define the inlet? i dont want that wave... see this: http://d.pr/i/yhog

Best regards.
pedroxramos is offline   Reply With Quote

Old   April 22, 2013, 05:35
Default
  #25
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
...I guess you have a noSlip boundary condition at the sidewalls which conflicts a bit with your fixed value inlet. I suggest a short block with full slip boundary conditions between your inlet and the channel simulation, that allows a velocity profile to develop over a certain distance. And for turbulence modelling it might make sense to grade the mesh such that you get finer mesh resolutions close to the walls, especially if you want to switch to LES or hybrid URANS/LES (I recommend LeMoS openFOAM extensions for this)
sail and pedroxramos like this.
vonboett is offline   Reply With Quote

Old   April 23, 2013, 06:57
Default
  #26
Member
 
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 14
pedroxramos is on a distinguished road
Hello Albrecht!Thanks for your help.

I'm doing a simulation of the flow on a sand bed with glass sidewalls. Does it make sense impose slip condition on sidewalls? Or should I only put that condition on the smaller block? Can I use swak4foam like an alternative?

Best regards.
pedroxramos is offline   Reply With Quote

Old   April 24, 2013, 05:35
Default
  #27
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 240
Rep Power: 17
vonboett is on a distinguished road
Hi Pedro,

I would apply the slip only at your 'artificial' inlet block. Your setup works because with water the shear gradient can be high enough to allow you to feed a constant inlet velocity at the inlet patch of an inlet cell while demanding a zero velocity on the side or ground patch of the same cell, since finite Volumes solves for the values in the cell centers. I used to model debris flows and that made me use theese inlet blocks that have the inlet patch on one side and full slip patches on all other boundaries. If you want to include the erosion and deposition of the sand behind your pile, I recommend CFDEM-LIGGGHTS like it was used here: http://web678.public1.linz.at/media/...flow_small.pdf
pedroxramos likes this.
vonboett is offline   Reply With Quote

Old   April 24, 2013, 07:59
Default
  #28
Member
 
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 14
pedroxramos is on a distinguished road
Can the mesh in the artigivial inlet block be with less quality (bigger cells) than the other zones?
pedroxramos is offline   Reply With Quote

Old   April 26, 2013, 06:21
Default
  #29
Member
 
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 14
pedroxramos is on a distinguished road
Hi again! Thanks for your help! I did what you told but the problem is still there:

http://www.youtube.com/watch?feature...&v=-LEeX9pFk3Y

What you think?

Regards.
pedroxramos is offline   Reply With Quote

Old   April 26, 2013, 23:29
Default
  #30
Senior Member
 
JR22's Avatar
 
Jose Rey
Join Date: Oct 2012
Posts: 134
Rep Power: 18
JR22 will become famous soon enough
I've seen examples (old Comsol model laminar flow as I remember) in which the flow at the inlet is set as a fully developed parabolic flow with the purpose of not getting it to develop on your computational domain. I don't know if in your case that would solve the problem. Are others (tutorials) using a function and not just a fixed value at inlets?

Last edited by JR22; April 29, 2013 at 23:13.
JR22 is offline   Reply With Quote

Old   May 7, 2013, 10:46
Default
  #31
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 JR22 View Post
I've seen examples (old Comsol model laminar flow as I remember) in which the flow at the inlet is set as a fully developed parabolic flow with the purpose of not getting it to develop on your computational domain. I don't know if in your case that would solve the problem. Are others (tutorials) using a function and not just a fixed value at inlets?
LeMoS at the University Rostock provides an inflow generator for OpenFOAM:
"an inflow generator for synthesis of turbulent fields with prescribed second order statistics using turbulent spot method"

Parabolic profiles can be done with groovyBC
pedroxramos and JR22 like this.
vonboett is offline   Reply With Quote

Old   May 24, 2013, 06:59
Default
  #32
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 vonboett View Post
If you know the downstream water level and want to use it as a boundary constraint, a good approach is the setup of kflora in Setting BCs for Riverine Flows using Interfoam. If you want the outflow flow depth be dependent on your simulation, you can use U: pressureInletOutletVelocity and p_rgh: totalPressure at the outlet because that even allows to have inflow at the outlet if the local pressure field demands it. So this BC is self stabilizing and rise or fall of surface do not occur even in long time runs.
Actually, I was imprecise, pressureInletOutletVelocity together with totalPressure is flux controlled, it is the flux not the local pressure allowing to turn from outflow to inflow.
vonboett is offline   Reply With Quote

Old   June 1, 2013, 12:41
Default considering roughness in channel
  #33
New Member
 
ali naqi mohammadi
Join Date: Dec 2012
Posts: 6
Rep Power: 13
ali naqi is on a distinguished road
hi
i want to model same case, critical depth in outlet and flow rate for inflow
it doesn't work!

on other hand, i should consider problem of roughness obtaining Ks by n'manning.
may you help me a bit?
thanks

Last edited by ali naqi; June 6, 2013 at 10:27.
ali naqi is offline   Reply With Quote

Old   November 6, 2013, 06:29
Default Critical inlet & subcritical outlet to force a hydraulic jump
  #34
New Member
 
arnau1985's Avatar
 
Arnau
Join Date: Jan 2012
Posts: 17
Rep Power: 14
arnau1985 is on a distinguished road
Hi everyone,

Thank you very much for your helpful contributions. I am trying to simulate a similar case, the only difference is that I want to force a hydraulic jump, so the water level imposed at the outlet is significantly higher than that at the inlet (the problem is better explained in the attached scheme). I have tried a lot of combinations of boundary conditions but none of them worked so far.

As it is not exactly the same case your are dealing with I started a new thread: http://www.cfd-online.com/Forums/ope...tml#post460707

Any ideas?

Thanks,

Arnau.
Attached Files
File Type: pdf Hydraulic Jump Scheme.pdf (27.9 KB, 130 views)
arnau1985 is offline   Reply With Quote

Old   March 17, 2014, 22:44
Post
  #35
New Member
 
Youngkook Kim
Join Date: Jul 2013
Location: Singapore and South Korea
Posts: 20
Rep Power: 13
totalart is on a distinguished road
Quote:
Originally Posted by mgdenno View Post
Kevin,

I experienced the problem you describe regarding the water level going up or down at the inlet if the internal velocity was not just right. I have had reasonable success dealing with this by breaking the "inlet" face into two separate patches that I name "inlet" and "aboveInlet" with the top edge of "inlet" patch near the expected water surface elevation. I then set alpha1 = 1 for the "inlet" patch and alpha1 = 0 for "aboveInlet" patch. This is not perfect but is the best I have found so far. I understand that with swak4Foam you can set the height of alpha1 = 1 to be at a specific elevation. I am planning to try this soon, but haven't had a chance to yet.

MD
Hi Matthew,

I have some problem that the free surface level is decreasing. And I'm trying what you suggested but the calculation clashes. When I use one patch at the inlet, everything was okay except the free surface level. But after split the inlet patch for water and air, calculation clashes within 30min. I didn't change anything except the inlet patch and inlet boundary conditions. Do you have this experience or know why it happens?

And another question is what you mean by 'setting alpha1=1 for the inlet and 0 for aboveInlet' is setting the fixedValue at the boundary condition of alpha?
totalart is offline   Reply With Quote

Old   March 19, 2014, 10:14
Default
  #36
Senior Member
 
Matthew Denno
Join Date: Feb 2010
Posts: 138
Rep Power: 16
mgdenno is on a distinguished road
Quote:
Originally Posted by totalart View Post
Hi Matthew,

I have some problem that the free surface level is decreasing. And I'm trying what you suggested but the calculation clashes. When I use one patch at the inlet, everything was okay except the free surface level. But after split the inlet patch for water and air, calculation clashes within 30min. I didn't change anything except the inlet patch and inlet boundary conditions. Do you have this experience or know why it happens?

And another question is what you mean by setting alpha1=1 for the inlet and 0 for aboveInlet' is setting the fixedValue at the boundary condition of alpha?
Hi,

To answer your second question first, yes I was referring to setting the alpha1 value using a fixedValue boundary condition.

Regarding the free surface level decreasing, without knowing anything about your case, I would guess that it may have more to do with your outlet boundary condition than your inlet boundary. If you have a zeroGradient outlet boundary, there is nothing to "hold" the water level up at the initial level, and it may drop. Did you initialize the velocity field using setFields? Depending on your case this may help the free surface stay at the initial level. If you post more information about your case, I (or someone else) may be able to provide more specific thoughts.

What version of OF are you using? Recent versions have some channel flow (waterChannel and weirFlow) examples in the tutorials that may be helpful, and there are also some new inlet boundaries for two phase flow, that I think are used in the tutorials too.

Matt
mgdenno is offline   Reply With Quote

Old   April 23, 2014, 08:51
Default
  #37
New Member
 
Youngkook Kim
Join Date: Jul 2013
Location: Singapore and South Korea
Posts: 20
Rep Power: 13
totalart is on a distinguished road
Hi Matt,

I am late for your reply. I didn't notice. Yes you're right. I realised the problem is related to the outlet condition which affects continuity. When I set the same velocity at the outlet, the problem was resolved. But this is not applicable for all the cases. I was using OF2.1 and I've recently installed OF2.3. I found some useful tutorials and I'm improving my case based on them. Thank you!

Youngkook
totalart is offline   Reply With Quote

Old   June 13, 2015, 15:50
Default
  #38
Senior Member
 
Ehsan Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 18
syavash is on a distinguished road
Quote:
Originally Posted by vonboett View Post
LeMoS at the University Rostock provides an inflow generator for OpenFOAM:
"an inflow generator for synthesis of turbulent fields with prescribed second order statistics using turbulent spot method"

Parabolic profiles can be done with groovyBC
Dear Albrecht,

How is it possible to implement both LeMOS inflow generator and groovy BC simultaneously? I need too apply a boundary layer velocity profile at inlet, on the other hand, I need to implement LeMOS to generate fluctuations at the inlet.
But I do not have any idea how to implement them both at the same time. Could you provide me a brief example??

Regards.
syavash is offline   Reply With Quote

Old   May 24, 2016, 09:59
Default Salome
  #39
New Member
 
Yash Lakhani
Join Date: May 2016
Posts: 2
Rep Power: 0
yash lakhani is on a distinguished road
Can anyone tell me how to create the mesh for open channel flow with air above it. The channel is 0.4 m wide 0.6 m depth and 9 m length. The water is flowing into the channel upto the depth of 0.089m. I want my mesh to be cubic i.e. the channel should be composed of cubic boxes i.e. more no. of elements along the depth and the length as compared to the width. Any help will be great. Thanks in advance.
yash lakhani is offline   Reply With Quote

Old   June 11, 2016, 05:53
Default
  #40
Member
 
Pedro Ramos
Join Date: Mar 2012
Location: Belgium
Posts: 81
Rep Power: 14
pedroxramos is on a distinguished road
Try swak4Foam
pedroxramos 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
interFoam and stratified flow in a pipeline AlmostSurelyRob OpenFOAM 1 February 24, 2011 19:23
boundary conditions for 3D channel flow with heat transfer Aloex FLUENT 1 February 22, 2011 13:28
Open Channel Flow using InterFoam type solver sxhdhi OpenFOAM Running, Solving & CFD 3 May 5, 2009 22:58
Stabilizing turbulence equation in channel flow Biga Main CFD Forum 5 March 22, 2005 21:06
Inviscid Drag at subsonic, subcritical Mach # Axel Rohde Main CFD Forum 1 November 19, 2001 13:19


All times are GMT -4. The time now is 21:28.