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

Time step continuity

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree7Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   January 18, 2006, 10:05
Default Hi, does someone know how t
  #1
Member
 
Anja Stretz
Join Date: Mar 2009
Posts: 92
Rep Power: 9
anja is on a distinguished road
Hi,

does someone know how to solve "time step continuity errors" ??


Thanks a lot,
Anja
anja is offline   Reply With Quote

Old   January 18, 2006, 10:23
Default How big are they? They are rel
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,783
Rep Power: 22
hjasak will become famous soon enough
How big are they? They are related to the pressure solver tolerance and you should be able to squeeze them by converging the pressure more tightly. If this doesn't work, you've probably messed up the boundary conditions.

Hrv
luiscardona and mgg like this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   January 18, 2006, 10:36
Default For example: time step contin
  #3
Member
 
Anja Stretz
Join Date: Mar 2009
Posts: 92
Rep Power: 9
anja is on a distinguished road
For example:
time step continuity errors :
sum local = 1.05535e-08, global = 1.65393e-14, cumulative = -9.944e-11

What exactly do you mean by converging the pressure more tightly?

Anja
anja is offline   Reply With Quote

Old   January 18, 2006, 10:41
Default This does not worry me at all:
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,783
Rep Power: 22
hjasak will become famous soon enough
This does not worry me at all: it says your global continuity error is 1e-14, which is the double precision round-off error, the sum local tells me that in the line above your pressure solver has converged to about 1e-8; in other words, all is well.

Nothing to worry about here.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   January 18, 2006, 10:49
Default Okay then. I was searching
  #5
Member
 
Anja Stretz
Join Date: Mar 2009
Posts: 92
Rep Power: 9
anja is on a distinguished road
Okay then.

I was searching a reason for the very long duration time of the calculation, which I have just launched. Every single time step takes around 10 minutes and before I didn't get an error message for this case.
I try to calculate an incompressible, laminar flow through a s-shaped tube.

Anja
anja is offline   Reply With Quote

Old   January 19, 2006, 05:22
Default Hi Anja, It sounds to me as
  #6
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,783
Rep Power: 22
hjasak will become famous soon enough
Hi Anja,

It sounds to me as if you need to tune the solver. For a steady-state laminar flow, I would use simpleFoam with the "laminar" turbulence model. You can then play around with under-relaxation factors, convergence parameters and discretisation to get a decent result. 10 mins per iteration is massively too much, unless you're trying to do a couple of million cells of a single-CPU machine.

Is your mesh hexahedral or tetrahedral or mixed? How many cells, any problems reported by checkMesh? Do you have some fancy boundary conditions? Which solver are you using? Can you post the output from a single iteration (the one that takes 10 mins) - I'll have a look and see if there's somethign obvious I can suggest.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   January 20, 2006, 07:59
Default The mesh consists of 386106 he
  #7
Member
 
Anja Stretz
Join Date: Mar 2009
Posts: 92
Rep Power: 9
anja is on a distinguished road
The mesh consists of 386106 hexahedral cells.
Not one problem was reported by checkMesh.

The boundary conditions are:
wall; physicalType wall; p=zeroGradient; U=0 0 0
inlet;physicalType inlet; p=zeroGradient; U=4 0 0
outlet;physicalType outlet; p=0; U=zeroGradient

I used icoFoam.

Time = 0.0002

Mean and max Courant Numbers = 0.0186142 0.789515
BICCG: Solving for Ux, Initial residual = 0.403172, Final residual = 1.85342e-06, No Iterations 3
BICCG: Solving for Uy, Initial residual = 0.334868, Final residual = 5.72366e-07, No Iterations 3
BICCG: Solving for Uz, Initial residual = 0.30369, Final residual = 1.64811e-06, No Iterations 3
ICCG: Solving for p, Initial residual = 0.0138496, Final residual = 9.63037e-07, No Iterations 851
ICCG: Solving for p, Initial residual = 0.128861, Final residual = 9.18745e-07, No Iterations 858
ICCG: Solving for p, Initial residual = 0.0693657, Final residual = 9.58556e-07, No Iterations 849
time step continuity errors : sum local = 1.16673e-07, global = 1.2324e-10, cumulative = -8.26334e-11
ICCG: Solving for p, Initial residual = 0.0237425, Final residual = 8.75212e-07, No Iterations 855
ICCG: Solving for p, Initial residual = 0.164026, Final residual = 8.78886e-07, No Iterations 856
ICCG: Solving for p, Initial residual = 0.0716675, Final residual = 9.91469e-07, No Iterations 850
time step continuity errors : sum local = 2.52566e-08, global = 1.38281e-12, cumulative = -8.12506e-11
ExecutionTime = 641.55 s

