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

IcoFoam continuity error in 2D transient simulation

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 1 Post By finch
  • 5 Post By hjasak
  • 1 Post By finch

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 27, 2005, 13:09
Default I am running a basic test case
  #1
New Member
 
a
Join Date: Mar 2009
Location: a
Posts: 4
Rep Power: 17
finch is on a distinguished road
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?
gabrielmarcondes likes this.
finch is offline   Reply With Quote

Old   October 27, 2005, 13:30
Default Have a look at your boundary c
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
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
kid, Pirlu, mizzou and 2 others like this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   October 28, 2005, 00:49
Default Oops. I thought I had set the
  #3
New Member
 
a
Join Date: Mar 2009
Location: a
Posts: 4
Rep Power: 17
finch is on a distinguished road
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.
chqingyuan likes this.
finch is offline   Reply With Quote

Old   March 27, 2012, 02:42
Default Thank You
  #4
kid
Senior Member
 
cfdkid
Join Date: Mar 2009
Posts: 133
Rep Power: 17
kid is on a distinguished road
Hello Hrv,

Your comments helped a lot.

regards,
cfdkid
kid is offline   Reply With Quote

Old   September 24, 2013, 18:11
Default
  #5
New Member
 
Join Date: Feb 2011
Posts: 7
Rep Power: 15
mmaukii is on a distinguished road
great help. Also valid for SimpleFoam!!!

thanks a lot!!!
mmaukii is offline   Reply With Quote

Old   November 16, 2014, 00:06
Default Continuity error in sloshingtank2d
  #6
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
Quote:
Originally Posted by hjasak View Post
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.
musahossein is offline   Reply With Quote

Old   February 20, 2015, 03:22
Default
  #7
Member
 
Raitis Lebdevs
Join Date: Feb 2015
Location: Latvia
Posts: 37
Rep Power: 11
rietis is on a distinguished road
Send a message via Skype™ to rietis
Your error says that your inflow and your outflow is not the same. Look at your BC, they need to deal with the same amount of flux comming in and out.
rietis is offline   Reply With Quote

Old   February 20, 2015, 09:09
Default
  #8
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
Quote:
Originally Posted by rietis View Post
Your error says that your inflow and your outflow is not the same. Look at your BC, they need to deal with the same amount of flux comming in and out.
Thankyou for your response. I am simulating a tank in sloshingtank2d. What is realized is that this error was given due to a run time error. It is one of those cases where a run time error creates other cascading errors.
musahossein is offline   Reply With Quote

Old   February 20, 2015, 09:20
Default
  #9
Member
 
Raitis Lebdevs
Join Date: Feb 2015
Location: Latvia
Posts: 37
Rep Power: 11
rietis is on a distinguished road
Send a message via Skype™ to rietis
Dear, musahossein, do you have expirience in snappyHexMesh? If you have and are willing to look on a problem I would appriciate.

here is a link:

http://www.cfd-online.com/Forums/ope...esh-walls.html

cheers

Raitis.
rietis is offline   Reply With Quote

Old   February 20, 2015, 10:30
Default
  #10
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
Quote:
Originally Posted by rietis View Post
Dear, musahossein, do you have expirience in snappyHexMesh? If you have and are willing to look on a problem I would appriciate.

here is a link:

http://www.cfd-online.com/Forums/ope...esh-walls.html

cheers

Raitis.
Unfortunately, I do not. Another way you can refine the mesh at the walls is to subdivide our domaing into smaller blocks. By doing so you can refine the mesh in the block of your choice. However this requires that you redefine your model with more nodes as the blocks must be defined with nodes. One drawback of this method is that the mesh must be the same in at least one direction as the mesh in adjacent blocks must match. Sorry I could not help you more.
musahossein is offline   Reply With Quote

Old   February 20, 2015, 10:59
Default
  #11
Member
 
