CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

min time step in transient CFD

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 25, 2017, 07:45
Default min time step in transient CFD
  #1
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
Hi all

The maximum of time step is calculated by Courant Number.
Is there any limitation for min time step in transient CFD simulations?

I have a transient problem that it will be solved for Cr=0.8 .
Now I want to investigate the independence of my problem from time step. so I increased my Cr from 0.8 to 0.3. Every thing is good and exact until 50% of the total time. after that suddenly residuals become in order of 10^20 and time step in order of 10^-10 !!! pressure and velocity become unbounded and the problem become diverged!

Thanks
alimea is offline   Reply With Quote

Old   December 25, 2017, 09:07
Default
  #2
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
The best what you can do is to write results in between and look which of the field get strange.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   December 25, 2017, 09:26
Default
  #3
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by piu58 View Post
The best what you can do is to write results in between and look which of the field get strange.
Thank you
I did what you said. Pressure is increasing in every time step strongly! So I increased the number of loops of solution of pressure correction equation from 1 to 200!! but again the problem became diverged!
alimea is offline   Reply With Quote

Old   December 25, 2017, 11:02
Default
  #4
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
Looks like a problem with the boundary conditions.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   December 25, 2017, 11:27
Default
  #5
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by piu58 View Post
Looks like a problem with the boundary conditions.
I didn't get it! could you please explain your statement?

Thanks
alimea is offline   Reply With Quote

Old   December 25, 2017, 11:48
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Your problem can be due likely to a bug in your code. But if it is not, you have to consider that a small time step requires to work with smaller residuals in your iterative methods to avoid false convergence of the solutions.
And if you want to check the independence of the solution by changing only the time step you need to work on a spatial grid very fine since from the large time step. In practice, the value h has to be evaluated from the smallest time step you use.
FMDenaro is offline   Reply With Quote

Old   December 25, 2017, 12:20
Default
  #7
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 744
Rep Power: 15
piu58 is on a distinguished road
Quote:
Originally Posted by alimea View Post
I didn't get it! could you please explain your statement?

Thanks
It is easy to construct something what is not physical. At least this is valid for me.

If pressure increases it may be you have a closed volume, incompressible medium and "generate" mass somehow. This may happen if you have an inflow but no outflow. Or if you generate mass by density changings or chemical reactions.

I don't know your case, so I can only guess what may be the reason.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   December 25, 2017, 12:23
Default
  #8
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by piu58 View Post
It is easy to construct something what is not physical. At least this is valid for me.

If pressure increases it may be you have a closed volume, incompressible medium and "generate" mass somehow. This may happen if you have an inflow but no outflow. Or if you generate mass by density changings or chemical reactions.

I don't know your case, so I can only guess what may be the reason.
As I have gotten result from this problem by Cr=0.8 (it is validated with papers), I'm sure that non of them is happened. Just when I change Cr from 0.8 to 0.3, the problem become diverged.

Thanks
alimea is offline   Reply With Quote

Old   December 25, 2017, 12:27
Default
  #9
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
Your problem can be due likely to a bug in your code. But if it is not, you have to consider that a small time step requires to work with smaller residuals in your iterative methods to avoid false convergence of the solutions.
And if you want to check the independence of the solution by changing only the time step you need to work on a spatial grid very fine since from the large time step. In practice, the value h has to be evaluated from the smallest time step you use.
thank you
the code is for openFoam.
my residuals are set to 10^-6 . is it enough?
what is h in? ( In practice, the value h has to be evaluated from the smallest time step you use)
alimea is offline   Reply With Quote

Old   December 25, 2017, 12:31
Default
  #10
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by alimea View Post
thank you
the code is for openFoam.
my residuals are set to 10^-6 . is it enough?
what is h in? ( In practice, the value h has to be evaluated from the smallest time step you use)
h is the mesh size and the residuals can be required to be smaller
FMDenaro is offline   Reply With Quote

Old   December 25, 2017, 15:44
Default
  #11
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
h is the mesh size and the residuals can be required to be smaller
Ok
Thank you
I will do that
alimea is offline   Reply With Quote

Old   December 25, 2017, 16:15
Default
  #12
Senior Member
 
Joern Beilke
Join Date: Mar 2009
Location: Dresden
Posts: 498
Rep Power: 20
JBeilke is on a distinguished road
You could be a bit more specific with the description of your flow problem and also OpenFOAM can be anything from financialFoam to potentialFoam ...

Some of our "normal" compressible solvers show a strange behaviour, when we combine shock waves with small time steps.
JBeilke is offline   Reply With Quote

Old   December 26, 2017, 05:38
Default
  #13
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
h is the mesh size and the residuals can be required to be smaller
Hi
I set my residuals to 10^-12 but unfortunately again become diverged!
alimea is offline   Reply With Quote

Old   December 26, 2017, 05:51
Default
  #14
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
you should provide all the details of your simulation
FMDenaro is offline   Reply With Quote

Old   December 26, 2017, 06:05
Default
  #15
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
you should provide all the details of your simulation
steady 2D flow of viscoelastic fluid around a circular cylinder
Re=100 (rho = D = U_inf = 1, mu=0.01)

