CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   mass flow split BC (http://www.cfd-online.com/Forums/openfoam-solving/109685-mass-flow-split-bc.html)

kpax November 23, 2012 11:52

mass flow split BC
 
Fellow FOAMers,

i am currently simulating the flow in a tube with one inlet and two outlets. In Fluent, there is a mass flow split BC (http://hpce.iitm.ac.in/website/Manua...ug/node246.htm):
if you set, e.g., 0.5 for both outlets, the inlet flow will be split to 50% for each outlet (no matter what the geometry looks like).

Does something like that exist in OF? I couldn't find anything... maybe it could be built from flowRateInletVelocity?


Any help or advice is appreciated.

kpax

gschaider November 23, 2012 14:02

Quote:

Originally Posted by kpax (Post 393861)
Fellow FOAMers,

i am currently simulating the flow in a tube with one inlet and two outlets. In Fluent, there is a mass flow split BC (http://hpce.iitm.ac.in/website/Manua...ug/node246.htm):
if you set, e.g., 0.5 for both outlets, the inlet flow will be split to 50% for each outlet (no matter what the geometry looks like).

Does something like that exist in OF? I couldn't find anything... maybe it could be built from flowRateInletVelocity?


Any help or advice is appreciated.

I don't think there is something built in (but I'm willing to be taught differently).
Such a boundary condition (or something more flexible;) ) can be constructed with groovyBC from the swak4Foam-suite which allows boundary conditions to access the values on other patches

kpax November 26, 2012 07:59

ok...

does someone know then how the mass flow split BC is implemented in FLUENT?

I would think that the easiest way would be to adjust the pressure at the outlets in a way that ensure the prescribed mass flow split, but i'm not sure how that could be done.
Or maybe modify the outlet velocities? That seems difficult to me because they can have arbitrary profiles..

vainilreb November 27, 2012 07:52

Well there is the mass flow BC for the inlet which calculates the velocity by the mass flow and the density. Maybe you could simply take the formula of this BC to calculate the flux over the inlet and then simply set your outlet BC with the mass flow BC, but half of the inlet mass flow.

Does this help you?

kpax November 27, 2012 09:25

well, that was my first idea too, but as far as i understand flowRateInletVelocity, it sets a uniform velocity profile at the patch (be it outlet or inlet). at the outlet, however, i certainly have a developed velocity profile, so using this BC would not give a correct solution.

any other ideas?

vainilreb November 27, 2012 09:39

If you know your inlet mass flow, you could calculate the outlet mass flow for each pipe and assume the velocity profile to be a fully developed turbulent or laminar profile... Afaik this should be implementable using Swak4Foam or groovyBC, you just have to calculate the radial gradient of the velocity.

But then this would influence the flow behaviour upstream the outlets, too. :/

Or maybe you could specify a pressure at the outlets so that the flow departs itself in two equivalent mass flows? I think knowing the real setup you're trying to simulate would help finding the best solution!

kpax November 27, 2012 09:49

hey vainilreb, thx for the swift answer!


Quote:

Originally Posted by vainilreb (Post 394401)
If you know your inlet mass flow, you could calculate the outlet mass flow for each pipe and assume the velocity profile to be a fully developed turbulent or laminar profile... Afaik this should be implementable using Swak4Foam or groovyBC, you just have to calculate the radial gradient of the velocity.

the velocity profiles at the oulets are not fully developed (i.e., parabolic), because the geometry right before the outlets is curved. so assuming anything about the velocity profile will probably give false results, imo.


Quote:

Originally Posted by vainilreb (Post 394401)
Or maybe you could specify a pressure at the outlets so that the flow departs itself in two equivalent mass flows? I think knowing the real setup you're trying to simulate would help finding the best solution!

how could this pressure be set? the simulation is transient, with a varying velocity inlet profile, so the pressure values that give the correct flow split would have to be calculated for each time step..
i could create a new solver that iteratively calculates these pressure values for every time step by applying PISO repeatedly and adjusting the p values. but i think that would be quite time-consuming, and since a simple mass flow split BC exists in fluent, i thought there must be an easier way?

vainilreb November 27, 2012 10:07

I would have made a first try by setting the pressure as fixedValue, but even then it's a tough task finding the right pressure level. I would have tried keeping pi*rē*p equal for both outlets. You could set the pressure at the smaller outlet equal to ambient pressure and calculate the pressure at the larger outlet from this value. But I can't say if it will work.

Can you give more information on flow past the outlets? If you get two equal mass flows in reality, this must result from something?

Physically you must realize an equal pressure loss from inlet to outlet1 and from inlet to outlet2... Or setup a pressure acting against the flow direction, which equals the difference in pressure loss.

gschaider November 27, 2012 10:56

Quote:

Originally Posted by vainilreb (Post 394373)
Well there is the mass flow BC for the inlet which calculates the velocity by the mass flow and the density. Maybe you could simply take the formula of this BC to calculate the flux over the inlet and then simply set your outlet BC with the mass flow BC, but half of the inlet mass flow.

But resist the temptation to fix the mass flux on the other outlet too. Fixing the velocity on all boundaries usual ends in tears (violated mass conservation)

vainilreb November 27, 2012 11:02

But it's be possible to fix all three pressure levels to get the desired mass flow without bursting into tears, does it?

gschaider November 27, 2012 13:43

Quote:

Originally Posted by vainilreb (Post 394432)
But it's be possible to fix all three pressure levels to get the desired mass flow without bursting into tears, does it?

Well. If you know the pressure that is necessary to get a specific mass flow then the question is: why do you want to do CFD in the first place. Because it seems that your system is simple enough to be treated with a Bernoulli equation

vainilreb November 29, 2012 04:34

Sounds reasonable... But I'm afraid it won't help kpax to list all the things that will NOT work? :rolleyes:

gschaider November 29, 2012 05:51

Quote:

Originally Posted by vainilreb (Post 394816)
Sounds reasonable... But I'm afraid it won't help kpax to list all the things that will NOT work? :rolleyes:

OK. To summarize. What I'd do (it would need a bit of playing):

- inlet: fixed velocity, p zeroGradient
- outlet1: fixed p. U inletOutlet
- outlet2: p zeroGradient. U mass flow set to x% of inlet

outlet2 for a first test could be a simple fixedValue with a calculated value. Later a groovyBC that gets the MF from the inlet. If you want a developed profile at the outlet you might use groovyBC to rescale the velocity on the outlet, but that might be a bit tricky: a) during startup b) if you have backflow. Underrelaxation might be your friend

kpax November 29, 2012 11:30

thx guys, I'll think I will try to implement both your idea and a pressure-adjusting solver - we'll see what works best! :>


All times are GMT -4. The time now is 05:56.