|
[Sponsors] |
September 25, 2018, 04:52 |
Pressure bc in 2 phase flow channel
|
#1 |
New Member
Alex
Join Date: Sep 2018
Posts: 4
Rep Power: 7 |
Hi all,
I'm new to open foam, however not new to fluid simulation. I was working on wave energy converters some years ago. Now, for a spare time project, I'd like to delve into open foam multiphase simulation (submerged structure in flow channel). I worked through the tutorials to get an overall impression and now am setting up a flow channel mainly based on the dambreak turorial, having a look also into other tutorial use-cases that come with open foam (great work, by the way!). I have several questions, but will start with my main concern: setting the pressure boundary conditions. I read and tested a lot, but can not achieve sensible results. Perhaps someone could give me a hint. I first want to setup the flow channel only: I have the following velocity boundary conditions (which I think are Ok): Code:
FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { leftInlet { type fixedValue; value uniform (8.333 0 0); //8.333=30m/s } rightOutlet { type zeroGradient; } lowerWall { type noSlip; } atmosphere { type pressureInletOutletVelocity; value uniform (0 0 0); } defaultFaces { type empty; } } Code:
FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { leftInlet { type zeroGradient; } rightOutlet { type fixedValue; value uniform 0; } lowerWall { type zeroGradient; } atmosphere { type zeroGradient; } } Code:
FoamFile { version 2.0; format ascii; class volScalarField; object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 0; boundaryField { leftInlet { // type fixedFluxPressure; // value pressureInletOutletVelocity; //type fixedFluxPressure; //value uniform 0; // type fixedValue; // value uniform 0; type zeroGradient; } rightOutlet { //type freestream; type fixedValue; value uniform 0; //type fixedFluxPressure; //value pressureInletOutletVelocity; } lowerWall { type fixedFluxPressure; value uniform 0; } atmosphere { type totalPressure; p0 uniform 0; } defaultFaces { type empty; } } // ************************************************************************* // A related question: I use one inlet / outlet patch for air/water in total, as both fractions should have the same inlet velocity. Is this ok? Thank you a lot Alexander |
|
September 27, 2018, 01:27 |
|
#2 |
New Member
Alex
Join Date: Sep 2018
Posts: 4
Rep Power: 7 |
Hi all,
I see I should have been more specific, sorry for that. First of all I use: openfoam on linux - v1806 solver: interFoam laminar For the inlet (left side in the above figure), i have two patches one 'inlet' at the bottom for water, the other 'inletAir' for air. They have the same boundary conditions regarding U and p_rgh: U Code:
inlet { type fixedValue; value uniform (8.333 0 0); //8.333=30m/s } inletAir { type fixedValue; value uniform (8.333 0 0); //8.333=30m/s } Code:
inlet { type zeroGradient; } inletAir { type zeroGradient; } Code:
inlet { type fixedValue; value uniform 1; } inletAir { type fixedValue; value uniform 0; } and it develops as intended (1.5s later): I also checked the velocities of the inlet air / water inlet everything looks as expected. However, I can not manage the outlet such that the water/air flows out. E.g. (after 6s): 8s There is a velocity of 4.x m/s in x (normal to the outlet), which is about 1/2 of the inlet velocity (8.33m/s) and a y-component (to the top) of 3.x m/s -> looks like a partial permeable wall leading to water rising and partly flowing out via the top atmosphere patch. I use: U Code:
outlet { type zeroGradient; } outletAir { type zeroGradient; } Code:
outlet { type fixedValue; value uniform 0; } outletAir { type fixedValue; value uniform 0; } Code:
outlet { type inletOutlet; inletValue uniform 0; } outletAir { type inletOutlet; inletValue uniform 0; } Regarding alpha.water I'm unsure. Any hint about where the meaning of the options inletValue, Value etc. are explained? I can find the listing of bc in the manual, however all the options per bc are not explained. One option could be to use an outlet with the same fixed velocity as the inlet (in the stream channel, mass conservation holds (in mean what comes in must get out). However, when having submerged structures, there might be some surface waves which might lead to velocities not exactly equal to 8.3 m/s across the outlet - or not? And the alpha.water might change across the outlet when waves crossing (e.g. part of the 'air' zone might be occupied by water). As far as I can see, if setting alpha.water bc on the outlet patch, I fix the value there - not? Any idea how to configure the outlet to get what I want? Thanks Alex |
|
June 12, 2019, 06:50 |
One hint maybe
|
#3 |
New Member
Martin
Join Date: Aug 2017
Posts: 1
Rep Power: 0 |
I also have Problems to run a stable Modell whenn it Comes to 2 Phase open channel flow.
For the Alpha file: if you have a seperate outlet for water, i think you should put Alpha = 1 there. Same for the inlet. I use only one outlet patch with Zero Gradient for Alpha and 2 inlet Patches with Alpha = 1 for water and Alpha = 0 for air. I hope this could help. If I dont forgett i will put the files in here later on. |
|
May 8, 2020, 20:25 |
why 8.333 is euqal to 30 m/s?
|
#4 |
New Member
Mario
Join Date: Apr 2020
Posts: 3
Rep Power: 6 |
I am not sure why you introduced 8.333 as 30 m/s.
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Review: Reversed flow | CRT | FLUENT | 1 | May 7, 2018 05:36 |
static vs. total pressure | auf dem feld | FLUENT | 17 | February 26, 2016 13:04 |
Pressure contours in two compressible phase flow | Hershey | Fluent Multiphase | 1 | June 6, 2014 07:41 |
gas-liquid 2 phase flow in microchannels using VoF | LyngHoo | FLUENT | 1 | November 13, 2012 19:01 |
Channel flow: Inlet pressure AND uniform velocity? | frmap1 | Main CFD Forum | 0 | April 15, 2010 10:32 |