Tensor Calculus - Smu.ca

2y ago
55 Views
3 Downloads
495.35 KB
53 Pages
Last View : 15d ago
Last Download : 2m ago
Upload by : Aliana Wahl
Transcription

A Primer onTensor CalculusDavid A. ClarkeProfessor of Astronomy and PhysicsSaint Mary’s University, Halifax NS, Canadadclarke@ap.smu.caJune, 2011Copyright c David A. Clarke, 2011

ContentsPrefaceii1 Introduction12 Definition of a tensor33 The3.13.23.33.4metricPhysical components and basis vectorsThe scalar and inner products . . . . .Invariance of tensor expressions . . . .The permutation tensors . . . . . . . .9111417184 Tensor derivatives4.1 “Christ-awful symbols” . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4.2 Covariant derivative . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2121255 Connexion to vector calculus5.1 Gradient of a scalar . . . . .5.2 Divergence of a vector . . .5.3 Divergence of a tensor . . .5.4 The Laplacian of a scalar . .5.5 Curl of a vector . . . . . . .5.6 The Laplacian of a vector .5.7 Gradient of a vector . . . .5.8 Summary . . . . . . . . . .5.9 A tensor-vector identity . .30303032333435353637coordinates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .39404041.6 Cartesian, cylindrical, spherical polar6.1 Cartesian coordinates . . . . . . . . .6.2 Cylindrical coordinates . . . . . . . .6.3 Spherical polar coordinates . . . . . .7 An application to viscosity.42i

PrefaceThese notes stem from my own need to refresh my memory on the fundamentals of tensorcalculus, having seriously considered them last some 25 years ago in grad school. Since then,while I have had ample opportunity to teach, use, and even program numerous ideas fromvector calculus, tensor analysis has faded from my consciousness. How much it had fadedbecame clear recently when I tried to program the viscosity tensor into my fluids code, andcouldn’t account for, much less derive, the myriad of “strange terms” (ultimately from thedreaded “Christ-awful” symbols) that arise when programming a tensor quantity valid incurvilinear coordinates.My goal here is to reconstruct my understanding of tensor analysis enough to make theconnexion between covariant, contravariant, and physical vector components, to understandthe usual vector derivative constructs ( , ·, ) in terms of tensor differentiation, to putdyads (e.g., v) into proper context, to understand how to derive certain identities involvingtensors, and finally, the true test, how to program a realistic viscous tensor to endow a fluidwith the non-isotropic stresses associated with Newtonian viscosity in curvilinear coordinates.Inasmuch as these notes may help others, the reader is free to use, distribute, and modifythem as needed so long as they remain in the public domain and are passed on to others freeof charge.David ClarkeSaint Mary’s UniversityJune, 2011Primers by David Clarke:1. A FORTRAN Primer2. A UNIX Primer3. A DBX (debugger) Primer4. A Primer on Tensor Calculus5. A Primer on Magnetohydrodynamics6. A Primer on ZEUS-3DI also give a link to David R. Wilkins’ excellent primer Getting Started with LATEX, inwhich I have added a few sections on adding figures, colour, and HTML links.ii

