{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# hw2 - Plot at t = 10 s with µ = 0.5 and 2 and ∆ x = 0.05...

This preview shows page 1. Sign up to view the full content.

Numerical Methods for Coastal and Oceanographic Engineering Slinn Spring 2004 Home Work Problem # 2 Due February 17, 2004 Solve the one-way wave equation, 0 = + x u C t u , using implicit finite difference schemes. A. Use backward Euler, with µ = 0.5, 2, and 5. B. Use trapezoidal differencing with µ = 0.5, 2, and 5. With each, use second-order central spatial differences on the domain 0 < x < 20 m, on the time interval, 0 < t < 10 s, with C = 1 m s -1 , and initial conditions . 2 ) 2 ( 5 3 ) 0 , ( = x e x u Let x = 0.05 m (401 grid points), and x = 0.02 m (1001 grid points). For boundary conditions use u = 0 at x = 0, 20 m at all times. The exact result should look like u . 2 ) 12 ( 5 3 ) 10 , ( = x e x C. Solve the one-dimensional advection-diffusion equation, 2 2 x u x u C t u = + ν using the trapezoidal scheme and values of ν = 0.01 and 0.001.
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Plot at t = 10 s with µ = 0.5 and 2 and ∆ x = 0.05 m and 0.02 m. A non-periodic tri-diagonal matrix solver is provided for the assignment. Plot the six solutions for part A, together with the initial conditions and exact solution on a single color plot with Tecplot. Also plot the eight curves for part B together on a single plot. Plot four solutions, for each value of v, together for part C, on two color plots. One approach to put multiple line plots together for Tecplot is to “Cat” together (the append command in unix) the separate *.dat files for each set of parameters, i.e., cat file1.dat file2.dat file3.dat file4.dat > file5.dat . Note that here the file header for files 2-4 is slightly different from the necessary file header for file1....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online