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. |
All times are GMT -4. The time now is 18:48. |