How to avoid the sudden divergence

390 views
Skip to first unread message

Haoran

unread,
May 16, 2019, 4:08:26 AM5/16/19
to Nek5000
Hi Neks,
         Recently I meet a tough problem. During the calculation process ,  the Courant number will increase sharply in a several steps. I have try to decrease the fixed time step, reduce Re to solve the problem but I failed.

         Do you have any suggestions about it? Part of the log file is appended below. Thank you for your support in advance.


Haoran


1. part of log


Step    865, t= 9.9465381E+01, DT= 1.0000000E-03, C=  0.676 1.1732E+04 3.7107E+01
             Solving for fluid
        865  Project PRES           6.5182E-02   1.2862E+02   1.9732E+03   8   8
        865  PRES gmres       510   1.3665E-04   1.8470E-03   1.0000E-04   2.2139E+01   3.8261E+01    F
        865  Hmholtz VELX      42   7.3102E-08   5.2118E+00   1.0000E-07
        865  Hmholtz VELY      40   8.4808E-08   4.2469E+00   1.0000E-07
        865  Hmholtz VELZ      60   8.2604E-08   1.8329E+03   1.0000E-07
        865  volflow Z              1.8361E+03   3.1092E+01   4.3972E-02   3.1136E+01
             L1/L2 DIV(V)           2.4790E-02   1.0814E+00
             L1/L2 QTL              0.0000E+00   0.0000E+00
             L1/L2 DIV(V)-QTL       2.4790E-02   1.0814E+00
             WARNING: DIV(V)-QTL too large!
        865  Fluid done  9.9465E+01  4.0846E+01
Step    866, t= 9.9466381E+01, DT= 1.0000000E-03, C=  0.676 1.1773E+04 4.1043E+01
             Solving for fluid
        866  Project PRES           5.8296E-02   1.2862E+02   2.2063E+03   8   8
        866  PRES gmres       510   1.8368E-04   1.6519E-03   1.0000E-04   2.2711E+01   3.8805E+01    F
        866  Hmholtz VELX      42   7.3101E-08   5.2125E+00   1.0000E-07
        866  Hmholtz VELY      40   8.4875E-08   4.2672E+00   1.0000E-07
        866  Hmholtz VELZ      60   8.2604E-08   1.8329E+03   1.0000E-07
        866  volflow Z              1.8361E+03   3.1092E+01   4.3972E-02   3.1136E+01
             L1/L2 DIV(V)           2.4790E-02   1.0820E+00
             L1/L2 QTL              0.0000E+00   0.0000E+00
             L1/L2 DIV(V)-QTL       2.4790E-02   1.0820E+00
             WARNING: DIV(V)-QTL too large!
        866  Fluid done  9.9466E+01  4.1382E+01
Step    867, t= 9.9467381E+01, DT= 1.0000000E-03, C=  0.677 1.1814E+04 4.1591E+01
             Solving for fluid
        867  Project PRES           7.6838E-02   1.2862E+02   1.6739E+03   8   8
        867  PRES gmres       510   2.2527E-04   2.1773E-03   1.0000E-04   2.2423E+01   3.8507E+01    F
        867  Hmholtz VELX      42   7.3104E-08   5.2139E+00   1.0000E-07
        867  Hmholtz VELY      40   8.4996E-08   4.3027E+00   1.0000E-07
        867  Hmholtz VELZ      60   8.2604E-08   1.8329E+03   1.0000E-07
        867  volflow Z              1.8361E+03   3.1092E+01   4.3976E-02   3.1136E+01
             L1/L2 DIV(V)           2.4790E-02   1.0829E+00
             L1/L2 QTL              0.0000E+00   0.0000E+00
             L1/L2 DIV(V)-QTL       2.4790E-02   1.0829E+00
             WARNING: DIV(V)-QTL too large!
        867  Fluid done  9.9467E+01  4.1102E+01