Raitis Lebdevs
Join Date: Feb 2015
Location: Latvia
Posts: 37
Rep Power: 11
rietis is on a distinguished road
Send a message via Skype™ to rietis
No worries.

Yes I undarstand that it is a way, but this time I need to do with this method.
rietis is offline   Reply With Quote

Old   May 5, 2015, 12:43
Default
  #12
New Member
 
Chen Linya
Join Date: Oct 2014
Posts: 4
Rep Power: 12
Chen Linya is on a distinguished road
Quote:
Originally Posted by musahossein View Post
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.
Dear, musahossein
I am expirienceing this problem,can you tell me the details about the run time error?
Chen Linya is offline   Reply With Quote

Old   May 5, 2015, 14:48
Default
  #13
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
Quote:
Originally Posted by Chen Linya View Post
Dear, musahossein
I am expirienceing this problem,can you tell me the details about the run time error?
In my case the run time error was due to other errors during run time. The applied displacement was so large that essentially the tank was dispalcement by more than half its length. So I would suggest that you look at your data and then the results of your run using ParaFOAM upto the point where the error occurs. May be you will discover some error in modeling or input which, if taken care of will not generate this type of error message.

Also, are you running the latest version of OpenFOAM? From what I hear, it is more robust and handles these types of errors better.
musahossein is offline   Reply With Quote

Old   May 6, 2015, 02:25
Default
  #14
New Member
 
Chen Linya
Join Date: Oct 2014
Posts: 4
Rep Power: 12
Chen Linya is on a distinguished road
Quote:
Originally Posted by musahossein View Post
In my case the run time error was due to other errors during run time. The applied displacement was so large that essentially the tank was dispalcement by more than half its length. So I would suggest that you look at your data and then the results of your run using ParaFOAM upto the point where the error occurs. May be you will discover some error in modeling or input which, if taken care of will not generate this type of error message.

Also, are you running the latest version of OpenFOAM? From what I hear, it is more robust and handles these types of errors better.
Appreciate you quick reply.
I use the foam-extend-3.1,i want to combine the icoFsiFoam and interFoam to a interFsiFoam to couple with multiphase fluid-struction interaction problem(dambreak with a elastic baffle),and the error occured in first interation(and i guess) due to the fluid mesh moving.the dynamicMeshDict as follow:
dynamicFvMesh dynamicMotionSolverFvMesh;
twoDMotion yes;
solver laplace;
diffusivity quadratic;
frozenDiffusion on;
distancePatches(consoleFluid);
Chen Linya is offline   Reply With Quote

Old   May 7, 2015, 11:04
Default
  #15
Senior Member
 
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18
musahossein is on a distinguished road
I would suggest that you check your mesh, Start with checkmesh or (CheckMesh?) command once you have run blockMesh, to make sure OpenFOAM is ok with your aspect ratio.

Once you have established that it is not a aspect ratio problem, it is more likely how you are communicating the input data to OpenFOAM, or how you have set up the problem. Check those in a systematic manner.
musahossein is offline   Reply With Quote

Old   June 29, 2016, 11:39
Question
  #16
Senior Member
 
Asmaa
Join Date: Mar 2016
Posts: 102
Rep Power: 10
foamiste is on a distinguished road
Hello,
I am simulating a mixing tank using multiphaseEulerFoam and I get this error message

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


I understand that it's from my BC, because I am using movingwall, so how can I set movingWall without having problems when I run the simulation?
foamiste 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
Von Karman street simulation with icoFoam agrewal OpenFOAM Running, Solving & CFD 3 February 9, 2008 18:12
Transient simulation Error information Li CFX 0 July 25, 2007 12:27
Transient simulation error sree CFX 0 November 2, 2005 11:03
Transient simulation error on start - Korsh Mik CFX 1 November 2, 2005 10:08
MRF simulation : continuity residual high as 0.4 guru FLUENT 2 February 7, 2005 10:33


All times are GMT -4. The time now is 00:09.