CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Main CFD Forum (https://www.cfd-online.com/Forums/main/)
-   -   1D Burgers DGP0 TVD code: Dispersing a lot! (https://www.cfd-online.com/Forums/main/184755-1d-burgers-dgp0-tvd-code-dispersing-lot.html)

ayushmorx March 10, 2017 06:13

1D Burgers DGP0 TVD code: Dispersing a lot!
 
Hey Guys!

I have made a code to solve a very simple Burger's equation problem, using TVD 3 stage, upwind scheme. Wave velocity a=1. Since upwind is a perfect shift for this equation, I should be retaining the flow structure as it changes. Instead, it is dispersing, eventually becomes a sine wave. I have tried the single stage, and it works perfectly, so I am pretty sure there are some problems with my equation for TVD. I have referred quite a few books and have not been able to figure out the cause of the dispersion yet. I would really, really appreciate any help in this matter.

BTW ntime is the time in seconds and I am trying to solve the flow for 100 mesh size. Increasing the mesh size does retain the structure, but a change in temporal scheme should not significantly affect the structure of the wave according to me.

What do you think?

FMDenaro March 10, 2017 08:15

First, post your solution with the details and then explain your doubts.
Second, the exact solution you get for the upwind is or the linear case at cfl=1. The Burgers euqation is non linear and you cannot fulfill the exact shift requirement on all nodes.

ayushmorx March 10, 2017 15:40

3 Attachment(s)
Here is the solution. My Burger's equation is Ut+Ux=0 Ut is time derivative and flux is just U, with wave speed 1. So it is linear here. The exact solution is pretty much the same as that shown in the one stage. I have used RK3 tvd here.

I have used cfl=1 globally everywhere, and computed the time step using this. All the values are for time=1s, and the domain is 1m in size. Thing is, I am thinking the perfect shift should take place regardless of 3 stage or 1 stage since essentially my discretization remains the same. This is not reflected here. But when I increase the space and time discretization the shift accuracy improves quite a lot, which doesn't really make sense to me since the cfl is the same.

@FMDenaro

FMDenaro March 10, 2017 17:32

However, this is not called Burgers equation but it is simply a first order linear PDE. Check first the first order upwind scheme at cfl=1, it must work otherwise you have a bug for sure.
Then, when using a second order TVD scheme the flux is modified also for the linear case so that the exact shift could be not result.

ayushmorx March 10, 2017 17:43

The first order is working fine for CFL=1, so there isn't a bug there I guess. I am using the SSP TVD scheme described here http://www.ams.org/journals/mcom/199...98-00913-2.pdf for my code. It has optimal co-effcients for cfl=1, see eqn 3.3, and I am trying to reproduce that condition, so I should get the exact shift no?

dinhanh March 13, 2017 07:21

He, ayushmorx

I also using TVD for my code. In TVD, there is the minmod function compute at grig point i-1/2,i+1/2 and i+3/2. At the boundary (inlet, outlet, wall), How do you compute the minmod function (There is no grid point out of domain at inlet, outlet or wall)?

ayushmorx March 13, 2017 08:10

Hey Anh,

I am not aware of the approach you have taken, and do not know about minmod. Can you explain it further?

Regardless, i gather that you are looking for an extra grid point out of the domain. you can simply generate a ghost cell for such cases. Not sure of the question though.


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