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

Convergence in PisoFoam

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

Like Tree1Likes
  • 1 Post By Tobi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 16, 2019, 08:11
Default Convergence in PisoFoam
  #1
New Member
 
Join Date: Dec 2019
Posts: 9
Rep Power: 2
ras27 is on a distinguished road
Hi,

I'm trying the pisoFoam solver for the first time.
So, it is necessary for this transient solver to converge as well to get reasonable results, or isn't it?
What might be the case setup problem/misconfiguration when the pressure residuals are generally relatively high, while decreasing very slowly (much slower then for U,k etc.)?

Regards
ras27
ras27 is offline   Reply With Quote

Old   December 17, 2019, 02:42
Default
  #2
New Member
 
Join Date: Dec 2019
Posts: 9
Rep Power: 2
ras27 is on a distinguished road
After ca. 30.000 seconds velocity magnitude doesn't really change any more over time steps, pressure residuals (initial, final) still change somewhat and are higher than the residuals for the other parameters.
Current p/pFinal-solver is PCG; preconditioner DIC; tolerance 1e-05; relTol 0.01;

The final p residuals are below this value, but not the initial p residuals - is this the actual reason why the calc. doesn't converge?

Solver for the other parameters: U/UFinal: solver PBiCG; preconditioner DILU; tolerance 1e-08; relTol 0; k/kFinal/omega/omegaFinal: same but with tolerance 1e-06

An example time step looks like this:
Courant Number mean: 6.42953e-06 max: 0.000193524 velocity magnitude: 0.356507
DILUPBiCG: Solving for Ux, Initial residual = 7.72219e-06, Final residual = 2.09765e-14, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 7.72269e-06, Final residual = 2.1326e-14, No Iterations 1
DILUPBiCG: Solving for Uz, Initial residual = 4.29846e-06, Final residual = 4.14046e-15, No Iterations 1
DICPCG: Solving for p, Initial residual = 0.000942324, Final residual = 9.63831e-06, No Iterations 7
DICPCG: Solving for p, Initial residual = 0.000892736, Final residual = 9.33697e-06, No Iterations 7
DICPCG: Solving for p, Initial residual = 0.000896561, Final residual = 8.91375e-06, No Iterations 7
time step continuity errors : sum local = 2.81459e-14, global = 5.5071e-15, cumulative = -1.14628e-11
DICPCG: Solving for p, Initial residual = 0.00086609, Final residual = 8.85168e-06, No Iterations 7
DICPCG: Solving for p, Initial residual = 0.00086792, Final residual = 8.944e-06, No Iterations 7
DICPCG: Solving for p, Initial residual = 0.000873361, Final residual = 9.25454e-06, No Iterations 7
time step continuity errors : sum local = 2.9222e-14, global = 5.89021e-15, cumulative = -1.14569e-11
DILUPBiCG: Solving for omega, Initial residual = 0.00014519, Final residual = 5.96443e-14, No Iterations 1
DILUPBiCG: Solving for k, Initial residual = 0.000315144, Final residual = 1.67307e-13, No Iterations 1
ExecutionTime = 15945.2 s ClockTime = 31484 s
ras27 is offline   Reply With Quote

Old   December 17, 2019, 06:37
Default
  #3
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Augsburg
Posts: 2,448
Blog Entries: 6
Rep Power: 46
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi,


your solution is already converged (I would expect it). However, in some cases it is hard to achieve a pressure drop more than two or three orders of magnitude. This might be a result of different things such as the norm in which FOAM calculates the residuals or due to some instabilities in your flow (e.g., small vortexes which form). Imagine a fluid flow around a cylinder with a critical Reynolds number of 120. In that case we will get some vortex shedding. Using a steady state solver will not converge to low residuals due to the fact that we have vortexes in the domain that form and propagates. Keeping that scenario, even a transient solver will not converge towards 1e-7 residuals as the flow is always changing.



As you do not give much information about your case, this is the only hints I can give to you. Surely, you also can have numerical instabilities based on the schemes etc.
By the way, your Courant number is 2e-4. So why you don't increase your time-step?
emjay likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   December 17, 2019, 07:21
Default
  #4
New Member
 
Join Date: Dec 2019
Posts: 9
Rep Power: 2
ras27 is on a distinguished road
Hi,

ok, thanks. So, isn't there a real/absolute necessity for the notice "The simulation converged after...time steps" e.g. to have feasible results?
Presumed that I would increase the tolerances (e.g. form 1e-08 to 1e-06 etc.) would this possibly result in convergence a la "The simulation conv. after...time steps", or aren't this tolerances the main convergence criteria?

Note: The simulation converged with simpleFoam...now, I'm trying it with pisoFoam, as I want to introduce a sinusoidal U boundary/initial condition.
By the way, the case is basically a pipe flow with some bodies/geometries causing flow resistance along the flow axis.

