AMME2960 Assignment 1.docx - AMME2960 Assignment 1 Section 1 Taylor Series Approximations 1(A 4-Point Stencil f xx xi f i3 4 f i24 f i1 f i 1 2x 2

AMME2960 Assignment 1.docx - AMME2960 Assignment 1 Section...

This preview shows page 1 - 4 out of 17 pages.

AMME2960 Assignment 1 Section 1: Taylor Series Approximations 1. (A) 4-Point Stencil f xx ( x i ) f i 3 + 4 f i 2 4 f i 1 + f i + 1 2 Δ x 2 + ϵ Separate the taylor series for each term in the stencil ¿ ¿ ¿ [ 4 × ] f i 2 = f i 2 Δx 1 ! f i ' + ( 2 Δx ) 2 2 ! f i ' ' ( 2 Δx ) 3 3 ! f i ( 3 ) + ( 2 Δ ϰ ) 4 4 ! f i ( 4 ) [ 4 × ] f i 1 = f i Δx 1 ! f i ' + ( Δx ) 2 2 ! f i ' ' ( Δx ) 3 3 ! f i ( 3 ) + ( Δ ϰ ) 4 4 ! f i ( 4 ) f i + 1 = f i + Δx 1 ! f i ' + ( Δx ) 2 2 ! f i ' ' + ( Δx ) 3 3 ! f i ( 3 ) + ( Δ ϰ ) 4 4 ! f i ( 4 ) Summation of the taylor series for every term f xx ( x i ) =− f i + 3 Δx f ' 9 2 Δ x 2 f ' ' + 9 2 Δ x 3 f i ( 3 ) 27 8 Δ x 4 f ( 4 ) + 4 f i 8 Δx f i ' + 8 Δ x 2 f i '' 16 3 Δ x 3 f i ( 3 ) + 8 3 Δ x 4 f i ( 4 ) 4 f i + f xx ( x i ) = 2 Δ x 2 f i ' ' 5 6 Δ x 4 f i ( 4 ) 2 Δ x 2 f xx ( x i ) = f i '' 5 12 Δ x 2 f i ( 4 ) Thus the leading order error for the 4-point stencil is 5 12 Δ x 2 f i ( 4 )
Image of page 1
1. (B) 5-Point Stencil f xx ( x i ) f i 2 + 16 f i 1 30 f i + 16 f i + 1 f i + 2 12 Δ x 2 + ϵ Separate the taylor series for each term in the stencil ¿ ¿ ¿ [ 16 × ] f i 1 = f i Δx 1 ! f i ' + ( Δx ) 2 2 ! f i '' ( Δx ) 3 3 ! f i ( 3 ) + ( Δ ϰ ) 4 4 ! f i ( 4 ) ( Δ ϰ ) 5 5 ! f i ( 5 ) + ( Δ ϰ ) 6 6 ! f i ( 6 ) [ 30 × ] f i = f i [ 16 × ] f i + 1 = f i + Δx 1 ! f i ' + ( Δx ) 2 2 ! f i ' ' + ( Δx ) 3 3 ! f i ( 3 ) + ( Δ ϰ ) 4 4 ! f i ( 4 ) + ( Δ ϰ ) 5 5 ! f i ( 5 ) + ( Δ ϰ ) 6 6 ! f i ( 6 ) ¿ ¿ ¿ Summation of the taylor series for every term f xx ( x i ) =− f i + 2 Δx f i ' 2 Δx f i ' ' + 4 3 Δ x 3 f i ( 3 ) 2 3 Δ x 4 f i ( 4 ) + 4 15 Δ x 5 f i ( 5 ) 4 45 Δ x 6 f i ( 6 ) + 16 f i 16 Δx f i ' + 8 Δ x 2 f i '' 8 3 Δ x ¿ 12 Δ x 2 f i ' ' 2 15 Δ x 6 f i ( 6 ) 12 Δ x 2 ¿ f i ' ' 1 90 Δ x 4 f i ( 6 ) Thus the leading order error term for the 5-term stencil is 1 90 Δ x 4 f i ( 6 ) 2. Stencil Differences
Image of page 2
In the 4-point stencil (Stencil 1) the difference between the numerical solutions (n=[8,16,32]) and the analytical solution is very clear. With n=8, there are not enough points in the grid to obtain a clear solution, whereas with the n=32 solution, it is much closer to the analytical solution and with an increased number of points, it increases the accuracy of the solution. In the 5-point stencil (Stencil 2) the difference between the numerical solutions and the analytical solutions is much less. Because it is a 5-term solution, the numerical solutions for all n values are closer to the analytical solution. Overall, the 5-point stencil provides a much clearer solution, as there is increasing grid resolution and therefore accuracy increased. Section 2: Analytical Solution to the Heat Equation 1. General Solution of the heat equation To determine the general solution to the heat equation, first the general governing equation for heat must be established along with the governing equation for heat provided in the question: T t = c 2 Txx therefore ∂ H ∂x = D 2 H ∂t 2 Where H is the height of the honey and D = 0.087m2/s is the diffusivity.
Image of page 3
Image of page 4

You've reached the end of your free preview.

Want to read all 17 pages?

  • Three '17
  • Dr Andre Kyme
  • Partial differential equation, Analytical Solution, Numerical vs Analytical Solution

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture