Professional Documents
Culture Documents
The Einstein summation convention allows us to write down equations economically. Consider the continuity equation for an incompressible uid, which in vector form can be written as u = 0. (1) In Cartesian coordinates, we can write this as ux uy uz + + = 0. x y z (2)
But, this equation can be written as follows using the Einstein summation notation: ui = 0, (3) xi where it is understood that i = x, y, z . The notation in Eq. (3) is understood as follows: ux uy uz ui + + = 0. (4) xi x y z Lets try another example. Consider the term u u which appears on the left-hand-side of the Navier-Stokes equations (see Fundamental Equations of Fluid Mechanics). This term can be written in component form as follows u u = + + ux ux ux + uy + uz ix x y z uy uy uy ux + uy + uz iy x y z uz uz uz ux + uy + uz iz . x y z ux
(5)
But, this equation can be written very economically using the Einstein summation convention as follows uj ui , (6) xi with i = x, y, z and j = x, y, z . To see that this equation is the same as Eq. (5), we simply evaluate it by doing the following Fix j = x; Loop i over x, y , and z , and sum up all terms. This gives you the ix component: ux ux ux ux + uy + uz ix ; (7) x y z Fix j = y ; 1
Loop i over x, y , and z , and sum up all terms. This gives you the iy component: uy uy uy ux + uy + uz iy ; (8) x y z Fix j = z ; Loop i over x, y , and z , and sum up all terms. This gives you the iz component: uz uz uz ux + uy + uz iz ; (9) x y z Sum up Eqs. (7)-(9) to get the full expression for u u, which is the same as Eq. (5). We can use this procedure to evaluate the terms expressed using the Einstein summation convention in lecture 8, pp. 7-10.