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

Continuity Error: Mass Inflow/Outflow

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Tiffany

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 15, 2012, 19:24
Default Continuity Error: Mass Inflow/Outflow
  #1
New Member
 
Anonymous
Join Date: Aug 2012
Posts: 8
Rep Power: 14
Tiffany is on a distinguished road
Hi, I'm new to OpenFOAM. I'm trying to model the flow of a mixture of liquids in a cylindrical shape with interFoam. When I try running the solver, I get the error below. I set up the shape to be enclosed by walls on all sides (where one of the walls rotates). I don't have an inflow or outflow that I'm aware of. I don't understand why I'm getting this error. Any ideas?

Create time

Create mesh for time = 0


PIMPLE: Operating solver in PISO mode

Reading field p_rgh

Reading field alpha1

Reading field U

Reading/calculating face flux field phi

Reading transportProperties

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
Selecting turbulence model type LESModel
Selecting LES turbulence model Smagorinsky
SmagorinskyCoeffs
{
ce 1.05;
ck 0.07;
}


Reading g
Calculating field g.h

time step continuity errors : sum local = 4.35666e-18, global = 2.09e-19, cumulative = 2.09e-19


--> FOAM FATAL ERROR:
Continuity error cannot be removed by adjusting the outflow.
Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow.
Total flux : 1e-300
Specified mass inflow : 2.89178e-15
Specified mass outflow : 3.18322e-15
Adjustable mass outflow : 0