It would be really great, if you could help me.
Anja
anja is offline   Reply With Quote

Old   January 20, 2006, 08:23
Default Hehe, a perfect candidate :-)
  #8
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,783
Rep Power: 22
hjasak will become famous soon enough
Hehe, a perfect candidate :-)

The time of simulation is all spent in the pressure solver, which is doing way too many iterations (6 times 800). Secondly, it looks like the non-orthogonal pressure correctors are not converging and PISO is not too happy either.

Try the following:
- use the AMG solver on the pressure
- try changing the discretisation of the pressure laplacian from Gauss linear corrected to Gauss linear limited
- reduce the number of non-orthogonal correctors to 1
- run checkMesh and report the non-orthogonality problems it reports (is the mesh really that bad?).

This should be relatively easy to fix.

Hrv
Alhasan and simt like this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   January 20, 2006, 09:10
Default I can't find a tutorial using
  #9
Member
 
Anja Stretz
Join Date: Mar 2009
Posts: 92
Rep Power: 9
anja is on a distinguished road
I can't find a tutorial using the AMG solver.
What about: AMG 1e-06 0 0 ??

And for the laplacian scheme:
Gauss linear limited 1 ??

Concerning the checkMesh:
Mesh non-orthogonality Max: 39.6288 average: 8.72216
Non-orthogonality check OK.
anja is offline   Reply With Quote

Old   January 20, 2006, 09:24
Default Try: Gauss linear limited 1
  #10
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,783
Rep Power: 22
hjasak will become famous soon enough
Try:

Gauss linear limited 1;

p AMG 1e-06 0 100;

(the last number is the number of equations on the top level)

The mesh is good, looks like the CG is struggling a bit. I am really interested, please let me know if the AMG helps. Are you running on one CPU or in parallel?

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   January 20, 2006, 09:38
Default Gauss linear limited 1; s
  #11
Member
 
Anja Stretz
Join Date: Mar 2009
Posts: 92
Rep Power: 9
anja is on a distinguished road
Gauss linear limited 1;

solvers
p AMG 1e-06 0 100;
U BICCG 1e-05 0;

PISO
//momentumPredictor yes;
nCorrectors 2;
nNonOrthogonalCorrectors 0;
//pRefCell 0;
//pRefValue 0;
//fluxGradp yes;
(These // I also had before, but now it's only nCorrectors; nNonOrthogonalCorrectors)


Here some excerpts:
Time = 0.0003; ExecutionTime = 258.17 s
Time = 0.0005; ExecutionTime = 378.72 s
Time = 0.0008; ExecutionTime = 547.68 s

What do you think?
anja is offline   Reply With Quote

Old   January 20, 2006, 14:16
Default Better, huh? :-) How much w
  #12
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,783
Rep Power: 22
hjasak will become famous soon enough
Better, huh? :-)

How much work does the AMG do? I think you're in business now...

Good luck,

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   May 11, 2006, 07:50
Default Hello! I have had the same
  #13
newbee
Guest
 
Posts: n/a
Hello!

I have had the same problem as mentioned above, with many pressure itterations, but have had higher sum local and global values (about e-4). The print out looks like the following for a time step:

Time = 0.1

BICCG: Solving for Ux, Initial residual = 1, Final residual = 0.0164738, No Iterations 1
BICCG: Solving for Uy, Initial residual = 1, Final residual = 0.0138657, No Iterations 1
BICCG: Solving for Uz, Initial residual = 1, Final residual = 0.00943703, No Iterations 1
ICCG: Solving for p, Initial residual = 1, Final residual = 0.0871697, No Iterations 2223
time step continuity errors : sum local = 0.000278016, global = -1.48514e-06, cumulative = -1.48514e-06
BICCG: Solving for epsilon, Initial residual = 1, Final residual = 0.0117474, No Iterations 1
BICCG: Solving for k, Initial residual = 1, Final residual = 0.000467489, No Iterations 1
Creating alphaEff.
BICCG: Solving for T, Initial residual = 1, Final residual = 0.0442807, No Iterations 43
ExecutionTime = 65.31 s

Then I tried to modify it like it is said above and get the following print out (i.e. higher sum local and global values):

Time = 0.1

