M.Sc. in Meteorology. Numerical Weather Prediction

Similar documents
INTRODUCTION TO PDEs

LECTURE # 0 BASIC NOTATIONS AND CONCEPTS IN THE THEORY OF PARTIAL DIFFERENTIAL EQUATIONS (PDES)

Introduction to Partial Differential Equations

Introduction of Partial Differential Equations and Boundary Value Problems

Reading: P1-P20 of Durran, Chapter 1 of Lapidus and Pinder (Numerical solution of Partial Differential Equations in Science and Engineering)

Partial Differential Equations

Boundary-value Problems in Rectangular Coordinates

Chapter 3 Second Order Linear Equations

AM 205: lecture 14. Last time: Boundary value problems Today: Numerical solution of PDEs

Partial Differential Equations Summary

BOUNDARY-VALUE PROBLEMS IN RECTANGULAR COORDINATES

MAT 372 K.T.D.D. Final Sınavın Çözümleri N. Course. Question 1 (Canonical Forms). Consider the second order partial differential equation

Math 5587 Lecture 2. Jeff Calder. August 31, Initial/boundary conditions and well-posedness

1 Separation of Variables

Math 124A October 11, 2011

An Introduction to Numerical Methods for Differential Equations. Janet Peterson

Class Meeting # 2: The Diffusion (aka Heat) Equation

UNIVERSITY of LIMERICK OLLSCOIL LUIMNIGH

MATH-UA 263 Partial Differential Equations Recitation Summary

M.Sc. in Meteorology. Numerical Weather Prediction

The two-dimensional heat equation

MATH 251 Final Examination August 14, 2015 FORM A. Name: Student Number: Section:

Numerical Methods for PDEs

Lecture Introduction

u xx + u yy = 0. (5.1)

MA 201, Mathematics III, July-November 2016, Partial Differential Equations: 1D wave equation (contd.) and 1D heat conduction equation

Partial Differential Equations

Numerical Analysis and Methods for PDE I

General Technical Remarks on PDE s and Boundary Conditions Kurt Bryan MA 436

Before we look at numerical methods, it is important to understand the types of equations we will be dealing with.

Introduction to Differential Equations

Problem set 3: Solutions Math 207B, Winter Suppose that u(x) is a non-zero solution of the eigenvalue problem. (u ) 2 dx, u 2 dx.

Staple or bind all pages together. DO NOT dog ear pages as a method to bind.

CLASSIFICATION AND PRINCIPLE OF SUPERPOSITION FOR SECOND ORDER LINEAR PDE

c2 2 x2. (1) t = c2 2 u, (2) 2 = 2 x x 2, (3)

Mathematical Methods - Lecture 9

Diffusion on the half-line. The Dirichlet problem

Module 7: The Laplace Equation

Lecture 16: Relaxation methods

MA 201: Method of Separation of Variables Finite Vibrating String Problem Lecture - 11 MA201(2016): PDE

MATH 425, FINAL EXAM SOLUTIONS

Table of Contents. II. PDE classification II.1. Motivation and Examples. II.2. Classification. II.3. Well-posedness according to Hadamard

Video 15: PDE Classification: Elliptic, Parabolic and Hyperbolic March Equations 11, / 20

ENGI 9420 Lecture Notes 8 - PDEs Page 8.01

Applications of the Maximum Principle

10.2-3: Fourier Series.

McGill University April 20, Advanced Calculus for Engineers

PDE and Boundary-Value Problems Winter Term 2014/2015

The General Dirichlet Problem on a Rectangle

Analysis III Solutions - Serie 12

Math 342 Partial Differential Equations «Viktor Grigoryan

Lecture 10. (2) Functions of two variables. Partial derivatives. Dan Nichols February 27, 2018

Classification of partial differential equations and their solution characteristics

Lecture 6: Introduction to Partial Differential Equations

ENGI 9420 Lecture Notes 8 - PDEs Page 8.01

Vibrating-string problem

ENGI 4430 PDEs - d Alembert Solutions Page 11.01

Chapter 5 Types of Governing Equations. Chapter 5: Governing Equations

Extra Problems and Examples

Introduction and some preliminaries

MA 201: Partial Differential Equations D Alembert s Solution Lecture - 7 MA 201 (2016), PDE 1 / 20

Modeling using conservation laws. Let u(x, t) = density (heat, momentum, probability,...) so that. u dx = amount in region R Ω. R

Applied Mathematics 205. Unit III: Numerical Calculus. Lecturer: Dr. David Knezevic

MATH 131P: PRACTICE FINAL SOLUTIONS DECEMBER 12, 2012

CHAPTER 4. Introduction to the. Heat Conduction Model

LECTURE NOTES IN PARTIAL DIFFERENTIAL EQUATIONS. Fourth Edition, February by Tadeusz STYŠ. University of Botswana

