First Midterm solutions

advertisement
College of Engineering and Computer Science
Mechanical Engineering Department
Mechanical Engineering 501B
Seminar in Engineering Analysis
Spring 2009 Class: 14443 Instructor: Larry Caretto
First Midterm Exam Solutions
1. Solve the diffusion equation u/t = 2u/x2 for u(x,t) with the boundary conditions that
u(0,t) = 0 and u/x = 0 at x = L.
a) Find the general solution and the expression for the expansion coefficient for any
initial condition, u(x,0) = f(x).
Applying separation of variables to the diffusion equation gives the following result.
u( x, t )  e  t C1 sin( x)  C2 cos(x)
2
[1]
Taking the first derivative of this equation with respect to x gives.
2
u( x, t )
 e   t  C1 cos( x )  C2 sin( x )
x
[2]
The boundary condition that u = 0 at x = 0 gives
u( x, t )  e t C1 sin( 0)  C2   0
2
[3]
This requires that C2 = 0. The boundary condition that the ∂u/∂x = 0 at x = L gives the following
result.
u ( x, t )
x
 0  e  t C1 cos(L)  0
2
x L
[4]
We can satisfy this condition by having cos(L) = 0 which requires L to be an odd integer times
/2. We can express this condition as follows.
L 
2n  1

or
2
2n  1
2L
integer n
[5]
We can now write the general solution for our problem as the sum of all solutions that satisfy the
differential equation and the boundary conditions. Each solution can have a different constant
which we call Cn in the equation below.

u ( x, t )   Cn e nt sin( n x)
2
n 0
n 
2n  1
2L
[6]
As usual we find the coefficients, Cn, by using an eigenfunction expansion for the initial condition.
Jacaranda (Engineering) Room 3333
Email: lcaretto@csun.edu
Mail Code
8348
Phone: 818.677.6448
Fax: 818.677.7062
First midterm solutions
L. S. Caretto, Spring 2009, ME 501B

2n  1x
n 0
L
u ( x,0)  f ( x)   Cn sin
Page 2
[7]
If we multiply both sides of this equation by sin[(2m+1)x/2L, and integrate the result from 0 to L,
we obtain.
L

f x sin
0
2m  1x dx  L sin 2m  1x  

2L
 Cn sin
 n 0
2L
0
2m  1x  dx
2L


[8]
Because of the orthogonality of the sine eigenfunctions, there is only one term in the summation
on the right side of this equation.
L

0
2m  1x dx  C
f x sin
2L
x
2L
22m  1x 
 2m  1x 
dx

C

sin
m sin
m



2L
2L


 2 42m  1
 0 [9]
0
L
2m  1L  0C  LC m
L
 
sin
 m
L
2
 2 22m  1

L
L
2

Solving for Cm gives
2
Cm 
L
L
 f xsin
0
2m  1x dx
[10]
2L
b) Write the solution for the specific initial condition that u(x,0) = f(x) = U, a constant.
In this case, equation [10] for Cn becomes (after replacing m by n)
2n  1x dx  2U 2 L  cos 2n  1x 
2
Cn 
U sin

L
2L
L 2n  1 
2L
 x 0
x L
L

0
2n  1L  cos0  4U
4U 

 cos

 2n  1
2n  1 
2L
[11]
Substituting this result into equation [6] gives.

u ( x, t )  4U


n 0
e
2 n12 2 t
4 L2
sin
2n  1x
2n  1
2L
[12]
c) What are the first three terms in your equation for part b)?
9 2t
252t
  2t



1

x
1
3

x
1
5x
2
2
2

4
L
4
L
4
L
u ( x, t )  4U e
sin
 e
sin
 e
sin
 


2 L 3
2 L 5
2L


[13]
First midterm solutions
L. S. Caretto, Spring 2009, ME 501B
Page 3
d) Find the answer to part a) change if the original boundary conditions were replaced by
the boundary conditions that u(0,t) = A and u/x = B at x = L, where A and B are
constants? (Continue to use the initial condition that u(x,0) = f(x).)
In this case our solution for u(x,t) would be written as the sum of two functions.
u( x, t )  u( x, t )  wx
[14]
Here, v(x,t) is the solution to the original problem, with zero boundary conditions. The solution for
v(x,t) is the same as the solution for u(x,t) found in equation [6]. The differential equation and
boundary conditions for w are found from the requirements that u has to satisfy the diffusion
equation and boundary conditions, while v satisfies the diffusion equation with zero boundary
conditions. These requirements can only be satisfied if w(x)is given by the following differential
equation and boundary conditions.
d 2w
dx 2
0
w0  A
dw
dx
B
[15]
xL
This gives the following result for w.
w  Bx  A
[16]
(Note that dw/dx =B so that for long times the gradient is a constant for all x values.)
The solution for u = v + w would then be given by a combination of equations [6] and [16].

