|
[Sponsors] |
August 24, 2010, 14:04 |
Adaptive Timestepping: Possible Glitch?
|
#1 |
Senior Member
Joshua Counsil
Join Date: Jul 2009
Location: Halifax, Nova Scotia, Canada
Posts: 366
Rep Power: 17 |
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. |
|
August 24, 2010, 14:05 |
|
#2 |
Senior Member
Joshua Counsil
Join Date: Jul 2009
Location: Halifax, Nova Scotia, Canada
Posts: 366
Rep Power: 17 |
Also, as a side note, a smaller timestep is supposed to allow for steadier convergence, n'est pas?
|
|
August 24, 2010, 18:47 |
|
#3 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143 |
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. |
|
August 24, 2010, 18:56 |
|
#4 |
Senior Member
Joshua Counsil
Join Date: Jul 2009
Location: Halifax, Nova Scotia, Canada
Posts: 366
Rep Power: 17 |
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? |
|
August 24, 2010, 19:04 |
|
#5 | |||
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143 |
Quote:
Quote:
Quote:
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. |
||||
August 24, 2010, 19:17 |
|
#6 | ||
Senior Member
Joshua Counsil
Join Date: Jul 2009
Location: Halifax, Nova Scotia, Canada
Posts: 366
Rep Power: 17 |
Quote:
Quote:
|
|||
August 25, 2010, 12:13 |
|
#7 | ||
Senior Member
Lance
Join Date: Mar 2009
Posts: 669
Rep Power: 22 |
Quote:
Quote:
"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? |
|||
August 25, 2010, 14:18 |
|
#8 |
Senior Member
Joshua Counsil
Join Date: Jul 2009
Location: Halifax, Nova Scotia, Canada
Posts: 366
Rep Power: 17 |
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? |
|
August 25, 2010, 17:48 |
|
#9 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143 |
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.
|
|
August 25, 2010, 21:52 |
|
#10 |
Senior Member
Joshua Counsil
Join Date: Jul 2009
Location: Halifax, Nova Scotia, Canada
Posts: 366
Rep Power: 17 |
Thanks for clearing that up.
|
|
|
|
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 |