A Primer on Tensor Calculus1IntroductionIn physics, there is an overwhelming need to formulate the basic laws in a so-called invariantform; that is, one that does not depend on the chosen coordinate system. As a start, thefreshman universityphysics student learns that in ordinary Cartesian coordinates, Newton’sP i m a, has the identical form regardless of which inertial frame ofSecond Law,Fireference (not accelerating with respect to the background stars) one chooses. Thus twoobservers taking independent measures of the forces and accelerations would agree on eachmeasurement made, regardless of how rapidly one observer is moving relative to the otherso long as neither observer is accelerating.However, the sophomore student soon learns that if one chooses to examine Newton’sSecond Law in a curvilinear coordinate system, such as right-cylindrical or spherical polarcoordinates, new terms arise that stem from the fact that the orientation of some coordinateunit vectors change with position. Once these terms, which resemble the centrifugal andCoriolis terms appearing in a rotating frame of reference, have been properly accounted for,physical laws involving vector quantities can once again be made to “look” the same as theydo in Cartesian coordinates, restoring their “invariance”.Alas, once the student reaches their junior year, the complexity of the problems hasforced the introduction of rank 2 constructs such as matrices to describe certain physicalquantities (e.g., moment of inertia, viscosity, spin) and in the senior year, Riemannian geometry and general relativity require mathematical entities of still higher rank. The toolsof vector analysis are simply incapable of allowing one to write down the governing laws inan invariant form, and one has to adopt a different mathematics from the vector analysistaught in the freshman and sophomore years.Tensor calculus is that mathematics. Clues that tensor-like entities are ultimatelyneeded exist even in a first year physics course. Consider the task of expressing a velocityas a vector quantity. In Cartesian coordinates, the task is rather trivial and no ambiguitiesarise. Each component of the vector is given by the rate of change of the object’s coordinatesas a function of time: v (ẋ, ẏ, ż) ẋ êx ẏ êy ż êz ,(1)where I use the standard notation of an “over-dot” for time differentiation, and where êx isthe unit vector in the x-direction, etc. Each component has the unambiguous units of m s 1 ,the unit vectors point in the same direction no matter where the object may be, and thevelocity is completely well-defined.Ambiguities start when one wishes to express the velocity in spherical-polar coordinates,for example. If, following equation (1), we write the velocity components as the timederivatives of the coordinates, we might write v (ṙ, ϑ̇, ϕ̇).1(2)

Introduction2zz r sinθdφdydxr dθdzdryxyxFigure 1: (left) A differential volume in Cartesian coordinates, and (right) a differentialvolume in spherical polar coordinates, both with their edge-lengths indicated.An immediate “cause for pause” is that the three components do not share the same “units”,and thus we cannot expand this ordered triple into a series involving the respective unitvectors as was done in equation (1). A little reflection might lead us to examine a differential“box” in each of the coordinate systems as shown in Fig. 1. The sides of the Cartesian boxhave length dx, dy, and dz, while the spherical polar box has sides of length dr, r dϑ, andr sin ϑ dϕ. We might argue that the components of a physical velocity vector should be thelengths of the differential box divided by dt, and thus: v (ṙ, r ϑ̇, r sin ϑ ϕ̇) ṙ êr r ϑ̇ êϑ r sin ϑ ϕ̇ êϕ ,(3)which addresses the concern about units. So which is the “correct” form?In the pages that follow, we shall see that a tensor may be designated as contravariant,covariant, or mixed, and that the velocity expressed in equation (2) is in its contravariantform. The velocity vector in equation (3) corresponds to neither the covariant nor contravariant form, but is in its so-called physical form that we would measure with a speedometer.Each form has a purpose, no form is any more fundamental than the other, and all are linkedvia a very fundamental tensor called the metric. Understanding the role of the metric inlinking the various forms of tensors1 and, more importantly, in differentiating tensors is thebasis of tensor calculus, and the subject of this primer.1Examples of tensors the reader is already familiar with include scalars (rank 0 tensors) and vectors(rank 1 tensors).

2Definition of a tensorAs mentioned, the need for a mathematical construct such as tensors stems from the needto know how the functional dependence of a physical quantity on the position coordinateschanges with a change in coordinates. Further, we wish to render the fundamental laws ofphysics relating these quantities invariant under coordinate transformations. Thus, whilethe functional form of the acceleration vector may change from one coordinate system toanother, the functional changes to F and m will be such that F will always be equal to m a,and not some other function of m, a, and/or some other variables or constants dependingon the coordinate system chosen.Consider two coordinate systems, xi and x̃i , in an n-dimensional space where i 1, 2, . . . , n2 . xi and x̃i could be two Cartesian coordinate systems, one moving at a constant velocity relative to the other, or xi could be Cartesian coordinates and x̃i sphericalpolar coordinates whose origins are coincident and in relative rest. Regardless, one shouldbe able, in principle, to write down the coordinate transformations in the following form:x̃i x̃i (x1 , x2 , . . . , xn ),(4)one for each i, and their inverse transformations:xi xi (x̃1 , x̃2 , . . . , x̃n ).(5)Note that which of equations (4) and (5) is referred to as the “transformation”, and whichas the “inverse” is completely arbitrary. Thus, in the first example where the Cartesiancoordinate system x̃i (x̃, ỹ, z̃) is moving with velocity v along the x axis of the Cartesiancoordinate system xi (x, y, z), the transformation relations and their inverses are: x̃ x vt,x x̃ vt, ỹ y,y ỹ,(6) z̃ z,z z̃.For the second example, the coordinate transformations and their inverses between Cartesian,xi (x, y, z), and spherical polar, x̃i (r, ϑ, ϕ) coordinates are: px r sin ϑ cos ϕ, r x2 y 2 z 2 , p 2 2x y 1ϑ tan,y r sin ϑ sin ϕ,(7)z y ϕ tan 1,z r cos ϑ.xNow, let f be some function of the coordinates that represents a physical quantityof interest. Consider again two generic coordinate systems, xi and x̃i , and assume theirtransformation relations, equations (4) and (5), are known. If the components of the gradient2In physics, n is normally 3 or 4 depending on whether the discussion is non-relativistic or relativistic,though our discussion matters little on a specific value of n. Only when we are speaking of the curl andcross-products in general will we deliberately restrict our discussion to 3-space.3

