CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > General Forums > Main CFD Forum

1D Burgers DGP0 TVD code: Dispersing a lot!

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 10, 2017, 06:13
Default 1D Burgers DGP0 TVD code: Dispersing a lot!
  #1
New Member
 
Ayush Agrawal
Join Date: Jun 2014
Posts: 16
Rep Power: 12
ayushmorx is on a distinguished road
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.
ayushmorx is offline   Reply With Quote

Old   March 10, 2017, 08:15
Default
  #2
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,897
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
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.
FMDenaro is online now   Reply With Quote

Old   March 10, 2017, 15:40
Default
  #3
New Member
 
Ayush Agrawal
Join Date: Jun 2014
Posts: 16
Rep Power: 12
ayushmorx is on a distinguished road
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
Attached Images
File Type: jpeg 1 stage.jpeg (44.1 KB, 12 views)
File Type: jpeg tvd 3stage.jpeg (46.4 KB, 9 views)
File Type: jpeg tvd 3stage higher mesh size.jpeg (47.8 KB, 8 views)

Last edited by ayushmorx; March 10, 2017 at 15:52. Reason: Extra Details
ayushmorx is offline   Reply With Quote

Old   March 10, 2017, 17:32
Default
  #4
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,897
Rep Power: 73
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
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.
FMDenaro is online now   Reply With Quote

Old   March 10, 2017, 17:43
Default
  #5
New Member
 
Ayush Agrawal
Join Date: Jun 2014
Posts: 16
Rep Power: 12
ayushmorx is on a distinguished road
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?
ayushmorx is offline   Reply With Quote

Old   March 13, 2017, 07:21
Default
  #6
Member
 
Anh
Join Date: Sep 2014
Posts: 72
Rep Power: 12
dinhanh is on a distinguished road
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)?
dinhanh is offline   Reply With Quote

Old   March 13, 2017, 08:10
Default
  #7
New Member
 
Ayush Agrawal
Join Date: Jun 2014
Posts: 16
Rep Power: 12
ayushmorx is on a distinguished road
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.
ayushmorx is offline   Reply With Quote

Reply

Tags
1 dimensional, burgers equation, fluid dynamics, temporal scheme


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


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


All times are GMT -4. The time now is 12:17.