Download Tutorial12

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Heat transfer wikipedia , lookup

Heat transfer physics wikipedia , lookup

Thermal conduction wikipedia , lookup

Van der Waals equation wikipedia , lookup

History of thermodynamics wikipedia , lookup

Equation of state wikipedia , lookup

Heat equation wikipedia , lookup

Transcript
Tutorial 12
Heat Equation.
Laplace Equation.
Math for CS
Tutorial 12
1
Contents
1.
Heat Equation
2.
Solution of the Heat Equation
3.
Examples of the Physical Equations
Math for CS
Tutorial 12
2
Example: The Heat Equation
1.
The heat equation, describing the temperature in solid u(x,y,z,t) as a function of
position (x,y,z) and time t:
y
This equation is derived as follows:
Consider a small square of size δ, shown on
the figure. Its heat capacitance is
δ2·q,

where
q is the heat capacitance per unit area. The
heat flow inside this square is the difference
of the flows through its four walls. The heat
flow through each wall is:
W  
Math for CS
  
u
  
x x0  / 2
 
u
x
u
y
u
x x0  / 2
y0  / 2
x
Tutorial 12
3
The Heat Equation
Here δ is the size of the square, µ is the heat conductivity
of the body and
u
t
F4    
u
y
y0   / 2
is the temperature
gradient. The change of the temperature
F1    
of the body is the total thermal flow
u
x x0  / 2
divided by its heat capacitance:
 u
u
   

 x x  / 2 x
u F1  F2  F3  F4
0



2
t
 q
 2 q


      u

 y
x0   / 2 


y0
u

y
 / 2
 2 q



y0   / 2 
F2    
F3    
u
y
u
x x0  / 2
y0  / 2
the last expression is actually the definition of the second derivative, therefore:
u    2 u  2 u 
  2  2 
t q  x
y 
u 
 u
t q
Math for CS
Tutorial 12
4
Solution of the Heat Equation 1/5
A square plate [0,1]2 has the sides kept at u(0,y,t)=u(1,y,t)=u(x,0,t)=u(x,1,t)=0, and
initial temperature u(x,y,0)=f(x,y). Determine u(x,y,t).
Solution:
  2u  2u 
u
 k  2  2 
t
y 
 x
(1)
Consider the solution in the form
u  X ( x )  Y ( y )  T (t )
Then (1) becomes
Math for CS
T  X  Y 


kT
X
Y
Tutorial 12
(2)
5
Solution of the Heat Equation 2/5
Since the left side depends only on t and the right side depends only on x and y,
each side must be equal to a constant, -λ2, where the sign is chosen for convergence:
T   k2T  0
(2)
X  Y 

  2
X
Y
The last equation can be rewritten as
X 
Y 
2
  
, which shows that both
X
Y
sides are constants, say -µ2 (negative to have bounded solutions):
X    2 X  0 ; X   (2   2 ) X  0
Math for CS
Tutorial 12
(3)
6
Solution of the Heat Equation 3/5
The solutions to equations (2) and (3) are:
X  a1 cos x  b1 sin x , Y  a2 cos    y  b2 sin    y , T  a3 e
2
2
2
2
 k2 t
,
therefore, the solution to (1) is given by:
u( x , y , t )  (a1 cos x  b1 sin x )( a 2 cos    y  b2 sin    y )e
2
2
2
2
 k2 t
From the boundary conditions that u(0,y,t)=0 and u(x,0,t)=0 we get a1=a2=0;
Therefore the solution is already limited to the form:


u( x , y , t )  B  sinx   sin 2   2 y  e  k t ,
2
(4)
where B=b1b2.
Math for CS
Tutorial 12
7
Solution of the Heat Equation 4/5
u( x , y , t )  B  sinx   sin
 
2
2
y  e
 k2 t
From the boundary conditions u(1,y,t)=0 and u(x,1,t)=0, we see that the sin(..x) and
sin(..y) are zero at the boundary, therefore:
  m 
2   2  n  
   m 2  n2
Therefore, the solution satisfying boundary conditions is given by:
u( x, y, t )  B  e
 k ( m 2  n2 ) 2 t
 sinmx   sinny 
(5)
Since the equation (1) is linear, any linear combination of these functions is also a
solution. Letting t=0, and using an initial condition u(x,y,0)=f(x,y), we obtain:
Math for CS
Tutorial 12
8
Solution of the Heat Equation 5/5
The solution to (1) is given by


u( x , y , t )   Bm ,n  e
 k ( m 2  n 2 ) 2 t
 sinm x   sinny ,
m 1 n 1
Where


f ( x , y )   Bm ,n  sinmx   sinny ,
m 1 n 1
And therefore
1 1
Bm ,n 
  f ( x, y )  sinmx   sinny dxdy
0 0
1 1
2
2


ny dxdy
sin
m

x

sin

1 1
 4  f ( x , y )  sinmx   sinny dxdy
