0% found this document useful (0 votes)
286 views

Partial Differential Solution With Matlab

This document discusses solving partial differential equations (PDEs) using the PDEPE tool in MATLAB. It describes how PDEPE can be used to solve elliptic and parabolic PDEs, outlines the required syntax, and provides an example of using it to model conductive heat transfer in a solid slab. PDEPE solves initial value-boundary value problems with one space and one time dependent variable. The user must define the PDE, initial conditions, and boundary conditions as MATLAB functions.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
286 views

Partial Differential Solution With Matlab

This document discusses solving partial differential equations (PDEs) using the PDEPE tool in MATLAB. It describes how PDEPE can be used to solve elliptic and parabolic PDEs, outlines the required syntax, and provides an example of using it to model conductive heat transfer in a solid slab. PDEPE solves initial value-boundary value problems with one space and one time dependent variable. The user must define the PDE, initial conditions, and boundary conditions as MATLAB functions.
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Partial Differential Equations

Solution with Matlab


PDEPE Tool
Daniel Casas Orozco
Posgraduate Engineering Program
27
th
July, 2012
Generalities
This algorithm resolves elliptical and parabolic
PDEs


Elliptical for

Parabolic for
0
2
2
2
2
=
c
c
+
c c
c
+
c
c
y
F
c
y x
F
b
x
F
a
0 4
2
< ac b
0 4
2
= ac b
Syntaxis
sol = pdepe(m,pdefun,icfun,bcfun,xmesh,tspan)

Solves Initial Value (IV) Boundary Value (BV)
problems with one space variable x and one
time dependent variable t.

m: A parameter corresponding to the symmetry of the problem. m can be
slab = 0, cylindrical = 1, or spherical = 2.

pdefun: A handle to a function that defines the components of the PDE.

icfun: A handle to a function that defines the initial conditions.

bcfun: A handle to a function that defines the boundary conditions.

xmesh: A vector [x0, x1, ..., xn] specifying the points at which a numerical
solution is requested for every value in tspan. The elements
of xmesh must satisfy x0 < x1 < ... < xn. The length of xmesh must be >= 3.

tspan: A vector [t0, t1, ..., tf] specifying the points at which a solution is
requested for every value in xmesh. The elements of tspan must
satisfy t0 < t1 < ... < tf. The length of tspan must be >= 3.
Initial and boundary conditions
Initial condions of the form


Boundary conditions of the form:

( ) ( ) x u t x u
0 0
, =
( ) ( ) 0 , , , , , , =
|
.
|

\
|
c
c
+
x
u
u t x f t x q u t x p
Conductive heat transfer problem
Heat transfer in a solid slab is governed by


General initial condition:

Boundary conditions (Dirichlet)

2
2
x
T
t
T
c
c
=
c
c
o
( ) ( ) x T x T = 0 ,
( )
( ) 100 , 0
0 , 0
0
= =
= =
L
T t T
T t T
If the solid has an average value of 0.02 and
we say that the initial temperature of the solid
is 0 degrees celcius:

2
2
02 . 0
x
T
t
T
c
c
=
c
c
( ) 0 0 , = x T
General form for PDEs in matlab is



so each function must be recognized by
similarity to enter them in Matlab
|
.
|

\
|
c
c
+
|
|
.
|

\
|
|
.
|

\
|
c
c
c
c
=
c
c
|
.
|

\
|
c
c

x
u
u t x s
x
u
u t x f x
x
x
t
u
x
u
u t x c
m m
, , , , , , , , ,
0
0
02 . 0
1
, , , 02 . 0 * 1
=
=
|
.
|

\
|
c
c
=
=
|
.
|

\
|
c
c
+
|
.
|

\
|
c
c
c
c
=
c
c
m
s
x
u
f
c
x
u
u t x s
x
u
x t
u
So
( ) ( ) 0 , , , , , , =
|
.
|

\
|
c
c
+
x
u
u t x f t x q u t x p
( ) ( )
( ) ( ) 100 , 0 * 0 , 1
0 , 0 * 0 , 0
=
c
c
+
=
c
c
+
t
x
T
t T
t
x
T
t T
100
2 2
1 1
=
=
T p
T p
0
0
2
1
=
=
q
q

You might also like