pdemat - Partial Differential Equations in MATLAB 7.0 P....

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Partial Differential Equations in MATLAB 7.0 P. Howard Spring 2005 Contents 1 PDE in One Space Dimension 1 1.1 Single equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Single Equations with Variable Coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.3 Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.4 Systems of Equations with Variable Coefficients . . . . . . . . . . . . . . . . . . . . . . . . . . 9 2 Single PDE in Two Space Dimensions 13 2.1 Elliptic PDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 2.2 Parabolic PDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3 Linear systems in two space dimensions 16 3.1 Two Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4 Nonlinear elliptic PDE in two space dimensions 17 4.1 Single nonlinear elliptic equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 5 General nonlinear systems in two space dimensions 17 5.1 Parabolic Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 6 Defining more complicated geometries 20 7 FEMLAB 20 7.1 About FEMLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 7.2 Getting Started with FEMLAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 1 PDE in One Space Dimension For initialboundary value partial differential equations with time t and a single spatial variable x , MATLAB has a built-in solver pdepe . 1.1 Single equations Example 1.1. Suppose, for example, that we would like to solve the heat equation u t = u xx u ( t, 0) = 0 , u ( t, 1) = 1 u (0 , x ) = 2 x 1 + x 2 . (1.1) MATLAB specifies such parabolic PDE in the form c ( x, t, u, u x ) u t = x- m x x m b ( x, t, u, u x ) + s ( x, t, u, u x ) , 1 with boundary conditions p ( x l , t, u ) + q ( x l , t ) b ( x l , t, u, u x ) = 0 p ( x r , t, u ) + q ( x r , t ) b ( x r , t, u, u x ) = 0 , where x l represents the left endpoint of the boundary and x r represents the right endpoint of the boundary, and initial condition u (0 , x ) = f ( x ) . (Observe that the same function b appears in both the equation and the boundary conditions.) Typically, for clarity, each set of functions will be specified in a separate M-file. That is, the functions c , b , and s associated with the equation should be specified in one M-file, the functions p and q associated with the boundary conditions in a second M-file (again, keep in mind that b is the same and only needs to be specified once), and finally the initial function f ( x ) in a third. The command pdepe will combine these M-files and return a solution to the problem. In our example, we have c ( x, t, u, u x ) =1 b ( x, t, u, u x ) = u x s ( x, t, u, u x ) =0 ,...
View Full Document

Page1 / 23

pdemat - Partial Differential Equations in MATLAB 7.0 P....

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online