Burgers equation - a first look at fluid mechanics and non-linear partial differential equations

Similar documents
Math background. Physics. Simulation. Related phenomena. Frontiers in graphics. Rigid fluids

The one-dimensional equations for the fluid dynamics of a gas can be written in conservation form as follows:

7 The Navier-Stokes Equations

Finite Volume Method

Chapter 3 Burgers Equation

Fluid Dynamics. Part 2. Massimo Ricotti. University of Maryland. Fluid Dynamics p.1/17

Lecture Notes on Numerical Schemes for Flow and Transport Problems

Lecture Notes on Numerical Schemes for Flow and Transport Problems

Lecture 1: Introduction to Linear and Non-Linear Waves

Info. No lecture on Thursday in a week (March 17) PSet back tonight

Fundamentals Physics

Last time: Diffusion - Numerical scheme (FD) Heat equation is dissipative, so why not try Forward Euler:

AE/ME 339. Computational Fluid Dynamics (CFD) K. M. Isaac. Momentum equation. Computational Fluid Dynamics (AE/ME 339) MAEEM Dept.

Chapter 3. Finite Difference Methods for Hyperbolic Equations Introduction Linear convection 1-D wave equation

An Overview of Fluid Animation. Christopher Batty March 11, 2014

VISCOUS FLUX LIMITERS

Numerical methods for the Navier- Stokes equations

Fluid Animation. Christopher Batty November 17, 2011

1 Introduction to PDE MATH 22C. 1. Introduction To Partial Differential Equations Recall: A function f is an input-output machine for numbers:

Modeling, Simulating and Rendering Fluids. Thanks to Ron Fediw et al, Jos Stam, Henrik Jensen, Ryan

ENO and WENO schemes. Further topics and time Integration

Chp 4: Non-linear Conservation Laws; the Scalar Case. By Prof. Dinshaw S. Balsara

Advection / Hyperbolic PDEs. PHY 604: Computational Methods in Physics and Astrophysics II

Numerical Methods for Conservation Laws WPI, January 2006 C. Ringhofer C2 b 2

Announcements. Topics: Homework:

The Orchestra of Partial Differential Equations. Adam Larios

Travelling waves. Chapter 8. 1 Introduction

Multiscale Hydrodynamic Phenomena

2.3 The Turbulent Flat Plate Boundary Layer

Announcements. Topics: Homework:

A Study on Numerical Solution to the Incompressible Navier-Stokes Equation

Before we consider two canonical turbulent flows we need a general description of turbulence.

Lagrangian Dynamics & Mixing

AA214B: NUMERICAL METHODS FOR COMPRESSIBLE FLOWS

PDE Solvers for Fluid Flow

Waves in a Shock Tube

UNIVERSITY of LIMERICK

Game Physics. Game and Media Technology Master Program - Utrecht University. Dr. Nicolas Pronost

The Euler Equation of Gas-Dynamics

ICES REPORT A Multilevel-WENO Technique for Solving Nonlinear Conservation Laws

( ) Notes. Fluid mechanics. Inviscid Euler model. Lagrangian viewpoint. " = " x,t,#, #

P = 1 3 (σ xx + σ yy + σ zz ) = F A. It is created by the bombardment of the surface by molecules of fluid.

Chapter 2: Fluid Dynamics Review

Chapter 10 Exercises

Lattice Boltzmann Method

Fundamentals of Fluid Dynamics: Ideal Flow Theory & Basic Aerodynamics

Conservation of Mass. Computational Fluid Dynamics. The Equations Governing Fluid Motion

0.3.4 Burgers Equation and Nonlinear Wave

3. FORMS OF GOVERNING EQUATIONS IN CFD

arxiv: v2 [physics.flu-dyn] 31 Aug 2016

Notes: Outline. Shock formation. Notes: Notes: Shocks in traffic flow

Numerical Methods for Modern Traffic Flow Models. Alexander Kurganov

Fluid Dynamics Exercises and questions for the course

Fluid Equations for Rarefied Gases

Lattice Boltzmann Method for Fluid Simulations

2.2. Methods for Obtaining FD Expressions. There are several methods, and we will look at a few:

Hierarchical Modeling of Complicated Systems

UNIVERSITY OF EAST ANGLIA

Non-Differentiable Embedding of Lagrangian structures

In this chapter, we study the calculus of vector fields.

Turbulence Modeling I!

Chapter 1. Governing Equations of GFD. 1.1 Mass continuity

Dissipation and Dispersion

A stochastic particle system for the Burgers equation.

