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

Different results with icoFoam and simpleFoam..why???

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 10, 2010, 05:43
Default Different results with icoFoam and simpleFoam..why???
  #1
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
nileshjrane is on a distinguished road
Hello all,

I am solving mixing of two jets in a chamber flow. I solved the case with icoFoam and simpleFoam, with same BCs and same fvschemes (turbulence was switched off in simplefoam). But strengely i am getting different flowfield for the two solvers. I am confused.. Can anyone think of any reason for this???
__________________
Imagination is more important than knowledge..

Last edited by nileshjrane; September 10, 2010 at 06:09.
nileshjrane is offline   Reply With Quote

Old   September 10, 2010, 07:29
Default
  #2
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
nileshjrane is on a distinguished road
I tried pisoFoam as well. It runs for laminar case. (I think laminar pisoFoam is same as icoFoam, correct me if i am wrong). But as soon as i switch on turbulence the solution blows in 3-4 iterations itself..i m specifying k and eps values based on turbulent intensity and length scale. I dont understand what is happening...
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   September 11, 2010, 14:23
Default
  #3
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
More details needed to answer

For example, for how long did you simulate with pisoFoam? Are both the solutions converged?

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   September 11, 2010, 15:12
Default
  #4
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
nileshjrane is on a distinguished road
I ran laminar pisoFoam simulation. This is the last timestep output:
Quote:
Time = 0.190269

Courant Number mean: 0.0280662 max: 0.46523
DILUPBiCG: Solving for Ux, Initial residual = 0.000465129, Final residual = 7.29107e-08, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.000304322, Final residual = 5.17427e-08, No Iterations 1
DICPCG: Solving for p, Initial residual = 0.00160079, Final residual = 0.000157785, No Iterations 10
time step continuity errors : sum local = 6.8602e-09, global = 1.75327e-10, cumulative = 1.53384e-07
DICPCG: Solving for p, Initial residual = 0.000229767, Final residual = 9.70914e-07, No Iterations 154
time step continuity errors : sum local = 4.22184e-11, global = 6.43781e-13, cumulative = 1.53385e-07
ExecutionTime = 122.17 s ClockTime = 122 s
The values are going down so i suppose it will converge without any glitch.

for icoFoam i ran case till about same time:

Quote:
Time = 0.197402

Courant Number mean: 0.0141889 max: 0.42272
DILUPBiCG: Solving for Ux, Initial residual = 8.74097e-09, Final residual = 8.74097e-09, No Iterations 0
DILUPBiCG: Solving for Uz, Initial residual = 2.66859e-08, Final residual = 2.66859e-08, No Iterations 0
DICPCG: Solving for p, Initial residual = 1.02221e-06, Final residual = 9.10455e-07, No Iterations 1
time step continuity errors : sum local = 1.22993e-11, global = -1.66116e-12, cumulative = 4.25772e-08
DICPCG: Solving for p, Initial residual = 9.17487e-07, Final residual = 9.17487e-07, No Iterations 0
time step continuity errors : sum local = 1.23943e-11, global = -1.72819e-12, cumulative = 4.25755e-08
ExecutionTime = 9769.2 s ClockTime = 9874 s
geometry, BCs identical and both cases laminar.
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   September 11, 2010, 15:25
Default
  #5
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
nileshjrane is on a distinguished road
Here are the case files.

As soon as switch on turbulence, the solution diverges. Same thing is happening for simpleFoam.

Quote:
Time = 114

DILUPBiCG: Solving for Ux, Initial residual = 0.772595, Final residual = 0.0213943, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 0.63506, Final residual = 0.0144294, No Iterations 1
DICPCG: Solving for p, Initial residual = 6.20921e-34, Final residual = 6.20921e-34, No Iterations 0
time step continuity errors : sum local = 7.6134e+45, global = -2.00193e+29, cumulative = -2.00193e+29
DILUPBiCG: Solving for epsilon, Initial residual = 0.00202807, Final residual = 2.96562e-10, No Iterations 1
bounding epsilon, min: -8.64629e+80 max: 5.5278e+84 average: 6.60167e+80
DILUPBiCG: Solving for k, Initial residual = 0.422706, Final residual = 2.26954e-07, No Iterations 4
ExecutionTime = 5.59 s ClockTime = 5 s

The continuity error kills the solution..


There is some error for sure as whem i run potentialFoam for initialisation it gives me this massege:

Quote:
Create time

Create mesh for time = 0

Reading field p

Reading field U


Calculating potential flow
DICPCG: Solving for p, Initial residual = 1, Final residual = 0.409896, No Iterations 1
continuity error = 762907
Interpolated U error = 47.2242
ExecutionTime = 0.2 s ClockTime = 0 s

End
Please note that BCs are identical for all.
Attached Files
File Type: gz 2D_icoFoam.tar.gz (2.6 KB, 12 views)
File Type: gz 2D_pisoFoam.tar.gz (3.4 KB, 12 views)
File Type: gz 2D_simpleFoam.tar.gz (3.4 KB, 21 views)
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   September 11, 2010, 18:56
Default
  #6
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Hi,

the solution is not converging also if the flow is assumed to be laminar.

Your linear solvers settings are not good. The relTol to 0.5 on p is definetly not a good idea. Set the relTol to zero, and your conservation error will go to machine precision

