You are on page 1of 42

# AML 811 Lecture 11

## Recap : Modified Differential Equation with FTBS for wave equation

The MDE for the FTBS for wave equation can be written as

Dissipation

Dispersion

Both the dissipation and dispersion terms are zero for the CFL number, c = 1 This happens for the higher order terms also. Hence, FTBS is exact for a CFL for 1 with the wave equation Note that as c decreases, the MDE has a higher coefficient of dissipation. This is what was reflected in our simulations
See Hoffmann and Chiang, Vol 1, Appendix C for the algebra in all its glory

## Recap: FTBS for wave equation with CFL =1

Gives the exact solution because FTBS has the same form as the exact solution for CFL = 1 All the truncation error terms in the MDE cancel for CFL = 1

## Recap: FTBS for wave equation with CFL = 0.5

Solution diffusive because of the dissipative term in the MDE is not zero. Note that the MDE is still consistent as truncation error goes to zero as grid size decreases

## Recap: FTBS for wave equation with CFL = 0.9

Solution diffusive because of the dissipative term in the MDE is not zero. Since 1-c is smaller than that for CFL = 0.5, solution is less dissipative for this CFL.

## Recap: Anti-diffusive behavior: CFL = 1.1

Artificial Dissipation coefficient

Solution anti-diffusive because of the coefficient of artificial dissipation is negative. (Never, never confuse this for the whole dissipation term itself) This gives additional significance to why the CFL 1 for stability

## Recap: Upwind methods

FTBS works while FTFS does not because FTBS takes numerical information consistent where the direction of the characteristics Such schemes are known as upwind schemes as they take information only in a direction upwind of the wave propagation. u u = a For e.g. Higher order upwind method for
t x
3uin 4uin1 + uin 2 uin +1 uin = a t 2 x

## What would be first order upwind scheme for a < 0

u u +a =0 t x
uin+1 uin uin +1 uin + a x =0 t

FTFS

## Recap: Explicit Method: Lax-Wendroff

The original equation is used in the Taylor series expansion to obtain the finite difference equation. Hence, spatial and temporal derivatives are connected Second order accurate in space and time Stability for c 1

## Recap: Lax-Wendroff CFL = 1

Blue lines : Exact Red lines : Numerical

## Recap: Lax-Wendroff CFL = 0.9

Blue lines : Exact Red lines : Numerical

Solution is oscillatory, unlike FTBS Solution shows both dissipation and dispersion

## Recap: Lax-Wendroff CFL = 0.7

Blue lines : Exact Red lines : Numerical

Solution is oscillatory, unlike FTBS Solution shows both dissipation and dispersion. More of all non-idealities than CFL = 0.9

## Recap: Lax-Wendroff CFL = 0.5

Blue lines : Exact Red lines : Numerical

Solution is oscillatory, unlike FTBS Solution shows both dissipation and dispersion. More of all non-idealities than CFL = 0.9

## Recap: Explicit Method: Lax-Wendroff

Can be viewed as addition of artificial dissipation to FTCS. For CFL < 1, the dissipation is not enough to kill all the oscillations caused by the central scheme. (When would the scheme be the same as FTBS?) Since the scheme is second order accurate, the truncation error term starts with a third order derivative which explains the dispersion

## Recap: Some Implicit Methods for the wave equation

BTCS
u in++11 u in+11 u in + 1 u in + a t 2x = 0

BTBS

u in++11 u in + 1 u in + 1 u in + a t x

= 0
= 0

Crank Nicholson

## u in + 1 u in a u in++11 u in+11 u in+ 1 u in 1 + + t 2 2 2x x

The stability restriction on the time step explicit schemes for the wave equation is proportional to the grid size unlike the parabolic equation where is it is proportional to x2 Since we require accurate solutions in time, the time step is already restricted even for implicit schemes by the accuracy constraint Often, we dont gain anything by using implicit schemes for the wave equation. Explicit schemes are hence far more used for hyperbolic problems and for the Navier-Stokes, the convective terms are often computed explicitly.

Summary of Lecture 10
Modified Differential Equation (MDE) for FTBS shows why it is increasingly dissipative as CFL decreases FTBS is a first-order upwind method. Higher order upwind methods can also be derived Lax-Wendroff : Explicit scheme which is second accurate in time and space. However, it adds non-physical oscillations and is also dispersive

## Main ideas and terms in the course till now

Basic properties of PDEs
Hyperbolic, parabolic and elliptic PDEs Characteristics

Deriving finite difference formulas of any order for a uniform and non-uniform stencil
Taylor series table, polynomial fit

## Convergence = Consistency + Stability

Modified Differential Equation (MDE) Von Neumann Stability criterion

## Main ideas and terms in the course till now

Methods for Parabolic Equations FTCS (explicit), Crank Nicholson (Implicit) Diffusion number Approximate Factorization Methods : ADI, Fractional-Step Methods for Elliptic Equations 5-point stencil and 9-point stencil Solution of linear system of equations Direct vs iterative methods Jacobi, Gauss-Seidel, SOR Point and line methods : Line Gauss-Seidel, LSOR Methods for Hyperbolic equations Upwind schemes, numerical dissipation Lax-Wendroff Dispersion and dissipation due to numerical method

Assignments,Minors,Projects, etc
Assignments Next assignment will be given tomorrow. Please submit the previous assignment by then No late assignments from now on Minors Minor 2 will be a take home exam i.e. effectively a (longish!) homework except that no discussions would be allowed. Final Project Will not be a long coding exercise but analysis of a subject and a few papers. Please give me a subject of your interest and I can find something of interest to you (by this Friday). If you do not have anything particular you are interested in, I can assign you something by myself. Etc Please fill in the mid-term evaluations and return them to me