Part 1. The diffusion equation

Numerical Heat and Mass Transfer

GFD 2012 Lecture 1: Dynamics of Coherent Structures and their Impact on Transport and Predictability

A New Fourth-Order Non-Oscillatory Central Scheme For Hyperbolic Conservation Laws

n v molecules will pass per unit time through the area from left to

Chapter 7: Natural Convection

Diffusion of a density in a static fluid

What is a flux? The Things We Does Know

Figure XP3.1 (a) Mass in equilibrium, (b) Freebody diagram, (c) Kinematic constraint relation Example Problem 3.1 Figure XP3.1 illustrates a mass m

Computational Fluid Dynamics-1(CFDI)

3 Generation and diffusion of vorticity

2 A: The Shallow Water Equations

Diffusion / Parabolic Equations. PHY 688: Numerical Methods for (Astro)Physics

Partial differential equations

Soft Bodies. Good approximation for hard ones. approximation breaks when objects break, or deform. Generalization: soft (deformable) bodies

First, Second, and Third Order Finite-Volume Schemes for Diffusion

Math 660-Lecture 23: Gudonov s method and some theories for FVM schemes

CHAPTER 4 BOUNDARY LAYER FLOW APPLICATION TO EXTERNAL FLOW

Mathematical Hydrodynamics

Computer Fluid Dynamics E181107

Finite Volume Schemes: an introduction

Solving the Euler Equations!

Collision of inertial particles in turbulent flows.

isocurvature modes Since there are two degrees of freedom in

Introduction to the Finite Volumes Method. Application to the Shallow Water Equations. Jaime Miguel Fe Marqués

Numerical Methods for Engineers and Scientists

Finite difference method for solving Advection-Diffusion Problem in 1D

An Introduction to Theories of Turbulence. James Glimm Stony Brook University

B.1 NAVIER STOKES EQUATION AND REYNOLDS NUMBER. = UL ν. Re = U ρ f L μ

Marching on the BL equations

F11AE1 1. C = ρν r r. r u z r

Basic Aspects of Discretization

Getting started: CFD notation

CS 542G: The Poisson Problem, Finite Differences

BAE 820 Physical Principles of Environmental Systems

( ) II. Why statistics? SIO 221B, Rudnick adapted from Davis!1

Transcription:

Burgers equation - a first look at fluid mechanics and non-linear partial differential equations In this assignment you will solve Burgers equation, which is useo model for example gas dynamics anraffic flow, and investigate the appearance of shock waves. We will however start with the simpler linear advection equation and proceed stepwise to Burgers equation. Background The Navier-Stokes equations describe the motion of fluid substances. They are non-linear partial differential equations that can be useo model a range of systems from water flowing in pipes to hot dense astrophysical plasma. Unfortunately, the nonlinearity makes most problems difficult or impossible to solve and leads to phenomena such as turbulence. The Navier-Stokes equations is the subject of contemporary research. Burgers equation is a one-dimensional Navier-Stokes equation valid for simplified conditions. Consider a mass element of a continuous substance. We assume now that the dynamics is only taking place in one dimension. Following Newton we have then for the mass element, dm, with cross section area A, moving in the x -direction with velocity u(x, t): F x = dm a x F x = dm du x dt F x = ρ du x Adx. (1) dt The velocity can change with time in two ways. First, the velocity varies in time at a certain point in space, and in addition the mass element changes its position with time anhereby, if the velocity is space-dependent, the velocity changes: F x = ρ du x dt Adx ( F x = ρ ) x + ρ x Adx ( F x = ρ ) x + ρu x x Adx (2) To apply Newton s equation we neeo know the total force that works on the mass element. We can in principle have three different type of forces. First there might be an external force (like the gravitational force). Second a pressure gradient over the mass element gives a net force, and last there are intermolecular forces within the medium that can be approximated with the help of the concept of viscosity. We first assume that all these forces are zero and obtain the result (skipping the index x on the velocity u(x, t)) + u(x, t) = 0, (3) which is the inviscid (i.e. without viscosity) Burgers equation. This equation is non-linear and it is the simplest equation for which the solutions can develop shock waves. Alternatively the equation can be written: This is an equation of the general form + 1 ( u(x, t) 2 ) = 0. (4) 2 + f(u) = 0. (5)