Step    868, t= 9.9468381E+01, DT= 1.0000000E-03, C=  0.807 1.1856E+04 4.1353E+01
             Solving for fluid
        868  Project PRES           1.4022E-01   1.2863E+02   9.1734E+02   8   8
        868  PRES gmres       510   3.7823E-04   3.9732E-03   1.0000E-04   2.3275E+01   3.9419E+01    F
        868  Hmholtz VELX      42   7.3110E-08   5.2168E+00   1.0000E-07
        868  Hmholtz VELY      40   8.5203E-08   4.3706E+00   1.0000E-07
        868  Hmholtz VELZ      60   8.2604E-08   1.8329E+03   1.0000E-07
        868  volflow Z              1.8361E+03   3.1092E+01   4.3978E-02   3.1136E+01
             L1/L2 DIV(V)           2.4790E-02   1.0843E+00
             L1/L2 QTL              0.0000E+00   0.0000E+00
             L1/L2 DIV(V)-QTL       2.4790E-02   1.0843E+00
             WARNING: DIV(V)-QTL too large!
        868  Fluid done  9.9468E+01  4.2031E+01
Step    869, t= 9.9469381E+01, DT= 1.0000000E-03, C=  0.956 1.1898E+04 4.2248E+01
             Solving for fluid
        869  Project PRES           1.8068E-01   1.2864E+02   7.1200E+02   8   8
        869  PRES gmres       510   4.0328E-04   5.1196E-03   1.0000E-04   2.2137E+01   3.8222E+01    F
        869  Hmholtz VELX      42   7.3124E-08   5.2233E+00   1.0000E-07
        869  Hmholtz VELY      40   8.5564E-08   4.5171E+00   1.0000E-07
        869  Hmholtz VELZ      60   8.2604E-08   1.8329E+03   1.0000E-07
        869  volflow Z              1.8361E+03   3.1092E+01   4.3972E-02   3.1136E+01
             L1/L2 DIV(V)           2.4790E-02   1.0869E+00
             L1/L2 QTL              0.0000E+00   0.0000E+00
             L1/L2 DIV(V)-QTL       2.4790E-02   1.0869E+00
             WARNING: DIV(V)-QTL too large!
        869  Fluid done  9.9469E+01  4.0833E+01
Step    870, t= 9.9470381E+01, DT= 1.0000000E-03, C=  1.110 1.1939E+04 4.1170E+01
             Solving for fluid
        870  Project PRES           4.0948E-01   1.2869E+02   3.1428E+02   8   8
        870  PRES gmres       510   9.2960E-04   1.1603E-02   1.0000E-04   2.2244E+01   3.8336E+01    F
        870  Hmholtz VELX      42   7.3183E-08   5.2411E+00   1.0000E-07
        870  Hmholtz VELY      40   8.6194E-08   4.8911E+00   1.0000E-07
        870  Hmholtz VELZ      60   8.2604E-08   1.8329E+03   1.0000E-07
        870  volflow Z              1.8361E+03   3.1092E+01   4.3966E-02   3.1136E+01
             L1/L2 DIV(V)           2.4790E-02   1.0924E+00
             L1/L2 QTL              0.0000E+00   0.0000E+00
             L1/L2 DIV(V)-QTL       2.4790E-02   1.0924E+00
             WARNING: DIV(V)-QTL too large!
        870  Fluid done  9.9470E+01  4.0950E+01
Step    871, t= 9.9471381E+01, DT= 1.0000000E-03, C=  1.720 1.1980E+04 4.1196E+01
             Solving for fluid
        871  Project PRES           8.0954E-01   1.2895E+02   1.5929E+02   8   8
        871  PRES gmres       510   1.8954E-03   2.2939E-02   1.0000E-04   2.2305E+01   3.8383E+01    F
        871  Hmholtz VELX      42   7.3411E-08   5.3072E+00   1.0000E-07
        871  Hmholtz VELY      40   8.7196E-08   6.0546E+00   1.0000E-07
        871  Hmholtz VELZ      60   8.2604E-08   1.8329E+03   1.0000E-07
        871  volflow Z              1.8361E+03   3.1092E+01   4.3962E-02   3.1136E+01
             L1/L2 DIV(V)           2.4790E-02   1.1075E+00
             L1/L2 QTL              0.0000E+00   0.0000E+00
             L1/L2 DIV(V)-QTL       2.4790E-02   1.1075E+00
             WARNING: DIV(V)-QTL too large!
        871  Fluid done  9.9471E+01  4.0959E+01