u ( x, t )   Cn e nt sin( n x)  Bx  A
2
n 0
n 
2n  1
[17]
2L
Here, the equation for Cn, given by equation [10] would have to be modified to include the Bx + A
term.
2
Cm 
L
L
  f x  Bx  Asin
0
2m  1x dx
[18]
2L
e) What is the answer to part d if f(x) = u(x,0) = U, a constant? (This question was not
included on the exam!)
In this case equation [18] for Cm = becomes
2
. Cm 
U  Bx  Asin 2m  1x dx  2U  A sin 2m  1x dx  2B x sin 2m  1x dx [19]
L
2L
L
2L
L
2L
L
L
L



0
0
0
The first integral above, with the (U – A) factor, is similar to the one found in equation [11]. The
result for this integral is given below.
First midterm solutions
L. S. Caretto, Spring 2009, ME 501B
Page 4
2m  1x dx  4U  A
2U  A
sin

2m  1
L
2L
0
L
[20]
The second integral in equation [19] is found from integral tables. 1
xL
2
L


2m  1x 
2B
2m  1x
2B 
2 Lx
2m  1x  2 L 

 sin
x sin
dx 
cos
 
L
2L
L  2m  1
2L
2L

 2m  1 
0

x 0
2
2


2m  1L   2 L  sin 2m  1L  0  sin 0
2B
2L

cos
.
[21]
 2m  1 
L  2m  1
2L
2L





2
m
2m  1  8BL  1
2B  2L 

 sin
 0 
L  2m  1 
2
2m  12  2

Combining equations [19], [20], and [21] gives


2U  A
2m  1x
2B
2m  1x
4U  A 8BL  1m
[22]
Cm 
sin
dx 
x sin
dx 

2m  1 2m  12  2
L
2L
L
2L
L
.
L


0
0
WE can replace m by n in this equation and then substitute the result for C n into equation [17] to
get the problem solution.
 4U  A 8BL  1  e
u ( x, t )   


2n  12  2 
n 0  2n  1


2 n 12  2
n
4 L2
t
sin
2n  1x
2n  1
2L
 Bx  A
[23]
We can divide this equation by U to obtain the following result.

e
u ( x, t )  
A
4
BL 8 1m 

1





2 2
U
 U  2m  1 U 2m  1  
n 0 

2n12 2 t
4 L2
sin
2n  1x
2n  1
2L

BL x A

U L U
[23]
As before the solution for u(x,t)/U depends on x/L and /L2, but this solution also depends on the ratios
BL/U and A/U.
1
x
1
 x sin axdx   a cos ax  a 2 sin ax  C
First midterm solutions
L. S. Caretto, Spring 2009, ME 501B
Page 5
2. Solve the following problem which is a model of heat transfer in an electronic component.
 2T
x 2
T
x
0
x 0
T
x
x L

 2T
y 2
 0 0  x  L, 0  y  H
h
 Tx  L  T   0
k
T
y
 GS
y 0
T
y

yH

h
 T y  H  T  0
k
In this problem, T, k, h, and GS are constants.
We can solve this problem by defining a new variable,  = (T – T). With this substitution we
have the following problem.
 2

x
0
x 0

 2
 0 0  x  L, 0  y  H
x 2 y 2

h


  x L  0
 GS
x x  L k
y y 0
y
yH
h
  yH  0
k
[2]
This problem has homogenous boundary conditions at all boundaries except the boundary at y =
0. The general separation of variables solution for the Laplace equation with an eigenfunction
expansion in the x direction to fit the boundary condition at y = 0 is
( x, y)  Asin( x)  B cos(x)C sinh( y)  D cosh( y)
[3]
Taking the first derivative of this solution gives.

  A cos(x)  B sin( x)C sinh( y )  D cosh( y )
x
[4]
We can satisfy the boundary condition this derivative is zero at x = 0 by setting A = 0. The mixed
boundary condition at x = L requires the following relation (after setting A = 0).

h
  x  L  B sin( L)C sinh( y )  D cosh( y ) 
x x  L k
h
B cos(L)C sinh( y )  D cosh( y )  0
k
[5]
We can satisfy this boundary condition by the following equation that can be solved for the
eigenvalues,  = L. The eigenvalues will depend on the problem parameter ratio hL/k.
h
  sin( L)  cos(L)  0 
k
k
L   cot L 
hL
[6]
We now have to match the boundary conditions at y = 0 and y = H. Taking the y derivative of the
solution in equation [3] (after setting A = 0 as noted above) gives
[1]
First midterm solutions
L. S. Caretto, Spring 2009, ME 501B
Page 6

 B cos(x)C cosh( y )  D sinh( y )