Definition of a tensor4of f in xj , namely f / xj , are known, then we can find the components of the gradient inx̃i , namely f / x̃i , by the chain rule:nX f f x1 f x2 f xn xj f ··· . x̃i x1 x̃i x2 x̃i xn x̃i x̃i xjj 1(8)Note that the coordinate transformation information appears as partial derivatives of theold coordinates, xj , with respect to the new coordinates, x̃i .Next, let us ask how a differential of one of the new coordinates, dx̃i , is related todifferentials of the old coordinates, dxi . Again, an invocation of the chain rule yields:nX x̃i x̃i x̃i x̃idx̃i dx1 dx2 · · · dxn dxj . x1 x2 xn xjj 1(9)This time, the coordinate transformation information appears as partial derivatives of thenew coordinates, x̃i , with respect to the old coordinates, xj , and the inverse of equation (8).We now redefine what it means to be a vector (equally, a rank 1 tensor ).Definition 2.1. The components of a covariant vector transform like a gradient and obey the transformation law:Ãi nX xjj 1 x̃iAj .(10)Definition 2.2. The components of a contravariant vector transform like acoordinate differential and obey the transformation law:nX x̃i jA.Ã j xj 1i(11)It is customary, as illustrated in equations (10) and (11), to leave the indices of covarianttensors as subscripts, and to raise the indices of contravariant tensors to superscripts: “colow, contra-high”3 . In this convention, dxi dxi . As a practical modification to this rule,because of the difference between the definitions of covariant and contravariant components(equations 10 and 11), a contravariant index in the denominator is equivalent to a covariantindex in the numerator, and vice versa. Thus, in the construct xj / x̃i , j is contravariantwhile i is considered to be covariant.Superscripts indicating raising a variable to some power will generally be clear by context, but where there is any ambiguity, indices representing powers will be enclosed in squarebrackets. Thus, A2 will normally be, from now on, the “2-component of the contravariantvector A”, whereas A[2] will be “A-squared” when A2 could be ambiguous.3Thanks to Rob Thacker, SMU, for this handy mnemonic.