BICCG: Solving for Ux, Initial residual = 1, Final residual = 0.0164738, No Iterations 1
BICCG: Solving for Uy, Initial residual = 1, Final residual = 0.0138657, No Iterations 1
BICCG: Solving for Uz, Initial residual = 1, Final residual = 0.00943703, No Iterations 1
AMG: Solving for p, Initial residual = 1, Final residual = 2.66915, No Iterations 501
AMG: Solving for p, Initial residual = 0.416487, Final residual = 0.342388, No Iterations 501
time step continuity errors : sum local = 0.0087574, global = -8.70409e-05, cumulative = -8.70409e-05
BICCG: Solving for epsilon, Initial residual = 1, Final residual = 0.011749, No Iterations 1
BICCG: Solving for k, Initial residual = 1, Final residual = 0.000470466, No Iterations 1
Creating alphaEff.
BICCG: Solving for T, Initial residual = 1, Final residual = 0.0710206, No Iterations 43
BICCG: Solving for T, Initial residual = 0.0572284, Final residual = 0.00546826, No Iterations 29
ExecutionTime = 101.47 s

I have also checked the mesh and the only thing wrong with it was that trere were 4 points that wasn't in use and put into an according file. But stil I have to many itterations for the pressure.

Thankfull for help
/Erik
  Reply With Quote

Old   March 7, 2007, 08:37
Default Hello. I also have a problem
  #14
New Member
 
Holger Putz
Join Date: Mar 2009
Posts: 5
Rep Power: 9
holger is on a distinguished road
Hello.
I also have a problem with these continuity errors. I am running a modified simpleFoam case, where a liquid is streaming through a small cylinder into a bigger one, driven by the bodyforce and an inlet-velocity. The time step continuity errors are rising, and after 10 iterations they are about 10^11. When I run the same case without the small inlet-cylinder, everything is fine and the error is about 10^-9. also when I take the mesh with the small cylinder, but set g=0m/sē the error stays small. I have allready tried a lot of combinations for solvers, bc and relaxation factors.
my mesh has about 1.2million cells.
do you have any suggestions?
hoping for your help,


holger is offline   Reply With Quote

Old   March 7, 2007, 08:45
Default Yes. Check your boundary cond
  #15
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,783
Rep Power: 22
hjasak will become famous soon enough
Yes. Check your boundary condition on that additional inlet. My guess is that you have specified both the pressure and the velocity at the boundary, which will give you a continuity error.

Let me know,

Hrv
skeptik and Jamie.Jol like this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   March 7, 2007, 09:07
Default Thank you for your quick reply
  #16
New Member
 
Holger Putz
Join Date: Mar 2009
Posts: 5
Rep Power: 9
holger is on a distinguished road
Thank you for your quick reply.
I have checked, but at the inlet (there is only one at the top of the smaller cylinder) I have only specified the velocity with 0.1m/s. pressure is fixed gradient because the bc is only inlet.
Maybe there is a missunderstanding on my side.

greetings, Holger
holger is offline   Reply With Quote

Old   March 7, 2007, 09:13
Default Yup. Put zero gradient on the
  #17
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,783
Rep Power: 22
hjasak will become famous soon enough
Yup. Put zero gradient on the pressure and the continuity error will go away. The fixed gradient b.c. gives you additional flux which is not accounted for in the continuity equation.

Hrv
skeptik likes this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   March 7, 2007, 09:36
Default I'm sorry. I meant zero gradie
  #18
New Member
 
Holger Putz
Join Date: Mar 2009
Posts: 5
Rep Power: 9
holger is on a distinguished road
I'm sorry. I meant zero gradient. the top of the small cylinder has p zero gradient.
what I am really wondering about is that everything works when I take away the small one and take the top of the big cylinder as an inlet. I have simulated several other geometries with this modified simpleFoam solver, but this is the only one where I get an error.
holger is offline   Reply With Quote

Old   March 8, 2007, 03:54
Default I now created a inlet on the
  #19
New Member
 
Holger Putz
Join Date: Mar 2009
Posts: 5
Rep Power: 9
holger is on a distinguished road
I now created a inlet on the top of the big cylinder and took the small cylinder away. But these big continuity errors stay. and now, after the 6 iteration the simulation just stops. there is no error-message, its just doing nothing. is there any connection between the number of cells included in the inlet and the continuity error?

Error-Log:

Create mesh for time = 0


Reading environmentalProperties
Reading field p

Reading field U

Reading transportProperties

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model laminar

Starting time loop

Time = 1

