Sample Quiz 3 problems: BVPs#
Problem 1: Finite difference method#
The temperature distribution \(T(r)\) in an annular fin of inner radius \(r_1\) and outer radius \(r_2\) is described by the equation
where \(r\) is the radial distance from the centerline (the independent variable) and \(m^2\) is a constant that depends on the heat transfer coefficient, thermal conductivity, and thickness of the annulus. Assuming we choose a spatial step size \(\Delta r\),
a.) Write the finite-difference representation of the ODE (that applies at a location \(r_i\)), using central differences.
b.) Based on the last part, write the recursion formula.
c.) The boundary condition at the outer radius \(r = r_2\) is described by convection heat transfer:
Write the boundary condition at \(r = r_2\) in recursion form (i.e., the equation you would implement into your system of equations to solve for temperature).
Solution#
a.) Replace the derivatives in the given ODE with finite differences, and replace any locations with the \(i\) location:
or
b.) Rearrange and combine terms:
c.) We can use a backward difference to approximate the \(dT/dr\) term. \(T_n\) represents the temperature at node \(n\) where \(r_n = r_2\):
Problem 2: eigenvalue#
Given the equation \(y^{\prime\prime} + 9 \lambda^2 y = 0\) with \(y(0) = 0\) and \(y(2) = 0\),
a.) Find the expression that gives all eigenvalues (\(\lambda\)). What is the eigenfunction?
b.) Calculate the principal eigenvalue.
Solution#
a.)
The eigenfunction is then the solution function associated with an eigenvalue:
b.) The principal eigenvalue is just that associated with \(n = 1\):
Problem 3: shooting method#
Use the shooting method to solve the boundary value problem
where \(y(0) = 0\) and \(y(1) = 3\). Find the initial value of \(y'\) (meaning, \(y'(0)\)) that satisfies the given boundary conditions. Use the forward Euler method with a step size of \(\Delta x = 0.5\).
Solution#
First decompose into two 1st-order ODEs:
with BCs \(z_1 (x=0) = z_{1,1} = 0\) and \(z_1(x=1) = z_{1,3} = 3\), we do not know \(y'(0) = z_2(x=0) = z_{2,1} = ?\)
Try some guess #1: \(y' (0) = 0 = z_2 (0)\), with the forward Euler method:
so for solution 1: \(y(1) = 0 \neq 3\).
For guess #2: \(y' (0) = 2 = z_2 (0)\), with the forward Euler method:
so for solution 1: \(y(1) = 2 \neq 3\).
For guess #3, we can interpolate:
then, use this guess:
so for solution 3: \(y(1) = 3\) which is the target.
So our answer is \(y'(0) = 3\).