CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Fixed vs Adaptive time steps

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 11, 2013, 00:28
Default Fixed vs Adaptive time steps
  #1
Member
 
Harry
Join Date: May 2013
Posts: 68
Rep Power: 12
star is on a distinguished road
Hi friends. I am simulating flow around 2D airfoil at low Reynolds number. I assumed flow to be laminar, incompressible and transient. When i used Fixed time steps of 0.001 the residuals and CL converged with an error of about 5% from experimental results. Then I restarted the simulation with Adaptive time step and after a number of time steps the CL has become in regular oscillation (sine wave type). At that moment, i just stopped it, switched to Fixed time step of 0.001 and run it. I found that the CL and residuals converged with an error of 3% from experimental results. My question is
Is it okay to do like this?
and why CL changed (increased in my case) with switching from Adaptive to Fixed time steps?
If it is possible to get accurate CL using Adaptive or Fixed time step, how can I get minimum error.(to increase CL in my case)?

Sorry for long thread and my poor English. Thanks in advance.
star is offline   Reply With Quote

Old   August 12, 2013, 11:29
Default
  #2
Senior Member
 
duri
Join Date: May 2010
Posts: 245
Rep Power: 16
duri is on a distinguished road
To get more clarity on the problem can you answer these questions. Why are you running in unsteady mode?. Is airfoil in separated flow or oscillating airfoil problem etc. What you are trying to estimate?.
What is the time step size of adaptive time and how much it is different from fixed time step.
duri is offline   Reply With Quote

Old   August 13, 2013, 01:35
Default
  #3
Member
 
Harry
Join Date: May 2013
Posts: 68
Rep Power: 12
star is on a distinguished road
Thanks duri for your reply. I am not sure how to know whether the flow is steady or unsteady at such low Reynolds number (i.e 1000) so i just used unsteady. The airfoil is at the angle of attack 4 degree. the published work result of CL is about 0.37 but i got about 0.31 with fixed time step (time step=0.001). I used time step size of 1e-5 for Adaptive time step. can the CL change with using Fixed and/or Adaptive time stepping?
I am in learning stage so thanks for your patience..
star is offline   Reply With Quote

Old   August 13, 2013, 10:46
Default
  #4
Senior Member
 
duri
Join Date: May 2010
Posts: 245
Rep Power: 16
duri is on a distinguished road
I am not getting how unsteadiness related to reynolds number. It should be independent. When the flow is unsteady and if you are running with higher time step it ends up in aliasing. In case of steady flow it doesn't matter. It doesn't matter what you use either fixed time step or adaptive time step. But the time step size is more important to capture the correct physics and for stability.
duri is offline   Reply With Quote

Old   August 13, 2013, 12:13
Default
  #5
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,399
Rep Power: 46
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
If in doubt about a suitable time step size, a sensitivity analysis of this parameter can shed some light on this issue.
Reduce the time step size a few times by a constant factor. The coefficients of lift and drag should converge towards the "correct" value (correct in the sense that the error introduced by a finite time step size tends towards zero, all the other errors are still present).
Just make sure that the physical simulation time is the same for all simulations, e.g. run 4 times as many timesteps if you reduce the time step size by a factor of 4.
flotus1 is offline   Reply With Quote

Old   August 14, 2013, 03:17
Default
  #6
Member
 
Harry
Join Date: May 2013
Posts: 68
Rep Power: 12
star is on a distinguished road
Thanks duri and Alex for your kind reply. As Alex mentioned about time step sensitivity, do you mean that i should run up to same Flow time for different time steps? I tried a few time steps and noticed that the CL doesn't completely converge in the same Flow time if we decrease time step (decrease time steps took more Flow time to converge than larger time steps). so how should i find the best time step out of these. I can show you in detail if you are not getting me. Thanks
star is offline   Reply With Quote

Old   August 14, 2013, 05:30
Default
  #7
Senior Member
 
OJ
Join Date: Apr 2012
Location: United Kindom
Posts: 473
Rep Power: 20
oj.bulmer will become famous soon enough
Typically, there should be around 5-10 coefficient loops within a timestep and after each timestep the residuals should decrease by the order of 3 (ie 1e-2 to 1e-5 etc). If you choose smaller timestep or larger no. of coefficient loops, this decrease in residuals will be larger, but it is upto the timestep-independence of your solution and your criteria for this independence that decides how small you want the timestep.

Often it helps to let the adaptive timestep give you an idea about how small a timestep should be for the given physics, and from then on, you can use appropriate values of timestep and coefficient loops to get results.

OJ
oj.bulmer is offline   Reply With Quote

