CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

massflow of inlet and outlet are not equal

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 1, 2014, 06:43
Default massflow of inlet and outlet are not equal
  #1
New Member
 
Join Date: Mar 2014
Posts: 28
Rep Power: 12
knoedl1 is on a distinguished road
Hello foamers!

In my mesh i have one inlet and one outlet, both have the same area.
I set the BC as followed:
--------------------------------------------------------------------------------
0/U

inlet
{
type flowRateInletVelocity;
flowRate 0.02;
value uniform (0 500 0);
}

outlet
{
type zeroGradient;

}

-----------------------------------------------------------------------------------------------------
0/p

inlet
{
type zeroGradient;
}

outlet
{
type fixedValue;
value uniform 86000;
}


the massflows are then:

MassFlows: inlet = 1.44
MassFlows: outlet = 0.880914

so they are not the same, but how can i tell the programm that the outlet massflow should be the same like the inlet massflow?

Maybe somebody has an idea?
knoedl1 is offline   Reply With Quote

Old   April 1, 2014, 16:00
Default
  #2
Senior Member
 
Troy Snyder
Join Date: Jul 2009
Location: Akron, OH
Posts: 219
Rep Power: 18
tas38 is on a distinguished road
Is your solver incompressible? If the solver is compressible, the mass flowrates may not be the same.
tas38 is offline   Reply With Quote

Old   April 2, 2014, 06:07
Default
  #3
New Member
 
Join Date: Mar 2014
Posts: 28
Rep Power: 12
knoedl1 is on a distinguished road
Quote:
Originally Posted by tas38 View Post
Is your solver incompressible? If the solver is compressible, the mass flowrates may not be the same.
hi tas38!

Yes my solver is compressible, but the massflow should be always the same because it is in kg/sec, so everything that is going in should also go out?

so the massflow should be equal, but how do i can do that?
knoedl1 is offline   Reply With Quote

Old   April 3, 2014, 21:48
Default
  #4
New Member
 
Orry Shamash
Join Date: Apr 2014
Posts: 4
Rep Power: 12
orryshamash is on a distinguished road
mass flow rate is density*area*velocity

If this is incompressible flow, density shouldn't be a problem

area isn't changing

only thing changing velocity is friction

if you disable viscous dissipation there should be no viscous forces and therefore no loss of flow rate
orryshamash is offline   Reply With Quote

Old   April 4, 2014, 05:24
Default
  #5
Senior Member
 
Olivier
Join Date: Jun 2009
Location: France, grenoble
Posts: 272
Rep Power: 17
olivierG is on a distinguished road
hello,

Just to add some entropy ... is you simulation transient ?
by the way, you didn't tel give the solver name, neither other relevant info ... check http://www.cfd-online.com/Forums/ope...-get-help.html

regards,
olivier
olivierG is offline   Reply With Quote

Old   April 30, 2014, 18:22
Default
  #6
New Member
 
Join Date: Mar 2014
Posts: 28
Rep Power: 12
knoedl1 is on a distinguished road
My flow is subsonic,

0/U:

inlet type flowRateInletVelocity;
outlet type zeroGradient;
domain1 type temperatureDirectedInletVelocity;
domain2 type symmetryPlane;
domain3 type zeroGradient;

0/p:

inlet zeroGradient;
outlet type fixedValue;
domain1 type zeroGradient;
domain2 type symmetryPlane;
domain3 type outletInlet;

if i change the fixedValue of the pressure outlet i can change the outlet Massflow, but it never goes equal to the inlet massflow.
Also after the calculation converged, the massflows are not equal.
What should i change that is going to be equal?
knoedl1 is offline   Reply With Quote

Old   April 30, 2014, 18:52
Default
  #7
Senior Member
 
Troy Snyder
Join Date: Jul 2009
Location: Akron, OH
Posts: 219
Rep Power: 18
tas38 is on a distinguished road
Regarding your initial post.

Is it possible that there may be an issue in specifying 500 in the second
element of the 'value' array? What is the basis for making this 500 and not leaving as 0?

Code:
Description
    Describes a volumetric/mass flow normal vector boundary condition by its
    magnitude as an integral over its area.

    The basis of the patch (volumetric or mass) is determined by the
    dimensions of the flux, phi.
    The current density is used to correct the velocity when applying the
    mass basis.

    Example of the boundary condition specification:
    \verbatim
    inlet
    {
        type        flowRateInletVelocity;
        flowRate    0.2;        // Volumetric/mass flow rate [m3/s or kg/s]
        value       uniform (0 0 0); // placeholder
    }
    \endverbatim

Note
    - The value is positive inwards
    - May not work correctly for transonic inlets
    - Strange behaviour with potentialFoam since the U equation is not solved
