FourierSolTutorial

FourierSolTutorial - Using EXCEL Spreadsheets to Evaluate...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Using EXCEL Spreadsheets to Evaluate the Fourier Series Solutions to a 1D Heat Equation The goal of this tutorial is to create an EXCEL spreadsheet that calculates the Fourier series solution to the following initial-boundary value problem for the one-dimensional heat equation: The basic idea of finding a series solution is to expand the unknown function u(x, t) in a series of eigenfunctions that satisfy the same boundary conditions as the original problem. For the boundary-value problem described above, the general expansion of u over a spatial domain [0, L ] is where Note that the coefficients b n are the coefficients of f(x) in a Fourier series. Thus, for a given initial condition f(x) , the function u(x, t) is completely determined. An Example of Initial Condition Suppose the initial condition has the following form Using the above expression for the Fourier coefficients b n with L = 1, one finds
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
While substituting the expression for b n into the expansion of u , it is worth noticing that sin(n π/2 ) = 0 for even values of n sin(n π/2 ) = ( -1 ) n for odd values of n Hence, half of the terms in the expansion of u are null and the expression reduces to Basic Steps to Set Up a Spreadsheet These are the basic steps needed in setting up an EXCEL spreadsheet that allows you to calculate the first few terms in the series solution derived above. The terms will be calculated at specific points in the spatial domain and at a given time. 1. How to Tabulate the Spatial Interval 2. How to Tabulate the Modes 3. How to Compute the Terms of the Fourier Series 4. How to Find the Fourier Series Solution 5. How to Compare the Fourier Series Solution to the Finite Difference Solution Step 1: How to Tabulate the Spatial Interval The first step is to tabulate the sample points in the spatial interval. These will be the points at which the expansion of u will be evaluated. Subdivide the interval [0, 1] into N+1 equally-spaced sample points a distance Δ x apart. In a blank EXCEL spreadsheet, enter the sample points along a row, as shown below. For this tutorial, let Δ x = 0.05 and N = 19. Note that the value of Δ x is shown in cell C2. Each sample point is calculated as for n = 1, . .. N and x 0 = 0. For example, in the spreadsheet below the value of the first sample point x 1 = x 0 + 0.05 is shown in cell E5: it is computed by addying the fixed space increment (cell C2) to the value contained in the cell to the immediate left of E5 (cell D5). The expression displayed in the formula box shows the specific EXCEL formula used to compute the value in cell E5. The same formula can be copied and pasted in the cells along row 5 to calculate the desired sample points. Note that the value of the space increment Δ x should always be read from cell C2, therefore the address of cell C2 should be displayed with dollar signs in the formula (see
Background image of page 2
absolute referencing). Step 2: How to Tabulate the Modes
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 05/04/2011 for the course MATH 25 taught by Professor Lo during the Spring '11 term at BC.

Page1 / 6

FourierSolTutorial - Using EXCEL Spreadsheets to Evaluate...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online