Definition of a tensor5Finally, we shall adopt here, as is done most everywhere else, the Einstein summationconvention in which a covariant index followed by the identical contravariant index (or viceversa) is implicitly summed over the index without the use of a summation sign, renderingthe repeated index a dummy index. On rare occasions where a sum is to be taken over tworepeated covariant or two repeated contravariant indices, a summation sign will be givenexplicitly. Conversely, if properly repeated indices (e.g., one covariant, one contravariant)are not to be summed, a note to that effect will be given. Further, any indices enclosedin parentheses [e.g., (i)] will not be summed. Thus, Ai B i is normally summed while Ai Bi ,Ai B i , and A(i) B (i) are not.To the uninitiated who may think at first blush that this convention may be fraught withexceptions, it turns out to be remarkably robust and rarely will it pose any ambiguities. Intensor analysis, it is rare that two properly repeated indices should not, in fact, be summed.It is equally rare that two repeated covariant (or contravariant) indices should be summed,and rarer still that an index appears more than twice in any given term.As a first illustration, applying the Einstein summation convention changes equations(10) and (11) to: x̃i j xjiA,andà A,Ãi j x̃i xjrespectively, where summation is implicit over the index j in both cases.Remark 2.1. While dxi is the prototypical rank 1 contravariant tensor (e.g., equation 9), xiis not a tensor as its transformation follows neither equations (10) nor (11). Still, we willfollow the up-down convention for coordinate indices as it serves a purpose to distinguishbetween covariant-like and contravariant-like coordinates. It will usually be the case anywaythat xi will appear as part of dxi or / xi .Tensors of higher rank4 are defined in an entirely analogous way. A tensor of dimensionm (each index varies from 1 to m) and rank n (number of indices) is an entity that, underan arbitrary coordinate transformation, transforms as:T̃i1 .ipk1 .kq xj1 xjp x̃k1 x̃kq .Tj1 .jp l1 .lq ,iillpq11 x̃ x̃ x x(12)where p q n, and where the indices i1 , . . . , ip and j1 , . . . , jp are covariant indices andk1 , . . . , kq and l1 , . . . , lq are contravariant indices. Indices that appear just once in a term(e.g., i1 , . . . , ip and k1 , . . . , kq in equation 12) are called free indices, while indices appearingtwice—one covariant and one contravariant—(e.g., j1 , . . . , jp and l1 , . . . , lq in equation 12),are called dummy indices as they disappear after the implied sum is carried forth. In a4There is great potential for confusion on the use of the term rank, as it is not used consistently in theliterature. In the context of matrices, if the n column vectors in an m n matrix (with “tensor-rank” 2)can all be expressed as a linear combination of r min(m, n) m-dimensional vectors, that matrix has a“matrix-rank” r which, of course, need not be 2. For this reason, some authors prefer to use order ratherthan rank for tensors so that a scalar is an order-0 tensor, a vector an order-1 tensor, and a matrix anorder-2 tensor. Still other authors use dimension instead of rank, although this then gets confused with thedimension of a vector (number of linearly independent vectors that span the parent vector space).Despite its potential for confusion, I use the term rank for the number of indices on a tensor, which is inkeeping with the most common practise.

