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

1D Burgers equation

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By lex78700

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 8, 2014, 22:25
Default 1D Burgers equation
  #1
New Member
 
Panee
Join Date: Jun 2014
Posts: 3
Rep Power: 11
Panee is on a distinguished road
Hey all!

I am trying to solve the 1D Burgers equation using finite differences.

1. Inviscid - I have tried to solve it using Upwind, Maccormack and Lax Friedrichs scheme. Maccormack gives heavy oscillations near the shock region and Lax Friedrichs gives a damped solution. Although Upwind seems to work for Riemann conditions, when I give a sinusoidal initial condition, the method blows up (I dont think the method can handle both positive and negative values at the same time). So what do I do to create a solver which handles the discontinuities as well as smooth initial conditions without any damping?

2. Viscous - Is Cole Hopf transformations valid only for f(0,t) = g(L,t) = 0 at the boundaries? If not, what changes should I make to the transformation?

Thanks in advance!
Panee is offline   Reply With Quote

Old   June 10, 2014, 15:13
Default
  #2
New Member
 
Adrien
Join Date: Jun 2014
Location: Cambridge, UK
Posts: 17
Rep Power: 11
lex78700 is on a distinguished road
Hi Panee,

I am not sure to understand your question 2, so I will focus on 1.

To my knowledge, no finite difference scheme can handle discontinuities without damping. Although the inviscid Burgers equation seems simple, it is actually very hard to solve for an sinusoidal initial condition. Physically, Burgers says that the fluid accelerates where the velocity is larger. In a sine wave, you have positive velocity behind an area where the velocity is negative. It means that the fluid behind will accelerated whereas the fluid in front of it will slow down. This will obviously lead to convergence of the fluid and create a shock. Analytically, the solution after a given time (the time needed for the shock to form) doesn't exist anymore (in the usual mathematical sense, that is a continuous solution). So the math says your solution blows up, and you should expect a good numerical code to give you this result (the real solution) as well.

The oscillations or damping you see in your codes are due to numerical errors associated with your finite difference schemes. These schemes only approximate the real analytical solution, and due to their finite order (hence the name finite difference), they introduce errors. Some schemes are called dispersive (they introduce spurious waves) while the others are called dissipative (they damp the solution and especially gradients). This is normal to see such errors, and you can reduce them by choosing higher-order schemes, or schemes that are best adapted to your specific problem, or by reducing the time step or increasing the spatial resolution.

But this won't solve your problem. After a given time, an initial sine wave will eventually blow up no matter which numerical method you use. You could delay the blow-up by using a super-diffusive scheme (since the high gradient preceding the blow up will make a dispersive finite difference scheme crazy, cause they hate that), but this would spoil you whole solution and I guess you wouldn't be happy if you end up with a zero solution after 1 second (that's what overdamping would cause).

Of course many people have to simulate shock waves (the kind of discontinuity waves generated by Burgers equation that you observe) but they don't use explicit finite differences for that (as I explained, it's not suited). They use special schemes based on the finite volume method which are specifically designed to handle and propagate such waves and conserve some flow properties that are of interest (for example vorticity). I'm not sure that's what you're looking for, but this is a whole area of research (it does exist!).

I hope I was clear, don't hesitate if you need more help!

Adrien
FMDenaro likes this.

Last edited by lex78700; June 10, 2014 at 17:22.
lex78700 is offline   Reply With Quote

Old   June 10, 2014, 17:08
Default
  #3
Senior Member
 
Filippo Maria Denaro
Join Date: Jul 2010
Posts: 6,768
Rep Power: 71
FMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura aboutFMDenaro has a spectacular aura about
Many details about the Burgers equations can be found in the book of Leveque about FV for hyperbolic equations.
Note that the original paper of Burgers illustrated an equation with the diffusive term. For small viscosity, you can use a finite volume scheme based on upwinded flux, using a very small mesh size (Reh=O(1))
FMDenaro is offline   Reply With Quote

Old   June 14, 2014, 10:30
Default
  #4
New Member
 
Panee
Join Date: Jun 2014
Posts: 3
Rep Power: 11
Panee is on a distinguished road
Thanks a lot Adrien and FMDenaro!

Adrien, surprisingly, Lax Friedrichs scheme is producing a bounded solution with progressing time, although the shock is not as sharp as I would like.

FMDenaro, I will go through the book by LeVeque, thanks!
Panee is offline   Reply With Quote

Old   March 6, 2016, 16:29
Default 1D Burger Using Crank Nicolson
  #5
New Member
 
Shahid Hasnain
Join Date: Mar 2016
Location: Saudi Arabia
Posts: 1
Rep Power: 0
shahid_qa32 is on a distinguished road
Send a message via Skype™ to shahid_qa32
Hy to everyone,

I am using Crank Nicolson for 1D Burger.I am getting confuse to use Initial guess as Initial condition?

Answer will be highly appreciated
shahid_qa32 is offline   Reply With Quote

Reply

Tags
1d burgers, cole hopf transformation, maccormack, upwind


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
Calculation of the Governing Equations Mihail CFX 7 September 7, 2014 06:27
error message cuteapathy CFX 14 March 20, 2012 06:45
Exact solution of Burgers equation mcaro Main CFD Forum 3 January 25, 2011 06:46
Constant velocity of the material Sas CFX 15 July 13, 2010 08:56
solution to Burger's Equation using fortran Tony Limjuco Main CFD Forum 4 April 2, 2005 00:41


All times are GMT -4. The time now is 21:27.