With viscosity Burgers equation is + u(x, t) = ν 2 u(x, t) 2, (6) where the ν is the kinematic viscosity. The kinematic viscosity is the (more common) dynamic viscosity divided by the density. The dynamic viscosity has dimension ML 1 T 1 (Nsm 2 in SI-units), while the kinematic viscosity has dimension L 2 T 1. The linear advection equation: Before we start with Burgers equation itself we look at the simpler linear advection equation: + v(x, t) = 0, (7) where the v(x, t) is a known function, we will even put it to a constant, v(x, t) = v 0. We can get some further insight into the solution to this equation with the method of characteristics. We look for a characteristic curve along which the equation is an ordinary differential equation. Instead of Eq.(7) we search an equation of the form First d u (x (s), t (s)) ds d u (x (s), t (s)) ds and by comparison with Eq.(7) we conclude that which leads to: d x d s = η (u, x (s), t (s)). (8) = d x d s + d s, (9) = v(x, t) and d s = 1 (10) d u ds = + v(x, t) = 0. (11) With constant v(x, t) = v 0, and with appropriate boundary conditions we get further = 1, an(s = 0) = 0 t d s = s d x d s = v 0 and x(s = 0) = x 0 x(s) = x 0 + v 0 s x(t) = x 0 + v 0 t d u d s = 0, and u(0) = f(x(t = 0)) u(x(t), t) = f(x(t = 0)) = f(x(t) v 0t). (12) We have thus founhat along the lines in the (x, t)-plane, defined by x(t) x 0 = v 0 t, the values of u remains constant. Imagine now an initial velocity distribution. When t increases it will move in space with velocity v 0, and it will keep its form. For example an initial velocity as a function of x (a Gaussian centered around x = 0): u(x, t = 0) = e x2 (13) will at later time t be i.e. a Gaussian centered around x = v 0 t u(x, t) = e (x v 0t) 2, (14)

Task Use a grid in x and a grid in t. Create a initial velocity profile in the form a Gaussian u(x, t = 0) = 1 2πσ 2 e (x x 0) 2 /(2σ 2 ) (15) 1) Solve the linear advection equation, Eq.(7), (with v(x, t) = v 0 ) to get u at later times with the following methods The FTCS (Forward Time Centered Space) method (Numerical Recipes Eq. 20.1.11). This method does not work, but it is really interesting to see how bad it is! The Lax Method (Numerical Recipes chapter 20.1.2). Note the small difference compareo FTCS. The Upwind Method ((Numerical Recipes Eq. 20.1.27). The Lax-Wendroff scheme (Numerical Recipes chapter 20.1.4 and below) 2) Solve the Burgers equation Eq.(4) with the Upwind method anhe Lax-Wendroff scheme (see below). Look at the velocity profile for rather small t to see the onset of shock waves. If you want to see shock waves in real life you can look at this article http://www.newscientist.com/article/dn13402 (includes a video). The methods for the linear advection equation Forward Time Centered Space (FTCS). With a two point formula for the derivatives we can write which is the forward form of the derivative, and which is the centered form. From Eq. (7) we then get: u(x j, t n+1 = u(x j, t n ) 1 2 This method can be shown to diverge regardless of the time-step. The Lax method; a slight change of the FTCS method where leads to u(x j, t n+1 ) u(x j, t n ), (16) t u(x j+1, t n ) u(x j 1, t n ), (17) 2 t (u(x j+1, t n ) u(x j 1, t n )). (18) u(x j, t n ) 1 2 (u(x j+1, t n ) + u(x j 1, t n )) (19) u(x j, t n+1 ) = 1 2 (u(x j+1, t n ) + u(x j 1, t n )) 1 2 (u(x j+1, t n ) u(x j 1, t n )), (20) which works much better. Why? Adding u(x j, t n ) on both sides of the equation we find: u(x j, t n+1 ) u(x j, t n ) = 1 2 (u(x j+1, t n ) 2u(x j, t n ) + u(x j 1, t n )) 1 2 Eq. (20) is thus identical to Eq. (18) up to the term (u(x j+1, t n ) u(x j 1, t n )). (21) 1 2 (u(x j+1, t n ) 2u(x j, t n ) + u(x j 1, t n )) 2 2 u(x j, t n ) 2 2. (22) This last term has the form of a viscosity term (cf. Eq. (6)). Viscosity models dissipation (loss of mechanical energy) and acts like a damping term. What happen with the velocity profile now? Try

