differential equations on manifolds

36
Chapter 5 Differential Equations on Manifolds In this chapter we look at a few classical linear differential equations formulated using the exterior calculus. They include heat equation, Poisson equation, Maxwell’s equations. These differential equations originate from classical physics and are often formulated in coordi- nates. For example, the Laplace operator Δ, which you will see appearing in a lot of the equations we consider, applied to a function u : R 3 R is expressed with Δu = 2 x 2 u + 2 y 2 u + 2 z 2 u. How- ever, when the coordinate x i n i =1 one uses is not orthonormal everywhere, which is often the case on a manifold, fundamental operators such as the Laplacian expressed in coordinates becomes impenetrable: Δu = 1 p det g n X i =1 n X j =1 x i ˘ det g ( g -1 ) ij x j u , g ij = x i , x j , to say nothing of its discretization for computation. Compare it with the coordinate-free exterior calculus expression Δu = -δdu, which is often physically, geometrically, and numerically (DEC) more insightful. Physical Units Many of the equations come from physics, and we will write the precise physical unit in these cases. A differential k-form is regarded as an oriented k-density, namely it describes some physical quantity per unit k-dimensional volume. For example, in R 3 , the mass density ρ is a 3-form which becomes a mass after integration over a volume. We denote ρ Ω 3 ( M ; R kg) 1

Upload: others

Post on 04-Oct-2021

16 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Differential Equations on Manifolds

Chapter 5

Differential Equations on Manifolds

In this chapter we look at a few classical linear differential equations formulated using theexterior calculus. They include heat equation, Poisson equation, Maxwell’s equations.

These differential equations originate from classical physics and are often formulated in coordi-nates. For example, the Laplace operator∆, which you will see appearing in a lot of the equationswe consider, applied to a function u: R3→ R is expressed with ∆u= ∂ 2

∂ x2 u+ ∂ 2

∂ y2 u+ ∂ 2

∂ z2 u. How-

ever, when the coordinate

∂∂ x i

n

i=1 one uses is not orthonormal everywhere, which is oftenthe case on a manifold, fundamental operators such as the Laplacian expressed in coordinatesbecomes impenetrable:

∆u=1

p

det g

n∑

i=1

n∑

j=1

∂ x i

Æ

det g(g−1)i j∂

∂ x ju

, gi j =­

∂ x i,∂

∂ x j

·

,

to say nothing of its discretization for computation. Compare it with the coordinate-free exteriorcalculus expression

∆u= −δdu,

which is often physically, geometrically, and numerically (DEC) more insightful.

Physical Units

Many of the equations come from physics, and we will write the precise physical unit in thesecases. A differential k-form is regarded as an oriented k-density, namely it describes somephysical quantity per unit k-dimensional volume. For example, in R3, the mass density ρ is a3-form which becomes a mass after integration over a volume. We denote

ρ ∈ Ω3(M ;Rkg)

1

Page 2: Differential Equations on Manifolds

2 CHAPTER 5. DIFFERENTIAL EQUATIONS ON MANIFOLDS

and read that ρ is a mass-valued (or kg-valued) 3-form. The actual physical dimension of ρ asa mass density is

[ρ] = [kg/m3]

since it has to integrate over a 3-dimensional region to become an element of Rkg. In otherwords, one has to take 3 tangent vectors X1, X2, X3 to plug in into the alternating triple linearform ρ to evaluate the mass, and tangent vectors have a unit of meter.

Another example is that a mass flux J ∈ Ω2(M ;R kg/s) is a 2-form modeling the amount of masspassing through a surface per unit area per unit time. The unit of J is [J] = [kg/m2s], and itsevaluation after integrating over an area is a number in R kg/s.

In general, a differential k-form ω ∈ Ωk(M ;Runit) has a unit [ω] = [unit/mk].

The exterior derivative d maps Ωk(M ;Runit) to Ωk+1(M ;Runit). In other words, the exteriorderivative gives an extra “length” in the denominator, [dω] = [ω][1/m]. For this being said, inRn the coordinate functions x1, . . . , xn, which are meter-valued functions : M → Rm, gives abasis for k-form d x I = d x i1 ∧ · · · ∧ d x ik that belongs to Ωk(M ;Rmk). Therefore [d x I] = [1]has no unit. The unit of ω=

I wI d x I is the same as that of the coefficient functions wI .

The standard Hodge star ∗ has no unit, since ∗ω=∑

I wI(∗d x I) has the same unit as wI andthus the same as the unit of ω. Therefore

∗k : Ωk(M ;Runit)→ Ωn−k(M ;Runit ·mn−2k)

in order to give [ω] = [∗ω] = [unit/mk].

In many physical examples, we will take the Hodge star as a more general operator that canmap differential forms of different unit of integrals:

∗k : Ωk(M ;Runit1)→ Ωn−k(M ;Runit2)

encoding a material property that relates unit1/mk with unit2/mn−k.

5.1 Heat Equation

The heat equation, a.k.a. diffusion equation, models how temperature diffuses in a material.Consider the domain to be an n-dimensional manifold M , and at each t ≥ 0 let u(t): M → R+ Kbe the temperature (in Kelvin) at each point on M . The 1-form d u ∈ Ω1(M ;RK) describes thetemperature difference:

γdu is the temperature difference across a path γ. Fourier’s Law of

thermal conductance (or Newton’s Law of cooling) states that the time rate of heat transfer isproportional to the (negative) temperature difference. Namely, the heat flux, the energy flowing

Page 3: Differential Equations on Manifolds

5.1. HEAT EQUATION 3

through a surface per unit area per unit time, is a (n− 1)-form Q(t) ∈ Ωn−1(M ;R J/s) that isrelated to d u through

Q = − ∗ du. (5.1)

Here the Hodge dual ∗ = ∗1 maps a temperature-valued 1-form to an energy-per-second-valued(n− 1)-form. In particular ∗1 serves the purpose of the thermal conductivity.

To illustrate this, we consider the case of isotropic and uniform thermal conductivity in thematerial. In this case, we look at a primal edge e and its corresponding dual facet e∗ in a discretesetup, and discover

e∗Q = −

e∗∗du= −

|e∗||e|

ed u.

On the left hand side we have the total heat transfer per unit time, which is negative proportionalto the temperature difference on the right hand side. The conductance rate is |e

∗||e| , which is

proportional to the cross section area |e∗| and inverse proportional to the distance |e|. This isthe familiar empirical thermal conductivity described in terms of the material geometry.

The above example uses ∗= ∗1 derived from a standard metric on M . In general one can take∗= ∗1 in Q = − ∗ d u at each point p an arbitrary linear map

∗1 : Ω1p(M ;RK)→ Ωn−1

p (M ;R J/s)

with positive orientation, i.e. (α ∧ ∗1α) is a positive n-form. It encodes a general thermalconductivity in a material.

With a heat flux Q given, the change in temperature over time is given by

∗ ∂∂ t u= −dQ. (5.2)

Here ∗= ∗0 maps changes in temperature to heat flux. That is,

∗0 : Ω0(M ;R K/s)→ Ωn(M ;R J/s)

is the heat capacity. In a material with uniform specific heat, on a small region U

−∫

∂ UQ =

U∗ ∂∂ t u≈ |U | ∂∂ t u

which states that the total in-flowing energy (LHS) results in a rise in temperature (RHS) witha rate proportional to the volume |U |. In general, at each p ∈ M , ∗0 can be an arbitrary linearmap ∗0 : Ω0(M ;R K/s)→ Ωn(M ;R J/s) with positive ∗01, modeling a general local heat capacityin a material.

Putting (5.1) (Newton-Fourier’s Law) and (5.2) (conservation of energy) together, one obtainsthe heat equation

∂∂ t u= ∗−1

0 d∗1 du=∆u. (5.3)

Page 4: Differential Equations on Manifolds

4 CHAPTER 5. DIFFERENTIAL EQUATIONS ON MANIFOLDS

Exercise 5.1 (Conservation of energy). Here is a quick exercise for using Stokes’ Theorem.Suppose M has no boundary. Show that the total internal (thermal) energy

M ∗0u isconstant in time when u satisfies (5.3).

If there is a heat source, namely there is β(t) ∈ Ωn(M ;R J/s) being the rate of heat transferredinto the domain per unit volume and per unit time, then (5.2) is replaced with

∗ ∂∂ t u= −dQ+ β

and (5.3) becomes

∂∂ t u=∆u+ ∗−1

0 β . (5.4)

How should the temperature u behave subject to the heat equation? Intuitively, the heat keepsflowing from high temperature to low temperature, which effectively keeps averaging thetemperature. This process is also called a diffusion process. As the averaging process suggests,we expect the following properties for the heat equation, which will be shown as the discussiongoes on.