LINEAR SECOND-ORDER EQUATIONS

Differential equations, comprehensive exam topics and sample questions

Math Assignment 14

The One-Dimensional Heat Equation

Lecture6. Partial Differential Equations

Solutions to Exercises 8.1

Partial Differential Equations

Chapter 2 Boundary and Initial Data

Lucio Demeio Dipartimento di Ingegneria Industriale e delle Scienze Matematiche

PDEs, part 1: Introduction and elliptic PDEs

1. Partial differential equations. Chapter 12: Partial Differential Equations. Examples. 2. The one-dimensional wave equation

In this chapter we study elliptical PDEs. That is, PDEs of the form. 2 u = lots,

MATH 251 Final Examination May 4, 2015 FORM A. Name: Student Number: Section:

Partial Differential Equations for Engineering Math 312, Fall 2012

A proof for the full Fourier series on [ π, π] is given here.

Final: Solutions Math 118A, Fall 2013

Scientific Computing: An Introductory Survey

21 Laplace s Equation and Harmonic Functions

Spotlight on Laplace s Equation

Numerical Solutions to Partial Differential Equations

2.29 Numerical Fluid Mechanics Spring 2015 Lecture 9

Introduction to Partial Differential Equations

Mathématiques appliquées (MATH0504-1) B. Dewals, Ch. Geuzaine

THE METHOD OF SEPARATION OF VARIABLES

Solving Nonhomogeneous PDEs (Eigenfunction Expansions)

# Points Score Total 100

Analysis III (BAUG) Assignment 3 Prof. Dr. Alessandro Sisto Due 13th October 2017

Additive Manufacturing Module 8

Boundary conditions. Diffusion 2: Boundary conditions, long time behavior

1.1 The classical partial differential equations

MATH 251 Final Examination December 16, 2014 FORM A. Name: Student Number: Section:

Partial Differential Equations

MA Chapter 10 practice

DIFFERENTIAL EQUATIONS

Transcription:

M.Sc. in Meteorology UCD Numerical Weather Prediction Prof Peter Lynch Meteorology & Climate Centre School of Mathematical Sciences University College Dublin Second Semester, 2005 2006. In this section we consider the numerical discretization of the equations of motion.

Text for the Course The lectures will be based closely on the text Atmospheric Modeling, Data Assimilation and Predictability by Eugenia Kalnay published by Cambridge University Press (2002). 2

Numerical Methods (Kalnay, Ch. 3) NWP is an initial/boundary value problem 3

Numerical Methods (Kalnay, Ch. 3) NWP is an initial/boundary value problem Given an estimate of the present state of the atmosphere (initial conditions) appropriate surface and lateral boundary conditions the model simulates or forecasts the evolution of the atmosphere. 3

Numerical Methods (Kalnay, Ch. 3) NWP is an initial/boundary value problem Given an estimate of the present state of the atmosphere (initial conditions) appropriate surface and lateral boundary conditions the model simulates or forecasts the evolution of the atmosphere. The more accurate the estimate of the initial conditions, the better the quality of the forecasts. 3

Numerical Methods (Kalnay, Ch. 3) NWP is an initial/boundary value problem Given an estimate of the present state of the atmosphere (initial conditions) appropriate surface and lateral boundary conditions the model simulates or forecasts the evolution of the atmosphere. The more accurate the estimate of the initial conditions, the better the quality of the forecasts. Similariy, the more accurate the solution method, the better the quality of the forecasts. 3

Numerical Methods (Kalnay, Ch. 3) NWP is an initial/boundary value problem Given an estimate of the present state of the atmosphere (initial conditions) appropriate surface and lateral boundary conditions the model simulates or forecasts the evolution of the atmosphere. The more accurate the estimate of the initial conditions, the better the quality of the forecasts. Similariy, the more accurate the solution method, the better the quality of the forecasts. We now consider methods of solving PDEs numerically. 3

Partial Differential Equations We begin by looking at the classification of partial differential equations (PDEs). 4

Partial Differential Equations We begin by looking at the classification of partial differential equations (PDEs). The general second order linear PDE in 2D may be written A 2 u x 2 + 2B 2 u x y + C 2 u y 2 + D u x + E u y + F u = 0 4

Partial Differential Equations We begin by looking at the classification of partial differential equations (PDEs). The general second order linear PDE in 2D may be written A 2 u x 2 + 2B 2 u x y + C 2 u y 2 + D u x + E u y + F u = 0 Second order linear partial differential equations are classified into three types depending on the sign of B 2 AC: Hyperbolic: B 2 AC > 0 Parabolic: B 2 AC = 0 Elliptic: B 2 AC < 0 4