Step    872, t= 9.9472381E+01, DT= 1.0000000E-03, C=  3.841 1.2021E+04 4.1161E+01
             Solving for fluid
        872  Project PRES           3.9845E+00   1.3113E+02   3.2910E+01   8   8
        872  PRES gmres       510   8.9476E-03   1.1290E-01   1.0000E-04   2.2963E+01   3.9068E+01    F
        872  Hmholtz VELX      42   7.4327E-08   5.6950E+00   1.0000E-07
        872  Hmholtz VELY      40   8.8701E-08   1.0373E+01   1.0000E-07
        872  Hmholtz VELZ      60   8.2604E-08   1.8329E+03   1.0000E-07
        872  volflow Z              1.8361E+03   3.1092E+01   4.4019E-02   3.1136E+01
             L1/L2 DIV(V)           2.4789E-02   1.1739E+00
             L1/L2 QTL              0.0000E+00   0.0000E+00
             L1/L2 DIV(V)-QTL       2.4789E-02   1.1739E+00
             WARNING: DIV(V)-QTL too large!
        872  Fluid done  9.9472E+01  4.1656E+01
 CFL, Ctarg!   13.308803137801068       0.50000000000000000     

      873  9.9472E+01 Write checkpoint
       FILE:/home/Nek5000/run/re10000/turb0.f00005                                                                  
        
           2  Emergency exit:         873    time =   99.472381418594168     
  Latest solution and data are dumped for post-processing.
  *** STOP ***




2. part of .par file

#
# nek parameter file
#
[GENERAL] 
#startFrom = turb0.f00001
stopAt = endTime
endTime = 2000.0 

dt = 1.0e-03
#dt = 0
timeStepper = bdf3
extrapolation = OIFS
variableDt = yes
targetCFL = 1.5

writeControl = runTime
writeInterval = 0.2

filtering = hpfrt
filterWeight = 10
filterCutoffRatio = 0.9

[PROBLEMTYPE]
variableProperties = no
equation = incompNS

[PRESSURE]
preconditioner = semg_amg
residualTol = 1e-04
residualProj = yes

[VELOCITY]
residualTol = 1e-07
density = 1
residualProj = no
viscosity = -7500





Divyansh Khattak

unread,
May 16, 2019, 4:12:04 AM5/16/19
to Haoran, Nek5000
You may try using variable time-stepping which will try to keep your Courant number near the value specified in your targetCFL in par file or parameter(26) in your rea file. 

--
You received this message because you are subscribed to the Google Groups "Nek5000" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nek5000+u...@googlegroups.com.
To post to this group, send email to nek...@googlegroups.com.
Visit this group at https://groups.google.com/group/nek5000.
To view this discussion on the web visit https://groups.google.com/d/msgid/nek5000/49c055ff-cbc5-4b68-9528-0509a12a9de7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Divyansh Khattak
Graduate Student, Mechanical Science and Engineering,
University of Illinois, Urbana Champaign

Haoran

unread,
May 16, 2019, 5:28:15 AM5/16/19
to Nek5000
Thank you for your rapid reply. Khattak. And could you please give other suggestions to get a steady state of fully developed turbulent flow from a initial flow field in complex geometry? Thank you for your kindness.

Haoran

在 2019年5月16日星期四 UTC+8下午4:12:04,Divyansh Khattak写道:
To unsubscribe from this group and stop receiving emails from it, send an email to nek5000+unsubscribe@googlegroups.com.

To post to this group, send email to nek...@googlegroups.com.
Visit this group at https://groups.google.com/group/nek5000.
To view this discussion on the web visit https://groups.google.com/d/msgid/nek5000/49c055ff-cbc5-4b68-9528-0509a12a9de7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Fischer, Paul

unread,
May 16, 2019, 8:18:07 AM5/16/19
to Haoran, Nek5000

Dear Haoran,


What is your geometry?


Have you looked (with visit) at the solution at times well before and just before

blow-up to see where it is blowing up?


It's possible that you have inflow coming into the outflow boundary, which 

would not be resolved by reducing dt.  If this is the case, you should use

