CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Setting mass flow rate boundary condition (http://www.cfd-online.com/Forums/openfoam/81412-setting-mass-flow-rate-boundary-condition.html)

maysmech October 26, 2010 11:24

Setting mass flow rate boundary condition
 
Dear Foamers,

How can i define mass flow rate boundary instead of velocity for a case simulation in OpenFOAM?

philippose October 26, 2010 13:41

Hello there,

A Good Evening to you :-)!

To specify a flow rate instead of a velocity, you can use the boundary condition:

flowRateInletVelocity

For an example of how to use it, check the following file in the tutorials folder of OpenFOAM:

/compressible/rhoPimpleFoam/angledDuct/0/U


Hope this helps.

Have a nice day ahead!

Philippose

maysmech October 26, 2010 14:53

Dear Philippose,
Thank you very much for your answer.
two questions:

i think it is suitable for inlet patches, isn't it? i need sth for outlet patch.

if i use it for inlet, in tutorial file P type is set to zeroGradient. can we suppose it in flow which comes from a duct as zeroGradient when (as you know) it has pressure drop across the duct?

Best regards,
Maysam

maysmech October 26, 2010 14:55

And 3rd question:

How can i calculate mass flow rate of a patch by using paraView?

philippose October 26, 2010 18:10

Hi again,

* If I remember right, you can use the flowRateInletVelocity patch as an output simply by changing the sign of the flow rate value, to indicate that it is flowing out of the domain.

* Normally, you cannot specify a fixed velocity (flow rate) and a pressure on the same boundary..... this is why, you need to provide a zeroGradient boundary condition for the pressure when you supply the flow rate as an input parameter. .... I am not sure what you imply by a pressure drop across the input boundary in a duct.

* Paraview has a filter which lets you integrate a variable over a surface (I think the filter is called Surface Flow).... this should give you the flow rate, however, I remember that I had an issue trying to interpret the output of this filter..... try it out anyway.... it basically calculates the dot product of a flow field and the normal vectors of the surface.

Philippose

maysmech November 4, 2010 01:55

As i understand, the flow rate boundary is same as setting a fixed value velocity in the boundary and this is not useful for cases which our velocity profile is not uniform.

philippose November 4, 2010 02:20

Hi,

The question then is, what exactly did you want to do?

a. Specify a uniform flow rate at the input
b. Specify a uniform velocity at the input
c. Specify a non-uniform velocity profile at the input (spatially non-uniform across the input patch)
d. Specify a non-uniform flow rate at the input (spatially non-uniform across the input patch)

In case it was (d), how would you specify the flow rate? would it be the flow rate through each patch element face?

In which case it would be something like specifying a non-uniform velocity profile where v_face = Q_face / A_face

For specifying a parabolic Inlet velocity, you have the boundary condition: "parabolicVelocity"

In addition, you could try to create a customised non-uniform velocity / flow inlet using the "groovyBC" library.

Have a nice day ahead!

Philippose

maysmech November 4, 2010 02:58

Thanks Philippose,
I want it for an outlet patch that is not uniform velocity. for example a T-junction geometry with two different outputs and i want control rate as 20% and 80% in outlets by setting mass flow rate.

Best,

Bernhard December 16, 2011 04:53

Hi Maysam,

Did you ever get this to work? I am also interested in such a boundary condition with a mass flow rate that is dictated, but also keeps in some way the zero gradient condition there.

Spidermohaa August 21, 2013 03:23

I am, too!

linnemann August 21, 2013 03:39

Hi

you can use something lige this (OF22)

for inlet use zeroGradient for outlet use this

Code:

  outlet
    {
        type            flowRateInletVelocity;
        volumetricFlowRate    constant -0.1; // m3/s, negative sign means out of the domain
        value          uniform (0 0 0);
    }


Dadou February 6, 2014 03:37

Hi,

Quote:

Originally Posted by linnemann (Post 447043)
Hi

you can use something lige this (OF22)

for inlet use zeroGradient for outlet use this

Code:

  outlet
    {
        type            flowRateInletVelocity;
        volumetricFlowRate    constant -0.1; // m3/s, negative sign means out of the domain
        value          uniform (0 0 0);
    }


So if I understood well, if we have a flow in the inlet and outlet (going out of the domain) we need to set inlet = zeroGradient and then put a flow in the outlet ??!!

Thank you

NoradFirst2 May 28, 2015 09:49

I have a quite similar problem and I cannot find the answer.

I am using buoyantPimpleFoam currently.

I have

inlet : U is fixedValue / P is zeroGradient / T is fixedValue

suction_outlet : U is zeroGradient / P is fixedValue (0.995e5) / T is zeroGradient

secondary_outlet (actually, suction_outlet sucks air from this patch in addition to air from the inlet) : U is zeroGradient / P is fixedValue (1e5) / T is inletOutlet (calculated with internalField - to prevent air coming inside the domain from this patch being at 0K).

I'd like to change my suction BC to have a given volumicFlowRate rather than fixed pression which is causing instability. I tryed something like :

Code:

  U
 
suction
    {
        type            flowRateInletVelocity;
        volumetricFlowRate    constant -130; // m3/s, negative sign means out of the domain
        value          uniform (0 0 0);
    }
 
P
 
suction {type    zeroGradient}

But then, the velocity field is 0 nearby, suction is behaving like the outlet...

Do you have any advice? Thanks!!

PS : What does the line " value uniform (0 0 0);" in flowRateInletVelocity stands for?

EDIT - PB SOLVED: I had a unit problem.


All times are GMT -4. The time now is 14:53.