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

Adaptive Timestepping: Possible Glitch?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 24, 2010, 14:04
Default Adaptive Timestepping: Possible Glitch?
  #1
Senior Member
 
Joshua Counsil
Join Date: Jul 2009
Location: Halifax, Nova Scotia, Canada
Posts: 366
Rep Power: 17
Josh is on a distinguished road
Good day, all -

I ran an external aerodynamic simulation in CFX in the low Reynolds number flow regime. With the basic SST model, the solution converged to a very low residual. When I switched to the SST transitional model, the simulation did not converge to an acceptable residual. I expected this as the laminar separation bubble is fluctuating. I switched to an unsteady simulation with adaptive timestepping. Published numerical results indicated timesteps of approximately 5E-5 s should be sufficient to capture the phenomenon, so I set my minimum adaptive step to 1E-10 s and my initial step to 1E-5 s. As the simulation progressed, the timesteps got smaller and smaller until they reached the minimum of 1E-10 s. At this point, most of the equations converged to a very low residual, though the continuity residual (p-mass) fluctuated at a higher value. It seemed like the adaptive timesteps wanted to continue to decrease in size, so I restarted my simulation with a lower minimum timestep (1E-20 s). Again, the timesteps decreased in size until they reached the minimum value of 1E-20 s and most of the residuals were very low (max of 1E-15). However, the continuity residual rose during the simulation and fluctuated at a high value once the minimum step of 1E-20 s was achieved. Here's the convergence history:



It seemed like the timesteps wanted to decrease further, so I set the minimum timestep to the lowest value (1E-30 s). However, when I reran the simulation, the timestep size remained unchanged at 1E-20 s for the entire simulation run (about 2000 timesteps). I decided to increase the timestep size to dampen the unsteady effects (vortex shedding, possibly). I set my minimum to 1E-5 s. This value has allowed my lift and drag monitor values to converge to a steadier level, though it, too, remains unchanging in value, despite that the max Courant number is 0.09.

Did I "break" my adaptive timestepping scheme? Why would the simulation at 1E-20 s minimum step adapt to the minimum step, causing the pressure residual to fluctuate at a high value, but not adapt any further when the minimum step was decreased to 1E-30 s?

Thanks for any suggestions or experiences.
Josh is offline   Reply With Quote

Old   August 24, 2010, 14:05
Default
  #2
Senior Member
 
Joshua Counsil
Join Date: Jul 2009
Location: Halifax, Nova Scotia, Canada
Posts: 366
Rep Power: 17
Josh is on a distinguished road
Also, as a side note, a smaller timestep is supposed to allow for steadier convergence, n'est pas?
Josh is offline   Reply With Quote

Old   August 24, 2010, 18:47
Default
  #3
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,700
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Yes, smaller timesteps should allow for easier convergence, but only to a certain extent - with timesteps as tiny as you are running then numeric round-off and noise will cloud the whole thing and make the results rubbish. You can only change timestep size a few E10 before numeric round off creeps in.

So in you case I would put a minimum time step size around the 1e-6 or 1e-5 mark. You seem to have a problem in getting the P-Mass equation to converge - this is your key problem.
ghorrocks is offline   Reply With Quote

Old   August 24, 2010, 18:56
Default
  #4
Senior Member
 
