CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   a basic question regarding reconstruction (https://www.cfd-online.com/Forums/main/12300-basic-question-regarding-reconstruction.html)

CFD student September 26, 2006 00:07

a basic question regarding reconstruction
 
Hi,

I wrote a Finite Volume, 2-D, first order Euler code. I am trying to make it second order accurate using reconstruction method. The primitive variables are stored at the cell centers.

I interpolate these primitive variables from cell center to edge center to make it 2nd order accurate. Using this approach gives me very unstable solution, even after using limiters.

My Question is : should I interpolate {rho, u, v, P} or {rho, rho * u, rho * v , rho * E} to the edge center ?

thanx in advance, Sunny


ganesh September 26, 2006 00:19

Re: a basic question regarding reconstruction
 
Dear Sunny,

Both primitive variable and conserved variable reconstruction are possible. Primitive variable reconstruction is what I have used, and they should work quite fine, even without limiters for low subsonic flows and even for a transonic flow on quite a coarse grid. Possibly, you are going wrong somewhere in the derivative calculation. Also, do check out that the Taylors's series expansion is written correctly (In terms of the way you write down dx and dy). If the derivative computation and interpolation is ok, you must be able to get a stable solution on a reasonably fine grid.

Regards,

Ganesh

cut cell September 26, 2006 04:16

Re: a basic question regarding reconstruction
 
Hi,

Not sure what is meant by: do check out that the Taylors's series expansion is written correctly (In terms of the way you write down dx and dy).

But I have done both, the only problem is that for viscous flows it's much nicer to have the primitive variable derivative rather than the conservative, hence I use the primitive. Also be careful, really the entropy condition tells us that you need to have a limiter, you can't just use a course grid and assume it will be ok, in my experience in this area which is quite large, you always need a limiters.

Try one quick thing. reconstruct the variables, and implement a poor mans limiter. basically if the pressure or density ever go negative after reconstruction (use an if statement or something) set them back to there first order values. These variables are responsible for violating the entropy condition of the Euler equations.

If that works you know simply that you need a proper limiter, if not, leave it in, and continue to debug. Are you using the correct sign and magnitude of the vector in the Taylor series expansion to the edge??

Cheers


CFD student September 26, 2006 18:52

Re: a basic question regarding reconstruction
 
Thank you both Ganesh and 'cut cell' for your suggestions. Some points based on your posts:

1.) As both of you have pointed out, I am using a coarse grid and it might be giving a problem.

2.) The Taylor series expansion seems to be correct and the code is working for simple channel flow.

3.) The current case I am solving (and which is blowing up) is hypersonic flow over cylinder, which means I do require a limiter.

I will try out the idea of using the aptly named poor man's limiter and let you know what happens. BTW, I am using Barth's Slope Limiter right now. Is there a better limiter for hypersonic flows ?

Cut cell September 27, 2006 03:17

Re: a basic question regarding reconstruction
 
There are many limiters, I really like van Rosendales, it's differentiable and works very very well. I would check that the numerical scheme has been tried at such high mach numbers. If you're using Roe make sure your entropy fix is working. What scheme are you using?? Does it converge in first-order?

Where does it blow up, are your boundary conditions ok for hypersonics??

Cheers,

CFD student September 28, 2006 04:41

Re: a basic question regarding reconstruction
 
I am using Steger Warming scheme right now. The first order does converge both for channel flow and flow over cylinder.

The place where this is blowing up is cell just to the left of cell at stagnation point. So the values at the cell touching the stagnation point, change appropriately...velocity decreases and pressure increases. But the cell just ahead of this cell (to the left)...pressure starts decreasing and becomes -ve ! It looks kind of checkerboard effect.

Although I am trying, right now I dont see any error in the way I have coded this thing. If other things are right, I will try to use the Van Rosendale's limiter and see what happens.

Thanks a lot for your suggestions cut cell,

Please let me know if you have further comments...

-Sunny



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