CFD Online Discussion Forums

CFD Online Discussion Forums (
-   Main CFD Forum (
-   -   Problem with staggered grid on numerical simulation (

gtr84 February 15, 2012 05:26

Problem with staggered grid on numerical simulation
2 Attachment(s)
Hello everyone, this is my first question on this forum

i've made a simulatio of a stratified fluid in a rotating system of reference.
So i'm going to solve equation of motion using Shallow Water approximation.

the code is written in matlab using C grid
i've done also one using an unstaggered (A) grid

The problem is that code with c grid is unstable even though
cfl condition is satisfied (the scheme of integration is FTCS + LAX for
both cases).
With A grid code works as it's expected

in the attachment there are both codes (you can use word pad to

can you tell me if there's any mistake?

gtr84 February 15, 2012 07:58

maybe CFL condition is different for C grid.

for an unstaggered grid is CFL<0.5 (in 2 dimension)

i've noticed that c grid code is stable for very little
courant numbers, like 0.01

does anyone know something more about this?


All times are GMT -4. The time now is 19:49.