Joshua Counsil
Join Date: Jul 2009
Location: Halifax, Nova Scotia, Canada
Posts: 366
Rep Power: 17
Josh is on a distinguished road
Thanks, Glenn. If I were a betting man, I'd place $100 on every thread that you'd be the first to answer. (Actually, I am a betting man, but I can't find anyone to take that bet up with!)

As I mentioned, I changed the minimum timestep size to 1E-5 s. P-Mass has converged and leveled to a maximum residual of ~9E-7, which should be sufficient. However, I find it strange that my timestep size has not adapted to a larger step throughout its entire run despite that the maximum Courant number is 0.09. In my experience, the Courant number wants to approach a value around 1 to preserve computational costs while ensuring simulation accuracy. Is this a correct observation?
Josh is offline   Reply With Quote

Old   August 24, 2010, 19:04
Default
  #5
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,700
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Quote:
Thanks, Glenn. If I were a betting man, I'd place $100 on every thread that you'd be the first to answer.
To misquote the Young Ones.... "If I had a cent every time I had to do that, I would have $5.43.". Although going off my current post count it would be $18.91.

Quote:
P-Mass has converged and leveled to a maximum residual of ~9E-7
This is probably way tighter than you need. Can probably back that off quite a bit.

Quote:
In my experience, the Courant number wants to approach a value around 1 to preserve computational costs while ensuring simulation accuracy. Is this a correct observation?
NO! I keep hearing this from lots of people but it is wrong. CFX is an implicit code and therefore have no Courant number stability limit. The limit on timestep size is simply what converges and gives adequate temporal accuracy. The Courant number 1 limit comes from explicit solvers where this is an absolute stability limit and if you go beyond it you are guaranteed to get numerical instability - but CFX is not an explicit solver so don't get confused by it.

Keep in mind that some aspects of the CFX numerics have explicit components, such as surface tension. This is one of the key reasons surface tension models have to run with far smaller timesteps. But if you are not running one of these models with explicit components then the time step size can be as big as converges reliably and give adequate temporal accuracy.

For most general CFD you should be able to run Courant numbers much larger than 1. If you are forced to run Courant numbers under 1 then forget CFX and get an explicit CFD code, it will run 10 times faster.
ghorrocks is offline   Reply With Quote

Old   August 24, 2010, 19:17
Default
  #6
Senior Member
 
Joshua Counsil
Join Date: Jul 2009
Location: Halifax, Nova Scotia, Canada
Posts: 366
Rep Power: 17
Josh is on a distinguished road
Quote:
Originally Posted by ghorrocks View Post
This is probably way tighter than you need. Can probably back that off quite a bit.
Of course, though my lift and drag monitor points continue to level out with further convergence, so I'm running it into the ground.

Quote:
Originally Posted by ghorrocks View Post
NO! I keep hearing this from lots of people but it is wrong. CFX is an implicit code and therefore have no Courant number stability limit. The limit on timestep size is simply what converges and gives adequate temporal accuracy. The Courant number 1 limit comes from explicit solvers where this is an absolute stability limit and if you go beyond it you are guaranteed to get numerical instability - but CFX is not an explicit solver so don't get confused by it.
I tried to come back and edit my post after reading up on the implicit/explicit implications of Courant numbers. I should have garnered that conclusion myself based on the basic definitions of implicit and explicit schemes (here, for example: http://en.wikipedia.org/wiki/Implicit_method). Sorry for wasting your time. I'm sort of new to temporal discretization.
Josh is offline   Reply With Quote

Old   August 25, 2010, 12:13
Default
  #7
Senior Member
 
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 22
Lance is on a distinguished road
Quote:
Originally Posted by Josh View Post
In my experience, the Courant number wants to approach a value around 1 to preserve computational costs while ensuring simulation accuracy. Is this a correct observation?
Quote:
Originally Posted by ghorrocks View Post
NO! I keep hearing this from lots of people but it is wrong. CFX is an implicit code and therefore have no Courant number stability limit. The limit on timestep size is simply what converges and gives adequate temporal accuracy. The Courant number 1 limit comes from explicit solvers where this is an absolute stability limit and if you go beyond it you are guaranteed to get numerical instability - but CFX is not an explicit solver so don't get confused by it.
However, when running LES the Courant number should be < 1. From xmod.pdf @ page 110:
"For accuracy, the average Courant (or CFL) number should be in the range of 0.5-1. Larger values can give stable results, but the turbulence may be damped..."

Guess that's why you can have adaptive time stepping based on RMS or MAX Courant number?
Lance is offline   Reply With Quote

Old   August 25, 2010, 14:18
Default
  #8
Senior Member
 
Joshua Counsil
Join Date: Jul 2009
Location: Halifax, Nova Scotia, Canada
Posts: 366
Rep Power: 17
Josh is on a distinguished road
I think Glenn meant that implicit solvers don't have a stability limited by Courant number. That doesn't mean that you shouldn't pay attention to it. If your Courant number is in the hundreds, the solution may be stable but inaccurate.

Am I correct in this presumption, Glenn?
Josh is offline   Reply With Quote

Old   August 25, 2010, 17:48
Default
  #9
Super Moderator
 
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,700
Rep Power: 143
ghorrocks is just really niceghorrocks is just really niceghorrocks is just really niceghorrocks is just really nice
Not quite. For most CFD Courant number is not important as you just get the time step size which gives temporal accuracy you require. There are special cases where Courant number is important - surface tension is one, and Lance has pointed out LES is another special case. But most people don't use surface tension or LES so Courant number is irrelevant to most people.
ghorrocks is offline   Reply With Quote

Old   August 25, 2010, 21:52
Default
  #10
Senior Member
 
Joshua Counsil
Join Date: Jul 2009
Location: Halifax, Nova Scotia, Canada
Posts: 366
Rep Power: 17
Josh is on a distinguished road
Thanks for clearing that up.
Josh 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
adaptive meshing clifford bradford Main CFD Forum 14 September 3, 2022 19:13
Adaptive timestepping Jochem OpenFOAM 6 August 27, 2010 04:08
Adaptive timestepping olwi OpenFOAM Running, Solving & CFD 7 August 3, 2010 09:51
adaptive timestepping techniques Sharks Main CFD Forum 0 April 21, 2003 09:25
unstructured grid sreekanth Main CFD Forum 1 August 6, 2001 15:09


All times are GMT -4. The time now is 16:22.