{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ComputerProb4hints

# ComputerProb4hints - Oct 24 2006 ATMS 502 CS 505 CSE 566...

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

1 Oct. 24, 2006 ATMS 502 - CS 505 - CSE 566 Jewett Hints: Computer Problem 4 To make things simple, read in the type of problem (rotational/deformational case), the cone radius and origin, and the time step and plot interval. As with computer problem 3, it is often easiest to debug by first running the problem for 10 steps, plotting each step, while looking for problems. Your initiation step now requires initializing the two wind components u(x,y) and v(x,y) as well as the scalar field q(x,y). Remember their physical dimensions will not be the same; u() has an extra point in the X direction, and v() in Y. You will be handling a single row or column at a time when doing advection, so you will be copying a row or column of q and of u (or v) to 1D arrays. You can implement boundary conditions there – in 1D – so q() can be q(nx,ny), and your 1D array can have the extra points needed as boundary points for advection. I coded advection this way: in the large time loop, I have a step that checks to see if the time step is even or odd. If even, I call my x-advection routine followed by
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Ask a homework question - tutors are online