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

Confusing, but Fun results.

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 10, 2012, 21:42
Default Confusing, but Fun results.
  #1
Member
 
Ford Prefect's Avatar
 
Join Date: Mar 2009
Posts: 72
Rep Power: 8
Ford Prefect is on a distinguished road
Hello,

Wife and kid sleeping since, well several hours ago (almost 3 AM here). A long week of work and what do I do? I spend my time writing CFD codes, for fun, of course
(I use commercial codes only at work)

I have written a very basic MAC-type incompressible solver that I now benchmark against some different cases.

The confusion that I have is the following:

I tested to increase the time-step well above the stability limit (both convective and diffusive terms are handled explicitly so the limit should be of the order deltaX^2). Well the code did not blow up until I raised the time-step above convective term stability criteria (approx deltaX).

The results were good compared to the following paper for Re 100 and 200, looking at the length of separation it was more or less identical. I might try to go higher in Re tomorrow but then I need to extend the mesh in the flow direction (probably, it seems like how things should work and how they actually work is very different)

http://courses.washington.edu/me431/...aly-jfm-83.pdf

I realize that I might have provided too little information to actually give any input or comments, but I try anyway. I can always add information when my head is a bit more clear

So, any thoughts?

Cheers and good night!

On a side note: The code converges nicely with the lower, "correct" time-step as well, but it obviously takes much, much longer.
__________________
"Trying is the first step to failure." - Homer Simpson
Ford Prefect is offline   Reply With Quote

Old   February 10, 2012, 22:41
Default
  #2
Senior Member
 
Arjun
Join Date: Mar 2009
Location: Nurenberg, Germany
Posts: 374
Rep Power: 10
arjun is on a distinguished road
Quote:
Originally Posted by Ford Prefect View Post
Hello,

Wife and kid sleeping since, well several hours ago (almost 3 AM here). A long week of work and what do I do? I spend my time writing CFD codes, for fun, of course
(I use commercial codes only at work)

I have written a very basic MAC-type incompressible solver that I now benchmark against some different cases.

The confusion that I have is the following:

I tested to increase the time-step well above the stability limit (both convective and diffusive terms are handled explicitly so the limit should be of the order deltaX^2). Well the code did not blow up until I raised the time-step above convective term stability criteria (approx deltaX).

I guess the reason is that error will build up slowly and it will blow up at some time. How long did you let run.

Anyway in MAC type solvers the problem is not low Re but high Re, at high Re it is very sensitive to time stepping.
arjun is online now   Reply With Quote

Old   February 11, 2012, 06:40
Default
  #3
Member
 
Ford Prefect's Avatar
 
Join Date: Mar 2009
Posts: 72
Rep Power: 8
Ford Prefect is on a distinguished road
Hello,

I tried to run it for approx 20000 time-steps and it did not blow up, but produced the correct answer (the same answer was also obtained in far fewer iterations).

Is it true that the stability of a method depends on the Reynolds number? I would have guessed that either a method is stable or it is not.

Thank you.
__________________
"Trying is the first step to failure." - Homer Simpson
Ford Prefect is offline   Reply With Quote

Old   February 11, 2012, 15:01
Default
  #4
Member
 
Join Date: Jul 2011
Posts: 59
Rep Power: 6
rmh26 is on a distinguished road
I think the Reynolds number will come into play. Not exactly sure about the NS equations but I know when solving the heat equation the limit is something like alpha*dt/dx^2 < C where C is like 1/2 or 1/4. Anyways the alpha term is related to the density, conductivity, and heat capacity. So I'm thinking the limit for the viscous term in the NS equations would be like dt/(Re*dx^2) < C. You could try a Reynolds number of 1 or 0.1 and I bet it would blow up with a time step that is stable at Re 100.
rmh26 is offline   Reply With Quote

Old   February 11, 2012, 17:00
Default
  #5
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 1,662
Rep Power: 23
FMDenaro will become famous soon enough
well, your question needs to be completed by some information ...
- are you using a standard first-order-in-time and second-order central discretization on staggered grid?
- what about your test configuration, is a steady or unsteady test?
- are you using stretched grid ?
- how do you estimate the stability constraint, independently for diffusion and convection part?

