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

Continuity error cannot be removed by adjusting the outflow - rotating domain case

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 7, 2017, 06:06
Default Continuity error cannot be removed by adjusting the outflow - rotating domain case
  #1
Member
 
Thomas Sprich
Join Date: Mar 2015
Posts: 76
Rep Power: 11
Swift is on a distinguished road
Dear Forum,

I am receiving the above mentioned error for the case I am trying to run. The full error message is as follows:
Code:
--> 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              : 1516.5
Specified mass inflow   : 0.0007348
Specified mass outflow  : 0.00057401
Adjustable mass outflow : 0


    From function bool Foam::adjustPhi(Foam::surfaceScalarField&, const volVectorField&, Foam::volScalarField&)
    in file cfdTools/general/adjustPhi/adjustPhi.C at line 107.

FOAM exiting
I am running a case similar to the propeller tutorial and am consequently using pimpleDyMFoam. I have an impeller in a rotating domain within a stationary volume. Unlike the propeller tutorial, my impeller is rotating in a tank with wall boundaries for the bottom, top and sides. i.e there are no inlets or outlets.

I have seen the following post:
Continuity error cannot be removed by adjusting the outflow. Please check the velocit
which discusses this problem, noting that it could be a problem with my boundary conditions. I am assuming that the problem is with my U and p files. These files are as follows:
U
Code:
dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    rotorBottom
    {
        type            movingWallVelocity;
        value           uniform (0 0 0);
    }
    AMIbottom
    {
        type            cyclicAMI;
        value           uniform (0 0 0);
    }
    AMIbottom_slave
    {
        type            cyclicAMI;
        value           uniform (0 0 0);
    }
    baffles
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    tank
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    shaft
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    bottomOfTank
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    topOfTank
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
}
p
Code:
dimensions      [0 2 -2 0 0 0 0];

internalField   uniform 0;
boundaryField
{
    rotorBottom
    {
        type            zeroGradient;
    }
    AMIbottom
    {
        type            cyclicAMI;
        value           uniform 0;
    }
    AMIbottom_slave
    {
        type            cyclicAMI;
        value           uniform 0;
    }
    baffles
    {
        type            zeroGradient;
    }
    tank
    {
        type            zeroGradient;
    }
    shaft
    {
        type            zeroGradient;
    }
    bottomOfTank
    {
        type            zeroGradient;
    }
    topOfTank
    {
        type            zeroGradient;
    }
}
To me it looks like the boundary conditions are correct. The error message notes that there is an inflow and outflow, but I don't understand where this could be coming from. Does anyone have some more suggestions as to how I could resolve this?

I have tried running potentialFoam as suggested but it doesn't resolve the error. In desperation, I have also checked that the rotational axis is correct, I have remeshed to get better agreement between the slave a master AMI patches, I have remeshed using different methods (meshing the whole stator and rotor domains in one operation and again meshing the stator and rotor separately and using mergeMesh). I have run moveDynamicMesh and it runs correctly. I am using the fvSolution and fvSchemes from the propeller case.

I have just tried changing the speed of rotation in dynamicMeshDict. I found that if I made it very big, the mass inflow and outflow values increase in the error message above. If I decrease omega so that it is very small, the mass inflow and outflow values also decrease. This makes me think that the error might due to the rotating domain or perhaps the AMI interface between slave and master patches. Is there anyway that I could troubleshoot this?
The part of the sHM dict that creates the AMI patches and rotating zone looks as follows:

Code:
    AMIbottom
        {
            level       (2 2);
            faceType    baffle;
            cellZone    rotatingDomainBottom;
            faceZone    rotatingDomainBottom;
            cellZoneInside  inside;
        }
I use this when I mesh in a single step, similar to the propeller case. I don't run createInletOutletSets.topoSetDict like in the propeller case because I don't have inlets and outlets. I edited the boundary file manually to make it cyclicAMI as follows:
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  4.1                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      binary;
    class       polyBoundaryMesh;
    location    "constant/polyMesh";
    object      boundary;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