From function adjustPhi(surfaceScalarField& phi, const volVectorField& U,const volScalarField& p
in file cfdTools/general/adjustPhi/adjustPhi.C at line 118.

FOAM exiting
dachs likes this.
Tiffany is offline   Reply With Quote

Old   July 31, 2024, 04:57
Default
  #2
New Member
 
Join Date: Jul 2024
Posts: 16
Rep Power: 2
dachs is on a distinguished road
I have a very similar problem, has anyone found a solution?
dachs is offline   Reply With Quote

Old   July 31, 2024, 07:30
Default
  #3
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 747
Rep Power: 14
Tobermory will become famous soon enough
Quote:
Originally Posted by dachs View Post
I have a very similar problem, has anyone found a solution?
The solution is to check your boundary conditions. The code is telling you that it cannot enforce continuity on the domain because you have over-constrained the solver with your boundaries.

If you are still struggling with this, post your velocity and pressure boundary files and a description of the domain/flow scenario.
Tobermory is offline   Reply With Quote

Old   July 31, 2024, 08:05
Default
  #4
New Member
 
Join Date: Jul 2024
Posts: 16
Rep Power: 2
dachs is on a distinguished road
Quote:
Originally Posted by Tobermory View Post
The solution is to check your boundary conditions. The code is telling you that it cannot enforce continuity on the domain because you have over-constrained the solver with your boundaries.

If you are still struggling with this, post your velocity and pressure boundary files and a description of the domain/flow scenario.

Hi thanks for your quick reply and the help you offered.

I want to carry out a two-phase simulation (oil/air) for the fluid space within a rolling bearing. So I have a closed system, which makes me wonder even more about the error message.


At the beginning I did a very simple 2 phase simulation of a closed ring, which runs without errors. Now the idea is to cut the geometry of the rolling elements (saved as CAD) out of the mesh with the SnappyHexMesh (I have tested on a single phase simulation and it works here). I have defined new boundary conditions for the newly created surfaces and run the simulation as follows:
blockMesh
surfaceFeautures
snappyHexMesh -overwrite
setFields
interFoam

Then I get the error message:
--> FOAM FATAL ERROR:
Continuity error cannot be removed by adjusting the outflow.
Specified mass inflow : 1.79258e-18
Specified mass outflow : 1.85626e-18
Adjustable mass outflow : 0

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

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

internalField   uniform (0 0 0);


boundaryField
{        

    frontWall
    {
        type            fixedValue;
        value         uniform (0 0 0); 
    }
    
    backWall
    {
        type            fixedValue;
        value         uniform (0 0 0);
    }
 
    innerWall
    {
        type            fixedValue;
        value         uniform (0 0 0);
    }
    

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

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

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

    middleGap
    {
        type            fixedValue;
        value         uniform (0 0 0);
    }
 
   innerRing
   {
        type            rotatingWallVelocity;
        origin          (0 0 0);
        axis             (0 0 1);
    omega         constant 18.274; //relative Rotation Velocity in rad/s for 300rpm    
    }

    outerRing
    {
        type            rotatingWallVelocity;
        origin          (0 0 0);
        axis             (0 0 1);
    omega         constant -13.325; //relative Rotation Velocity in rad/s for 300rpm
    }

    roller01
    {
        type            rotatingWallVelocity;
        origin        (0.0 0.083 0);
        axis         (0 0 1);
    omega         constant -98.402; //relative Rotation Velocity in rad/s for 0 Slip
    }

    roller02
    {
        type            rotatingWallVelocity;
        origin      (0.026 0.079 0);
        axis         (0 0 1);
    omega         constant -98.402; //relative Rotation Velocity in rad/s for 0 Slip   
    }

    roller03
    {
        type            rotatingWallVelocity;
        origin      (0.049 0.067 0);
        axis         (0 0 1);
    omega         constant -98.402; //relative Rotation Velocity in rad/s for 0 Slip    
    }

    roller04
    {
        type            rotatingWallVelocity;
        origin      (0.067 0.049 0);
        axis         (0 0 1);
    omega         constant -98.402; //relative Rotation Velocity in rad/s for 0 Slip   
    }

    roller05
    {
        type            rotatingWallVelocity;
        origin      (0.079 0.026 0);
        axis         (0 0 1);
     omega         constant -98.402; //relative Rotation Velocity in rad/s for 0 Slip
    }
    roller06
    {
        type            rotatingWallVelocity;
        origin      (0.083 0.0 0);
        axis         (0 0 1);
      omega         constant -98.402; //relative Rotation Velocity in rad/s for 0 Slip
    }    
    roller07
    {
        type            rotatingWallVelocity;
        origin      (0.079 -0.026 0);
        axis         (0 0 1);
      omega         constant -98.402; //relative Rotation Velocity in rad/s for 0 Slip
    }
    roller08
    {
        type            rotatingWallVelocity;
        origin      (0.067 -0.049 0);
        axis         (0 0 1);
     omega         constant -98.402; //relative Rotation Velocity in rad/s for 0 Slip

    }
    roller09
    {
        type            rotatingWallVelocity;
        origin      (0.049 -0.067 0);
        axis         (0 0 1);
       omega         constant -98.402; //relative Rotation Velocity in rad/s for 0 Slip
    }
    
    roller10
    {
        type            rotatingWallVelocity;
        origin      (0.026 -0.079 0);
        axis         (0 0 1);
      omega         constant -98.402; //relative Rotation Velocity in rad/s for 0 Slip
    }

    roller11
    {
        type            rotatingWallVelocity;
        origin      (0.0 -0.083 0);
        axis         (0 0 1);
       omega         constant -98.402; //relative Rotation Velocity in rad/s for 0 Slip

    }

    roller12
    {
        type            rotatingWallVelocity;
        origin      (-0.026 -0.079 0);
        axis         (0 0 1);
       omega         constant -98.402; //relative Rotation Velocity in rad/s for 0 Slip
    }
        
    roller13
    {
        type            rotatingWallVelocity;
        origin      (-0.049 -0.067 0);
        axis         (0 0 1);
       omega         constant -98.402; //relative Rotation Velocity in rad/s for 0 Slip
    }

    roller14
    {
        type            rotatingWallVelocity;
        origin      (-0.067 -0.049 0);
        axis         (0 0 1);
        omega         constant -98.402; //relative Rotation Velocity in rad/s for 0 Slip


    }
    roller15
    {
        type            rotatingWallVelocity;
        origin      (-0.079 -0.026 0);
        axis         (0 0 1);
        omega         constant -98.402; //relative Rotation Velocity in rad/s for 0 Slip


    }    
    roller16
    {
        type            rotatingWallVelocity;
        origin      (-0.083 0.0 0);
        axis         (0 0 1);
        omega         constant -98.402; //relative Rotation Velocity in rad/s for 0 Slip


    }
    roller17
    {
        type            rotatingWallVelocity;
        origin      (-0.079 0.026 0);
        axis         (0 0 1);
          omega         constant -98.402; //relative Rotation Velocity in rad/s for 0 Slip


    }
    roller18
    {
        type            rotatingWallVelocity;
        origin      (-0.067 0.049 0);
        axis         (0 0 1);
        omega         constant -98.402; //relative Rotation Velocity in rad/s for 0 Slip


    }        
    roller19
    {
        type            rotatingWallVelocity;
        origin      (-0.049 0.067 0);
        axis         (0 0 1);
       omega         constant -98.402; //relative Rotation Velocity in rad/s for 0 Slip

    }
    roller20
    {
        type            rotatingWallVelocity;
        origin      (-0.026 0.079 0);
        axis         (0 0 1);
        omega         constant -98.402; //relative Rotation Velocity in rad/s for 0 Slip


    }
    
    
}

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

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v2312                                 |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 0;


boundaryField
{        
    frontWall
    {
        type            zeroGradient;   

    }
    
    backWall
    {
        type             zeroGradient;

    }
    
    innerWall
    {
        type              zeroGradient;

    }
    
    outerWall
    {
        type               zeroGradient;

    }
        innerRing
    {
        type            fixedFluxPressure;
        value           uniform 0;
 
    }
    outerRing
    {
        type            fixedFluxPressure;
        value           uniform 0;
 
    }

    innerGap
    {
        type            fixedFluxPressure;
        value           uniform 0;
 
    }
    
    outerGap
    {
        type            fixedFluxPressure;
        value           uniform 0;
;

    }
    
    middleGap
    {
        type            fixedFluxPressure;
        value           uniform 0;


    }
    roller01
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
    roller02
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }    
    roller03
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }    
    roller04
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
    roller05
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }    
    roller06
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }        
    roller07
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
    roller08
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }    
    roller09
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }        
    roller10
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
    roller11
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }    
    roller12
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }    
    roller13
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
    roller14
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }    
    roller15
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }        
    roller16
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }    
    roller17
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }    
    roller18
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }
    roller19
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }    
    roller20
    {
        type            fixedFluxPressure;
        value           uniform 0;
    }              
}

// ************************************************************************* //
dachs is offline   Reply With Quote

Old   August 2, 2024, 13:35
Default
  #5
Senior Member
 
Join Date: Apr 2020
Location: UK
Posts: 747
Rep Power: 14
Tobermory will become famous soon enough
I can see why you are puzzled now. It is odd. The only thing that comes to mind is that your use of a fixedValue boundary for the stationary walls, eg
Code:
    frontWall
    {
        type            fixedValue;
        value         uniform (0 0 0); 
    }
is a little odd (I would have expected noSlip). What type are these defined as in constant/polyMesh/boundary? Patch or wall? If it is a patch, then I can see it trying to treat it as an inlet, which might be causing the continuity issue.
Tobermory 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
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 16:33
Upgraded from Karmic Koala 9.10 to Lucid Lynx10.04.3 bookie56 OpenFOAM Installation 8 August 13, 2011 05:03
Convergence moving mesh lr103476 OpenFOAM Running, Solving & CFD 30 November 19, 2007 15:09
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 03:58
Could anybody help me see this error and give help liugx212 OpenFOAM Running, Solving & CFD 3 January 4, 2006 19:07


All times are GMT -4. The time now is 06:26.