Graphics Programs Reference
In-Depth Information
25
20
15
4
3
5
2
0
1
0
5
t
x
In this case the limiting temperature distribution is not linear; it has a
steeper temperature gradient in the middle, where the thermal
conductivity is lower. Again one could find the exact form of this limiting
distribution, u ( x , t ) = 20(1 + (1 )arctan( x / 5)) , by setting the t derivative
to zero in the original equation and solving the resulting ordinary
differential equation.
You can use the method of finite differences to solve the heat equation
in two or three space dimensions as well. For this and other partial
differential equations withtime and two space dimensions, you can also
use the PDE Toolbox, which implements the more sophisticated finite
element method.
A SIMULINK Solution
We can also solve the heat equation using SIMULINK. To do this we
continue to approximate the x derivatives withfinite differences, but we
think of the equation as a vector-valued ordinary differential equation, with
t as the independent variable. SIMULINK solves the model using MATLAB's
ODE solver, ode45 . To illustrate how to do this, let's take the same example
we started with, the case where k = 2 on the interval 5 x 5 from time 0
to time 4, using boundary temperatures 15 and 25, and initial temperature
distribution of 15 for x < 0 and 25 for x > 0. We replace u ( x , t ) for fixed t by
the vector u of values of u ( x , t ), with, say, x = -5:5 . Here there are 11
Search WWH ::




Custom Search