8
(
    AMIbottom
    {
        type            cyclicAMI;
        inGroups        1(cyclicAMI);
        nFaces          51672;
        startFace       5977891;
        transform noOrdering;
        neighbourPatch AMIbottom_slave;
    }
    AMIbottom_slave
    {
        type            cyclicAMI;
        inGroups        1(cyclicAMI);
        nFaces          51672;
        startFace       6029563;
        transform noOrdering;
        neighbourPatch AMIbottom;
    }
    rotorBottom
    {
        type            wall;
        inGroups        1(wall);
        nFaces          30099;
        startFace       6081235;
    }
    baffles
    {
        type            wall;
        inGroups        1(wall);
        nFaces          32160;
        startFace       6111334;
    }
    tank
    {
        type            wall;
        inGroups        1(wall);
        nFaces          87354;
        startFace       6143494;
    }
    shaft
    {
        type            wall;
        inGroups        1(wall);
        nFaces          7779;
        startFace       6230848;
    }
    bottomOfTank
    {
        type            wall;
        inGroups        1(wall);
        nFaces          24822;
        startFace       6238627;
    }
    topOfTank
    {
        type            wall;
        inGroups        1(wall);
        nFaces          24910;
        startFace       6263449;
    }
)

// ************************************************************************* //
Does anyone have any advice or ideas on how to get this working? I've looked at this for two days and am running a blank.

Thanks,
Thomas
Swift is offline   Reply With Quote

Old   July 9, 2017, 14:46
Default
  #2
Senior Member
 
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10
saddy is on a distinguished road
i have recieved this error and i have solved it:
one thing i can promise you is ;
error is in your boundary conditions. just be 100% sure of that.
other thing is:
this error pops up when you solve same problem in different openfoam versions. mainly bcz codes evolve overtime.
so adjust your boundary conditions.
problem is most likely to be in P/U files.
have luck!
saddy is offline   Reply With Quote

Old   July 10, 2017, 01:55
Default
  #3
Member
 
Thomas Sprich
Join Date: Mar 2015
Posts: 76
Rep Power: 11
Swift is on a distinguished road
Hi Saddy,

Thanks for your input.

Do you have any suggestions regarding the U and P BCs? To me they look right but I have been staring at it for days and can't figure it out.

Thanks again,
Thomas
Swift is offline   Reply With Quote

Old   July 10, 2017, 05:17
Default
  #4
Member
 
Thomas Sprich
Join Date: Mar 2015
Posts: 76
Rep Power: 11
Swift is on a distinguished road
Greetings Saddy and the rest of the Forum,

I resolved the problem. Thanks for the help.

As Saddy mentioned and the error message mentioned the problem was my boundary conditions for U.

The exists in both the stationary and rotating regions of the domains, but I had a 'fixedValue' boundary condition. By changing it to 'movingWallVelocity' as is the case with the rotor, the problem is resolved. I'm not sure if this is a valid boundary condition for the part of the shaft in stationary region so I may remove the shaft altogether or create separate shaft patches in the stationary and rotating domains.

Problem solved. Whew.

Thomas
Swift is offline   Reply With Quote

Old   July 10, 2017, 08:36
Default
  #5
Senior Member
 
sandy
Join Date: Feb 2016
Location: .
Posts: 117
Rep Power: 10
saddy is on a distinguished road
whoa.......i was just here looking for the problem and in 1 second you solved it!! bravo
yeah i figured this same reason, actually physically we have to imagine whether we are unnecessarily imposing fixed/moving condition to one of our boundaries. this type of boundary conditions sometimes lead to divergence later or solution wont proceed at all.
anyways u got it!
saddy 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
Is Playstation 3 cluster suitable for CFD work hsieh OpenFOAM 9 August 16, 2015 14:53
How to write k and epsilon before the abnormal end xiuying OpenFOAM Running, Solving & CFD 8 August 27, 2013 15:33
injection problem Mark New FLUENT 0 August 4, 2013 01:30
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58
Free surface boudary conditions with SOLA-VOF Fan Main CFD Forum 10 September 9, 2006 12:24


All times are GMT -4. The time now is 17:13.