1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Approximation of boundary value problem using finite differences

  1. Mar 3, 2010 #1
    1. The problem statement, all variables and given/known data
    A hot fluid is flowing through a thick-walled cylindrical metal tube at a constant temperature of 450C. The cylinder wall has an inner radius of 1 cm and an outer radius of 2 cm and the surrounding temperature is 20C. The temperature distribution u(r) in the metal is defined by the differential equation:

    [tex]r\frac{d^2 u}{dr^2} + \frac{du}{dr} = 0 [/tex]

    With the boundary conditions:

    [tex]u\left(1\right) = 450 [/tex]

    [tex]\frac{du}{dr}\left(2\right) = -K\left(u-20\right)[/tex]

    where K=1.

    Approximate the boundary value problem by creating a matrix problem using the finite difference method.

    2. Relevant equations

    3. The attempt at a solution
    First, the interval [tex]1\leq r \leq 2[/tex] is divided by the number of iterations, N, to give the step length, h.

    The derivatives of all the values inbetween the boundaries can be approximated by using finite differences as follows:

    [tex]r\frac{u_{N-1}-2u_{N}+u_{N+1}}{h^2} + \frac{u_{N+1}-u_{N-1}}{2h} = 0[/tex]

    Which after rearrangement gives:

    [tex]r\frac{u_{N-1}-2u_{N}+u_{N+1}}{h^2} = -\frac{u_{N+1}-u_{N-1}}{2h}[/tex]

    This can be represented as a linear matrix problem Ax = B by using the left-hand coefficients to create a tridiagonal N-by-N matrix (A), the coefficients being:

    [tex]1\frac{r_{N}}{h^2}, -2\frac{r_{N}}{h^2}, 1\frac{r_{N}}{h^2}[/tex]

    and by using the right-hand values to create a n-by-1 column matrix (B). This problem should be solveable using gaussian elimination to give the matrix X, which contains the values of u at all N iteration points.

    The first and last value of the B matrix also have to be corrected due to the boundary values, which themselves are outside the range of the matrix.

    When solving similar problems in the past, the boundary conditions have always been given as two function values at different points i.e u(1) and u(2) and usually there has been some way of calculating values for the B matrix. The problem I'm having here is finding a way to use the second boundary value, since it is given as -(u-20), with u presumably being u(2) which is unknown and finding a way to generate the matrix B, i.e the values of du/dr.
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted

Similar Threads - Approximation boundary value Date
Find the Fourier Series of the function Feb 24, 2018
Schrodinger equation and boundary conditions Feb 3, 2018
Help with interpreting an interpolation problem Nov 13, 2017
IVP and root approximation Sep 17, 2017