tas38 is offline   Reply With Quote

Old   May 1, 2014, 03:40
Default
  #8
New Member
 
Join Date: Mar 2014
Posts: 28
Rep Power: 12
knoedl1 is on a distinguished road
hello tas38,

yes of course i can also write 0 instead of 500, the velocity at the inlet
is just about 450m/s at the inlet. I think the velocity is calculated by the massflow at the inlet?
knoedl1 is offline   Reply With Quote

Old   May 1, 2014, 12:32
Default
  #9
New Member
 
Join Date: Mar 2014
Posts: 28
Rep Power: 12
knoedl1 is on a distinguished road
i want to calculate the pressure with groovyBC.

type groovyBC;
valueExpression "0.003/(sum(mag(Sf()))*(normal()&U))*287.058*(288.15-sqr(mag(U))/(2*1004.5))";
value uniform 90000;

so that the massflow here 0.003 is the same like for the inlet,
but they dont converge!
knoedl1 is offline   Reply With Quote

Old   July 3, 2018, 02:30
Default
  #10
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
Maybe it is a bit late. But did you solve the problem?
mAlletto is offline   Reply With Quote

Old   July 3, 2018, 09:28
Default
  #11
F42
New Member
 
Join Date: Jun 2018
Posts: 20
Rep Power: 7
F42 is on a distinguished road
To the initial question: I suggest using type "inletOutlet" instead of "zeroGradient" as velocity bc for outlet.
F42 is offline   Reply With Quote

Old   July 3, 2018, 14:00
Default
  #12
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
I have a really simple test case. I have a 2D oscillating cylinder in a fluid at rest. The flow is laminar. The boundary conditions are: /*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#include "include/initialConditions"

dimensions [0 2 -2 0 0 0 0];

internalField uniform $pressure;

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"

overset
{
type overset;
}

wall
{
type zeroGradient;
}

inlet
{
type totalPressure;
rho none;
p0 uniform 0;
value uniform 0;
// Optional entries
U U;
phi phi;
}

outlet
{
type totalPressure;
rho none;
p0 uniform 0;
value uniform 0;
// Optional entries
U U;
phi phi;
}

topAndBottom
{
type fixedValue;
value uniform 0;
}
}

// ************************************************** *********************** //



/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

#include "include/initialConditions"

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
#includeEtc "caseDicts/setConstraintTypes"

overset
{
type overset;
}

walls
{
type movingWallVelocity;
value uniform (0 0 0);
}

inlet
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
phi phi;
}

outlet
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
phi phi;
}

topAndBottom
{
type fixedValue;
value uniform (0 0 0);
}
}

// ************************************************** *********************** //


The fvSolution dict is :


/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: plus |
| \\ / A nd | Web: www.OpenFOAM.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class dictionary;
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
cellDisplacement
{
solver PCG;
preconditioner DIC;

tolerance 1e-06;
relTol 0;
maxIter 100;
}

p
{
solver PBiCGStab;
preconditioner DILU;
tolerance 1e-5;
relTol 0.1;
}

pFinal
{
solver PBiCGStab;
preconditioner DILU;
tolerance 1e-6;
relTol 0.;
}

pcorr
{
$pFinal;
solver PCG;
preconditioner DIC;
tolerance 1e-7;
}

pcorrFinal
{
$pcorr;
relTol 0;
tolerance 1e-7;
}

"(U|k|epsilon)"
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-6;
relTol 0.01;
}

"(U|k|epsilon)Final"
{
$U;
tolerance 1e-6;
relTol 0;
}
}

PIMPLE
{
momentumPredictor true;
correctPhi true;
nOuterCorrectors 25;
nCorrectors 1;
nNonOrthogonalCorrectors 2;
massFluxInterpolation true;
ddtCorr true;
turbOnFinalIterOnly false;
}

relaxationFactors
{
fields
{
p 0.3;
}
equations
{
"(U|k|omega)" 0.7;
".*Final" 1.0;
}
}


// ************************************************** *********************** //



the solver i use is overPimpleDyMFoam.


The strange thing is that when I compare inflow and outflow mass flow the absolut value is not equal. The difference is of a factor two. I have no clue what went wrong.
mAlletto is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
mass flow of inlet and outlet is not equal datouguaiguai STAR-CCM+ 2 March 25, 2014 09:29
define BCs at inlet and outlet for natural ventilation simulation jjz2013 Main CFD Forum 0 January 29, 2013 15:50
ATTENTION! Reliability problems in CFX 5.7 Joseph CFX 14 April 20, 2010 15:45
boundary condition inlet equal outlet jpinho FLUENT 6 July 2, 2009 10:09
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 05:13


All times are GMT -4. The time now is 11:01.