Old   August 14, 2013, 06:17
Default
  #8
Member
 
Harry
Join Date: May 2013
Posts: 68
Rep Power: 12
star is on a distinguished road
Thanks OJ for your suggestions. I can understand that by choosing smaller time step the decrease in residual will be larger. but can you please elaborate a little how to find time independence of solution and criteria.
As I said previously, I run same problem using different time steps and I got converged CL (almost same results but within different flow time). Here by convergence i mean that CL was not changing within more that 200 time steps and although the residuals were not stable but they were constantly decreasing. is it fine? you can see my residual graph. Thanks again
Attached Images
File Type: jpg SD7003.2.3.jpg (59.2 KB, 88 views)
star is offline   Reply With Quote

Old   August 14, 2013, 06:34
Default
  #9
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,399
Rep Power: 46
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
Quote:
do you mean that i should run up to same Flow time for different time steps?
That is what I was trying to say.
As you already noticed, the physical time it takes for the flow to reach its statistically steady state is not always the same for different time steps, but at least it is a rough estimate.
I just wanted to prevent that your physical simulation time dereases as you decrease the time step size.
Of course one has to make sure that the statistically steady state is reached for each time step size, otherwise the solution cannot be considered converged.

Quote:
so how should i find the best time step out of these
The "best" time step is the one that gives you an acceptable error for the variables you are trying to simulate (lift and drag coefficient) compared to the time-step-independent value.
The size of the acceptable error is your choice.
You might want to consider a Richardson-extrapolation to estimate time-step-independent value

However, if the drag and lift coefficients do not converge towards a time-step-independent value with smaller time step size, there is something wrong with the simulation.
For example, the assumption of laminar flow might be wrong.

Edit: Is your flow even unsteady?
flotus1 is offline   Reply With Quote

Old   August 14, 2013, 06:44
Default
  #10
Senior Member
 
OJ
Join Date: Apr 2012
Location: United Kindom
Posts: 473
Rep Power: 20
oj.bulmer will become famous soon enough
From what I see, the timestep value seems a bit high to the naked eye, since the drop in residuals is of only 1 order max! This doesn't imply appropriate temporal resolution. As I have mentioned, the general guideline for the drop is 3. I would try reducing the timestep in your case, keeping the coefficient loops within 5-10 as I mentioned instead of using 20 loops and larger timesteps, as the former approach gives better temporal resolution. Your oscillations in residuals seem to reduce, why are you sure it is unsteady?
Also, mere number of timesteps for which the Cl was flat, may not be the best way to judge the convergence. The consistency is to be judged as well. e.g. If you are running the simulation for a flow time of say 100 seconds, then the last 20-30 seconds (20-30% of total time towards the end) should show the flatness in your residuals.And depending on how good your temporal resolution is, you may need different flow times for convergence for different timestes. Of course, if your physics is periodic or chaotic, then you will see a definitive pattern with one or more frequencies.

These are of course, general guidelines, and you need to understand what is the extent of sensitivity in your results with timestep/cell size etc, to finally decide on your choices. However, Grid Convergence Index can be a thing to look at, if you want a timestep that gives you solution that is in assymptotic range.

http://www.grc.nasa.gov/WWW/wind/val.../spatconv.html

OJ
oj.bulmer is offline   Reply With Quote

Old   August 14, 2013, 07:36
Default
  #11
Member
 
Harry
Join Date: May 2013
Posts: 68
Rep Power: 12
star is on a distinguished road
Quote:
Originally Posted by flotus1 View Post
I just wanted to prevent that your physical simulation time decreases as you decrease the time step size.
Edit: Is your flow even unsteady?
Thanks Alex. Now i am getting some idea. Let me write my objectives here. As i mentioned at start I am simulating 2d airfoil at Reynolds number of 1000. I guessed the flow will be laminar, incompressible and transient. At this time I have two objectives to learn
1) how to know that the flow is steady or unsteady in this case
2) What is effect of time step size and how to find the best/robust time step.
I used angle of attack of 2 degree. The experimental and published value of CL is about 0.21.
First, I used steady case and found converged CL of 0.203
Then I used Unsteady time and found same result i.e CL=0.203 With different step size of 0.01, 0005 and 0.0025
Does it mean that my problem is actually steady?
Also, as you said "physical simulation time decreases as you decrease the time step size" but in my case simulation time to reach convergence increases. So is this because my assumption of transient or laminar flow is wrong or some other thing?
sorry for too lengthy text.
star is offline   Reply With Quote

Old   August 14, 2013, 07:51
Default
  #12
Senior Member
 
