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

Why do oscilations appear when reducing the time step?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 28, 2015, 07:35
Default Why do oscilations appear when reducing the time step?
  #1
Senior Member
 
Hector Redal
Join Date: Aug 2010
Location: Madrid, Spain
Posts: 243
Rep Power: 16
HectorRedal is on a distinguished road
Hi,

I am simulating a flow past a circular cylinder, and according to references, the fluid flow establishes a oscilating pattern.
Using a certain time step, there is a deviation (5%) in the frequency of my simulation and the claimed frequency in references. For this reason I have reduced the time step in order to obtain better accuracy.
But, when reducing the time step of the simulation, several small oscilations appear additionally to the main oscilation expected. Why are these small oscialtions appearing? Which is the physics behind these oscilations?
I was wondering if there could be an error in the implementation of the algorithm.

Best regards,
Hector.
HectorRedal is offline   Reply With Quote

Old   May 28, 2015, 08:17
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,764
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by HectorRedal View Post
Hi,

I am simulating a flow past a circular cylinder, and according to references, the fluid flow establishes a oscilating pattern.
Using a certain time step, there is a deviation (5%) in the frequency of my simulation and the claimed frequency in references. For this reason I have reduced the time step in order to obtain better accuracy.
But, when reducing the time step of the simulation, several small oscilations appear additionally to the main oscilation expected. Why are these small oscialtions appearing? Which is the physics behind these oscilations?
I was wondering if there could be an error in the implementation of the algorithm.

Best regards,
Hector.
an error in the implementation is always possible but it would imply that your time integration method is not consistent at all...
On the other hand, reducing the computational time step means an increasing in the Nyquist cut-off pi/dt, therefore you velocity field can show more frequencies. But this is relevant in DNS/LES formulation, what are you using?
FMDenaro is offline   Reply With Quote

Old   May 28, 2015, 09:35
Default
  #3
Senior Member
 
Hector Redal
Join Date: Aug 2010
Location: Madrid, Spain
Posts: 243
Rep Power: 16
HectorRedal is on a distinguished road
Hi Filippo,
Thanks for your reply.

I do not use any turbulence model. The simulation is for laminar flow. No DNS or LES formulation is used.

Then, according to your statement, it could be an error in the integration method.
The algorithm contains a relaxation factor for the integration method.
Right now, I have set this relaxation factor to 0.6666, which means that 0.666 times of the velocity at time n is take into account and 0.333 times of the velocity at time n+1 is take into account.

Based on your suggestion, the problem could be in the value used for this relaxation factor.

Best regards,
Hector.
HectorRedal is offline   Reply With Quote

Old   May 28, 2015, 11:12
Default
  #4
Senior Member
 
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19
Martin Hegedus is on a distinguished road
What is your Reynolds number?
Martin Hegedus is offline   Reply With Quote

Old   May 28, 2015, 11:15
Default
  #5
Senior Member
 
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19
Martin Hegedus is on a distinguished road
Oh, and given your time step, what is your maximum CFL number?
Martin Hegedus is offline   Reply With Quote

Old   May 28, 2015, 11:20
Default
  #6
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,764
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by Martin Hegedus View Post
Oh, and given your time step, what is your maximum CFL number?

well, he wrote that diminuishing the time step oscillations appear, that would exclude a numerical instability....
FMDenaro is offline   Reply With Quote

Old   May 28, 2015, 12:09
Default
  #7
Senior Member
 
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19
Martin Hegedus is on a distinguished road
My thought was that he might be using an implicit method.

Edit: Or something with dual time stepping, in which case the max CFL for the outer loop is the number I'm interested in.
Martin Hegedus is offline   Reply With Quote

Old   May 28, 2015, 12:47
Default
  #8
Senior Member
 
Hector Redal
Join Date: Aug 2010
Location: Madrid, Spain
Posts: 243
Rep Power: 16
HectorRedal is on a distinguished road
The Reynolds number is 100 (Which I consider is laminar).

The maximum time step for the algorithm that fulfills the CFL condition is 0.001 (both convective and diffusive limitation), and initially I am using 0.0005 as time step for the simulation. With this value, no small oscilations happens. When using 0.0001 (even more reduced value) as time step for the simulation is when the small osicilations appear.
HectorRedal is offline   Reply With Quote

Old   May 28, 2015, 12:53
Default
  #9
Senior Member
 
Hector Redal
Join Date: Aug 2010
Location: Madrid, Spain
Posts: 243
Rep Power: 16
HectorRedal is on a distinguished road
I am using an implicit method in the equation of the pressure. The value of the relaxation factor for the pressure equation I am using is 0.666.
The type of algortithm I am using is the so called Characteristics Based Split algorithm (CBS), that uses a split scheme with a correction step once the pressure is calculated.
So, both relaxation factors I am using:
One for the velocity (explicit equation): 0.6666
Another for the pressure (implicit equation): 0.6666
HectorRedal is offline   Reply With Quote

Old   May 28, 2015, 12:59
Default
  #10
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,764
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
could you post some results showing the comparison for both time step?

A further issue to check is the threshold for the iterative solvers, it could be useful to diminuish it according to the time step
FMDenaro is offline   Reply With Quote

Old   May 28, 2015, 14:37
Default
  #11
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 1,273
Rep Power: 34
arjun will become famous soon enougharjun will become famous soon enough
Quote:
Originally Posted by HectorRedal View Post
Hi,

