|
[Sponsors] |
March 10, 2017, 06:13 |
1D Burgers DGP0 TVD code: Dispersing a lot!
|
#1 |
New Member
Ayush Agrawal
Join Date: Jun 2014
Posts: 16
Rep Power: 12 |
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? Last edited by ayushmorx; March 11, 2017 at 19:53. |
|
March 10, 2017, 08:15 |
|
#2 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,897
Rep Power: 73 |
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. |
|
March 10, 2017, 15:40 |
|
#3 |
New Member
Ayush Agrawal
Join Date: Jun 2014
Posts: 16
Rep Power: 12 |
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 Last edited by ayushmorx; March 10, 2017 at 15:52. Reason: Extra Details |
|
March 10, 2017, 17:32 |
|
#4 |
Senior Member
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,897
Rep Power: 73 |
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. |
|
March 10, 2017, 17:43 |
|
#5 |
New Member
Ayush Agrawal
Join Date: Jun 2014
Posts: 16
Rep Power: 12 |
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?
|
|
March 13, 2017, 07:21 |
|
#6 |
Member
Anh
Join Date: Sep 2014
Posts: 72
Rep Power: 12 |
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)? |
|
March 13, 2017, 08:10 |
|
#7 |
New Member
Ayush Agrawal
Join Date: Jun 2014
Posts: 16
Rep Power: 12 |
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. |
|
Tags |
1 dimensional, burgers equation, fluid dynamics, temporal scheme |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Open source CFD code development, possible? | Dr. Yazid Bindar | Main CFD Forum | 27 | July 18, 2000 01:18 |
own Code vs. commercial code | Bernhard Mueck | Main CFD Forum | 10 | February 16, 2000 11:07 |
State of the art in CFD technology | Juan Carlos GARCIA SALAS | Main CFD Forum | 39 | November 1, 1999 15:34 |
public CFD Code development | Heinz Wilkening | Main CFD Forum | 38 | March 5, 1999 12:44 |
What kind of Cmmercial CFD code you feel well? | Lans | Main CFD Forum | 13 | October 27, 1998 11:20 |