Setting BCs for Riverine Flows using Interfoam
5 Attachment(s)
Hi Foamers,
I am wanting to model open channel flow for a river and am unsure of the best means to define the inlet and outlet boundary conditions using VOF. With rivers one typically has the inflow rate and downstream water surface elevation (WSEL) defined as known values. Using interFoam with OpenFoam 2.1.x, I can generate a specified flow rate using funkySetBoundaryFields by creating a known area at the inlet by setting alpha =1 and using a fixed velocity so long as I make sure that this area is fully submerged under water. However, I am not sure the best way to "fix" the downstream depth given that it is free surface flow. Using a zeroGradient for the velocity at the outlet leads to the water surface changing due to changes in the calculated velocites from the initial values near the outlet. I have had some success duplicating my inlet approach described above at the outlet as well (fixed area, fixed velocity) so that my Flow In must equal my Flow Out. To clarify my approach, I have attached a screen shot showing my outlet condition for a simplified geometry of a contracted bridge crossing. If I set my initial water surface using setFields, then the total volume of water in the system is constant though the water surface may adjust locally within the system which is OK. This approach seems to work (sometimes, but other times it seems to be unstable); however, I understand that one normally prescribes the velocity (or flow rate) at the inlet and pressure at the outlet. Because my case uses VOF, I'm not sure if or how one can specify a pressure at the outlet to control the water surface elevation. Any thoughts on how to use pressure at the outlet to achieve my goal of having a fixed WSEL or any other suggested changes that I could make to the BCs would be very helpful. I have included my basic files if you wold like to see the specifics. Thanks in Advance.:) |
hello,
I would set zeroGradient for pressure outlet, and for alpha, set outlet as calculated. You should also try LTSInterFoam, since it does work well and are much faster. regards, olivier |
hi kflora:
I have the same problem as you, do you solver your problem now? If solved, could you show me the suitable boundary condition? Thank you! bojiezhang |
Quote:
indeed you can, I currently use: inletOutlet with inletValue uniform 0 for alpha1; totalPressure equals to 0 (same as the atmosphere) for p_rgh; pressureInletOutletVelocity for U; It works very well and apparently it does not disturb the internal behavior (I have a plunging wave crossing it and its shape does not change) Pablo |
Quote:
Hi Pablo: I think you may misunderstand the question, we are not sure how to set the outflow boundary, not the surface boundary condition. So if you have any idea to simulate the channel flow with the right outflow boundary condition? Thank you! bojiezhang |
Sorry, I misunderstood.
I may have a custom BC which may be applied for it. It is based on active wave absorption. Tell me your desired in and out water levels, and the inlet velocity and I will see what can I do. Pablo |
Quote:
Hi Pablo: I want to model the channel flow using interFoam in the laminar condition. I want to set a velocity in the inflow boundary, use outflow boundary to maintain the water level. I have tried all the methods mentioned in the forum, but still can not find a satisfied one. The water level in the channel either rises up or descends. I do not know how to set a right outflow boundary. Could you give me some advice? Thank you! bojiezhang |
freeSurfacePotentialFoam
Hi foamers,
someone of you have tried to use the new solver freesurfacepotentialFoam? If yes could you help me setting up a simple problem like eg dambreak of interFoam Tutorial or flow in a channel ? Thanks in advance |
Quote:
Pablo |
5 Attachment(s)
Quote:
I have also set up the same simulation using LTSInterform which also works quite well for this case.:) My problem at this point seems to be moving from the simple geometry of a contracted opening into a more natural river geometry. I have yet to be able to get either interFoam or LTSInterFoam to not blow up for this case. Attached are a few files showing the problem. As you can see, I have a high velocity near the surface at the outlet. I am using 1. The same specified area and magnitude for the velocity at both the inlet and outlet 2. Alpha is calculated at the inlet and outlet 3. Buoyant Pressure at the Inlet and zeroGradient Pressure at the Outlet Any ideas?:confused: |
Quote:
I used the same settings for VOF channel flow using interFoam always working fine with OF 1.7.1, but since I changed to OF 2.1.x with the new interFOAM using PIMPLE instead of PISO the alpha1 phase gets reflected at the outflow instead of leaving the domain. Any hints? |
2 Attachment(s)
Ok turning old searching the cause of alpha1 being reflected at the outflow, I finally got it. Maybe this is a bug dependent on ubuntu version, but it is quite relevant. The difference between the two pictures below showing an outflow of a channel is only that I moved the grid from positive x quadrant to negative x quadrant. When the whol gid lies at a position that the x-coordinates are smaller than 0 the outflow works! Maybe this should be reported.
|
Can you post your case so we can look at it and try it?
|
no outlet in interFoam dependent on outlet location in coordinate system
2 Attachment(s)
Shure, here are the two cases. The flume is parallel to the x-Axis, the g-acelleration corresponds to a 30° inclined flume accelerating the alpha phase towards the outlet. I removed the constant folder and yust placed blockMesh, g and transportProperties in the case folder to limit file size.
Since I have already lost a lot of time with it, I have to stop now searching for the reason and just continue my work with all simulations having vertices with x-coordinates < 0. Could you tell me if it shows the same on your machine? If so I will submit a bug report. Thanks, Albrecht |
I used for p_rgh at the outlet outletInlet outletValue uniform 0, if I change it to zeroGradient in p_rgh this reflection of alpha1 does not show anymore. Anyway I would be happy for a good explanation, why a grid translation from negative to positive coordinate system quadrant can cause such behavior.
|
Specifying Friction Coefficient in OpenFoam
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 |
Solved: Outlet BC
The solution that I discovered seems quite simple for the outlet BC. In short, by prescribing a known flow rate at the inlet (either via the flow or GroovyBC), one then determines the required average velocity at the outlet corresponding to ones desired depth and specifies this as a fixedValue for the entire outlet (air and water). Alpha can remain zeroGradient and pressure can be set to buoyant pressure.
This BC works quite well as it will converge to the desired WSEL regardless of the initial conditions. I has worked well for a number of cases and seems to not over prescribe the boundaries. In essence, by setting V at the outlet, Qout can vary which will lead to convergence since if the WSEL is higher than desired, Qout > Qin and so the water volume in the system will decrease and hence, the water surface will also decrease at the outlet until the inflow is equal to the outflow. Similarly, if the water surface is too low at the outlet, it will necessarily increase the storage in the system and adjust the water surface to where one wants it to be. Here is a link showing a case where the channel is initially dry and fills to the desired level. Here is a link to a case showing the setup for a case and which has an initial WSEL higher than desired. |
Quote:
how does this affect the pressure distribution at your ourflow BC? Do you introduce underpressure this way, causing an acceleration towards the outflow? If your channel system has high differences in elevation, I wonder how to use pRefValue if at all, to get a p_rgh that makes sense. I use pressureInletOutletVelocity for U at the outlet or inletOutlet inletValue uniform (0 0 0), I think the outflow should be driven by the flow due to gravity, viscosity and channel roughness, don't you disturb this system by introducing an outflow flow rate, such that your water level at the outflow is not representing the true situation? Of course, if your downstream region is not of interest, this is fine in supercritical flow. |
Albrecht,
You raise some interesting points which I have entirely thought through. For my purpose, typically the water depth at the outlet is a known value in subcritical flow and may be influenced by the factors you mentioned (gravity, roughness and viscosity), but also by factors beyond the boundaries of the simulation such as backwater caused by roadways, bridges, bends, etc. In other words, the outlet depth will likely not be at normal depth. It is for this nonuniform flow case that you actually want to "disturb the system" to generate the physically correct flow depth at the outlet. Regardless, if the depth is known or provided, then the average velocity which I am proposing to use at the outlet cross-section will be by definition correct - though, granted, the velocity distribution vertically and horizontally will not be right since I am using a singe velocity for the entire cross-section. Hopefully, this distribution error is not too critical since my outlet is far away from the point of interest anyway. In theory, one could improve my solution by creating a custom BC condition which would provide a paraboic velocity profile vertically and adjust its average velocity horizontally for depth such that the average velocity would still provide the same effect I propose, but without some of the error/unnatural accelerations to which I think you are making reference. |
outlet boundary condition for interFoam in inlet-driven open channel flow
Quote:
but with type buoyantPressure; // see: interFoam/channelFlow tutorial value uniform 0; for p_rgh at the outlet. |
manning's roughness coefficient in OpenFoam
Quote:
walls { type nutkRoughWallFunction; value uniform 0; Ks uniform .0014; Cs uniform .5; } |
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.
Casefiles (currently negative x-axis, to avoid the problem of reflecting -.-): Thanks and have a nice WE, Benji |
fixed depth water at outlet
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. |
Hi Benji,
have you tried just outlet { type buoyantPressure; value uniform 0; } for p_rgh ? |
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:
|
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. |
Quote:
I am facing similar issues, I am working of flow past plate . Did you mamnge to make this work for you ? |
Quote:
Hi! for velocity, enter flowRateInletVelocity for inlet and inletOutlet for outlet. for Pressure, zeroGradient for inlet and fixedValue for outlet. |
Setting BCs for Riverine Flows using Interfoam
Quote:
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 |
Quote:
|
Quote:
Thanks , I will try it . Sent from my iPhone using CFD Online Forum mobile app |
Quote:
Also, what setting should alpha.water get, i.e. BC. Bashar |
Channel Flow Depth outlet BC - resurrected
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. |
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 - 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? |
Quote:
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. |
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.
|
Quote:
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 |
Quote:
|
All times are GMT -4. The time now is 17:00. |