and check! The Lax method give stable results for v < / t. The Upwind Method; Along the characteristic curves u stays constant. If (x x, t n ) lies on the same characteristic curve as (x j, t n + 1) u(x j, t n+1 ) = u(x x, t n ). (23) Now x x x j (which is exact if v is a constant, but otherwise it is the first approximation), and we can Taylor expand u(x x, t n ) around x j 1. u(x x, t n ) = u(x j 1 + (x x x j 1 ), t n ) u(x x, t n ) = u(x j 1, t n ) + (x j x j 1 ) (x j 1, t n ) +... u(x x, t n ) u(x j 1, t n ) + ( ) u(x j, t n ) u(x j 1, t n ) u(x j, t n+1 ) u(x j, t n ) v(x j, t n ) t (u(x j, t n ) u(x j 1, t n )). (24) This is the upwind method for v(x j, t n ) > 0. In the case when / t = v the method is in fact exact. For v(x j, t n ) < 0 we get in the same way, (see also Numerical Recipes) u(x j, t n+1 ) u(x j, t n ) v(x j, t n ) t (u(x j+1, t n ) u(x j, t n )). (25) The idea here was to get the values x x through linear interpolation between the known points. We can get higher numerical accuracy if we use three points instead of two. This is the Lax Wendroff scheme. The Lax Wendroff scheme: It is most easily understood if we note that knowing the solutions u(x j 1, t n ), u(x j, t n ), u(x j+1, t n ), we can construct a second order polynomial, p(x, t n ), which goes through these three points. p(x, t n ) = (x x j )(x x j+1 ) (x j 1 x j )(x j 1 x j+1 ) u(x j 1, t n ) + (x x j 1)(x x j+1 ) (x j x j 1 )(x j x j+1 ) u(x j, t n ) + (x x j 1 )(x x j ) (x j+1 x j 1 )(x j+1 x j ) u(x j+1, t n ). (26) We have further from the characteristic lines that if (x x, t n ) lies on the same line as (x j, t n + 1), and with v = constant: x x x j 1 = (1 v t ) x x x j = v t x x x j+1 = (1 + v t ). (27) Combining Eq.(26) and Eq.(27) we get: u(x j, t n+1 ) = u(x x, t n ) u(x j, t n+1 ) p(x x, t n ) u(x j, t n+1 ) 1 2 + (1 + v t 1 2 v t v t (1 + )u(x j 1, t n ) )(1 v t )u(x j, t n ) v t v t (1 )u(x j+1, t n ). (28)

Rearranging the terms we see that this equals u(x j, t n+1 ) u(x j, t n ) 1 v t 2 (u(x j+1, t n ) u(x j 1, t n )) + 1 ( ) v t 2 (u(x j+1, t n ) 2u(x j, t n ) + u(x j 1, t n )), (29) 2 The same expression would be obtained by centered finite difference formula for the space derivatives in the equation u(x j, t n+1 ) u(x j, t n ) v t (x j, t n ) + (v t) 2 2 u(x j, t n ) 2 (30) and again we finhus that the numerical method gives us a viscosity type term. The methods for the Burgers equation The upwind scheme scheme for Burgers equation: For an equation of the type + f(u) (as Burgers equation) we can generalize the upwind method; = 0. (31) u(x j, t n+1 ) u(x j, t n ) t {f(u(x j, t n )) f(u(x j 1, t n ))}, for f(u(x j+1/2, t n )) > 0 u(x j, t n+1 ) u(x j, t n ) t {f(u(x j+1, t n )) f(u(x j, t n ))}, for f(u(x j 1/2, t n )) < 0. (32) Note that with f = v 0 u we recover Eq. 24-25. To get the Lax Wendroff scheme for Burgers equation we can proceed as follows, (see also Numerical Recipes 20.1.37-20.1.38, but note then that there is a misprint in 20.1.37; there is a factor 1/2 missing in the seconerm on the right-hand side). Use first the Lax scheme to take half a step in t, first for x j+1/2 anhen for x j 1/2 u(x j+1/2, t n+1/2 ) = 1 2 (u(x j+1, t n ) + u(x j, t n )) 1 t 2 (f(x j+1, t n ) f(x j, t n )) (33) u(x j 1/2, t n+1/2 ) = 1 2 (u(x j, t n ) + u(x j 1, t n )) 1 t 2 (f(x j, t n ) f(x j 1, t n )) (34) we use Eq.(33-34) to calculate f(x j+1/2, t n+1/2 ) and f(x j 1/2, t n+1/2 ) anhen calculate u(x j, t n+1 ) = u(x j, t n ) t (f(x j+1/2, t n+1/2 ) f(x j 1/2, t n+1/2 )) (35) with f = vu(x, t) expression (29) is re-obtained. For Burgers equation we should use f = u 2 (x, t)/2.