I would just remark that the linear stability analysis (Von Neumann) on a 3d LINEAR diffusion-convection equation discretized by a FTCS provides a constraint on the time step that simoultaneously involves the Re number and the velocity intensity in terms of the mesh sizes.
But...such analysis is not exactly valid for the non-linear NS equations. MAC is able to filter some spurious modes, therefore the numerical instability can be slow...
FMDenaro is online now   Reply With Quote

Old   February 11, 2012, 18:56
Default
  #6
Member
 
Ford Prefect's Avatar
 
Join Date: Mar 2009
Posts: 72
Rep Power: 8
Ford Prefect is on a distinguished road
Quote:
Originally Posted by FMDenaro View Post
well, your question needs to be completed by some information ...
- are you using a standard first-order-in-time and second-order central discretization on staggered grid?
- what about your test configuration, is a steady or unsteady test?
- are you using stretched grid ?
- how do you estimate the stability constraint, independently for diffusion and convection part?

I would just remark that the linear stability analysis (Von Neumann) on a 3d LINEAR diffusion-convection equation discretized by a FTCS provides a constraint on the time step that simoultaneously involves the Re number and the velocity intensity in terms of the mesh sizes.
But...such analysis is not exactly valid for the non-linear NS equations. MAC is able to filter some spurious modes, therefore the numerical instability can be slow...
First order in time and central differences in space, colocated grid arrangement.
Unsteady and solve until steady-state.
Uniform mesh spacing.
I use CFL condition as well as a condition where Reynolds number as well as dX^2 is included. Normally both conditions are evaluated and the lowest is chosen for the time-step. For the test mentioned above I just used the CFL condition.

Could you define numerical instability being slow? Do you mean an instability that will appear if we let the solution run indefinitely?

Cheers!
__________________
"Trying is the first step to failure." - Homer Simpson
Ford Prefect is offline   Reply With Quote

Old   February 12, 2012, 05:06
Default
  #7
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 1,662
Rep Power: 23
FMDenaro will become famous soon enough
Quote:
Originally Posted by Ford Prefect View Post
First order in time and central differences in space, colocated grid arrangement.
Unsteady and solve until steady-state.
Uniform mesh spacing.
Ok, my only concern is about the colocated grid arrangement... this way you will not satisfy exactly the continuity constraint but you get into the so-called approximate projection method. The pressure equation is defined on the 1-step or 2-step stencil? See the sketch in the book of Ferziger & Peric


[/QUOTE]I use CFL condition as well as a condition where Reynolds number as well as dX^2 is included. Normally both conditions are evaluated and the lowest is chosen for the time-step. For the test mentioned above I just used the CFL condition.

Could you define numerical instability being slow? Do you mean an instability that will appear if we let the solution run indefinitely?

Cheers![/QUOTE]

There is a stability region that is determined by a simultaneous combination of Re, cfl parameters. I can suggest a reading of my paper Int. J. Numer. Meth. Fluids 2006; 52:393432, you will find some analysis of the parabolic-hyperbolic equation discretized with a semi-implicit scheme. But the issue is generally valid also for the FTCS.
Numerical instability can be asymptotic if some eigenvalues is just a bit greater than 1.

let me know
FMDenaro is online now   Reply With Quote

Old   February 12, 2012, 05:16
Default
  #8
Super Moderator
 
praveen's Avatar
 
Praveen. C
Join Date: Mar 2009
Location: Bangalore
Posts: 251
Blog Entries: 6
Rep Power: 9
praveen is on a distinguished road
FordPerfect, I have seen similar behaviour as you report. For heat equation, I cannot use time step which is greater than the stability limit. But for convection-diffusion (Navier-Stokes), it seems to be not very strict; even a time step based on convection seems to work. My guess is that due to convection, the instabilities/disturbances are convected away and out of the computational domain, and do not get a chance to grow much. This does not happen for heat equation where disturbances will very soon affect all parts of the domain. I would suspect that for convection-diffusion, it will blow up after a sufficiently long time if your time step does not account for diffusion.
praveen is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenFOAM - Validation of Results Ahmed OpenFOAM Running, Solving & CFD 9 June 22, 2011 18:59
Velocity spots in openFoam results Valle OpenFOAM Running, Solving & CFD 4 August 19, 2009 05:53
How to plot a function over a time period? Cirion0000 CFX 4 July 18, 2009 12:48
how to view the complete results shokry FLOW-3D 5 February 3, 2009 14:56
CFX cylinder or sphere benchmark results Mel CFX 1 August 8, 2005 18:47


All times are GMT -4. The time now is 15:46.