BICCG: Solving for Ux, Initial residual = 1, Final residual = 0.0191738, No Ite rations 2
BICCG: Solving for Uy, Initial residual = 1, Final residual = 0.0230878, No Ite rations 2
BICCG: Solving for Uz, Initial residual = 1, Final residual = 0.0119195, No Ite rations 2
AMG: Solving for p, Initial residual = 1, Final residual = 0.0210672, No Iterat ions 5
AMG: Solving for p, Initial residual = 0.151581, Final residual = 0.00186491, N o Iterations 2
AMG: Solving for p, Initial residual = 0.0159399, Final residual = 0.000486127, No Iterations 2
AMG: Solving for p, Initial residual = 0.00352732, Final residual = 0.000146953, No Iterations 2
time step continuity errors : sum local = 0.235539, global = -0.0450524, cumulative = -0.0450524
ExecutionTime = 78.6 s ClockTime = 78 s
.
.
.
.
Time = 5

BICCG: Solving for Ux, Initial residual = 0.327544, Final residual = 0.00769073
BICCG: Solving for Uy, Initial residual = 0.378132, Final residual = 0.0157606,
BICCG: Solving for Uz, Initial residual = 0.330114, Final residual = 0.0149679,
AMG: Solving for p, Initial residual = 0.479773, Final residual = 0.0159471, No
AMG: Solving for p, Initial residual = 0.846998, Final residual = 0.00354764, N
AMG: Solving for p, Initial residual = 0.137398, Final residual = 0.00187623, N
AMG: Solving for p, Initial residual = 0.0499261, Final residual = 0.00105473,
time step continuity errors : sum local = 9.61023, global = 3.38102, cumulative
ExecutionTime = 390.55 s ClockTime = 391 s

Time = 6

BICCG: Solving for Ux, Initial residual = 0.284414, Final residual = 0.0203337,
BICCG: Solving for Uy, Initial residual = 0.318962, Final residual = 0.0192187,
BICCG: Solving for Uz, Initial residual = 0.315278, Final residual = 0.0149193,

New Geometry


greetings,
Holger
holger is offline   Reply With Quote

Old   July 10, 2007, 14:17
Default hi all, a the title said ....
  #20
Senior Member
 
Cedric DUPRAT
Join Date: Mar 2009
Location: Belgium
Posts: 184
Rep Power: 9
cedric_duprat is on a distinguished road
hi all,
a the title said .... I've got also a time step continuity errors ...following with

--> FOAM FATAL IO ERROR : IOstream::check(const char* operation) : error in IOstream
for operation Ostream& operator<<(Ostream&, const Scalar&)
From function IOstream::check(const char* operation) const
in file db/IOstreams/IOstreams/IOcheck.C at line 54.


well ... Foam is very talkative this evening.
So, I checked my mesh, Non-orthogonality check OK.
I changed my solver on the pressure to AMG (with same caracteristic as upper message)
and then, ...It hasn't changed anything:
Mean and max Courant Numbers = 0 0.0488421
Updating boundary gradient of U::outlet by Euler and normal schemes
Saving old-time boundary values of U::outlet
Boundary gradient of U::outlet has already been updated
Boundary gradient of U::outlet has already been updated
BICCG: Solving for Ux, Initial residual = 1, Final residual = 2.872e-07, No Iterations 1
BICCG: Solving for Uy, Initial residual = 1, Final residual = 2.87335e-07, No Iterations 1
BICCG: Solving for Uz, Initial residual = 1, Final residual = 5.11098e-07, No Iterations 1
AMG: Solving for p, Initial residual = 1, Final residual = 0.502698, No Iterations 501
time step continuity errors : sum local = 7.44298e-06, global = -1.76024e-08, cumulative = -1.76024e-08
Updating boundary gradient of U::outlet by Euler and normal schemes
AMG: Solving for p, Initial residual = 0.000116257, Final residual = 6.94937e-05, No Iterations 501
time step continuity errors : sum local = 8.05415e-06, global = 1.43586e-11, cumulative = -1.7588e-08
Updating boundary gradient of U::outlet by Euler and normal schemes


PS: I created my mesh with BlockMesh, using only hexa and, CheckMesh found 4 tetra mesh, it's quite strange, isn't ?

any ideas of what else I can check to solve this ...very small problem?
thanks,

Cedric
cedric_duprat is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SimpleFoam and Time Step continuity errors philippose OpenFOAM Running, Solving & CFD 56 February 21, 2016 06:44
Time step size and max iterations per time step pUl| FLUENT 31 August 21, 2015 04:46
SELECTING TIME STEP SIZE, NUMBER OF TIME STEP NITUL KALITA FLUENT 2 November 22, 2012 09:28
Long time CHT transient simulation time step.... JP CFX 0 May 9, 2008 03:36
Relation of computational time step with real time Salman Main CFD Forum 2 August 3, 2005 14:13


All times are GMT -4. The time now is 04:24.