• Maximum principle. For u satisfying the heat equation for t ≥ 0, the maximum andminimum temperature occurs at t = 0 or on the boundary ∂M .

• Time irreversibility. The total entropy increases in time.• Dirichlet energy

M ∗|du|2, which measures the roughness of the function u, decreasesunder heat flow.

5.1.1 Maximum Principle

The maximum principle for the heat equation states that the maximum of the temperature occursinitially or on the boundary, as expected in an averaging process. With the maximum/minimumprinciple, we justify that the temperature in Kelvin u≥ 0 is not violated if u≥ 0 initially and onthe boundary.

Theorem 5.1 (Maximum principle). Suppose u satisfies (5.3) for 0 < t ≤ T on a compactmanifold M. Then the maximum of u occurs on t = 0 or on ∂M.

Proof. First of all, by compactness of M × [0, T] the maximum is always attained. Let usfirst prove a slight variation of the statement: if u satisfies

∂∂ t u<∆u, for 0< t ≤ T,

then its maximum must occurs on t = 0 or on ∂M . To show this, assume that there is aninterior point p0 ∈ M and 0 < t0 ≤ T so that u(p0,t0) is a maximum. Then ∂ u

∂ t (p0,t0)≥ 0,

Page 5: Differential Equations on Manifolds

5.1. HEAT EQUATION 5

du(p0,t0) = 0 and ∆u(p0,t0) ≤ 0 (Can you see why? If they do not hold, take a smallneighborhood and integrate over it to show that u reaches a larger value somewhere else).We obtain a contradiction 0≤ ∂ u

∂ t (p0,t0)<∆u(p0,t0) ≤ 0.

Now to show the maximum principle for u solving ∂ u∂ t =∆u for 0< t ≤ T , take uε := u−εt

for each ε > 0. Note that ∂ uε∂ t <∆uε hence its maximum occurs only on t = 0 or ∂M . Take

ε→ 0, we obtain uε → u and

maxM×[0,T]

u= max∂M∪t=0

u.

Corollary 5.1. By a similar proof, the minimum occurs also on t = 0 or on ∂M.

Exercise 5.2 (Uniqueness). On a compact manifold M without boundary, using the maxi-mum (and minimum) principle, show that the solution to (5.3) is uniquely determined byits initial condition ut=0.

Hint: Consider u, v both satisfying the heat equation with common initial condition. Whathappens to their difference?

5.1.2 Entropy

An important concept in the thermodynamics is the entropy. An entropy is a quantity of asystem that only increases (or decreases depending on convention) in time, indicating time-irreversibility of the system. A heat diffusion process governed by (5.3) does have (a lot ofdifferent definitions of, see Exercise 5.3,) entropy that breaks the time-reversibility symmetry.

The standard entropy introduced in the classical thermodynamics is defined through the fol-lowing. The entropy density is an n-form σ ∈ Ωn(M ;R J/K) whose changes in time is givenby

∂∂ tσ := −1

u dQ.

Recall that Q ∈ Ωn−1(M ;R J/s) is the heat flux (energy per area per time), and −dQ is the totalin-flowing energy rate. From (5.2) we have

∂∂ tσ = ∗

1u∂∂ t u= ∗ ∂∂ t (log u) ,

which suggests that

σ = ∗ log u

Page 6: Differential Equations on Manifolds

6 CHAPTER 5. DIFFERENTIAL EQUATIONS ON MANIFOLDS

up to an additive constant. The total entropy is given by S =∫

M σ. Assuming that M has noboundary and there is no heat source, the change of total entropy is nonnegative (Second Lawof thermodynamics):

dd t S =

M

∂∂ tσ =

M−1

u dQ(5.1)=

M

1u d∗d u

= −∫

Md1

u

∧ ∗du=

M

1u2

d u∧ ∗du=

M∗ 1

u2 |du|2 ≥ 0

and dd t S = 0 if and only if d u≡ 0, i.e. u is a constant (at thermal equilibrium). Here we have

used integration by parts derived from d1

u ∗ d u

= d1

u

∧∗d u+ 1u d∗d u and Stokes’ Theorem

that removes the boundary term.

Exercise 5.3 (Second Law of Thermodynamics). Let f : R+ → R be any smooth strictlyconvex function, i.e. f ′′ > 0. Such functions are also known as mathematicians’ entropyfunction, whereas the special case f = − log is minus the physical entropy function. Showthat the total entropy

S(u) :=

M∗ f (u)

is strictly decreasing in time when u is non-constant and satisfies (5.3).

Hint: Integration by parts.

Exercise 5.4 (L2 function). Show that if u satisfies (5.3) on M without boundary, and ifu ∈ L2(M) =

v : M → R

M ∗v2 <∞

at t = 0, then u ∈ L2(M) for all later time.

Hint: Exercise 5.3.

5.1.3 Dirichlet Energy

Here is a whole different way of looking at the heat equation. For each function u: M → R, theDirichlet energy

ED(u) =12

Mdu∧ ∗du= 1

2‖du‖2L2

is a canonical way to measure the “roughness” of the function u. When ED(u) = 0, we have ubeing constant (in each connected component of M). In a diffusion process, e.g. governed bythe heat flow (5.3), we expect the function u becomes smoother in time. This is indeed true

Page 7: Differential Equations on Manifolds

5.1. HEAT EQUATION 7

measured with the Dirichlet energy: assuming ∂M = ;,

dd t ED(u) =

Md

∂ u∂ t

∧ ∗d u=

M

∂ u∂ t ∗ (−∆u) = −

M∗

∂ u∂ t

2≤ 0

and ED is constant if and only if u is stationary.

A more interesting fact between Dirichlet energy and the heat equation is that the heat flow isthe steepest descent (gradient flow) of the Dirichlet energy. Given a function u: M → R andconsider a variation u with u|∂M = 0. Then the variation of its Dirichlet energy is

ED =

Md u∧ ∗d u=

M− ∗ u∆u.

That is, ∆u is the negative gradient of the Dirichlet energy, and (5.3) is understood as thegradient flow of the Dirichlet energy.

One can similarly show that the heat equation with heat source (5.4) is the gradient flow of

ED(u) +

Muβ .

5.1.4 Weak formulation

For u to satisfy ∂∂ t u =∆u, seemingly u requires twice differentiability (due to the Laplacian).

Nonetheless, there is an alternative way to “describe” the heat equation with at most onedifferentiation. Multiply the heat equation by any differentiable function ϕ : M → R andintegrate the result over M :

M∗ϕ ∂

∂ t u=

M∗ϕ∆u= −

Mdϕ ∧ ∗d u.

We again used the integration by parts, assuming M has no boundary. If ϕ are time-independent,we may pull out ∂

∂ t from the integral and obtain

dd tϕ, u= −dϕ, du, ϕ ∈ Ω0(M ;R). (5.5)

We say u is a weak solution to the heat equation if u satisfies the heat equation in the weakform (5.5) for all test functions ϕ ∈ Ω0(M ;R). If u satisfies (5.3), i.e. u is a strong solution,then u must also be a weak solution (as just derived). If u is a weak solution, and if one couldshow that u is twice differentiable (regularity), then u is also a strong solution (by reversing theintegration by parts).

The weak formulation is important not only in PDE analysis but also in numerical approaches(as the base of finite element method). With the knowledge that the strong solution exists anduniquely agrees with the weak solution, we are safe to adopt numerical approaches which solvesthe weak form, say, using piecewise linear test functions which are only once differentiable.

Page 8: Differential Equations on Manifolds

8 CHAPTER 5. DIFFERENTIAL EQUATIONS ON MANIFOLDS

5.1.5 Discrete heat equation

Using DEC it is rather straightforward to write down a heat equation on a mesh. In fact, sincethe entire heat equation theory involves only primal 0-forms (temperature u ), 1-forms (du),dual (n− 1)-forms (energy flux) and dual n-forms (energy density), the heat equation requiresonly points and edges, such as a graph. But here we consider a discrete complex M such as atriangulated surface.

Let the temperature u sit on points (vertices). Hence u ∈ C0(M ;RK), where Ck denotes thek-cochain. The temperature difference d0 u ∈ C1(M ;RK) sits on edges, where d0 = ∂

ᵀ1 is the

incidence matrix. Now, consider the diagonal Hodge star ∗1 be a diagonal matrix with positiveentries. These entries are the thermal conductivity, or the edge weight in general. Namely,

Q = − ∗1 d0 u ∈ Cn−1(M∗;R J/s)