I am simulating a flow past a circular cylinder, and according to references, the fluid flow establishes a oscilating pattern.
Using a certain time step, there is a deviation (5%) in the frequency of my simulation and the claimed frequency in references. For this reason I have reduced the time step in order to obtain better accuracy.
But, when reducing the time step of the simulation, several small oscilations appear additionally to the main oscilation expected. Why are these small oscialtions appearing? Which is the physics behind these oscilations?
I was wondering if there could be an error in the implementation of the algorithm.

Best regards,
Hector.
What time stepping scheme you are using.

Also is it a collocated solver? Because pressure velocity may decouple at small time steps and could give you oscillations or checkerboarding.
arjun is offline   Reply With Quote

Old   May 28, 2015, 15:29
Default
  #12
Senior Member
 
Hector Redal
Join Date: Aug 2010
Location: Madrid, Spain
Posts: 243
Rep Power: 16
HectorRedal is on a distinguished road
I am attaching the results I am getting:
- VelocityYDirectionTimeStep1 When using a time step of 0.0005
- VelocityYDirectionTimeStep2 When using a time step of 0.0002

As you can see, when reducing the time step, some oscilations appear in between the main oscilations of the pattern flow.
Attached Images
File Type: jpg VelocityYDirectionTimeStep2.jpg (18.3 KB, 14 views)
File Type: jpg VelocityYDirectionTimeStep1.jpg (26.1 KB, 12 views)
HectorRedal is offline   Reply With Quote

Old   May 28, 2015, 15:40
Default
  #13
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,764
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Try reducing all thresholds in the iterative solvers.
FMDenaro is offline   Reply With Quote

Old   May 28, 2015, 17:36
Default
  #14
Senior Member
 
Martin Hegedus
Join Date: Feb 2011
Posts: 500
Rep Power: 19
Martin Hegedus is on a distinguished road
My area of knowledge is centered around implicit compressible time marching methods. So I'm not sure if that carries over to what you're doing. However, a CFL of 0.5 may be too large to insure accurate time marching for a method with an explicit component. It may be stable but possibly not accurate. One may need to go for dual time stepping, fully implicit, higher order time discretization, or lower CFL to achieve higher time accuracy.

That being said, an Re of 100 is low, so unless your grid is really coarse, I don't see what what the problem is. Hopefully one of the other posts above helps you out.

Good luck,

BTW, I am assuming that the boundary conditions are implemented correctly and that grid is not being subdivided. If the grid is being subdivided and distributed to more than one processor then the B.C.s at the grid edges may be lagged. In which case dual time stepping might be required. But, I'm not sure if that applies to your algorithm.
Martin Hegedus is offline   Reply With Quote

Old   May 29, 2015, 07:41
Default
  #15
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,764
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by HectorRedal View Post
I am attaching the results I am getting:
- VelocityYDirectionTimeStep1 When using a time step of 0.0005
- VelocityYDirectionTimeStep2 When using a time step of 0.0002

As you can see, when reducing the time step, some oscilations appear in between the main oscilations of the pattern flow.

the shape of oscillations makes me suppose that you should try to work on the residuals, try two order of magnitude lower.

Do you check similar problem by refining the spatial grid?
FMDenaro is offline   Reply With Quote

Old   May 29, 2015, 09:56
Default
  #16
Senior Member
 
Hector Redal
Join Date: Aug 2010
Location: Madrid, Spain
Posts: 243
Rep Power: 16
HectorRedal is on a distinguished road
This problem does not appear in a coarse grid.
It has appeared when I have used a finer grid.

I understand that your statement "to work on the residuals," refers to the tolerance (threshold) of the iterative solver, doesn't it?
HectorRedal is offline   Reply With Quote

Old   May 29, 2015, 10:21
Default
  #17
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,764
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
but you have simultaneously decreased both the time step and the grid sizes?
FMDenaro is offline   Reply With Quote

Old   May 29, 2015, 10:40
Default
  #18
Senior Member
 
Hector Redal
Join Date: Aug 2010
Location: Madrid, Spain
Posts: 243
Rep Power: 16
HectorRedal is on a distinguished road
Yes I have drecreased both time step and grid size simultaneously, since the shorter the grid the more reduced the time step should be used. Otherwise the solution does not converge.
HectorRedal is offline   Reply With Quote

Old   May 29, 2015, 11:12
Default
  #19
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,764
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Quote:
Originally Posted by HectorRedal View Post
Yes I have drecreased both time step and grid size simultaneously, since the shorter the grid the more reduced the time step should be used. Otherwise the solution does not converge.

and what about the ratio dt/h, it results increased on the refined grid?
FMDenaro is offline   Reply With Quote

Old   May 29, 2015, 16:16
Default
  #20
Senior Member
 
Hector Redal
Join Date: Aug 2010
Location: Madrid, Spain
Posts: 243
Rep Power: 16
HectorRedal is on a distinguished road
I have kept constant the dt/h ratio between grids.
HectorRedal is offline   Reply With Quote

Reply

Tags
oscilations


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
negative min.(alpha1) value interFoam Arjun Jayakumar OpenFOAM 11 December 21, 2019 10:59
High Courant Number @ icoFoam Artex85 OpenFOAM Running, Solving & CFD 11 February 16, 2017 13:40
Rapidly decreasing deltaT for interDyMFoam chrisb2244 OpenFOAM Running, Solving & CFD 3 July 1, 2014 16:40
InterFoam negative alpha karasa03 OpenFOAM 7 December 12, 2013 03:41
calculation diverge after continue to run zhajingjing OpenFOAM 0 April 28, 2010 04:35


All times are GMT -4. The time now is 09:36.