As I'm relatively new to OF, I adopted the schemes based on different example cases throughout the web, and am still trying around, i.e.
Code:
ddtSchemes
{
    default         Euler; 
}
gradSchemes
{
    default         Gauss linear;
    grad(U)        cellLimited Gauss linear 0.5; 
}
divSchemes
{
default         none;
    div(phi,U)       Gauss linearUpwind Grad(U);
    div(phi,k)       Gauss upwind;
    div(phi,omega)   Gauss upwind;
    div((nuEff*dev(T(grad(U)))))    Gauss linear;
}
laplacianSchemes
{
    default         Gauss linear limited 0.777;
}
interpolationSchemes
{
    default         linear;
}
snGradSchemes
{
    default        limited 0.777;
}
fluxRequired
{
    default         no;
    p;
 }

Last edited by Tobi; December 17, 2019 at 07:48. Reason: Added Code Tags
ras27 is offline   Reply With Quote

Old   December 17, 2019, 07:27
Default
  #5
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Augsburg
Posts: 2,448
Blog Entries: 6
Rep Power: 46
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Please use code tags if you place anything into the forum. It is hard to read and commonly I ignore those lines. The main problem in statements like these:


Quote:
So, isn't there a real/absolute necessity for the notice "The simulation converged after...time steps" e.g. to have feasible results?
Presumed that I would increase the tolerances (e.g. form 1e-08 to 1e-06 etc.) would this possibly result in convergence a la "The simulation conv. after...time steps", or aren't this tolerances the main convergence criteria?
Is the fact that people do not know the algorithms, linear solvers and the mathematics behind what they are solving. I would expect that if you declare your final residual factor of the pressure to be, e.g.,
Code:
relaxationFactors
{
    fields
    {
        p                 0.2;

        pFinal          0.2;
    }
}
you would get better residuals for the pressure (should be way better). However, imagine such a case while getting "lower" residual value for the pressure of, e.g., 1e-7, will this really lead to a more satisfying/accurate result? What do you think? Furthermore, the tolerances you mentioned are related to the linear solvers.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   December 17, 2019, 07:47
Default
  #6
New Member
 
Join Date: Dec 2019
Posts: 9
Rep Power: 2
ras27 is on a distinguished road
Ok, sorry for that, and thanks for the help so far...I'll play around a bit while trying to get some deeper grasp
ras27 is offline   Reply With Quote

Old   December 17, 2019, 07:49
Default
  #7
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Augsburg
Posts: 2,448
Blog Entries: 6
Rep Power: 46
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quote:
Originally Posted by ras27 View Post
Ok, sorry for that, and thanks for the help so far...I'll play around a bit while trying to get some deeper grasp



For numerical schemes etc. you can check out the OpenFOAM User Guide
For usage of algorithms and relax factors you can check out my book.


Good luck.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   December 17, 2019, 08:03
Default
  #8
New Member
 
Join Date: Dec 2019
Posts: 9
Rep Power: 2
ras27 is on a distinguished road
Ah, ok..thanks for the references.
Im Übrigen LG aus LE
ras27 is offline   Reply With Quote

Old   December 17, 2019, 08:07
Default
  #9
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Augsburg
Posts: 2,448
Blog Entries: 6
Rep Power: 46
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Ah from LE

Then you can bother Dr. Alexander Vakhrushev, he is in the SMMP department and knows almost everything about FOAM.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   December 17, 2019, 08:17
Default
  #10
New Member
 
Join Date: Dec 2019
Posts: 9
Rep Power: 2
ras27 is on a distinguished road
I try to use OpenFoam for some M.Thesis work, still trying to bother no one at the moment, since there is at least some little progress in understanding the program..will try to play around a bit with the case for the next 2 days
ras27 is offline   Reply With Quote

Old   December 18, 2019, 11:37
Default
  #11
New Member
 
Join Date: Dec 2019
Posts: 9
Rep Power: 2
ras27 is on a distinguished road
If the initial residuals are rel. high compared to the final residuals, is it possible to ever get full convergence in the specific case (since the solver tolerances refer to/control the initial residuals)?
Is it normal that the initial res. are several orders of magnitude higher than the final res.?

Addition: If applying a timeVaryingUniformFixedValue (with ramp) BC for the velocity inlet, can there even be a convergence of the computation (inlet velocity changes step-wise)? Or is it simply necessary to run the simulation from start time (0) to end time (e.g. 4seconds/the end of the ramp cycle)? -should be the logical case

bounding k: is there another way to avoid it, besides reducing the time step size? (partially solved, as bounding k vanishes during simulation run)

Is it reasonable for the flow simulation in a ca. 1.8m long pipe (with diverse installations inside) and varying inlet velocity to last approx. 1 day (approx. 24 hours)?

If entries in the ramp-file are changed before the simulation reaches the respective time, does the simulation recognise the updated values or does it continue with/remember the the original ramp-file values at the moment of simulation start?


Regards,
ras27

Last edited by ras27; December 20, 2019 at 06:47.
ras27 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
why pisoFoam take such a long time to converge? izna OpenFOAM Running, Solving & CFD 51 October 25, 2013 03:28
Convergence of CFX field in FSI analysis nasdak CFX 2 June 29, 2009 02:17
Problems with convergence with an easy system franzdrs Main CFD Forum 0 June 15, 2009 19:17
increasing mesh quality is leading to poor convergence tippo CFX 2 May 5, 2009 11:55
convergence problem with SIMPLER NURAY KAYAKOL Main CFD Forum 1 February 24, 1999 14:43


All times are GMT -4. The time now is 21:53.