is the heat flux sitting on the dual (n− 1)-cells across the primal edges. When considering ahomogeneous material with uniform isotropic heat conductivity, we take the diagonal Hodgestar

∗1 = diag

|e∗||e|

,

i.e., the cotangent weight in case of a triangulated surface. The total in-flowing flux into a dualn-cell is given by

−dᵀ0 ∗1 d0 u.

Finally, take the primal Hodge star on the 0-cell ∗0, which is the mass matrix. In the context ofheat equation, ∗0 is the heat capacitance. With this final piece we arrive at the discrete heatequation

∗0∂∂ t u= −dᵀ0 ∗1 d0 u. (5.6)

Similar to the smooth setting, we may also consider a heat source β ∈ Cn(M∗;R J/s) sitting onthe dual n-cell as the amount of additional heat poured into the cell per unit time:

∗0∂∂ t u= −dᵀ0 ∗1 d0 u+ β . (5.7)

Analogous to the smooth theory, the discrete heat equation is the gradient flow to the Dirichletenergy. Here one has to be careful that on C0(M), which is the vector space u belongs to,uses an inner product respecting ∗0. That is, for f , g ∈ C0(M), we have f , gC0(M) = f ᵀ ∗0 g.Similarly, for ξ,η ∈ C1(M), ξ,ηC1(M) = ξᵀ ∗1 η. Now, the Dirichlet energy is the L2-norm ofd0 u, which is given by

ED =12d0 u, d0 uC1(M)

Page 9: Differential Equations on Manifolds

5.1. HEAT EQUATION 9

= 12uᵀ dᵀ0 ∗1 d0 u.

Its variation is then

ED = uᵀ dᵀ0 ∗1 d0 u= u,∗−10 dᵀ0 ∗1 d0 uC0(M).

Hence

gradC0(M) ED = ∗−10 dᵀ0 ∗1 d0 u

which justifies that (5.6) is the gradient flow of the discrete Dirichlet energy.

Finite Element Approach

The discrete heat equation (5.6) and (5.7) coincides with the discretization obtained from thepiecewise linear (PL) finite element method (FEM) on a triangulated surface. The PL-FEMapproximates the solution using a piecewise linear function. To derive a finite element scheme,we begin with the heat equation in the weak form (5.5). To be precise, the weak heat equation(5.5) is a statement for u,ϕ in the function space

W 1,2Ω0(M ;R) =

v ∈ Ω0(M ;R)

‖v‖2 <∞ and ‖d v‖2 <∞

.

(The notation W k,p indicates k-times differentiability and∫

| · |p <∞ integrability.) Observethat the space PLΩ0(M ;R) of all functions which are continuous and piecewise linear overthe faces in a triangular mesh is a finite dimensional subspace of this infinite dimensionalspace W 1,2Ω0(M ;R). A canonical basis for PLΩ0(M ;R) is the “hat functions” φii which arepiecewise linear and φi(pj) = δij on vertex pj (Figure 5.1).

Figure 5.1: Left: a generic piecewise linear function whose linear pieces are the triangle faces of agiven mesh. Right: the hat function φi .

Any function u ∈ PLΩ0(M ;R) is written as

u=∑

i

uiφi

Page 10: Differential Equations on Manifolds

10 CHAPTER 5. DIFFERENTIAL EQUATIONS ON MANIFOLDS

where each ui ∈ R is a number sitting on a vertex, i.e. u = (ui)i ∈ C0(M ;R) zeroth cochain.Notice that u(pi) = ui. Now, to best approximate the heat equation, we orthogonally project theheat equation onto the subspace PLΩ0(M ;R):

dd tφi, u= −dφi, d u, ∀ basis element φi.

Note that this is the orthogonal projection of the heat equation in the sense that the remaindererror r =“ ∂∂ t u−∆u” is L2-orthogonal to all basis element φi.

Now, with u=∑

j ujφj, we have∑

j

φi,φj dd t uj =

j

−dφi, dφjuj, for all i. (5.8)

By working out the L2 inner product (in the smooth sense) for φi,φj and dφi, dφj, definematrices (∗FEM

0 )ij = φi,φj (the mass matrix) and Lij = −dφi, dφj (the stiffness matrix).Thus (5.8) becomes

∗FEM0

dd t u= Lu. (5.9)

If we can compute the matrix elements of L and ∗FEM0 , we can solve (5.9) for the coefficients u.

Exercise 5.5 (The stiffness matrix). On a discrete triangular mesh M , the stiffness matrixL is given by

Lij = −∫

Mdϕi ∧ ∗dϕj = −

tijkeij

⟨gradϕi, gradϕj⟩Aijk

where Aijk is the area of triangle tijk. Here we used the fact that the hat functions ϕi, ϕj

are piecewise linear and hence their gradients are piecewise constant on the triangles. Wealso used the fact that gradϕi and gradϕj have common support (the region on which thefunction is non-zero) only on the triangles incident to both i and j.

(a) Show that the aspect ratio of a triangle can be expressed as the sum of the cotangentsof the interior angles at its base, i.e.,

wh= cotα+ cotβ .

Page 11: Differential Equations on Manifolds

5.1. HEAT EQUATION 11

(b) Show that the gradient of the hat function on triangle tijk is given by

gradϕi =e⊥jk

2Aijk

where e⊥jk is the vector ejk rotated 90 counterclockwise within tijk.(c) Show that for any hat function ϕi associated with vertex pi of triangle tijk,

⟨gradϕi, gradϕi⟩Aijk =12(cotα+ cotβ).

(d) Show that for the hat functions ϕi and ϕj associated with vertices pi and pj of triangletijk, we have

⟨gradϕi, gradϕj⟩Aijk = −12 cotθ

where θ is the angle between the opposite edge vectors.

Putting all these facts together, we have the infamous cotan formula

(Lu)i =12

eijpi

(cotαij + cotβij)(uj − ui).

where αij and βij are the angles of opposite vertices across from eij in the two adjacenttriangles.

On a discrete surface, it happens that

L = −dᵀ0 ∗1 d0 .

Since the finite element mass matrix ∗FEM0 is not a diagonal matrix, it does not agree with the

diagonal discrete Hodge star ∗diag0 . One can show that ∗diag

0 and ∗FEM0 has the same row sum.

The diagonal entries of ∗diag0 is often referred as the lumped mass, and it has been shown that

replacing ∗FEM0 with ∗diag

0 does not affect the order of accuracy.

Page 12: Differential Equations on Manifolds

12 CHAPTER 5. DIFFERENTIAL EQUATIONS ON MANIFOLDS

5.1.6 Time discretization for the heat flow

So far we have seen the heat equation discretized in space, but is still continuous in the timevariable:

∗0dd t u= Lu, u ∈ C0(M ;R), L = −dᵀ0 ∗1 d0 .

One sure can plug this system ODE to any ODE solver. Here we note on a few popular ODEschemes and comment on their stability.

Denote 0 = t0 < t1 < t2 < . . . be the discretization of the time R+ = 0 ≤ t <∞. Assumeuniform time step tn − tn−1 = Ít. Let u(n) ∈ C0(M ;R) be the approximated solution at t = tn.

One of the most straightforward schemes is the forward Euler scheme, which directly replacesdd t by the forward difference:

∗01Ít

u(n+1) − u(n)

= Lu(n);

after rearrangement,

u(n+1) = u(n) +Ít ∗−10 Lu(n). (5.10)

This is an explicit iteration: one may update u(n+1) directly from u(n) by operations involving atmost matrix multiplication. (When ∗0 is not diagonal, you may need to solve a linear systemwith a symmetric positive definite matrix ∗0).

The backward Euler scheme is similar but implicit:

∗01Ít

u(n+1) − u(n)

= Lu(n+1);

after rearrangement,

(∗0 −Ít L)u(n+1) = ∗0u(n). (5.11)

To calculate u(n+1) from a current u(n), one has to solve a linear system with a symmetric positivedefinite matrix (∗0 −Ít L). (Recall L = −dᵀ0 ∗1 d0, which is symmetric negative semi-definite).

Both the forward and backward Euler time stepping are first-order accurate in time. However,in terms of stability, the forward Euler scheme is unstable unless Ít is extremely small; on theother hand the backward Euler scheme is unconditionally stable (stability is independent of thechoice of Ít).

Page 13: Differential Equations on Manifolds

5.1. HEAT EQUATION 13

Stability

The most elementary way to analyze stability is by the von Neumann stability analysis, whereone investigates the stability of the time discretization for each eigenvector of the Laplacian.Let λk, vk be the eigenvalues and eigenvectors of the (generalized) eigenvalue problem