y
[7]
The boundary condition at y = H requires that the following equation be satisfied

y

yH
h
 y  H  B cos(x)C cosh( H )  D sinh( H )
k
h
 B cos(x)C sinh( H )  D cosh( H )  0
k
[8]
This equation will be satisfied if
 C cosh( H )  D sinh( H ) 
h
C sinh( H )  D cosh( H )  0
k
[9]
Dividing this equation by cosh(H), using the definition that tanh(H) = sinh(H)/cosh(H) and
rearranging gives
h
h



C   tanh( H )  D  tanh( H )    0
k
k



[10]
Thus the constants C and D are related by the following equation.
D  C
h
k
  tanh( H )
h
 tanh( H ) 
k
[11]
Substituting this result and into equation [3] (with A = 0) gives
h


n  tanh( n H )


k
( x, y )  BC cos(x) sinh( y ) 
cosh( y )
h


n tanh( n H ) 
k


[12]
This is our desired eigenfunction solution. We can replace the product of constants, BC, by a
single constant, Bn for each eigenvalue and write the general solution as the sum of all the
eigenfunctions
h


n  tanh( n H )


k
( x, y )   Bn cos( n x) sinh(  n y ) 
cosh( n y )
h
n 1


n tanh( n H ) 
k



[13]
We have to match the condition that /y = GS.at y = 0. Taking the y derivative of equation [13]
and setting y = 0 gives the following results.
First midterm solutions
L. S. Caretto, Spring 2009, ME 501B
Page 7
h


n  tanh( n H )


 
k
  Bn cos(n x)n cosh( n y ) 
sinh( n y )
h
y n 1


n tanh( n H ) 
k



y
[14]
h


n  tanh( n H )

 
k
 GS   Bn cos(n x)n cosh( n 0) 
sinh( n 0)   Bn n cos(n x)
h
n 1

 n1
n tanh( n H ) 
k



y 0
Multiplying this equation by cos(mx), where m is a different eigenvalue, and integrating from 0 to
L gives the following equation that can be solved for the expansion coefficients, Bn.
L
L 
0
0 n 1
GS  cos(m x)dx    Bn cos(n x)n cos(m x)dx
[16]
As usual, the orthogonality of the eigenfunctions leaves only one term in the sum, the one for
which n = m.
L
L
GS  cos(m x)dx  Bmm  cos 2 (m x)dx
0
[17]
0
The integrals in this equation are found as follows.
xL
1

1
0 cosm xdx   m sin m x  m sin m L
x 0
L
[18]
xL
x

1
L
1
0 cos (m x)dx   2  4m sin( 2m x)  2  4m sin( 2m L)
x 0
L
2
[19]
Combining equations [17], [18], and [19], and multiplying top and bottom by L to obtain the
eigenvalue, m = mL, gives the following result for Bm.
GS
Bm 
1
m
sin( m L)
L

1
m  
sin( 2m L)
 2 4m


4GS sin( m L)
4G L sin( m L)
 2 2 S
2 L  m sin( 2m L) 2m L  m L sin( 2m L)
2
m
Substituting this expression for Bm into the general solution in equation [13] gives
[20]
[15]
First midterm solutions
L. S. Caretto, Spring 2009, ME 501B
Page 8
h


n  tanh( n H )

4GS L sin( m L) cos(n x) 
k
( x, y )   2 2
cosh( n y ) [21]
sinh( n y ) 
h
n1 2m L  m L sin( 2m L) 

n tanh( n H ) 
k



b) Show that the solution to this problem can be expressed in terms of the ratio (T –
T)/GSL. Show that this ratio is a function of the following variables: x/L, y/H, H/L, and
hL/k.
We can substitute the definition of  = T – T in equation [21] and divide that temperature
difference by GSL to get the desired ratio. In addition we can multiply the fraction with the tanh
terms top and bottom by L and introduce the roots of the eigenvalue equation [6], n = nL
throughout equation [21] to obtain the following result.

x
hL
H


sin(  n ) cos  n  
n 
tanh   n 
T  T
y H
y H 
L
k
L




4
sinh


cosh





n
n
2
H
hL
GS L
H
L
H
L









2



sin
2

n
n
n
n 1
 n tanh   n  


L k





We see that the variables that are explicitly shown in this equation are the ones listed in the
problem statement. In addition, the eigenvalues, n, depend only on the ratio hL/k. (See equation
[6].) Thus, equation [22] shows the desired functional behavior: (T – T)/(GSL) = f(x/L, y/H, H/L,
hK/k).
[22]
Download