Definition of a tensor6valid tensor relationship, each term, whether on the left or right side of the equation, musthave the same free indices each in the same position. If a certain free index is covariant(contravariant) in one term, it must be covariant (contravariant) in all terms.If q 0 (p 0), then all indices are covariant (contravariant) and the tensor is said tobe covariant (contravariant). Otherwise, if the tensor has both covariant and contravariantindices, it is said to be mixed. In general, the order of the indices is important, and wel .ldeliberately write the tensor as Tj1 .jp l1 .lq , and not Tj11.jqp . However, there is no reason toexpect all contravariant indices to follow the covariant indices, nor for all covariant indicesto be listed contiguously. Thus and for example, one could have Ti jkl m if, indeed, the first,third, and fourth indices were covariant, and the second and fifth indices were contravariant.Remark 2.2. Rank 2 tensors of dimension m can be represented by m m square matrices.A matrix that is an element of a vector space is a rank 2 tensor. Rank 3 tensors of dimensionm would be represented by an m m m cube of values, etc.Remark 2.3. In traditional vector analysis, one is forever moving back and forth betweenconsidering vectors as a whole (e.g., v ), or in terms of its components relative to somecoordinate system (e.g., vx ). This, then, leads one to worry whether a given relationship is f · A A · f ),true for all coordinate systems (e.g., vector “identities” such as: · f A B) ( ·Bx A, ·By A, ·or whether it is true only in certain coordinate systems [e.g., ·(A is true in Cartesian coordinates only]. The formalism of tensor analysis eliminates bothBz A)of these concerns by writing everything down in terms of a “typical tensor component” whereall “geometric factors”, which have yet to be discussed, have been safely accounted for inthe notation. As such, all equations are written in terms of tensor components, and rarely isa tensor written down without its indices. As we shall see, this both simplifies the notationand renders unambiguous the invariance of certain relationships under arbitrary coordinatetransformations.In the remainder of this section, we make a few definitions and prove a few theoremsthat will be useful throughout the rest of this primer.Theorem 2.1. The sum (or difference) of two like-tensors is a tensor of the same type.Proof. This is a simple application of equation (12). Consider two like-tensors (i.e., identicalindices), S and T, each transforming according to equation (12). Adding the LHS and theRHS of these transformation equations (and defining R S T), one gets:R̃i1 .ipk1 .kq S̃i1 .ipk1 .kq xj1. x̃i1 xj1 . x̃i1 T̃i1 .ip xjp x̃ip xjp x̃ipk1 .kq x̃k1. xl1 x̃k1. xl1 x̃kqSj1 .jp l1 .lqlq x x̃kqTj .j l1 .lq xlq 1 p xjp x̃k1 x̃kq xj1(Sj1 .jp l1 .lq Tj1 .jp l1 .lq ). x̃i1 x̃ip xl1 xlq xj1 xjp x̃k1 x̃kqRj .j l1 .lq . x̃i1 x̃ip xl1 xlq 1 p

Definition of a tensor7Definition 2.3. A rank 2 dyad, D, results from taking the dyadic product of two vectors and B, as follows:(rank 1 tensors), ADij Ai Bj ,Di j Ai B j ,D ij Ai Bj ,D ij Ai B j ,(13)where the ij th component of D, namely Ai Bj , is just the ordinary product of the ith element with the j th element of B. of AThe dyadic product of two covariant (contravariant) vectors yields a covariant (contravariant) dyad (first and fourth of equations 13), while the dyadic product of a covariantvector and a contravariant vector yields a mixed dyad (second and third of equations 13).Indeed, dyadic products of three or more vectors

A UNIX Primer 3. A DBX(debugger)Primer 4. A Primeron Tensor Calculus 5. A Primeron Magnetohydrodynamics 6. A Primeron ZEUS-3D I also give a link to David R. Wilkins’ excellent primer GettingStarted withLATEX, in which I have added a few sections on adding figures, colour, and HTML links. ii. A Primeron Tensor Calculus 1 Introduction In physics, there is an overwhelming need to formulate the .

Related Documents:

02 - tensor calculus 1 02 - tensor calculus - tensor algebra tensor calculus 2 tensor the word tensor was introduced in 1846 by william rowan hamilton . it was used in its current meaning by woldemar voigt in 1899. tensor calculus was deve-loped around 1890 by

LA, a tensor contraction, and a possible tensor contractions design using Einstein summation notation and a Domain Speci c Embedded Language (or DSEL ) . Right: Illustration of tensor contractions needed and viable approaches to solve them in machine learning. Figure 1 Left illustrates the notion of tensor and tensor contraction in DLA, as well .

SMU Data Science Review Volume 3 Number 1 Article 5 2020 Demand Forecasting for Alcoholic Beverage Distribution Lei Jiang Southern Methodist University, leij@smu.edu Kristen M. Rollins Southern Methodist University, kmrollins@smu.edu Meredith Ludlow Southern Methodist University, mludlow@smu.edu Bivin Sadler

SMU Data Science Review Volume 3 Number 1 Article 4 2020 QLIME-A Quadratic Local Interpretable Model-Agnostic Explanation Approach Steven Bramhall Southern Methodist University, sbramhall@smu.edu Hayley Horn hhorn@smu.edu Michael Tieu mtieu@smu.edu Nibhrat Lohia Southern Methodist University, nlohia@smu.edu

Tensor calculus on a 3-dimensional manifold only (3 1 formalism of general relativity) Main class: Tensor : stores tensor components with respect to a given triad and not abstract tensors Different metrics can be used at the same time (class Metric), with their associated covariant derivatives

on tensor decomposition, which aims to dissolve tensors into separable representations, while Song et al.(2019) reviewed tensor completion, which aims to impute the unobserved entries of a partially observed tensor. Tensor decomposition and tensor completion are both fundamen-tal problems i

tensor. Similarly, the vector is a rst order tensor, and a scalar is a zeroth order tensor. The order of the tensor equals the number of free indices (see SectionA.3) that the tensor has, and it can also be interpreted as the dimensionality of the array needed to represent the

course. The course was advertised as a training for social and philanthropic work. Birmingham was the first UK University to give aspiring social workers full status as students. From its founding in 1900 University staff had been actively involved in social welfare and philanthropic work in the City of Birmingham. Through research into the employment and housing conditions of poor people in .