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/)
-   -   IcoFoam continuity error in 2D transient simulation (http://www.cfd-online.com/Forums/openfoam-solving/60449-icofoam-continuity-error-2d-transient-simulation.html)

finch October 27, 2005 13:09

I am running a basic test case
 
I am running a basic test case using icoFoam. I defined a 2D channel with two walls, an inlet, and an outlet. The walls have a no-slip boundary condition U=uniform(0 0 0). The inlet has a boundary condition of U=uniform(1 0 0) which causes flow into the channel with a uniform velocity profile. The outlet BC is of type zeroGradient for U. All pressure boundaries are of type zeroGradient. This setup produces the following error:

Reading/calculating face flux field phi
Starting time loop
Time = 0.001
Mean and max Courant Numbers = 0 0.1

BICCG: Solving for Ux, Initial residual = 1, Final residual = 9.49086e-09, No Iterations 1

--> 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.

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

FOAM exiting

If I set one wall b.c. OR the internalField to U=uniform(0.00001 0 0) then the expected parabolic velocity profile develops. Reducing the time step does not help.

Can someone please explain why this is happening, and how to set it up correctly?

hjasak October 27, 2005 13:30

Have a look at your boundary c
 
Have a look at your boundary conditions on the velocity. In FOAM, we typically use fixed value U and zero gradient pressure at the inlet and fixed pressure and zero gradient U at the outlet. There is an option of using zero gradient on both p and U at the outlet, but then the code needs to adjust the outlet velocities in order to achieve global continuity. The message says it cannot do that for some reason.

Enjoy,

Hrv

finch October 28, 2005 00:49

Oops. I thought I had set the
 
Oops. I thought I had set the output pressure to zero instead of zeroGradient, but after checking I realize that it was in fact zeroGradient. No wonder it wasn't working. Thanks for the tip. I'll post my results as a tutorial sometime.

kid March 27, 2012 02:42

Thank You
 
Hello Hrv,

Your comments helped a lot.

regards,
cfdkid

mmaukii September 24, 2013 18:11

great help. Also valid for SimpleFoam!!!

thanks a lot!!!

musahossein November 16, 2014 00:06

Continuity error in sloshingtank2d
 
Quote:

Originally Posted by hjasak (Post 184663)
Have a look at your boundary conditions on the velocity. In FOAM, we typically use fixed value U and zero gradient pressure at the inlet and fixed pressure and zero gradient U at the outlet. There is an option of using zero gradient on both p and U at the outlet, but then the code needs to adjust the outlet velocities in order to achieve global continuity. The message says it cannot do that for some reason.

Enjoy,

Hrv

Dear all:

I am running sloshingTank2D in interDYMFoam. Tank dimensions in the y direction (horizontal) is 11 meters; vertical 7 meters. Water depth is 4.4 meters. There is no inflow or outflow. However I get a error message as follows:
[5] --> FOAM FATAL ERROR:
[5] 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 : 4.06534e-16
Specified mass inflow : 5.66242e-19
Specified mass outflow : 8.26281e-19
Adjustable mass outflow : 0
[5]
[5]
[5] From function adjustPhi(surfaceScalarField& phi, const volVectorField& U,const volScalarField& p
[5] in file cfdTools/general/adjustPhi/adjustPhi.C at line 118.
[5]
FOAM parallel run exiting
[5]
[4]
[4]
[4] --> FOAM FATAL ERROR:
[4] 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 : 4.06534e-16
Specified mass inflow : 5.66242e-19
Specified mass outflow : 8.26281e-19
Adjustable mass outflow : 0

Can any tell me why I am getting this error? Thankyou.


All times are GMT -4. The time now is 22:30.