CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   Confusing, but Fun results. (https://www.cfd-online.com/Forums/main/97189-confusing-but-fun-results.html)

Ford Prefect February 10, 2012 20:42

Confusing, but Fun results.
 
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 :D
(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). :confused:

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.

arjun February 10, 2012 21:41

Quote:

Originally Posted by Ford Prefect (Post 343878)
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 :D
(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). :confused:


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.

Ford Prefect February 11, 2012 05:40

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.

rmh26 February 11, 2012 14:01

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.

FMDenaro February 11, 2012 16:00

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...

Ford Prefect February 11, 2012 17:56

Quote:

Originally Posted by FMDenaro (Post 343957)
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!

FMDenaro February 12, 2012 04:06

Quote:

Originally Posted by Ford Prefect (Post 343964)
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:393–432, 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 :)

praveen February 12, 2012 04:16

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.


All times are GMT -4. The time now is 18:57.