16.12.2012 Views

Computer Algebra Recipes

Computer Algebra Recipes

Computer Algebra Recipes

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

7.3. SIMULATING SOLITON COLLISIONS 313<br />

then equation (7.11) reduces to<br />

μ <br />

dy<br />

a dp + cdq+ edy =0: (7.13)<br />

dx<br />

For the SGE, a =1,b =0,andc = ¡1, so that (7.12) yields (dy=dx) 2 ¡ 1=0,<br />

or dy=dx = §1. The two characteristic directions have slopes of 45 ± and ¡45 ± ,<br />

respectively. Forming a diamond-shaped mesh with these slopes produces the<br />

grid illustrated in Figure 7.9. Given the new grid, how is U (or Ã) calculated?<br />

j=2<br />

y<br />

j=1<br />

P<br />

L R<br />

(0,2) (2,2) (4,2)<br />

(1,1) (3,1) (5,1)<br />

j=0<br />

(2,0) (4,0) (6,0)<br />

i=0 i=1 i=2<br />

Δx=h<br />

x x<br />

min max<br />

Δy=h<br />

Figure 7.9: Characteristic directions and labels for solving the SGE.<br />

Consider the mesh point P in Figure 7.9, where it is desired to calculate the<br />

unknown UP from the known values UL and UR on the previous time step. The<br />

subscripts L and R denote advancing \from the left" along the characteristic<br />

direction dy=dx = 1 and \from the right" along the characteristic direction<br />

dy=dx = ¡1, respectively. Taking dy=dx = §1 and replacing (7.13) with a<br />

¯nite di®erence approximation yields the following pair of equations,<br />

(pP ¡ pL) ¡ (qP ¡ qL) =¡eL (yP ¡ yL);<br />

¡(pP ¡ pR) ¡ (qP ¡ qR) =¡eR (yP ¡ yR);<br />

x<br />

(7.14)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!