viscoelastic properties:
FENE-CR model
Wi(wisenberg number) = 80

numerical aspects:
div scheme: upwind (with central will be diverged!)
residuals = 10^-6
PISO algorithm
relaxations: U: 0.5 , p,tau: 0.3
Grid:



thank you
alimea is offline   Reply With Quote

Old   December 26, 2017, 06:10
Default
  #16
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
First of all, I suggest to do the test without the visco-elastic coupling to check if you still have the same problem. At such a low Re number, the main stability constraint is for the viscous part, not for the convective part.
Then consider also the relaxation factors in this simplified test.
FMDenaro is offline   Reply With Quote

Old   December 27, 2017, 23:53
Default
  #17
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
First of all, I suggest to do the test without the visco-elastic coupling to check if you still have the same problem. At such a low Re number, the main stability constraint is for the viscous part, not for the convective part.
Then consider also the relaxation factors in this simplified test.
Could you please explain more about your sentence : "At such a low Re number, the main stability constraint is for the viscous part, not for the convective part."
I solved this problem for Newtonian case (with viscoelastic solver) by Cr=0.3 . It works good, and give me the results close to Cr=0.8 results.
I think as we increase the viscoelastisity, because of non-linear nature of viscoelastic constitutive equation, we cant decrease the time step much more!

Of course I hear that (this is a experience of some of friends) if we decrease time step from a critical value, the problem will be diverged! Maybe for these non-linear equations this limitation is very stronger!
Whats your idea?
alimea is offline   Reply With Quote

Old   December 28, 2017, 05:12
Default
  #18
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,272
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by alimea View Post
Of course I hear that (this is a experience of some of friends) if we decrease time step from a critical value, the problem will be diverged!
Yes. It is because of the Rhie Chow dissipation which is proportional to time step size and below certain time step size it does not provide enough dissipation to keep velocity and pressure coupled.
This is what is possibly happening here.

Also, as he pointed out as viscosity becomes dominant term, convective part stop playing critical part. In your case what it means is that you are solving diffusion or Poisson problem for momentum equation.
What it in turn means is that you can not use implicit under relaxation anymore that modern solvers apply. You need explicit under relaxation.

In numerical point of view implicit urf is used to divide Ap of the matrix and that increases diagonal of matrix. It is well known that this approach does not work for Poisson equation.
arjun is offline   Reply With Quote

Old   December 28, 2017, 06:01
Default
  #19
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by alimea View Post
Could you please explain more about your sentence : "At such a low Re number, the main stability constraint is for the viscous part, not for the convective part."
I solved this problem for Newtonian case (with viscoelastic solver) by Cr=0.3 . It works good, and give me the results close to Cr=0.8 results.
I think as we increase the viscoelastisity, because of non-linear nature of viscoelastic constitutive equation, we cant decrease the time step much more!

Of course I hear that (this is a experience of some of friends) if we decrease time step from a critical value, the problem will be diverged! Maybe for these non-linear equations this limitation is very stronger!
Whats your idea?

For an explicit time-marching scheme, the numerical stability region is determined by the curve (in the 1D case) cfl=f(Re_h), being Re_h the cell Reynolds number. Only for Re_h >>1 you can recover the constraint due to only the cfl value.
In your case, at Re=100 I suppose you are working at Re_h=O(1) so that the max cfl value for the stability is much lower than it would be for the inviscid case.
FMDenaro is offline   Reply With Quote

Old   December 29, 2017, 03:43
Default
  #20
Senior Member
 
A. Min
Join Date: Mar 2015
Posts: 305
Rep Power: 12
alimea is on a distinguished road
Quote:
Originally Posted by arjun View Post
Yes. It is because of the Rhie Chow dissipation which is proportional to time step size and below certain time step size it does not provide enough dissipation to keep velocity and pressure coupled.
This is what is possibly happening here.

Also, as he pointed out as viscosity becomes dominant term, convective part stop playing critical part. In your case what it means is that you are solving diffusion or Poisson problem for momentum equation.
What it in turn means is that you can not use implicit under relaxation anymore that modern solvers apply. You need explicit under relaxation.

In numerical point of view implicit urf is used to divide Ap of the matrix and that increases diagonal of matrix. It is well known that this approach does not work for Poisson equation.
Thanks for your nice answer. because it will force me to learn some new concept. could you please explain about these concepts, or give me link or reference to read about them:
1- dissipation (physical or numerical?). especially what is Rhie Chow dissipation?
2- what are implicit and explicit under relaxations? what is the difference between them?

why did you think that in my problem, viscosity becomes dominant term?
alimea is offline   Reply With Quote

Reply

Tags
time step size, transient


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
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field lakeat OpenFOAM Community Contributions 58 December 23, 2021 02:36
p_rgh initial residual no change with different settings manuc OpenFOAM Running, Solving & CFD 3 June 26, 2018 15:53
pimpleDyMFoam computation randomly stops babapeti OpenFOAM Running, Solving & CFD 5 January 24, 2018 05:28
simpleFoam error - "Floating point exception" mbcx4jc2 OpenFOAM Running, Solving & CFD 12 August 4, 2015 02:20
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58


All times are GMT -4. The time now is 18:14.