Adding a couple of non-orthogonal corrector steps allows a quicker reduction of the residuals on p.

Relax k, eps with a factor of 0.2.

P.S. Are data in m/s? Velocities seem quite high.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   September 12, 2010, 03:38
Default
  #7
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
nileshjrane is on a distinguished road
Hello Alberto,

Your corrections seem to be working.. I will post the progress ASAP.

Well, couple of quick questions:

1) what does relTol exactly means??? I guess i havnt got the correct idea. Say my relTol is 0.5 then what dies it mean??

2) what are local, global and cumulative errors?? i have seen cumulative error sometimes very high than the other two or sometimes very low (in different simulations of coarse).

Thank you for the help..

PS: the velocities are indeed very high. The fuel stream is at Ma=1 and air stream at Ma=0.3.
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   September 12, 2010, 14:21
Default
  #8
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by nileshjrane View Post
1) what does relTol exactly means??? I guess i havnt got the correct idea. Say my relTol is 0.5 then what dies it mean??
Please refer to:
http://www.openfoam.com/docs/user/fvSolution.php

Quote:
2) what are local, global and cumulative errors?? i have seen cumulative error sometimes very high than the other two or sometimes very low (in different simulations of coarse).
Basically they are a measure of the continuity error you have. They are defined in continuityErrs.H (a search on the src directory will bring you there).

Quote:
PS: the velocities are indeed very high. The fuel stream is at Ma=1 and air stream at Ma=0.3.
Then use a compressible code.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   September 12, 2010, 17:52
Default
  #9
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
nileshjrane is on a distinguished road
I am going to use rhoSimpleFoam or rhoPisoFoam as you have already suggested to me in another thread, but as a starting point i am doing incompressible simulations. I thought it will be a good experience.

Thanks for the help and the support. The simpleFoam simulations are giving same results as icoFoam now.
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Old   September 13, 2010, 02:14
Default
  #10
Senior Member
 
matej forman
Join Date: Mar 2009
Location: Brno, Czech Republic
Posts: 182
Rep Power: 17
matejfor is on a distinguished road
Hi, just a quick comment. To run a simulation with nonphysical settings (like incompressible at Ma=1) is not a good experience, it is a bad habit and you will not learn much from it. You should always model the physics as the N-S equations will not converge what ever numerical settings you will try.

If you want first guess results around sonic speeds, you'd better try Euler flow (without viscosity).

good luck
matej
matejfor is offline   Reply With Quote

Old   September 13, 2010, 10:39
Default
  #11
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,912
Rep Power: 36
alberto will become famous soon enoughalberto will become famous soon enough
I agree with matej, and unfortunately running with a non-physical setup seems to be a too common habit, at least judging from the questions on this forum.

A good part of the problems met by OpenFOAM users are due to their poor setup.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats (current status: http://albertopassalacqua.com/?p=1541)
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.
alberto is offline   Reply With Quote

Old   September 13, 2010, 15:08
Default
  #12
Senior Member
 
Nilesh Rane
Join Date: Apr 2010
Posts: 122
Rep Power: 16
nileshjrane is on a distinguished road
Hello matej,

Thanks for your advice. Very true and i absolutely agree with you. I had started with rhoPisoFoam at first from Alberto's advice. By experience i didn't mean the 1st hand results. Its the 1st hand experience on OpenFoam. This is my 1st case with OF and using compressible solvers in a 3D simulation was leading me nowhere. Doing 2D incomressible simulation indeed helped me in the sense it gave me confidence that i can solve something in OpenFoam. First hurdle crossed. In that sense its a good learning experience. Anyway i am not giving the correct BCs in these simulations, i am not even specifying densities and pressures. I am not expecting the results to be correct. I'ld've done compressible inviscid simulation for 1st hand results.

@alberto:

You are correct, the problem is indeed the solver settings and BC for newbies. In fact i figured it out that its probably my BCs are unphysical. But thats part of the game in preliminary mechanical designs. You don't always know whether some BC gonna be unphysical or not or worse you have no other values to work with. By doing simulations only you improve on it. Leave apart BCs, but solvers, i would say its an uphill task getting hang of solver setting in OF. A bit difficult for beginners like me especially with inadequate documentation and c++ coding of OF.

actually I started with velocity of 3m/s, which is pretty much in the incompressible range and slowly increased the velocity. Thanks to you all expert guys on the forum newbies like me survive here.

PS: Today i read your wiki-guide on scalarTransportFoam. I wish we had somelike this for every solver. I will definitely try to write something like this when i'll become expert in OF. At least hoping so..



Thank you all for the help. I am gonna try rhoSimpleFoam and rhoPisoFoam now.
__________________
Imagination is more important than knowledge..
nileshjrane is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
pimpleFoam vs simpleFoam vs pisoFoam vs icoFoam? phsieh2005 OpenFOAM Running, Solving & CFD 45 March 22, 2021 09:14
Problem with transient simulation (icoFoam) skabilan OpenFOAM Running, Solving & CFD 20 June 18, 2014 11:36
SimpleFoam as Newtonian laminar flow solver titio OpenFOAM Running, Solving & CFD 2 March 8, 2013 04:44
coadles, simplefoam...icoFoam...channelOodles mgolbs OpenFOAM Pre-Processing 2 December 1, 2009 03:15
PS3 tutorial results mgarcia OpenFOAM 4 January 21, 2008 12:04


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