OJ
Join Date: Apr 2012
Location: United Kindom
Posts: 473
Rep Power: 20
oj.bulmer will become famous soon enough
You can't guess often if the simulation is unsteady when BCs are steady. You have to run and see. But if you can get a converged Cl of 0.203, I have no idea why you bother to go transient!

OJ
oj.bulmer is offline   Reply With Quote

Old   August 14, 2013, 07:56
Default
  #13
Member
 
Harry
Join Date: May 2013
Posts: 68
Rep Power: 12
star is on a distinguished road
Thanks Oj for your wonderful information. That's what my first objective is, to know about the steadiness or unsteadiness of flow. (sorry this thread is related to Fixed vs Adaptive time but i will put it here)
you said that your oscillations in residual reduces so it might be steady. Did you mean the end part of residuals in which large oscillations disappeared? I think in unsteady case we will get oscillating residuals with some sequence at the end.
Please correct me if i am wrong? Thanks
star is offline   Reply With Quote

Old   August 14, 2013, 08:07
Default
  #14
Member
 
Harry
Join Date: May 2013
Posts: 68
Rep Power: 12
star is on a distinguished road
Quote:
Originally Posted by oj.bulmer View Post
You can't guess often if the simulation is unsteady when BCs are steady. You have to run and see. But if you can get a converged Cl of 0.203, I have no idea why you bother to go transient!

OJ
I read that "converged solution is not always correct". I don't know this sentence is applicable here because I am comparing with experimental values but I used unsteady case to see the difference.
star is offline   Reply With Quote

Old   August 14, 2013, 08:09
Default
  #15
Super Moderator
 
flotus1's Avatar
 
Alex
Join Date: Jun 2012
Location: Germany
Posts: 3,399
Rep Power: 46
flotus1 has a spectacular aura aboutflotus1 has a spectacular aura about
Notice to self: ask earlier if the flow is transient

Quote:
1) how to know that the flow is steady or unsteady in this case
Since you already performed transient simulation, take a look at the results, for example the monitors of the lift coefficient.
If it converges towards a constant value although the simulation is transient with a sufficiently small time step and cell size, the flow is stationary.
If it oscillates around a constant value after some simulation time, the flow probaly is transient.

Quote:
2) What is effect of time step size and how to find the best/robust time step.
If the flow is steady, a small time step size will only increase the computational cost. There is no need to do a transient simulation.
If the flow is transient, the time step size determines how accurately transient effects like vortex shedding are simulated. Note that a large time step size might even force an unsteady flow to be steady in the simulation.
flotus1 is offline   Reply With Quote

Old   August 14, 2013, 08:36
Default
  #16
Member
 
Harry
Join Date: May 2013
Posts: 68
Rep Power: 12
star is on a distinguished road
Thanks Alex for straight forward and clear answers. Now, I think i have much clear idea. In transient flow the lower the time step the better will it capture the transient effects but at the cost of computation time. So it's good to use such a time step size so that it capture transient effect at minimum computation cost. I will try step size sensitivity on actual transient flow and will see the effects. Thanks once again
star is offline   Reply With Quote

Old   August 14, 2013, 09:10
Default
  #17
Senior Member
 
OJ
Join Date: Apr 2012
Location: United Kindom
Posts: 473
Rep Power: 20
oj.bulmer will become famous soon enough
Quote:
you said that your oscillations in residual reduces so it might be steady.
What I meant is that the oscillations or lack of it might just be the artifacts of incorrect modelling. If you can get a convergence in steady, there is no need to go to transient, since it will give similar results.

Sometimes, you may encounter some cases that are infact steady at the end but unsteady at the beginning and the steady solvers struggle to handle them. In these cases, it may be worthwhile to consider transient. Also, you may want to use transient solver if you want to know how the steady state was achieved over time.

OJ
oj.bulmer is offline   Reply With Quote

Old   August 14, 2013, 10:37
Default
  #18
Member
 
Harry
Join Date: May 2013
Posts: 68
Rep Power: 12
star is on a distinguished road
Thanks OJ. that's very helpful suggestion. I will try more to see the difference. Thanks once again
star is offline   Reply With Quote

Reply


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
Sudden jump in Courant number NJG OpenFOAM Running, Solving & CFD 7 May 15, 2014 13:52
Adaptive time stepping problem for periodic problem daysley FLUENT 7 April 14, 2013 12:27
A simple problem about Adaptive Time steps sakurabogoda CFX 9 December 12, 2012 05:22
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 02:58
CFX-10 - Adaptive Time Stepping James Date CFX 3 October 17, 2005 22:15


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