0 0
0 0
Math for CS
Tutorial 12
9
Laplace Equation 1/3
Three sides of the square plate are kept at zero temperature u(0,y)=u(1,y)=u(x,0)=0,
the fourth side, is kept at temperature u1: u(x,1)= u1. Determine the steady state
temperature of the plate.
 2u  2u
 2 0
2
x
y
To solve, suppose u(x,y)=X(x)Y(y):
X Y  XY   0
Setting each side to –λ2 we obtain:
From which we obtain:
or
X 
Y 

X
Y
X   2 X  0
Y   2Y  0
X  a1 cos x  b1 sin x
Y  a2 cosh y  b2 sinh y
Math for CS
Tutorial 12
10
Laplace Equation 2/3
Where
e y  e y
cosh y 
2
e y  e y
sinh y 
2
The boundary conditions u(0,y)=u(x,0)=0 imply a1=a2=0. The condition u(1,y)=0
implies λ=mπ and therefore, the general form of the solution is:

u( x , y )   Bm sin( mx ) sinh ( my )
m 1
From the condition u(x,1)=u1 we have:

u( x ,1)  u1   ( Bm sinh( m )) sin( mx )
m 1
And therefore
1
Bm sinh( m )  2 u1 sin mx 
0
Math for CS
2u1 (1  cos m )
m
Tutorial 12

Bm 
2u1 (1  cos m )
m sinh( m )
11
Laplace Equation 3/3
1
Bm sinh( m )  2 u1 sin mx 
0
2u1 (1  cos m )
m

Bm 
2u1 (1  cos m )
m sinh( m )
The solution is
u( x , y ) 
1  cos m 
sin( m x ) sinh( m y )

 m 1 m sinh( m )
2u1

This problem, which is the solution of Laplace equation
u( x , y )  0
Inside the region R when u(x,y) is specified an the boundary of R is called a
Dirichlet problem. The boundary conditions, when the function is specified around
the boundary is called Dirichlet boundary conditions.
Math for CS
Tutorial 12
12
Examples of Physical Equations
2. The vibrating string equation, describing the deviation y(x,t) of the taut string from its
equilibrium y=0 position:
2
2 y
2  y
a
2
t
x 2
(10)
The derivation of this equation is somewhat similar to the heat equation: we consider a small
piece of the string; the force acting on this piece is
piece which is
 y
.
t 2
2
2 y
F k 2
x
; it causes the acceleration of the
3. The Schrödinger equation. This equation defines the wave function of the particle in the
static field, and used, for example to calculate the electron orbits of the atoms.
2 2
( E  V )  

2m
Math for CS
Tutorial 12
(11)
13
Example 1
Solve
Given
u
 2u
2 2,
t
x
0  x  3, t  0
(14)
u(0, t )  u( 3, t )  0
u( x ,0)  5 sin 4x  3 sin 8x  2 sin 10x
(15)
Solution
The solution consists of functions:
e
 2 2 t

(a cos x  b sin x ) ; ax  b
The condition u(0,t)=u(3,t)=0 is fulfilled by
 n 

nx 
  2 3  t

b
e
sin
 n

3




2
Math for CS
Tutorial 12
(16)
14
Example 1
 n 

nx 
  2 3  t

b
e
sin
 n

3




2
We need only n=12, 24 and 30 in order to fit f(x,0). The solution is
f ( x, t )  5e 32 t sin 4x  3e 128 t sin 8x  2e 200 t sin 10x
2
Math for CS
2
Tutorial 12
2
(17)
15
Solution of the String Equation
The vibrating string equation
2
2 y
2  y
c
2
t
x 2
(18)
Can be solved in the way similar to solution of the heat equation. Substituting
y  XT
into (14), we obtain
a1 cos x  b1 sin x  a2 cos ct  b2 sin ct 
Math for CS
Tutorial 12
; ax  b
16
Example 2 (1/3)
The taut string equation is fixed at points x=-1 and x=1; f(-1,t)=f(1,t)=0; Its equation of
motion is
2 y
2 y
c 2
2
t
x
(19)
Initially it is pulled at the middle, so that
 x  1,  1  x  0
y ( x ,0 )  
1  x , 0  x  1
Find out the motion of the string.
Solution:
The solution of (19) is comprised of the functions, obtaining zero values at x=-1 and x=1:
( 2n  1)




cos
x

a
cos
n

t

b
sin
n

t
n
n


2




a
sin
m

x

a
cos
n

t

b
sin
n

t
 1n

m
m
 n, m  {0, N }





Math for CS
Tutorial 12
(20)
17
Example 2 (2/3)
Solution (continued):
Moreover, since the initial condition
 x  1,  1  x  0
y ( x ,0 )  
1  x , 0  x  1
(21)
is symmetric, only the cos(…x) remains in the solution.
The coefficients bn in (20) are zeros, since
y( x ,0)
0
t
Therefore, the solution has the form

y( x , t )   a n cos
n 0
Math for CS
Tutorial 12
( 2n  1)
x  cos nt
2
18
Example 2 (3/3)
Where
1
an 
2 cos
2
0
1
2 cos 2
0
Math for CS
2n  1 (1  x )dx
2n  1 dx
2
Tutorial 12
19