Assignments,Minors,Projects, etc
Assignments Next assignment will be given tomorrow. Please submit the previous assignment by then No late assignments from now on Minors Minor 2 will be a take home exam i.e. effectively a (longish!) homework except that no discussions would be allowed. Final Project Will not be a long coding exercise but analysis of a subject and a few papers. Please give me a subject of your interest and I can find something of interest to you (by this Friday). If you do not have anything particular you are interested in, I can assign you something by myself. Etc Please fill in the mid-term evaluations and return them to me

## The governing equations of fluid flow

Governing equations can be written in many forms
Differential, integral, conservative, non-conservative

All of them express the same physical law but one form or the other can be more correct for numerical approximation. The laws of physics a fluid obeys at every point
Conservation of mass. Newtons second Law. F = ma Conservation of energy

## A solid obeys these too. So what distinguishes a fluid from a solid?

Concept of a fluid
What distinguishes a fluid from a solid?

A fluid deforms continuously under an applied shear force (i.e. a force tangential to its surface) Hence, on a static free surface will always be perpendicular to the net force. Note: A fluids resistance depends on rate of strain (i.e. rate of deformation) instead of strain. Linear elastic solid => Stress is proportional to strain Newtonian fluid => Stress is proportional to rate-of-strain

Net force

## The continuum hypothesis

A fluid is made of atoms and molecules so what do density, pressure, velocity, etc at a point mean? In theory: We assume that the fluid is actually a continuum i.e. that it is continuous medium and every point in space has a fluid particle in it. In practice,

Density and other quantities are molecular averages over a volume which is big enough to contain sufficient molecules but small enough not to include macroscopic variations

## Different ways of deriving the governing equations

Control Volume analysis
Concentrate on a finite volume of fluid and carefully apply conservation principles Basic idea : Change of quantity inside volume = Flux of quantity in Flux of quantity out Results in integral form of equations Can derive finite volume methods using this idea This form holds true regardless of discontinuities such as shocks, etc

Differential Analysis
Concentrate on the dynamics of an infinitesimal fluid element and apply the physical conservation laws Results in differential form of equations Can derive finite difference methods from this form of equations The equation does not hold through discontinuities as derivatives are not defined

## Different ways of deriving the governing equations

Control Volume analysis
Concentrate on a finite volume of fluid and carefully apply conservation principles Basic idea : Change of quantity inside volume = Flux of quantity in Flux of quantity out Results in integral form of equations Can derive finite volume methods using this idea This form holds true regardless of discontinuities such as shocks, etc

Differential Analysis
Concentrate on the dynamics of an infinitesimal fluid element and apply the physical conservation laws Results in differential form of equations Can derive finite difference methods from this form of equations The equation does not hold through discontinuities as derivatives are not defined

## Differential Analysis : The substantial, total or material derivative

Two perspectives of looking at flow Eulerian : Looking at a fixed point in space Lagrangian : Following an individual material particle. Physical laws are known for individual particles but we are interested at a fixed point in space. The connection between the two ideas: The substantial derivative

Taylor series

d D dt Dt

## Chain rule and physical arguments give the same result

Conservation of mass

Mass is conserved => Rate of change of mass in volume = Inlet mass flux Outgoing mass flux

## Coordinate independent form

Momentum equation
To give an idea of an alternate approach (the previous approach would give the same result), consider a moving infinitesimal fluid element

r r Dv Use a = Dt

## Types of external forces acting on the fluid element

Body forces : Act directly on the volume of fluid element (i.e. at each point inside a volumetric element). These are forces that act at a distance e.g : Gravitational, Electromagnetic etc. Surface forces : These forces act only on the exposed surfaces of an element. These act locally only. Physically, they are due to two sources
Pressure on the surface imposed due to the external fluid surrounding the element Viscous forces caused by the external fluid dragging, etc on the fluid

## Surface forces on the fluid element

Only forces in the x-direction shown

## Note the two types of surface forces here

Pressure on the surface imposed due to the external fluid surrounding the element. Pressure is purely a normal force Viscous forces caused by the external fluid dragging, etc on the fluid. Viscous forces can be both normal and shear

## Surface forces on the fluid element

Viscous shear force

## Note the two types of surface forces here

Pressure on the surface imposed due to the external fluid surrounding the element. Pressure is purely a normal force Viscous forces caused by the external fluid dragging, etc on the fluid. Viscous forces can be both normal and shear

## F = ma on the fluid element

External force = Surface + Body

## Newtonian fluid and the Stokes hypothesis

The momentum equations have viscous stresses as unknowns. To close the system of equations we need some relationship between the stress and the velocity derivatives The assumption of a Newtonian fluid (Stress is proportional to rate-of strain) provides closure. This assumption is not valid for non-Newtonian fluids such as blood etc. The previous assumption still leaves the bulk viscosity coefficient unknown. Stokes hypothesis relates the molecular viscosity to the bulk viscosity.

## Newtonian fluid and the Stokes hypothesis

Newtonian fluid

Stokes hypothesis

## Coupled system of nonlinear PDEs

Energy equation
Uses first law of thermodynamics

## For closure, assume

Fouriers law of heat conduction (to relate heat flux to temperature) Ideal gas law : To relate temperature, pressure and density

## The energy equation in conservation form

Equations of motion
Continuity (mass) System of coupled, non-linear PDEs

Momentum

Energy

Summary
Concept of a fluid: Deforms continuously under shear Continuum hypothesis Eulerian and Lagrangian viewpoints Conservation equations Continuity: Mass is conserved Momentum : F = ma Energy. First law of thermodynamics These laws + some constitutive laws give the full equations for flow The full equations can be simplified for various cases : inviscid, incompressible, boundary layers, low Reynolds number, etc. The simplified equations often also exhibit purely hyperbolic, elliptic, parabolic etc.