WaveTutorial

WaveTutorial - Using EXCEL Spreadsheets to Solve a 1D Wave...

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

View Full Document Right Arrow Icon
Using EXCEL Spreadsheets to Solve a 1D Wave Equation The goal of this tutorial is to describe how to use an EXCEL spreadsheet to compute numerically the solution to the following initial-boundary value problem for the one-dimensional wave equation: Let us introduce a finite difference mesh x n = n Δ x and t k = k Δ t , and let the corresponding nodal values be denoted by Derivatives will be approximated by central differences both in space and time, By rearranging terms, one obtains where r = (c Δ t x ). The resulting discrete equation involves three distinct time levels: known data from steps k - 1 and k are transferred to step k + 1. In other words, to compute the time evolution of the solution its values at both time t k and an earlier time t k-1 must be known. This three-level scheme poses some challenges when imposing the initial condition. To calculate the value of u n at the first time step k = 1, one needs information from step k = - 1 and k = 0. The initial condition u(x, 0)
Background image of page 1

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

View Full DocumentRight Arrow Icon
= f(x) provides information at step k = 0. Any information at an earlier time must be inferred. The initial velocity condition can be used to do that. Imagine a row of false mesh point at time t = - Δ t = t -1 , then the initial velocity condition can be approximated using central differences as thus Assuming that the discrete wave equation also holds at t = 0, one can compute the value of the solution at time t = t 1 as and substitute in the expression for u n -1 derived from the initial velocity condition. After re-arranging one obtains Since u n 0 = f ( x n ) and g ( x n ) are known at all nodes, we are now in a position to specify the first two rows of nodes. Let's see how to build an EXCEL spreadsheet that implements this calculation. In line with the spreadsheet format used in other tutorials, we will be working with a spreadsheet where rows represent time levels, and columns correspond to spatial nodes. In particular, throughout this tutorial we will refer to this spreadsheet . 1. How to Tabulate the Spatial/Time Interval 2. How to Include the Initial Condition 3. How to Compute the First Time Step 4. How to Compute the Solution at Subsequent Time Steps 5. How to Create an Animation of the Solution Step 1: How to Tabulate the Spatial/Time Interval
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 5

WaveTutorial - Using EXCEL Spreadsheets to Solve a 1D Wave...

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

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