−Lvk = λk ∗0 vk

for k = 1, . . . , N when L is N -by-N (i.e. there are N vertices). Note that λk ≥ 0 since L isnegative semi-definite.

Now, plugging a single eigen-mode u(n) = c(n)k vk (where c(n)k is the time-dependent amplitude)into the forward Euler scheme (5.10), we obtain a difference equation

c(n+1)k = (1−Ítλk)c

(n)k .

This first order difference equation (yielding a geometric progression) is stable only when|1−Ítλk| ≤ 1. This implies that stability requires

Ít ≤2λk

for all eigenvalues λk. A fact about the eigenvalues −Lvk = λk ∗0 vk is that the maximumeigenvalue λN is of order 1

`2 where ` is a typical edge length. That is, in order to simulate theheat equation using the forward Euler method, you have to pick

Ít ≤ O(`2)

otherwise the solution will blow up on you.

Using the same technique let us investigate the backward Euler method. Plugging in a singleeigen-mode u(n) = c(n)k vk, (5.11) reads

c(n+1)k =

11+Ítλk

c(n)k .

Note that for any Ít > 0 the amplification factor 11+Ítλk

≤ 1 and = 1 only when λ = 0. (Oneneeds to check the eigenspace for λ= 0 is at most 1-dimensional). The unconditional stabilityfollows.

Exercise 5.6 (Unconditional instability). The leapfrog scheme for the heat equation isgiven by

∗01

2Ít

u(n+1) − u(n−1)

= Lu(n)

which allows one to calculate u(n+1) using u(n−1) and u(n) with second order accuracy intime. Show that the leapfrog scheme for the heat equation is however unstable for any

Page 14: Differential Equations on Manifolds

14 CHAPTER 5. DIFFERENTIAL EQUATIONS ON MANIFOLDS

Ít > 0.

Hint: A linear second order difference equation a2c(n+2) + a1c(n+1) + a0c(n) = 0 is unstable ifthere is a root z ∈ C of the polynomial a2 x2 + a1 x + a0 that |z|> 1.

Exercise 5.7 (Crank-Nicolson). The Crank-Nicolson method for the heat equation is givenby

∗01Ít

u(n+1) − u(n)

= Lu(n) + u(n+1)

2,

which is an implicit method with second order accuracy in time. Show that it is stable forall choice of Ít > 0 (i.e. unconditionally stable).

5.2 Poisson Equation

On a manifold M , given a function f ∈ Ω0(M ;R), the Poisson equation for u ∈ Ω0(M ;R) isgiven by

∆u= f . (5.12)

You can think of it as the steady solution of the heat equation

∂∂ t u=∆u+ ∗−1

0 β

with ∂∂ t u= 0 and β = −∗0 f . For ∂M = ;, the weak formulation of the Poisson equation is that

−dϕ, du= ϕ, f

for all test functions ϕ ∈ Ω0(M ;R). The solution to (5.12) is also the minimizer to the energy

E(u) = 12‖d u‖2 + u, f .

Think of it as the final destination of a heat flow as the gradient flow for this convex functional.

The discrete Poisson equation is written down straightforward by DEC: given f ∈ C0(M ;R),solve for u ∈ C0(M ;R) satisfying

−dᵀ0 ∗1 d0 u= ∗0 f or simply Lu= ∗0 f .

Notice that we write dᵀ0 ∗1 d0 on the LHS instead of ∗−10 dᵀ0 ∗1 d0 in order to obtain a linear system

with a symmetric system matrix.

Page 15: Differential Equations on Manifolds

5.2. POISSON EQUATION 15

5.2.1 Fredholm alternative

The equation (5.12) should be thought of as a linear algebra problem like Ax = b. A naturalquestion to ask here is that, which choices of b admit the existence of the solution x? To answerthis type of questions we recall the following basic linear algebra fact.

Lemma 5.1. Let A: V → W be a linear operator from space V to W. Let A∗ : W → V bethe adjoint of A, which is the operator that satisfies ⟨Ax , y⟩W = ⟨x , A∗ y⟩V for all x ∈ V andy ∈W. Then ker(A)⊥ = im(A∗), and im(A)⊥ = ker(A∗).

Back to the Poisson equation. On a manifold M without boundary, we have that∆ is self-adjoint(∆ = ∆∗) since ∆u, v = −du, d v = u,∆v. With the following exercise, you will showthat ker(∆) = ker(∆∗) consists of functions constant on connected component of M .

Exercise 5.8 (Harmonic functions on M). Suppose M has no boundary. Show that ∆u= 0if and only if u is constant on each connected component of M .

Hint: Show ‖d u‖2 = 0.

The Poisson equation (5.12) admits a solution if and only if f ∈ im(∆). Knowing ker(∆) weconclude the following theorem.

Theorem 5.2. Suppose M is a manifold without boundary, and M = M1 t . . .tMm whereeach Mk is a connected component of M. Then

∆u= f

has a solution if and only if∫

Mk∗ f = 0 for each k = 1, . . . , m.

In most cases the domain M is connected. In this case ∆u = f has a solution if and only if fhas zero mean.

How does this translate into the discrete setting? In the discrete setting one solves the linearsystem

Lu= ∗0 f

where u ∈ C0(M ;R) and the matrix L = −dᵀ0 ∗1 d0. Assume that the diagonal Hodge star ∗1is a diagonal matrix with positive diagonal entries. Then the only kernel of L is the subspacespanned by constant function (assuming one connected component). That is, the right-handside array ∗0 f must have zero sum of entries; in other words, zero sum of f weighted by pointarea encoded in ∗0 analogous to

M ∗ f = 0.

The Poisson equation ∆u = f (and so is the discrete Lu = ∗0 f ) is not well-posed if f hasconstant component. In some situation it makes sense to remove the constant component.That is, instead of trying to solve ∆u = f one can solve ∆u = f − f where f = 1

M ∗1

M ∗ f .

Page 16: Differential Equations on Manifolds

16 CHAPTER 5. DIFFERENTIAL EQUATIONS ON MANIFOLDS

Similarly in the discrete version where one attempts to solve Lu = b with the right-hand sidearray b = ∗0 f being area weighted values of f on vertices, one can instead solve Lu = b − bwhere b = 1

n

∑n−1i=0 bi and n is the number of vertices. Of course you must be certain that this

trick makes sense in the context of your particular problem.

5.3 A Note on Implementation

What we have seen so far are the heat equation

∂∂ t u=∆u

and the Poisson equation

∆u= f

for u ∈ Ω0(M ;R) on closed manifold M . We have also seen their discrete versions. A suitableexercise here would be implementing a Poisson equation solver on a closed surface. As it turnsout, there are many differential equations that boil down to solving Poisson-like equations assubproblem; backward Euler scheme for heat equation (5.11) is one example.

As we found out earlier, the Laplacian of a 0-form u is approximated by

(Lu)i =12

eijpi

cotαij + cotβij

(uj − ui)

where αij and βij are the angles of opposite vertices across from eij in the two adjacent triangles.In terms of matrix element this is the same as saying

Lij =12

cotαij + cotβij

when i, j is connected by an edge

Lii = −12

eijpi

cotαij + cotβij

and all other matrix elements are zero.

A straightforward way to construct L in the code is visit all half-edges ekij, where ekij is the edge in

triangle tijk across from vertex pk, and add entries Lij, Lji with 12 cotθkij , and subtract −1

2 cotθkijfrom Lii and Ljj. Here θkij is the angle in tijk at vertex k. See Algorithm 1.

However, most sparse matrix library would prefer to construct the matrix all at once rather thanfirst creating an empty sparse matrix and then jumping around the entries modifying its values.These sparse matrix constructors usually take in five informations: R array of row indices, Carray of column indices, V array of entry values, m, n size of matrix. Effectively the constructedmatrix A is m-by-n with value Vk added to the (Rk, Ck) entry of A.

Page 17: Differential Equations on Manifolds

5.3. A NOTE ON IMPLEMENTATION 17

Algorithm 1 Build cotan Laplace (assign entries)

L sparse n× n zero matrix . n is the number of pointsfor each half-edge ekij do

w := 12 cotθkij . θkij is the angle opposite to the half-edge ekij.

Lij+ = w, Lji+ = wLii−= w, Ljj−= w

end for

If you are familiar with MATLAB, it is the function call

sparse(R,C,V,m,n)

In Python, one loads the scipy package of Python. One of the methods for constructing sparsematrix is given by

scipy.sparse.csr_matrix((V,(R,C)),shape=(m,n))

Here scipy.sparse.csr_matrix constructs “Compressed Sparse Row” matrix. Alternatively onemay use scipy.sparse.csc_matrix (Compressed Sparse Column).

Therefore, in practice, one can build the sparse Laplace matrix given by Algorithm 2.

Algorithm 2 Build cotan Laplace (construct sparse matrix all at once)

I , J , W are m× 1 empty (zero) array . m is the number of half edgesfor k = 0, . . . , m− 1 do

Let hk be the k-th half-edgeLet i, j be the indices of the source and destination points of hkLet cotθ be the cotan of the angle opposite to hk.I(k)← i, J(k)← j, W (k)← 1

2 cotθ .end for

R=

IIJJ

, C =

IJIJ

, V =

−WWW−W

. The rows, columns and values of L.

L = Sparse(R, C , V, n, n) . The constructor of a sparse matrix.. (R, C , V, n, n) specifies the rows, columns, values and the size of the matrix.

Exercise 5.9 (Scalar Poisson Equation). In this coding exercise you will build the cotan-Laplace matrix for solving the discrete Poisson equation

Lu= ∗0 f

Page 18: Differential Equations on Manifolds

18 CHAPTER 5. DIFFERENTIAL EQUATIONS ON MANIFOLDS

on a triangular mesh, as an approximation to the Poisson equation

∆u= ∗−10 d∗du= f .

You can imagine f is the electric charge density as a function, and u is the electric potentialfor E = −d u being the electric field (for more detail see Section 5.4 and assume ∂

∂ t B = 0and E is the d of some 0-form). You can also imagine f is the heat source as a function (or∗0 f the energy per area per second) in a steady heat equation.

(a) Recall that Houdini’s vertices are polygon corners that 1-to-1 corresponds to half-edgesthrough VEX functions

vertexhedge and hedge_srcvertex .

We use this correspondence to store the quantities of half-edges as vertex attributes.For example,

// Vertex wranglei@ind = i@vtxnum; // ind is the vertex indexint he = vertexhedge(0,@vtxnum);i@src = hedge_srcpoint(0,he); // source point of the half-edgei@dst = hedge_dstpoint(0,he); // destination of the half-edgei@opp = hedge_presrcpoint(0,he);// opposite point across from the

// halfedge

Derive an expression for the cotangent of a given angle purely in terms of the twoincident edge vectors and the standard Euclidean dot product and cross product.

Implement a Vertex Wrangle node to create and define vertex attribute

f@cotan

(b) Each triangle has an area and each point has a dual area. For dual area you cansimply use 1/3 the total area of the incident faces:

Ai =13

tijkpi

Aijk.

Page 19: Differential Equations on Manifolds

5.3. A NOTE ON IMPLEMENTATION 19

Note that 1/3-total-area is just an approximation as if the dual vertices are the barycen-ters of the triangles. (What would be the correct circumcenter point area?) Createand calculate the value of point attribute f@area using VEX programing. (You canalso use Measure and Attribute Promote if you are sure the outcome is what youwant).

(c) Place a Python node and name the node “Laplacian”. In it build the Laplace matrixL and the mass matrix M (i.e. ∗0 matrix) by completing the following Python script.Hint: Algorithm 1 or Algorithm 2.

# IMPORT PACKAGESimport numpy as npimport scipy.sparse as sp

node = hou.pwd()geo = node.geometry()

# Read number of points and halfedges (vertices)n_pt = geo.intrinsicValue("pointcount")n_vtx = geo.intrinsicValue("vertexcount")

# Loop over verticesfor prim in geo.prims():

for vtx in prim.vertices():# Examples of evaluating vtx attributesind = vtx.attribValue("ind")src = vtx.attribValue("src")dst = vtx.attribValue("dst")cotan = vtx.attribValue("cotan")# TODO# ...

# Build Laplacian# L = ... TODO

# Build Mass (no need to do further coding here)# The function hou.Geometry.pointFloatAttribValues quickly# returns the values of point attributes from all points# as a tuple list. Numpy’s array converts it to a numpy array# which can be fed into spdiags (sparse diagonal matrix)ptarea = np.array(geo.pointFloatAttribValues("area"))M = sp.spdiags(ptarea,0,n_pt,n_pt)

# Cache result#node.setCachedUserData("L",L) #<- TO REMOVE COMMENTnode.setCachedUserData("M",M)

(d) In this exercise we let you explore a few simple things you can test/visualize thematrix you have just constructed. Now you have cached sparse matrices "L" and "M"

in the node “Laplacian”. You can re-access these sparse matrices from another Pythonnode by calling

Page 20: Differential Equations on Manifolds

20 CHAPTER 5. DIFFERENTIAL EQUATIONS ON MANIFOLDS

the_laplacian_node = hou.node("../Laplacian")L = the_lapacian_node.cachedUserData("L")M = the_lapacian_node.cachedUserData("M")

Now you can do a few things to test if the Laplace matrix is correct. First of all, theLaplacian eigenfunction should be the “standing waves” of this domain. A functionϕ is an eigenfunction of Laplacian if there is λ ∈ R so that

(−∆)ϕ = λϕ.

Eigenmodes ϕ and λ are approximated by their discrete counterpart, in which caseone solves the generalized eigenvalue problem

−Lϕ = λ ∗0 ϕ.

Here λ should be all greater or equal to zero. The number of zero eigenvalues isthe dimension of the null space of ∆, which you know from Exercise 5.8 that it isthe number of connected components. If the domain is a unit sphere, the first feweigenvalue/eigenfunction should well-approximate the spherical harmonics. If youhave been using Laplacian and Stanford Bunny a lot, you will remember that the firstfew eigenfunctions on the bunny are

and the 99th eigenfunction looks like

Here is a sample Python code for eigenvalue problem

import numpy as npimport scipy.sparse as spimport scipy.sparse.linalg as la

# current node object and geometry objectnode = hou.pwd()geo = node.geometry()

LaplacianNode = hou.node("../Laplacian")L = LaplacianNode.cachedUserData("L")

Page 21: Differential Equations on Manifolds

5.3. A NOTE ON IMPLEMENTATION 21

M = LaplacianNode.cachedUserData("M")

(ew,ev) = la.eigsh(-L,k=100,M=M,sigma=0.1)

geo.setPointFloatAttribValues("phi",ev[:,99])# make sure you have defined a point attribute called phi.

(e) Now solve the Poisson equation

−Lu= ∗0 f .

You can set∫

∗pi∗0 f = ±1 on a few points as point charges, and zero elsewhere.

Taking advantage of user interface, you can use a Point node, on the right of the“Group” entry click on to manually select points from the Scene View, and thenassign values to the selected points.Place another Python node where you solve

−Lu= ∗0 f

using functions in scipy.sparse.linalg of the Scipy library. Iterative linear solversare recommended. Since L is not invertible (it has kernel) you may want to useleast-squares solvers.By visualizing the solution u (the color) and its gradient (the field line), you obtainthe electric potential and electric field for given point charges on a curved surface:

Page 22: Differential Equations on Manifolds

22 CHAPTER 5. DIFFERENTIAL EQUATIONS ON MANIFOLDS

5.4 Classical Maxwell’s Equations

The classical Maxwell’s equations describe the time evolution of the electric field (1-form) andmagnetic field (2-form) interacting with electrically charged matter. In this section we considerthe domain being a manifold M representing the space, with time being a separate dimension.In the next section we discuss the relativistic electromagnetism, in which case we consider thedomain M being the space and time together as a manifold called a spacetime.

5.4.1 Charge and current

Let M be an n-dimensional manifold. The electric charge density is a (coulomb-valued) n-form

ρ ∈ Ωn(M ;RC)

whose sign (compared with the ambient orientation ∗1) represent the sign of the charge. HereRC is the real numbers with unit coulomb. On a region V ⊂ M ,

V ρ represent the total chargein the volume V . The electric current j is a (coulomb-per-second-valued) (n− 1)-form

j ∈ Ωn−1(M ;R C/s)

describing the rate electric charge passing through a section per unit area per time. Theconservation of electric charge states that

∂∂ tρ + d j = 0. (5.13)

Integrating (5.13) over a volume, using Stokes’ Theorem, one has

dd t

Vρ = −

∂ Vj

which reads that the change of total charge is contributed only from the in-flowing current.

5.4.2 Electric and magnetic field

To introduce the electric field and magnetic field, we consider a single point mass (particle) ofcharge q located at p ∈ M and moving with velocity v ∈ TpM . A force applied on the particle iswritten as an energy-valued 1-form f ∈ Ω1

p(M ;R J). (In particular the unit [ f ] is Newton and∫

γf along a particle path γ is the total work.) The force due to electromagnetism is given by

the Lorentz force law

f = q (E − ιvB) .

Page 23: Differential Equations on Manifolds

5.4. CLASSICAL MAXWELL’S EQUATIONS 23

Here ιv is the contraction operator (Appendix 5.A). By measuring f at every p ∈ M and v ∈ TpMwe determine a 1-form E ∈ Ω1(M ;R J/C) called the electric field, and a 2-form B ∈ Ω2(M ;R J·s/C)called the magnetic field.

The Lorentz force law for moving charged particles can be generalized for charged fluids. Letρ ∈ Ωn(M ;RC) be the charge density, which flows according to a velocity vector field v ∈ Γ (TM).Then the force field f ∈ Ω1(M ;R J) on the fluid is given by

f = (∗−10 ρ) (E − ιvB) .

5.4.3 Maxwell’s Equations

The (classical) Maxwell’s equation is the differential equation for the electric field and magneticfield in the presence of charged density and current and time variation of the fields themselves.The classical Maxwell’s equations consist of the four equations: the absence of magnetic charge,Faraday’s law, Gauss’ law, and Ampere-Maxwell law.

The absence of magnetic charge

This law states that B ∈ Ω2(M ;R J·s/C) is closed, i.e.

d B = 0. (5.14)

When M = R3 and write the magnetic field as a vector ~B= (∗B)], then d B = 0 amounts to thedivergence free condition ∇ · ~B= 0.

Faraday’s law

Micheal Faraday discovered that a time variation in a magnetic field induces a circulation ofelectric field

d E = − ∂∂ t B. (5.15)

The above two equations (5.14) and (5.15) do not require metric or ∗. They are just topologicalproperties. The remaining equations require Hodge stars, which require either a metric on M ,or some general weights as the electric permittivity and magnetic permeability as the Hodgestars.

Page 24: Differential Equations on Manifolds

24 CHAPTER 5. DIFFERENTIAL EQUATIONS ON MANIFOLDS

Gauss’ law

Gauss’ law states that

d∗E = ρ. (5.16)

To understand this equation, take the integral of it over a volume V :∫

∂ V∗E =

which reads that the total flux of electric field over the boundary surface is related to the totalcharge enclosed. Here the Hodge star ∗= ∗1 is regarded as a map from primal 1-forms to dual(n− 1)-forms

∗1 : Ω1(M ;R J/C)→ Ωn−1(M ;RC)

encoding the physical relation called the electric permittivity (often denoted with ε). In thevacuum in R3 without distinguishing primal and dual forms, one has ∗1 d x = ε0 d y ∧ dz withε0 ≈ 8.85 × 10−12 C2/N·m2. In a general material, at each point p ∈ M the permittivity ∗1 isa general linear map from Ω1(M ;R J/C) to Ωn−1(M ;RC). The form D = ∗E is also known aselectric displacement field.

Ampere-Maxwell law

Ampere-Maxwell law states that

d∗2B = j + ∗1∂∂ t E. (5.17)

Here

∗2 : Ω2(M ;R J·s/C)→ Ωn−2(M ;R C/s)

is called the magnetic permeability often denoted as 1µ . In the vacuum R3, ∗2 d x ∧ d y = 1

µ0d z

where µ0 ≈ 1.26×10−6 N·s2/C2. The (n−2)-form H = ∗2B ∈ Ωn−2(M ;R C/s) is also known as theauxiliary magnetic field. Note that ε0µ0 =

1c2 where c is the vacuum speed of light (as would

be seen later from the electromagnetic wave section.)

A summary

In summary, the classical Maxwell’s equations are given by the following. Given a permittivity∗1 : Ω1(M ;R J/C) → Ωn−1(M ;RC), a permeability ∗2 : Ω2(M ;R J·s/C) → Ωn−2(M ;R C/s), and a

Page 25: Differential Equations on Manifolds

5.4. CLASSICAL MAXWELL’S EQUATIONS 25

charge density ρ(t) ∈ Ωn(M ;RC) and current j(t) ∈ Ωn−1(M ;RC), then the electric fieldE ∈ Ω1(M ;R J/C) and the magnetic field B ∈ Ω1(M ;R J·s/C) satisfy

d∗1E = ρ

d B = 0

d E = − ∂∂ t B

d∗2B = j + ∗1∂∂ t E.

5.4.4 Electromagnetic wave

In the absence of ρ and j, i.e. with no free charge and free current (not necessarily vacuum),the electromagnetic fields E, M inducts each other and form electromagnetic waves.

Take a time derivative to Ampere-Maxwell law (5.17), which gives

d∗2∂∂ t B = ∗1

∂ 2

∂ t2 E.

Then replace ∂∂ t B by −d E using Faraday’s law (5.15), and obtain

−d∗2 d E = ∂∂ t j + ∗1

∂ 2

∂ t2 E. (5.18)

Recall that the codifferential

δk = (−1)k(∗k−1)−1 dn−k ∗k

and the Laplacian is given by

∆k = −dk−1δk −δk+1 dk .

After rearranging (5.18) we have

∂ 2

∂ t2 E = − ∗−11 d∗2 d E = −δ d E.

From the Gauss’ law (5.16) d∗1E = ρ with ρ = 0, we have that δE = −∗−10 d∗1E = 0. Therefore

dδE = 0 and ∆E = (−dδ−δ d)E = −δ d E. Therefore

∂ 2

∂ t2 E =∆E. (5.19)

This is the wave equation for an 1-form E.

Page 26: Differential Equations on Manifolds

26 CHAPTER 5. DIFFERENTIAL EQUATIONS ON MANIFOLDS

Exercise 5.10. In the absence of ρ and j, show that B satisfies

∂ 2

∂ t2 B =∆B = d∗−11 d∗2B. (5.20)

The wave speed of the wave equations (5.19) and (5.20) are encoded by∆1 and∆2 respectively.Namely, in both cases the wave speed is determined by the product of the factor contributed from∗−1

1 and ∗2. In the R3 vacuum ∗1 = ε0∗R3

1 and ∗2 =1µ0∗R

3

2 , where ∗R3

is the usual dimension-

less Hodge star induced from the standard metric of R3. So ∆1 = c2∆R3

1 and ∆2 = c2∆R3

2where c2 = 1

ε0µ0. In a more general material one has a more general ∗1 and ∗2 that steer the

propagation of electromagnetic waves.

5.5 Relativistic Maxwell’s Equations

In the previous section, the electromagnetism is formulated with time-dependent 1-form E and2-form B on a manifold M where M is usually 3-dimensional which represents space. In thissection, we consider M as a 4-dimensional manifold including the information of space andtime, and the electric and magnetic fields are united as 2-form defined on spacetime.

5.5.1 Electromagnetism on R×M

Before going to the full relativistic version, let us look at a simpler setup. A straightforwardway of putting both time and space together as a domain manifold is by taking the Cartesianproduct

eM := R×M

where the R component represents the time, and the n-dimensional (usually 3-dimensional)manifold M represents the space. Let t be the coordinate of the time component. Thend t ∈ Ω1( eM ;R s) is a natural time-valued 1-form. Its corresponding vector field d t] is the timedirection in eM .

Note that this setup is only a quick way to build a spacetime eM . In the theory of relativity, thereis no preferred time direction, so there is no canonical way to decompose eM into R×M .

On eM we introduce a pseudo-metric so that

⟨d t], d t]⟩= −c2,

⟨X , X ⟩= ⟨X , X ⟩M , for X ∈ TpM ⊂ T(t,p) eM

Page 27: Differential Equations on Manifolds

5.5. RELATIVISTIC MAXWELL’S EQUATIONS 27

where ⟨., .⟩M is the metric from M . The reason for this choice of metric will explained in thenext subsection on special relativity. We also have a volume form for eM . If µM is the volumen-form for M , then the volume (n+ 1)-form µ for eM is given by

µ= d t ∧µM .

Suppose ∗M is the Hodge star for M , then the Hodge star ∗ for eM is given by the following. Ifω is a k-form tangent to M , i.e. ω(d t]) = 0, then

∗ω= (−1)k d t ∧ ∗Mω, ∗(d t ∧ω) = −c2 ∗M ω.

One should check α∧ ∗α= ⟨α,α⟩µ.

Now, electric charge density ρ ∈ Ωn(M ;RC) and flux j ∈ Ωn−1(M ;R C/s) can be unified as the4-current (4 is the case when n= 3 and eM is 4-dimensional)

J := ρ − d t ∧ j ∈ Ωn( eM ;RC).

The conservation of charge ∂∂ tρ + dM j = 0 is then equivalent to

d J = 0.

One checks that

d J = d t ∧ ∂∂ tρ + d t ∧ dM j = 0

where dM is the exterior derivative on M .

The electric field and magnetic field on M can be unified as a 2-form called the Faraday 2-formdefined on eM :

F := −d t ∧ E + B ∈ Ω2(M ;R J·s/C).

Suppose at time t0 there is a moving charged particle at p ∈ M with velocity vM ∈ TpM . Thenthe particle is located at (t0, p) ∈ eM with velocity v = d t]+ vM ∈ T(t0,p) eM . Suppose the particlehas electric charge q. Then its Lorentz force is given by

f = −qιv F.

Finally, the Maxwell’s equations in terms of the Faraday 2-form is concisely written as

¨

d F = 0

d∗F = J .(5.21)

Page 28: Differential Equations on Manifolds

28 CHAPTER 5. DIFFERENTIAL EQUATIONS ON MANIFOLDS

The first equation d F = 0 in expansion is

d t ∧ dM E + d t ∧ ∂∂ t B + dM B = 0

which unifies dM B = 0 (by taking another d t∧ to the equation) and the Faraday’s Law dM E +∂∂ t B = 0 (by applying ιd t] to the equation). The second equation J = d∗F is

ρ − d t ∧ j = d(−c2 ∗M E + d t ∧ ∗M B)

= −c2dM ∗M E − c2 d t ∧ ∗M∂∂ t E − d t ∧ dM ∗M B

unifying the Gauss’ Law and Ampere-Maxwell’s Law.

One can almost immediately write down the corresponding DEC formulation for the discreteversion of (5.21). The corresponding algorithm for the case when the mesh being regularwas also known as the Finite Difference Time Domain (FDTD) method, or Yee’s Scheme. DECapproach generalizes Yee’s Scheme to arbitrary mesh for eM , even with non-synchronous timegrid (EM-fields are solved at different time resolution in different cells).

5.5.2 Special Relativity

In order to understand the spacetime domain on which we are going to define relativisticelectromagnetic fields independent of the choice of time-axis, we need a bit background onRelativity. In particular Special Relativity provides a model for space and time.

Albert Einstein postulated in one of his 1905 papers that

1. the laws of physics are the same in all inertial frames of reference.2. the speed of light in free space has the same value c in all inertial frames of reference.

The first postulate says that if a physical law is formulated in terms of a coordinate system(t, x , y, z), then it must take the same form when written in terms of another coordinate system( t, x , y , z) which is a uniform translating motion with respect to (t, x , y, z). This postulate hasbeen known since Galileo Galilei and is applicable to all classical physics. The second postulateis more counterintuitive in the classical sense, and it is just based on the surprising result of1887 Michelson-Morley experiment: the measurement of the speed of light is the same in allseasons (when earth is moving in different directions!)

To have the two postulates consistently fit together, one puts space and time together as ageometric entity M called spacetime, a 4-dimensional (or in general (n + 1)-dimensional)manifold. Each point p in spacetime is called an event. A curve γ: I → M in M is a smoothlyvarying points on M , with the direction of γ′ ∈ TγM encodes how “fast” it moves throughspacetime.

Page 29: Differential Equations on Manifolds

5.5. RELATIVISTIC MAXWELL’S EQUATIONS 29

For example, if TpM = R4 with an orthonormal (in the Euclidean sense) basis e0, e1, e2, e3and suppose e0 is the time direction for some observer, then a vector v = v0e0 + · · ·+ v3e3 ∈ R4

has a classical velocity

v1v0

, v2v0

, v3v0

.

In this example, the coefficients v0 measures the time displacement and v1,2,3 measures thespacial displacement of a vector v (a geometric object). The values of the coefficients dependson the basis e0, e1, e2, e3 (how fast the observer moves and how the observer is oriented,i.e. the inertial frames of reference). Although it is more intuitive (in the classical sense) toformulate laws of physics in terms of the values v0,1,2,3, the first postulate of Einstein means thatthe laws of physics should depend only on the geometric object v rather than the coefficientsv0,1,2,3. Hence if we write everything “geometrically” on spacetime, we arrive at formulationthat is relativistic.

Now, the second postulate of Einstein says that the measurement of speed of light is alsogeometric, i.e. independent of coordinate. How to come up with a framework so that it is true?

Before revealing the sequence of definitions, let us look at the example of R4. If a vector v ∈ R4

is tangent to a light trajectory, we must have c2 =

v1v0

2+

v2v0

2+

v3v0

2. In other words,

−c2 (v0)2 + (v1)

2 + (v2)2 + (v3)

2 = 0.

If we define for each u, v ∈ TpM the “inner product”

⟨u, v⟩L := −c2u0v0 + u1v1 + u2v2 + u3v3

then we may use ⟨v, v⟩L as a measuring device for testing whether a tangent direction v is alight direction. We call v light-like if ⟨v, v⟩L = 0. The collection of all light-like vectors in TpM ,as the solutions of the quadratic polynomial ⟨v, v⟩L = 0, forms a cone called light cone. We callv time-like if ⟨v, v⟩L < 0 (slower than speed of light, i.e. v lies in the solid interior of the lightcone); and we call v space-like if ⟨v, v⟩L > 0. See Figure 5.2.

It turns out ⟨., .⟩L can be thought of as a “metric” for the spacetime manifold M . Using sucha metric we may talk about geometries of embedded curves (which are particle path/history)analogous to space curves (curves embedded in R3); in terms of geometry of curves in spacetimethe motion law will be made relativistic. With the notion of metric, we may also talk about theHodge star ∗ for differential forms on M which will bring us relativistic Maxwell’s equations.

Definition 5.1 (Lorentzian manifold). Let M be an (n+ 1)-dimensional smooth manifold.It is Lorentzian if it is equipped with ⟨., .⟩L defined (smoothly) on every tangent space

⟨., .⟩L

p: TpM × TpM → R

such that

• ⟨., .⟩L is bilinear and symmetric (⟨u, v⟩L = ⟨v, u⟩L).

Page 30: Differential Equations on Manifolds

30 CHAPTER 5. DIFFERENTIAL EQUATIONS ON MANIFOLDS

Figure 5.2: A spacetime manifold of dimension 1+ 1. Each tangent space has a distinct light cone(collection of light-like vectors) that separates time-like vectors and space-like vectors. The textureof the surface shows a few trajectories of light in this spacetime.

• ⟨., .⟩L is non-degenerate; i.e. there is no u ∈ TpM such that ⟨u, v⟩L = 0 for all v ∈ TpM .• ⟨., .⟩L has signature (1, n). That is for any basis e0, . . . , en for TpM , the matrix[⟨ei , e j⟩L]i j has exactly one negative eigenvalue and n positive eigenvalues.

⟨., .⟩L is called a Lorentzian metric or Lorentzian inner product.

Exercise 5.11. Check that the signature of the above definition is independent of the choiceof basis.

Definition 5.2. Let M be an (n+ 1)-dimensional Lorentzian manifold. Then u ∈ TpM issaid to be

• time-like if ⟨u, u⟩L < 0;• light-like if ⟨u, u⟩L = 0;• space-like if ⟨u, u⟩L > 0.

A vector u ∈ TpM is a unit vector if ⟨u, u⟩L = −c2 or ⟨u, u⟩L = 1. A curve γ: I → M is saidto be a world line if γ′ is time-like (a path of moving object never exceeding speed of light).A world line γ: τ 7→ γ(τ) is parameterized by arclength if ⟨γ′,γ′⟩L = −c2, in which case

Page 31: Differential Equations on Manifolds

5.5. RELATIVISTIC MAXWELL’S EQUATIONS 31

the parameter τ is called the proper time.

Similar to the Curve Chapter, we shall assume all world lines are parameterized by arclength(parameterized by proper time). An observer is a (arclength-parameterized) world line γ :[0,τmax] → M , and the proper time τ is his or her biological clock (or any other clock heor she brings along). Let T = γ′ ∈ TγM , which is the time direction of the observer γ. LetT⊥ = w ∈ TγM | ⟨w, T ⟩L = 0 be the n-dimensional orthogonal complement. Note that T⊥

consists of space-like vectors (can you see why?) which is the space experienced by the observerγ. Define for each u ∈ TγM

uT =⟨T,u⟩L⟨T,T ⟩L

= − 1c2 ⟨T, u⟩L (Lorentz factor)

uT⊥ = u− uT T ∈ T⊥.

Then every u ∈ TγM can be orthogonally decomposed into

u= uT T + uT⊥ .

(The Lorentz factor is often denoted by “γ” in special relativity. Since the letter “γ” coincideswith the notation for curves, and that the Lorentz factor totally depends on both u and theobserver’s direction T , and that it is the projection factor from u to T , we shall use the notation“uT ”.)

Definition 5.3. Let γ be an observer, T = γ′, and suppose u ∈ TγM . Then the classicalvelocity of u observed by γ is given by

uT⊥

uT∈ T⊥,

which is the space displacement divided by the time displacement.

Now we can check that Einstein’s 2nd postulate is satisfied. Suppose u is a light-like vector(⟨u, u⟩L = 0). For any observer γ with T = γ′, one has

u= uT T + uT⊥ .

From ⟨u, u⟩L = 0, using ⟨T, uT⊥⟩L = 0 we get

0= u2T ⟨T, T ⟩L + ⟨uT⊥ , uT⊥⟩L = −c2u2

T + |uT⊥ |2

Hence the classical speed of u is |uT⊥ ||uT |

= c. Therefore, the value of the speed of light measuredby any observer is the same constant c.

Page 32: Differential Equations on Manifolds

32 CHAPTER 5. DIFFERENTIAL EQUATIONS ON MANIFOLDS

Note Classically velocity or speed has the unit of m/s. The constancy of c allows us to think ofthe unit s be just another unit of length through the canonical identification

c : R s∼=−→ Rm linear,

c · 1s := 299792458m in our universe.

Many authors would choose the time unit as s= 1299792458 s so that c = 1. However we would

like to keep c in our formulas to give the right sense of scales. Hence, let us agree on thefollowing convention: “second” is a unit of length with 1 s= 299792458 m, and c is the numberc = 299792458 ∈ R. In particular velocities are dimensionless.

5.5.3 Momentum and Force

Suppose a world line γ: I → M is a particle trajectory with tangent u= γ′ (assuming arclengthparameterization ⟨u, u⟩L = −c2). The vector u ∈ Tγ(τ)M is also called the 4-velocity.

Let m0 ∈ Rkg, m0 > 0, be the rest mass of the particle. Then the 4-momentum is given by

P := m0u.

(The physical unit of P is [P] = [kg]) And the force is given by

f := P ′ = m0u′.

([ f ] = [kg/m]) As a consequence of ⟨u, u⟩L = −c2 being constant, we always have ⟨ f , u⟩L = 0.In fact u′, the acceleration, is exactly the curvature normal for the curve γ. The meaning ofu′ is clear when M = R4 analogous to space curves. When M is curved, the curvature of γ isreferred as the geodesic curvature of the curve on M .

How does momentum and force “looks like” classically? Suppose there is an observer whotravels at a direction T , ⟨T, T ⟩L = −c2. Then

P = m0uT T +m0uT⊥

= mT T +mTuT⊥uT

where mT := m0uT is the classical mass and mTuT⊥uT= PT⊥ is the classical momentum (classical

mass times classical velocity). Similarly,

f = m′T T + fT⊥

assuming T ′ = 0. Here fT⊥ = P ′T⊥

, so the classical force is given by fc :=fT⊥uT

(change ofclassical momentum per unit time displacement). Now, using ⟨ f , u⟩L = 0, one has

0= m′T ⟨T, u⟩L + uT ⟨ fc , u⟩L

Page 33: Differential Equations on Manifolds

5.5. RELATIVISTIC MAXWELL’S EQUATIONS 33

= −m′T c2uT + uT ⟨ fc , uT T + uT⊥⟩L= −m′T c2uT + u2

T

¬

fc ,uT⊥uT

.

This implies the classical work rate¬

fc ,uT⊥uT

equals tom′TuT

c2 wherem′TuT

classical rate of massgain. Since work is the energy added into the particle, it associates an energy ET to a mass mTvia

ET = mT c2.

Thus, in the observer’s expansion of the momentum P = mT T + mTuT⊥uT

, while the space

component mTuT⊥uT

is understood as the classical momentum, the time component mT =ETc2 is

understood as the energy.

The value observed energy ET = mT c2 can be written in terms of m0 and the informationuT , uT⊥ of their relative speed. From ⟨P, P⟩L = −m2

0c2, one has

−c2m2T +

mTuT⊥uT

2= −m2

0c2

and thus obtains

E2T = m2

0c4 + c2

mTuT⊥uT

2

i.e. the observed energy is contributed from the rest mass and the observed kinetic energy.

5.5.4 Maxwell’s Equations

On the spacetime manifold M , suppose γ is a world line representing the trajectory of a chargedparticle with charge q. Let u= γ′ (again, ⟨u, u⟩L = −c2). Assume that the particle feels no otherforces than the electromagnetic force. Then the force f = m0u′ is proportional to q and it isorthogonal to u. The latter statement can be rephrased by that ιu f [ = 0. Thus, f [ must be theresult of ιu applied on some 2-form. (Can you see the image of ιu equals to the kernel of ιu?)Therefore, we conclude

f [ = −qιuF

where F is a 2-form called the Faraday 2-form. (F ∈ Ω2(M ;R kg/C)). If T is a unit time-likevector as the direction of an observer, then

E = 1c2 ιT F, B = ∗T⊥F

Page 34: Differential Equations on Manifolds

34 CHAPTER 5. DIFFERENTIAL EQUATIONS ON MANIFOLDS

where ∗T⊥

is the pull-back for the inclusion T⊥ : T⊥ ,→ TpM . That is, B is the projection ofF on T⊥. See Example 5.3 in Appendix 5.A for more detail. Note that in fact the observer Tdecomposes F into

F = −T [ ∧ E + B.

Now we have F concisely represents both electric field and magnetic field. In terms of F ,Maxwell’s Equations are given by

¨

d F = 0

d∗F = J

where J ∈ Ωn(M ;RC) (M is (n+ 1)-dimensional) necessarily satisfying d J = 0 with

ρ = 1c2 ιT J , j = ∗T⊥F

being the classical charge density and charge current observed by T .

Page 35: Differential Equations on Manifolds

Appendix

5.A Contraction Operator

Given a tangent vector field v on M , the operator ιv : Ωk(M)→ Ωk−1(M), called the interiorproduct or contraction with v, is defined by

(ιvω)(X1, . . . , Xk−1) :=ω(v, X1, . . . , Xk−1)

for ω ∈ Ωk(M) and X1, . . . , Xk−1 tangent vectors. In other words, ιv is “inserting v into the firstslot of a differential form”. The contraction product has the following properties similar toexterior derivative.

• ιv ιv = 0.• ιv(α∧ β) = (ιvα)∧ β + (−1)kα∧ (ιvβ) when α is a k-form. (Leibniz rule)

In fact ιv is the unique linear operator on differential forms so that ι2v = 0, Leibniz rule holds,and ιvα= α(v) for all 1-form α.

Example 5.1. Let us consider d x ∧ d y as a 2-form in R3. Then for a vector v ∈ R3, usingLeibniz rule

ιv(d x ∧ d y) = d x(v)d y − d y(v)d x

= vx d y − vy d x .

Example 5.2. Suppose B is a 2-form in R3 given by

B = Bx d y ∧ d z + By dz ∧ d x + Bz d x ∧ d y.

Let v = (v1, v2, v3) be a vector field. Then

(ιvB)] = −(vx , vy , vz)× (Bx , By , Bz).

35

Page 36: Differential Equations on Manifolds

36 CHAPTER 5. DIFFERENTIAL EQUATIONS ON MANIFOLDS

A remarkable fact about the contraction is that it is the dual to a wedge product:

(ιvα)∧ ∗β = α∧ ∗(v[ ∧ β).

So, if you use the analogy d↔ ιv , then δ corresponds to v[∧. Now you may think of what doesLaplacian ∆= −dδ−δ d corresponds to in the ιv version? It turns out that

(v[∧) ιv + ιv (v[∧) = |v|2id.

If |v|2 = 1, then the operators ιv (v[∧) and (v[∧) ιv are projection operators. One seesthat in the evaluation (ιv(v[ ∧ω))(X1, . . . , Xk), any v component of X j will not contribute. If: v⊥ ,→ TpM is the inclusion map, then one would have that

ιv(v[ ∧ω)(X1, . . . , Xk) = (

∗ω)(X1, . . . , Xk)

for all X1, . . . , Xk ∈ v⊥.

Example 5.3. In Section 5.5.4, if T is a unit time-like vector field (⟨T, T ⟩L = −c2), and Fis the Faraday 2-form. Then

F = − 1c2

(T [∧) ιT + ιT (T [∧)

F

= −T [ ∧ 1c2 ιT F︸ ︷︷ ︸

E

+ ∗T⊥F︸︷︷︸

B

where E and B are the electric and magnetic fields measured by an observer traveling alonga world line tangent to T .