
[Sponsors] 
November 1, 2013, 09:20 
stabilize collocated grid via spline interpolated gradients ?

#1 
New Member
Bernd
Join Date: Jul 2012
Posts: 6
Rep Power: 5 
Hi,
I am working on fluid simulation code mainly intended for visualization/animation purposes and do not have a solid background in theoretical CFD so please excuse me if the following may be too basic/dumb kind of question: For 'reasons of code legacy' I use collocated grids throughout my Naiver Stokes solver framework and I realize that this comes with stability problems because of the well known 'weak velocitypressure coupling' problem (checkerboard effect) I am aware of the common correction schemes (RhieChow etc.) but I came up with the following Idea of my own that seams simpler to implement (at least in my case): As the reason for the checkerboard instability is the usage of simple centraldifferences for the velocity gradients used to calculate cell divergence ('righthandside') in the pressure correction step: So why not use a slightly better gradient estimation technique instead: For example why not fit a quadratic spline over the 3x3x3 neighborhood at each cell and take the analytical spline derivative as the cellcentered gradient. This way it is obvious that *each* grid point in the neighborhood, including the central one, contributes to the value of the gradient estimation. So wouldn't this in effect eliminate the checkerboardproblem of the centraldifferencebased scheme where the middle point is completely ignored for the gradient ? Furthermore this would be simple to implement on top of an existing solver because a 3x3x3 quadratic spline does not seem to introduce new 'boundary case problems' because we still only use a maximum local distance of one grid neighbor in each dircetion ... It does also not seem to significatnly affect performance (although the overhead for gradient calculation increases substantiallly this is still a small fraction of the total runtime which is usually dominated by the pressure/poisson and advection steps. On the other hand I did not found mentioned about this rather simple idea in connection with collocated grid correction schemes in the literature/websearch and there must be reason why this is not widely mentioned/used. So probably it is me with my limited CFD knowledge obviuously erring and/or missing something so that's why I ask in this forum what the experts think about this Thanks in advance for any answers zx81 

November 1, 2013, 17:43 

#2  
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 1,853
Rep Power: 25 
Quote:
if you want to discretize in such a way, then you must discretize also Div(Grad p) as same way as you do for Div V . That will produce a very large stencil for the pressure 

November 1, 2013, 18:57 

#3  
New Member
Bernd
Join Date: Jul 2012
Posts: 6
Rep Power: 5 
Quote:
Yes I thought about this, but hoped to get away with just keeping the simple stencil for the pressure correction poisson equation. After all (at least in my projection based scheme) the pressure correction is only an approximation anyway and so I thought it might be sufficient to use my 27point quadratic Bspline gradient discretization only for the gradients and only for the calculation of the righthandside of the pressure correction (and possibly for the pressure gradient but only for the result when adding it to the velocity after the poisson solve... (somewhat similar to ChieRowInterpolation if I understood that correctly) 

November 2, 2013, 07:28 

#4 
New Member
Bernd
Join Date: Jul 2012
Posts: 6
Rep Power: 5 
After some more research I found a paper
"A velocitypressure NavierStokes solver using a Bspline collocation method" http://ctr.stanford.edu/ResBriefs99/botella.pdf dealing with the same idea. However, I'm afraid that the technical details of that paper are beyond my comprehension. In particular they mention that even with the Bspline discretization, the oscillation problem still occurs and they recommend a kind of "staggered Bspline basis" construction to overcome it. But this seems to be even more complicated than the regular staggered grid approch that I was trying to avoid wih the Bsplineapproach .... So the error must be in my original assumption that it is the central difference gradient discretization alone that is responsible for the oscillation instability because with Bspline gradients, we use not only two but 27 neighboring grid cells for each gradient value and so I thought that this should not be prone to checkerboard oscillations any more ... but what do I know 

November 2, 2013, 10:24 

#5 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 1,853
Rep Power: 25 
but you want an exact or an approximate projection ?


November 2, 2013, 10:35 

#6 
New Member
Bernd
Join Date: Jul 2012
Posts: 6
Rep Power: 5 
an approximate (but stable, nonoscillating) projection would be sufficient.
The simulation is only for visualization/animation purposes, but the grid resolution is high (up to 1000x1000x1000) and unfortunately, at resolutions higher than about 200^3 instabilities/checkerboard/striping artifacts occur unless I use agressive artificial damping of the velocity field (which of course negates the effect of the high resolution :/ 

November 2, 2013, 10:44 

#7 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 1,853
Rep Power: 25 
are you sure this is not a symptom of numerical instability? maybe your timestep is to high for such a refined grid


November 3, 2013, 08:30 

#8  
New Member
Bernd
Join Date: Jul 2012
Posts: 6
Rep Power: 5 
Quote:
To the contrary: choosing too small a time step is even contraproductive with the semilagrangian schemes because it can lead to many repeated advectioninterpolation steps 'within the same grid cell' and repeated interpolation = heavy blurring/numerical dissipation ... So I know what I should really do is to switch the whole framework from the 'collocatedgrid/semilagrangian' to a 'staggeredgrid/alleulerian' paradigm .... but this would mean to rewrite almost all the code from scratch However, on the other hand I really like the ability to take arbitrarily large time steps of the semilagrangian scheme (probably the only way to do a 1000^3 simulation on a normal workstation and the computational simplicity of the collocated grid ... Concerning the colocated grid problem: maybe I schould take another look at the RhieChow correction (but then again, wouldn't this mean to also change the discretization of the pressure gradient to a larger stencil in the poisson solver, which I try to avoid ?) 

November 3, 2013, 08:38 

#9 
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 1,853
Rep Power: 25 
I worked on this problem some time ago, if you want check details here are you. However, the cost is a second elliptic solver...


November 8, 2013, 03:49 

#10 
New Member
Bernd
Join Date: Jul 2012
Posts: 6
Rep Power: 5 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
momentum interpolation for collocated grid  Hadian  Main CFD Forum  4  December 25, 2009 08:25 
Stability of Collocated grid!  Frederic Felten  Main CFD Forum  8  November 2, 2009 06:00 
Algebraic Stress Model and Collocated grid  Keur  Main CFD Forum  0  May 31, 2005 21:46 
collocated grid for turbulent channel flow!!  frederic felten  Main CFD Forum  0  July 11, 2000 22:01 
Grid Independent Solution  Chuck Leakeas  Main CFD Forum  2  May 26, 2000 11:18 