turb_outflow or one of the other options.  (grep turb_outflow Nek5000/core/navier5.f).


It's troubling that your pressure iteration counts are 510 per timestep---they should

be ~20 or so.


Paul



From: nek...@googlegroups.com <nek...@googlegroups.com> on behalf of Haoran <juhao...@gmail.com>
Sent: Thursday, May 16, 2019 4:28:15 AM
To: Nek5000
Subject: Re: [nek5000] How to avoid the sudden divergence
 
To unsubscribe from this group and stop receiving emails from it, send an email to nek5000+u...@googlegroups.com.

To post to this group, send email to nek...@googlegroups.com.
Visit this group at https://groups.google.com/group/nek5000.

Haoran

unread,
May 16, 2019, 10:12:22 PM5/16/19
to Nek5000
Dear Prof. fischer,

Thank you for your reply,  Actually I am working with a 3by3 rod bundle with one pair of periodic boundaries through the flow direction. The way to add driving force in my case studies from turbChannel case. Now I am on the way from initial flow field to steady field with Re =10000 where iterations in PRES steps vary in each step at range from 30-130.   The velocity contour near the divergence is attached below. Could you please give some comments about my case? Thank you very much for your time and support !

Haoran

在 2019年5月16日星期四 UTC+8下午8:18:07,fischerp写道:
123.png

Pau Fradera

unread,
Mar 26, 2025, 10:21:35 PM3/26/25
to Nek5000
Dear Paul Fischer, 

I was reviewing some old discussions and I wanted to ask you if you or someone could clarify how do you know that the pressure iteration counts on that case were supposed to be ~20? I would really like to understand how you were able to know this. Is that something that is always like that? or you guessed this based on something that was shown on that logfile?

Thanks in advance to you or to anyone that can help me with this question.

Sincerely,

Pau

El dia dijous, 16 de maig del 2019 a les 5:18:07 UTC-7, fischerp va escriure:
To unsubscribe from this group and stop receiving emails from it, send an email to nek5000+u...@googlegroups.com.
To post to this group, send email to nek...@googlegroups.com.
Visit this group at https://groups.google.com/group/nek5000.
To view this discussion on the web visit https://groups.google.com/d/msgid/nek5000/49c055ff-cbc5-4b68-9528-0509a12a9de7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Divyansh Khattak
Graduate Student, Mechanical Science and Engineering,
University of Illinois, Urbana Champaign

--
You received this message because you are subscribed to the Google Groups "Nek5000" group.

Philipp Schlatter

unread,
Mar 27, 2025, 2:49:10 AM3/27/25
to nek...@googlegroups.com

pressure iterations, once the flow has stabilised, should be somehwere between 10 and 30, so ~20.

Fischer, Paul

unread,
Mar 27, 2025, 8:37:00 AM3/27/25
to Pau Fradera, Nek5000
Dear Pau,

Philipp is correct re. expected behavior.

We have developed scalable solvers for Nek5000/RS using multilevel preconditioners.  Generally, these are based on local p multigrid within each element coupled with a scalable coarse-grid solver for the unstructured mesh comprising the initial 8 vertices of each element.

Occasionally if the mesh has extremely high aspect ratio cells we see something going up to 100 or so iterations, but 500 is an indicator that something is broken.
Often, the solution has blown up by that point and the initial residual is very large (e.g., 1e10), which makes it difficult to get down to 1e-4 or 1e-6, which are standard target values when the equations are nondimensionalized using a convective time scale.

hth.

Paul Fischer

From: nek...@googlegroups.com <nek...@googlegroups.com> on behalf of Pau Fradera <pau.fr...@gmail.com>
Sent: Wednesday, March 26, 2025 9:21 PM
To: Nek5000 <nek...@googlegroups.com>

Pau Fradera

unread,
Jun 12, 2025, 3:11:41 PM6/12/25
to Nek5000
Dear Paul and Philipp,

Thank you very much for your replies and for the very interesting information. I really appreciate it.

Thank you.

Sincerely,
Pau

El dia dijous, 27 de març del 2025 a les 5:37:00 UTC-7, fischerp va escriure:
Reply all
Reply to author
Forward
0 new messages