Partial Differential Equations We begin by looking at the classification of partial differential equations (PDEs). The general second order linear PDE in 2D may be written A 2 u x 2 + 2B 2 u x y + C 2 u y 2 + D u x + E u y + F u = 0 Second order linear partial differential equations are classified into three types depending on the sign of B 2 AC: Hyperbolic: B 2 AC > 0 Parabolic: B 2 AC = 0 Elliptic: B 2 AC < 0 Recall the equations of the conic sections x 2 a y2 } 2 {{ b = 1 2 } Hyperbola x 2 = y }{{} Parabola x 2 a + y2 } 2 {{ b = 1 2 } Ellipse 4

The simplest (canonical) examples of these equations are (a) (b) (c) 2 u t 2 = u c2 2 x 2 u t = u σ 2 x 2 2 u x 2 + 2 u = f(x, y) y2 Wave equation (hyperbolic). Diffusion equation (parabolic). Poisson s equation (elliptic). 5

The simplest (canonical) examples of these equations are (a) (b) (c) 2 u t 2 = u c2 2 x 2 u t = u σ 2 x 2 2 u x 2 + 2 u = f(x, y) y2 Example of hyperbolic equation: Vibrating String. Water Waves. Wave equation (hyperbolic). Diffusion equation (parabolic). Poisson s equation (elliptic). 5

The simplest (canonical) examples of these equations are (a) (b) (c) 2 u t 2 = u c2 2 x 2 u t = u σ 2 x 2 2 u x 2 + 2 u = f(x, y) y2 Example of hyperbolic equation: Vibrating String. Water Waves. Example of parabolic equation: Heated Rod. Viscous Damping. Wave equation (hyperbolic). Diffusion equation (parabolic). Poisson s equation (elliptic). 5

Examples of Elliptic Equation: Shape of a drum. Streamfunction/vorticity relationship. 6

Examples of Elliptic Equation: Shape of a drum. Streamfunction/vorticity relationship. Note: The following standard elliptic equations arise repeatedly in a multitude of contexts throughout science: Poisson s Equation: 2 u = f. Laplace s Equation: 2 u = 0. 6

The behaviour of the solutions, the proper initial and/or boundary conditions, and the numerical methods that can be used to find the solutions depend essentially on the type of PDE that we are dealing with. 7

The behaviour of the solutions, the proper initial and/or boundary conditions, and the numerical methods that can be used to find the solutions depend essentially on the type of PDE that we are dealing with. Thus, we need to study the canonical PDEs to develop an understanding of their properties, and then apply similar methods to the more complicated NWP equations. 7

The behaviour of the solutions, the proper initial and/or boundary conditions, and the numerical methods that can be used to find the solutions depend essentially on the type of PDE that we are dealing with. Thus, we need to study the canonical PDEs to develop an understanding of their properties, and then apply similar methods to the more complicated NWP equations. A fourth canonical equation, of central importance in atmospheric science, is u (d) t + c u x = 0 Advection equation. 7

The behaviour of the solutions, the proper initial and/or boundary conditions, and the numerical methods that can be used to find the solutions depend essentially on the type of PDE that we are dealing with. Thus, we need to study the canonical PDEs to develop an understanding of their properties, and then apply similar methods to the more complicated NWP equations. A fourth canonical equation, of central importance in atmospheric science, is u (d) t + c u x = 0 Advection equation. The advection equation has the solution u(x, t) = u(x ct, 0). 7

The advection equation is a first order PDE, but it can also be classified as hyperbolic, since its solutions satisfy the wave equation: 8

The advection equation is a first order PDE, but it can also be classified as hyperbolic, since its solutions satisfy the wave equation: 2 u t 2 c2 2 u x 2 = ( t + c ) ( x t c ) u = 0 x Obviously, if u/ t + c u/ x = 0, then u is a solution of the wave equation. 8

The advection equation is a first order PDE, but it can also be classified as hyperbolic, since its solutions satisfy the wave equation: 2 u t 2 c2 2 u x 2 = ( t + c ) ( x t c ) u = 0 x Obviously, if u/ t + c u/ x = 0, then u is a solution of the wave equation. We note that if the elliptic Laplace equation is split up like this, the component operators are complex: 2 ( u x 2 + 2 u y 2 = x + i ) ( y x i ) u = 0 y 8

The advection equation is a first order PDE, but it can also be classified as hyperbolic, since its solutions satisfy the wave equation: 2 u t 2 c2 2 u x 2 = ( t + c ) ( x t c ) u = 0 x Obviously, if u/ t + c u/ x = 0, then u is a solution of the wave equation. We note that if the elliptic Laplace equation is split up like this, the component operators are complex: 2 ( u x 2 + 2 u y 2 = x + i ) ( y x i ) u = 0 y We cannot split this equation into two real first-order factors. 8

Example: Solve the Wave Equation We will derive the solution of the wave equation by transformation of variables. 9

Example: Solve the Wave Equation We will derive the solution of the wave equation by transformation of variables. Define the new variables ξ = x ct and η = x + ct. 9

Example: Solve the Wave Equation We will derive the solution of the wave equation by transformation of variables. Define the new variables ξ = x ct and η = x + ct. Then u x = ξ x u ξ + η x u η = u ξ + u η u t = ξ t u ξ + η t u η = cu ξ + cu η u xx = [u ξξ + 2u ξη + u ηη ] u tt = c 2 [u ξξ 2u ξη + u ηη ] 9

Example: Solve the Wave Equation We will derive the solution of the wave equation by transformation of variables. Define the new variables ξ = x ct and η = x + ct. Then u x = ξ x u ξ + η x u η = u ξ + u η u t = ξ t u ξ + η t u η = cu ξ + cu η u xx = [u ξξ + 2u ξη + u ηη ] u tt = c 2 [u ξξ 2u ξη + u ηη ] Therefore [u tt c 2 u xx ] = 4c 2 u ξη = 0 which means 2 u ξ η = 0. 9

Example: Solve the Wave Equation We will derive the solution of the wave equation by transformation of variables. Define the new variables ξ = x ct and η = x + ct. Then u x = ξ x u ξ + η x u η = u ξ + u η u t = ξ t u ξ + η t u η = cu ξ + cu η u xx = [u ξξ + 2u ξη + u ηη ] u tt = c 2 [u ξξ 2u ξη + u ηη ] Therefore [u tt c 2 u xx ] = 4c 2 u ξη = 0 which means 2 u ξ η = 0. The solution of this equation may be expressed as a sum of a function of ξ and another of η: u = f(x ct) + g(x + ct). 9

Well-posedness A well-posed initial/boundary condition problem has a unique solution that depends continuously on the initial/boundary conditions. 10

Well-posedness A well-posed initial/boundary condition problem has a unique solution that depends continuously on the initial/boundary conditions. The specification of proper initial conditions and boundary conditions for a PDE is essential in order to have a wellposed problem. 10

Well-posedness A well-posed initial/boundary condition problem has a unique solution that depends continuously on the initial/boundary conditions. The specification of proper initial conditions and boundary conditions for a PDE is essential in order to have a wellposed problem. If too many initial/boundary conditions are specified, there will be no solution. 10

Well-posedness A well-posed initial/boundary condition problem has a unique solution that depends continuously on the initial/boundary conditions. The specification of proper initial conditions and boundary conditions for a PDE is essential in order to have a wellposed problem. If too many initial/boundary conditions are specified, there will be no solution. If too few are specified, the solution will not be unique. 10

Well-posedness A well-posed initial/boundary condition problem has a unique solution that depends continuously on the initial/boundary conditions. The specification of proper initial conditions and boundary conditions for a PDE is essential in order to have a wellposed problem. If too many initial/boundary conditions are specified, there will be no solution. If too few are specified, the solution will not be unique. If the number of initial/boundary conditions is right, but they are specified at the wrong place or time, the solution will be unique, but it will not depend smoothly on initial/boundary conditions. 10

Well-posedness A well-posed initial/boundary condition problem has a unique solution that depends continuously on the initial/boundary conditions. The specification of proper initial conditions and boundary conditions for a PDE is essential in order to have a wellposed problem. If too many initial/boundary conditions are specified, there will be no solution. If too few are specified, the solution will not be unique. If the number of initial/boundary conditions is right, but they are specified at the wrong place or time, the solution will be unique, but it will not depend smoothly on initial/boundary conditions. For ill-posed problems, small errors in the initial/boundary conditions may produce huge errors in the solution. 10

In any of the above cases we have an ill-posed problem. 11

In any of the above cases we have an ill-posed problem. We can never find a numerical solution of a problem that is ill posed: the computation will react by blowing up. 11

In any of the above cases we have an ill-posed problem. We can never find a numerical solution of a problem that is ill posed: the computation will react by blowing up. Example: Solve the hyperbolic equation 2 u t 2 c2 2 u x 2 = 0 subject to the following conditions: u(x, 0) = a 0 (x) u(x, 1) = a 1 (x) u(0, t) = b 0 (t) u(0, t) = b 1 (t) 11

In any of the above cases we have an ill-posed problem. We can never find a numerical solution of a problem that is ill posed: the computation will react by blowing up. Example: Solve the hyperbolic equation 2 u t 2 c2 2 u x 2 = 0 subject to the following conditions: u(x, 0) = a 0 (x) u(x, 1) = a 1 (x) u(0, t) = b 0 (t) u(0, t) = b 1 (t) Example: Solve the advection equation u t + c u x = 0 on 0 x 1 and t 0 with the initial/boundary conditions u(x, 0) = u 0 (x) u(0, t) = u L (t) u(1, t) = u R (t). 11

The Elliptic Case Second order elliptic equations require one boundary condition at each point of the spatial boundary. 12

The Elliptic Case Second order elliptic equations require one boundary condition at each point of the spatial boundary. These are pure boundary value, time-independent problems. The boundary conditions may be: 12

The Elliptic Case Second order elliptic equations require one boundary condition at each point of the spatial boundary. These are pure boundary value, time-independent problems. The boundary conditions may be: The value of the function (Dirichlet problem), as when we specify the temperature on the edge of a plate. 12

The Elliptic Case Second order elliptic equations require one boundary condition at each point of the spatial boundary. These are pure boundary value, time-independent problems. The boundary conditions may be: The value of the function (Dirichlet problem), as when we specify the temperature on the edge of a plate. The normal derivative (Neumann problem), as when we specify the heat flux. 12

The Elliptic Case Second order elliptic equations require one boundary condition at each point of the spatial boundary. These are pure boundary value, time-independent problems. The boundary conditions may be: The value of the function (Dirichlet problem), as when we specify the temperature on the edge of a plate. The normal derivative (Neumann problem), as when we specify the heat flux. A mixed boundary condition, involving a linear combination of the function and its derivative (Robin problem). 12

The Parabolic Case Linear parabolic equations require one initial condition at the initial time and one boundary condition at each point of the spatial boundaries. 13

The Parabolic Case Linear parabolic equations require one initial condition at the initial time and one boundary condition at each point of the spatial boundaries. For example, for a heated rod, we need the initial temperature at each point T (x, 0) and the temperature at each end, T (0, t) and T (L, t) as a function of time. 13

The Parabolic Case Linear parabolic equations require one initial condition at the initial time and one boundary condition at each point of the spatial boundaries. For example, for a heated rod, we need the initial temperature at each point T (x, 0) and the temperature at each end, T (0, t) and T (L, t) as a function of time. In atmospheric science, the parabolic case arises mainly when we consider diffusive processes: internal viscosity; boundary layer friction; etc. 13

The Parabolic Case Linear parabolic equations require one initial condition at the initial time and one boundary condition at each point of the spatial boundaries. For example, for a heated rod, we need the initial temperature at each point T (x, 0) and the temperature at each end, T (0, t) and T (L, t) as a function of time. In atmospheric science, the parabolic case arises mainly when we consider diffusive processes: internal viscosity; boundary layer friction; etc. To give an example, consider the highlighted terms of the Navier-Stokes Equations V t + V V + 2Ω V + 1 ρ p = ν 2 V 13

The Parabolic Case Linear parabolic equations require one initial condition at the initial time and one boundary condition at each point of the spatial boundaries. For example, for a heated rod, we need the initial temperature at each point T (x, 0) and the temperature at each end, T (0, t) and T (L, t) as a function of time. In atmospheric science, the parabolic case arises mainly when we consider diffusive processes: internal viscosity; boundary layer friction; etc. To give an example, consider the highlighted terms of the Navier-Stokes Equations V t + V V + 2Ω V + 1 ρ p = ν 2 V Break here. 13

The Hyperbolic Case Linear hyperbolic equations require as many initial conditions as the number of characteristics that come out of every point in the surface t = 0, and as many boundary conditions as the number of characteristics that cross a point in the (space) boundary pointing inwards. 14

The Hyperbolic Case Linear hyperbolic equations require as many initial conditions as the number of characteristics that come out of every point in the surface t = 0, and as many boundary conditions as the number of characteristics that cross a point in the (space) boundary pointing inwards. For example: Solve u/ t + c u/ x = 0 for x > 0, t > 0. 14

The Hyperbolic Case Linear hyperbolic equations require as many initial conditions as the number of characteristics that come out of every point in the surface t = 0, and as many boundary conditions as the number of characteristics that cross a point in the (space) boundary pointing inwards. For example: Solve u/ t + c u/ x = 0 for x > 0, t > 0. The characteristics are the solutions of dx/dt = c. The space boundary is x = 0. 14

The Hyperbolic Case Linear hyperbolic equations require as many initial conditions as the number of characteristics that come out of every point in the surface t = 0, and as many boundary conditions as the number of characteristics that cross a point in the (space) boundary pointing inwards. For example: Solve u/ t + c u/ x = 0 for x > 0, t > 0. The characteristics are the solutions of dx/dt = c. The space boundary is x = 0. If c > 0, we need the initial condition u(x, 0) = f(x) and the boundary condition u(0, t) = g(t). 14

The Hyperbolic Case Linear hyperbolic equations require as many initial conditions as the number of characteristics that come out of every point in the surface t = 0, and as many boundary conditions as the number of characteristics that cross a point in the (space) boundary pointing inwards. For example: Solve u/ t + c u/ x = 0 for x > 0, t > 0. The characteristics are the solutions of dx/dt = c. The space boundary is x = 0. If c > 0, we need the initial condition u(x, 0) = f(x) and the boundary condition u(0, t) = g(t). If c < 0, we need the initial condition u(x, 0) = f(x) but no boundary conditions. 14

Schematic of the characteristics of the advection equation u t + c u x = 0 for (a) positive and (b) negative velocity c. 15

For nonlinear equations, no general statements can be made, but physical insight and local linearization can help to determine proper initial/boundary conditions. 16

For nonlinear equations, no general statements can be made, but physical insight and local linearization can help to determine proper initial/boundary conditions. For example, in the nonlinear advection equation u t + u u x = 0 the characteristics are dx/dt = u. 16

For nonlinear equations, no general statements can be made, but physical insight and local linearization can help to determine proper initial/boundary conditions. For example, in the nonlinear advection equation u t + u u x = 0 the characteristics are dx/dt = u. We don t know a priori the sign of u at the boundary, and whether the characteristics will point inwards or outwards. 16

For nonlinear equations, no general statements can be made, but physical insight and local linearization can help to determine proper initial/boundary conditions. For example, in the nonlinear advection equation u t + u u x = 0 the characteristics are dx/dt = u. We don t know a priori the sign of u at the boundary, and whether the characteristics will point inwards or outwards. One method of solving simple PDEs is the method of separation of variables. Unfortunately in most cases it is not possible to use it. 16

For nonlinear equations, no general statements can be made, but physical insight and local linearization can help to determine proper initial/boundary conditions. For example, in the nonlinear advection equation u t + u u x = 0 the characteristics are dx/dt = u. We don t know a priori the sign of u at the boundary, and whether the characteristics will point inwards or outwards. One method of solving simple PDEs is the method of separation of variables. Unfortunately in most cases it is not possible to use it. Nevertheless, it is instructive to solve some simple PDE s analytically, using the method of separation of variables. 16

Separation of Variables Example 1: An Elliptic Equation. 17

Separation of Variables Example 1: An Elliptic Equation. Solve, by the method of separation of variables, the PDE: 2 u = 2 u x 2 + 2 u y 2 = 0 0 x 1 0 y 1 subject to the boundary conditions u(x, 0) = 0 u(0, y) = 0 u(1, y) = 0 u(x, 1) = A sin mπx, 17

Separation of Variables Example 1: An Elliptic Equation. Solve, by the method of separation of variables, the PDE: 2 u = 2 u x 2 + 2 u y 2 = 0 0 x 1 0 y 1 subject to the boundary conditions u(x, 0) = 0 u(0, y) = 0 u(1, y) = 0 u(x, 1) = A sin mπx, Assume the solution is a product of a function of x and a function of y: u(x, y) = X(x) Y (y) 17

Separation of Variables Example 1: An Elliptic Equation. Solve, by the method of separation of variables, the PDE: 2 u = 2 u x 2 + 2 u y 2 = 0 0 x 1 0 y 1 subject to the boundary conditions u(x, 0) = 0 u(0, y) = 0 u(1, y) = 0 u(x, 1) = A sin mπx, Assume the solution is a product of a function of x and a function of y: u(x, y) = X(x) Y (y) The equation becomes Y d2 X dx 2 + X d2 Y dy 2 = 0 or 1 d 2 X X dx 2 = 1 Y d 2 Y dy 2 17

Separation of Variables Example 1: An Elliptic Equation. Solve, by the method of separation of variables, the PDE: 2 u = 2 u x 2 + 2 u y 2 = 0 0 x 1 0 y 1 subject to the boundary conditions u(x, 0) = 0 u(0, y) = 0 u(1, y) = 0 u(x, 1) = A sin mπx, Assume the solution is a product of a function of x and a function of y: u(x, y) = X(x) Y (y) The equation becomes Y d2 X dx 2 + X d2 Y dy 2 = 0 or 1 d 2 X X dx 2 = 1 Y d 2 Y dy 2 The left side is a function of x, the right a function of y. 17

Thus, they must both be equal to a constant K 2 d 2 X dx 2 + K2 X = 0 d 2 Y dy 2 K2 Y = 0 18

Thus, they must both be equal to a constant K 2 d 2 X dx 2 + K2 X = 0 d 2 Y dy 2 K2 Y = 0 The solutions of the two equations are X = C 1 sin Kx + C 2 cos Kx Y = C 3 sinh Ky + C 4 cosh Ky 18

Thus, they must both be equal to a constant K 2 d 2 X dx 2 + K2 X = 0 d 2 Y dy 2 K2 Y = 0 The solutions of the two equations are X = C 1 sin Kx + C 2 cos Kx Y = C 3 sinh Ky + C 4 cosh Ky The boundary condition u(0, y) = 0 forces C 2 = 0, so X = C 1 sin Kx. 18

Thus, they must both be equal to a constant K 2 d 2 X dx 2 + K2 X = 0 d 2 Y dy 2 K2 Y = 0 The solutions of the two equations are X = C 1 sin Kx + C 2 cos Kx Y = C 3 sinh Ky + C 4 cosh Ky The boundary condition u(0, y) = 0 forces C 2 = 0, so X = C 1 sin Kx. The boundary condition u(1, y) = 0 forces sin Kx = 0 or K = nπ so X = C 1 sin nπx. 18

Thus, they must both be equal to a constant K 2 d 2 X dx 2 + K2 X = 0 d 2 Y dy 2 K2 Y = 0 The solutions of the two equations are X = C 1 sin Kx + C 2 cos Kx Y = C 3 sinh Ky + C 4 cosh Ky The boundary condition u(0, y) = 0 forces C 2 = 0, so X = C 1 sin Kx. The boundary condition u(1, y) = 0 forces sin Kx = 0 or K = nπ so X = C 1 sin nπx. The boundary condition u(x, 0) = 0 forces C 4 = 0, so Y = C 3 sinh nπy. 18

Thus, they must both be equal to a constant K 2 d 2 X dx 2 + K2 X = 0 d 2 Y dy 2 K2 Y = 0 The solutions of the two equations are X = C 1 sin Kx + C 2 cos Kx Y = C 3 sinh Ky + C 4 cosh Ky The boundary condition u(0, y) = 0 forces C 2 = 0, so X = C 1 sin Kx. The boundary condition u(1, y) = 0 forces sin Kx = 0 or K = nπ so X = C 1 sin nπx. The boundary condition u(x, 0) = 0 forces C 4 = 0, so Y = C 3 sinh nπy. The boundary condition u(x, 1) = A sin mπx forces C 1 sin nπx C 3 sinh nπ = A sin mπx, so that n = m and C 1 C 3 sinh mπ = A. 18

Thus, C 1 C 3 = A/ sinh mπ, and the solution is u(x, y) = ( A sinh mπ ) sin mπx sinh mπy 19

Thus, C 1 C 3 = A/ sinh mπ, and the solution is u(x, y) = More general BCs ( A sinh mπ ) sin mπx sinh mπy Suppose the solution on the northern side is now Find the solution. u(x, 1) = f(x) 19

Thus, C 1 C 3 = A/ sinh mπ, and the solution is u(x, y) = More general BCs ( A sinh mπ ) sin mπx sinh mπy Suppose the solution on the northern side is now Find the solution. u(x, 1) = f(x) We note that the equation is linear and homogeneous, so that, given two solutions, a linear combination of them is also a solution of the equation. 19

We assume that we can Fourier-analyse the function f(x): f(x) = a k sin kπx with k 2 a k < k=1 k=1 20

We assume that we can Fourier-analyse the function f(x): f(x) = a k sin kπx with k 2 a k < k=1 k=1 Then the solution may be expressed as: ( ak ) u(x, y) = sin kπx sinh kπy sinh kπ k=1 20

We assume that we can Fourier-analyse the function f(x): f(x) = a k sin kπx with k 2 a k < k=1 k=1 Then the solution may be expressed as: ( ak ) u(x, y) = sin kπx sinh kπy sinh kπ k=1 In the same way, we can find solutions for non-vanishing boundary values on the other three edges. 20

We assume that we can Fourier-analyse the function f(x): f(x) = a k sin kπx with k 2 a k < k=1 k=1 Then the solution may be expressed as: ( ak ) u(x, y) = sin kπx sinh kπy sinh kπ k=1 In the same way, we can find solutions for non-vanishing boundary values on the other three edges. Thus, the more general problem on a rectangular domain: 2 u(x, y) = 0, may be solved. u(x, y) = F (x, y) on the boundary 20

Another Example: A Parabolic Equation. 21

Another Example: A Parabolic Equation. u t = σ 2 u x 2 0 x 1 t 0 21

Another Example: A Parabolic Equation. Boundary conditions: u t = σ 2 u x 2 0 x 1 t 0 u(0, t) = 0 u(1, t) = 0 21

Another Example: A Parabolic Equation. Boundary conditions: u t = σ 2 u x 2 0 x 1 t 0 u(0, t) = 0 u(1, t) = 0 Initial condition: u(x, 0) = f(x) = k=1 a k sin kπx 21

Another Example: A Parabolic Equation. Boundary conditions: u t = σ 2 u x 2 0 x 1 t 0 u(0, t) = 0 u(1, t) = 0 Initial condition: u(x, 0) = f(x) = k=1 a k sin kπx Find the solution: u(x, t) = k=1 a k e σk2 π 2t sin kπx 21

Another Example: A Parabolic Equation. Boundary conditions: u t = σ 2 u x 2 0 x 1 t 0 u(0, t) = 0 u(1, t) = 0 Initial condition: u(x, 0) = f(x) = k=1 a k sin kπx Find the solution: u(x, t) = k=1 a k e σk2 π 2t sin kπx Note that the higher the wavenumber, the faster it goes to zero, i.e., the solution is smoothed as time goes on. 21

Another Example: A Hyperbolic Equation. 2 u t 2 = c2 2 u x 2 0 x 1 0 t 1 22

Another Example: A Hyperbolic Equation. Boundary conditions: 2 u t 2 = c2 2 u x 2 0 x 1 0 t 1 Initial conditions: u(x, 0) = f(x) = a k sin kπx k=1 u(0, t) = 0 u(1, t) = 0 u t (x, 0) = g(x) = k=1 b k sin kπx 22

Another Example: A Hyperbolic Equation. Boundary conditions: 2 u t 2 = c2 2 u x 2 0 x 1 0 t 1 Initial conditions: u(x, 0) = f(x) = a k sin kπx k=1 u(0, t) = 0 u(1, t) = 0 u t (x, 0) = g(x) = k=1 b k sin kπx Find the solution by the separation of variables method. 22

Same equation as above, but different boundary conditions: 2 u t 2 = c2 2 u x 2 0 x 1 0 t 1 23

Same equation as above, but different boundary conditions: Boundary conditions: 2 u t 2 = c2 2 u x 2 0 x 1 0 t 1 u(0, t) = 0 u(1, t) = 0 23

Same equation as above, but different boundary conditions: Boundary conditions: 2 u t 2 = c2 2 u x 2 0 x 1 0 t 1 u(0, t) = 0 u(1, t) = 0 Instead of two initial conditions, we give an initial and a final condition: u(x, 0) = f(x) u(x, 1) = g(x) 23

Same equation as above, but different boundary conditions: Boundary conditions: 2 u t 2 = c2 2 u x 2 0 x 1 0 t 1 u(0, t) = 0 u(1, t) = 0 Instead of two initial conditions, we give an initial and a final condition: u(x, 0) = f(x) u(x, 1) = g(x) In other words, we try to solve a hyperbolic (wave) equation as if it were an elliptic equation (boundary value problem). 23

Same equation as above, but different boundary conditions: Boundary conditions: 2 u t 2 = c2 2 u x 2 0 x 1 0 t 1 u(0, t) = 0 u(1, t) = 0 Instead of two initial conditions, we give an initial and a final condition: u(x, 0) = f(x) u(x, 1) = g(x) In other words, we try to solve a hyperbolic (wave) equation as if it were an elliptic equation (boundary value problem). Exercise: Show that the solution is unique but that it does not depend continuously on the boundary conditions, and therefore is not a well-posed problem. 23

Conclusion: Before trying to solve a problem numerically, we must make sure that it is well posed: it has a unique solution that depends continuously on the data that define the problem. 24

Conclusion: Before trying to solve a problem numerically, we must make sure that it is well posed: it has a unique solution that depends continuously on the data that define the problem. Food for Thought Lorenz showed that the atmosphere has a finite limit of predictability: Even if the models and the observations are perfect, the flapping of a butterfly in Brazil will result in a completely different forecast for Texas. 24

Conclusion: Before trying to solve a problem numerically, we must make sure that it is well posed: it has a unique solution that depends continuously on the data that define the problem. Food for Thought Lorenz showed that the atmosphere has a finite limit of predictability: Even if the models and the observations are perfect, the flapping of a butterfly in Brazil will result in a completely different forecast for Texas. Does this mean that the problem of NWP is not well posed? 24

Conclusion: Before trying to solve a problem numerically, we must make sure that it is well posed: it has a unique solution that depends continuously on the data that define the problem. Food for Thought Lorenz showed that the atmosphere has a finite limit of predictability: Even if the models and the observations are perfect, the flapping of a butterfly in Brazil will result in a completely different forecast for Texas. Does this mean that the problem of NWP is not well posed? If not, why not? 24

Conclusion: Before trying to solve a problem numerically, we must make sure that it is well posed: it has a unique solution that depends continuously on the data that define the problem. Food for Thought Lorenz showed that the atmosphere has a finite limit of predictability: Even if the models and the observations are perfect, the flapping of a butterfly in Brazil will result in a completely different forecast for Texas. Does this mean that the problem of NWP is not well posed? If not, why not? Consider again the definition of an ill-posed problem. 24