Calculus/Discrete vector calculus

From testwiki
Jump to navigation Jump to search

This chapter will present an analog to vector calculus where space now consists of discrete "lumps". The purpose of this chapter is to provide an intuitive basis for vector calculus. The portrayal of vector calculus in this chapter will enable the generalization of vector calculus to non-Euclidean geometries.

The essence of Calculus

The key approach to calculus is to start with a model where each variable, using x as an example, takes on discrete quantities separated by small intervals of width Δx. Δx is a measure of the model's "coarseness" (when Δx is increasing) or "fineness" (when Δx is decreasing). When handling quantities at the scale of Δx, an approximation for which the error relative to Δx vanishes as Δx becomes infinitely small, becomes exact when x is treated as a continuous variable.

As an example, let Δx be small, and restrict x to the quantities {...,3Δx,2Δx,Δx,0,+Δx,+2Δx,+3Δx,...}. Let xi=iΔx for any integer i.

The difference Δy(i)=xi+12xi2=2xiΔx+Δx2 approaches 0 as Δx0+, but it is not accurate to approximate Δy(i) with 0, as the error relative to Δx does not vanish as Δx0+: in truth, Δy(i)0Δx=2xi+Δx↛0 as Δx0.

It is however, accurate to approximate Δy(i) with Δz(i)=2xiΔx since the error relative to Δx does vanish as Δx0+: it is the case that Δy(i)Δz(i)Δx=Δx0 as Δx0.

When we articulate continuous space into small but non-zero volumes for the purpose of approximating vector calculus, it is important to note that the only approximations that will be made, will be those that entail relative errors that vanish as the articulation of space becomes more and more fine.

In order to demonstrate the necessity of having the error relative to the differential Δx approach 0 as Δx0 as opposed to the absolute error, the following example will be used:

Consider the closed interval [a,b] divided into N intervals: [x0,x1],[x1,x2],...,[xN1,xN] where a=x0<x1<...<xN=b. From each i=1,2,,N choose a representative point xi*[xi1,xi], and let Δxi=xixi1. Let f:โ„2โ„ and g:โ„2โ„ be two functions whose first parameter is a representative point, and the second parameter is the interval width. Both f and g will be assumed to approach 0 as the interval width becomes infinitely small. Consider the two sums F=i=1Nf(xi*,Δxi) and G=i=1Ng(xi*,Δxi). It will be assumed that F and G converge to F and G respectively as N+ and max(Δxi)0+.

The question of interest are circumstances under which F=G. If other words, as the interval [a,b] becomes more and more articulated into smaller and smaller intervals, what is required so that approximating F with G becomes exact?

If maxx[a,b]|f(x,Δx)g(x,Δx)|0 as Δx0+, this is not sufficient to guarantee that F=G. In contrast, if maxx[a,b]|f(x,Δx)g(x,Δx)|Δx0 as Δx0+, this will force F=G. To prove this, the following derivation will be used:

|FG|=|i=1Nf(xi*,Δxi)i=1Ng(xi*,Δxi)|=|i=1N(f(xi*,Δxi)g(xi*,Δxi))|

i=1N|f(xi*,Δxi)g(xi*,Δxi)|=i=1NΔxi|f(xi*,Δxi)g(xi*,Δxi)|Δxi

i=1NΔximaxj(|f(xj*,Δxj)g(xj*,Δxj)|Δxj) =(i=1NΔxi)maxj(|f(xj*,Δxj)g(xj*,Δxj)|Δxj) =(ba)maxj(|f(xj*,Δxj)g(xj*,Δxj)|Δxj)

For each j=1,2,,N, it is assumed that |f(xj*,Δxj)g(xj*,Δxj)|Δxj0 as Δxj0+. Therefore maxj(|f(xj*,Δxj)g(xj*,Δxj)|Δxj)0 and hence |FG|0 as N+ and max(Δxi)0+. Therefore F=G.

The left image shows the sums F and G. The white area of each strip depicts f, and the red area of each strip depicts gf. The total area highlighted in red depicts the difference between G and F. As N increases, the center image shows how the total red area does not decrease if it is not the case that for each strip that the "ratio of red area to the strip width", which is the height of the red area, fails to approach 0 for all strips. This is despite the fact that the red area (absolute difference) in each strip is approaching 0. The right image shows how the total red area approaches 0 if the "red area to strip width ratio" for each strip is approaching 0.

Lumped space

Directed graphs

The lumped approximation of space will require the use of a "directed graph".

A "directed graph" ๐’ข=๐’ฉ,โ„ฐ consists of a set ๐’ฉ of nodes/vertices and a set โ„ฐ of directed edges. For each edge eโ„ฐ, e has an origin node t(e)๐’ฉ that is the beginning of edge e, and a terminal node t(e)๐’ฉ that is the end of edge e. It will also be allowed that edges can form loops (t(e)=t(e)) and that multiple edges can have both the same beginning and end (t(e1)=t(e2) and t(e1)=t(e2)), though this will be irrelevant for the cases that will be considered.

An arbitrary function f:๐’ฉโ„ over the set of nodes will be referred to as a "node based function", and is effectively a scalar field. The notation n๐’ฉ:f(n) will be used if the input parameter is ambiguous. A node based function can also be denoted by exhaustively listing the assignment to each node: {n1f(n1),n2f(n2),}. If a node based function is denoted by a complex expression F, then the evaluation of F at a single node n will be denoted using the pipe-subscript notation: F|n.

An arbitrary function f:โ„ฐโ„ over the set of edges will be referred to as an "edge based function", and is effectively a scalar or vector field. The notation eโ„ฐ:f(e) will be used if the input parameter is ambiguous. An edge based function can also be denoted by exhaustively listing the assignment to each edge: {e1f(e1),e2f(e2),}. If an edge based function is denoted by a complex expression F, then the evaluation of F at a single edge e will be denoted using the pipe-subscript notation: F|e. When a real number assigned to an edge denotes a "vector", a positive value denotes an orientation along the edge's preferred direction, and a negative value denotes an orientation against the edge's preferred direction.

An example directed graph.

An example directed graph is shown to the right. The node set is ๐’ฉ={n1,n2,n3,n4,n5} and the edge set is โ„ฐ={e1,e2,e3,e4,e5,e6}. The origin and terminal nodes of each edge are: (t(e1),t(e1))=(n1,n2); (t(e2),t(e2))=(n1,n3); (t(e3),t(e3))=(n2,n4); (t(e4),t(e4))=(n4,n3); (t(e5),t(e5))=(n4,n5); and (t(e6),t(e6))=(n5,n1).

Interpreting nodes and edges

Two irregular volumes with an irregular boundary are characterized as two points linked by a curve. Each point is a node in a directed graph, and the curve denotes the directed edge that links the two points. The "length" of the directed edge is the distance between the two points, and the "cross-sectional area" of the directed edge is the area of the projection of the boundary surface onto a plane that is perpendicular to the displacement between the two points.

Each node n๐’ฉ will correspond to both a point ω0(n) in space, and a volume ω3(n) that contains ω0(n). τ3(n) will denote the volume of ω3(n), also referred to as the volume of node n. The volume of each node must be positive: τ3(n)>0 for all n๐’ฉ. In the example directed graph, an example choice of volumes for each node is τ3={n13,n22,n32,n41,n54}.

Each edge eโ„ฐ will correspond to both a curve ω1(e) originating from ω0(t(e)) and terminating at ω0(t(e)), and a surface ω2(e) that separates ω3(t(e)) from ω3(t(e)) oriented from ω3(t(e)) to ω3(t(e)).

τ1(e) will denote the distance |ω0(t(e))ω0(t(e))| from ω0(t(e)) to ω0(t(e)), which will be referred to as the length of edge e. The length of each edge must be positive: τ1(e)>0 for all eโ„ฐ. τ2(e) will denote the area of ω2(e) projected onto a plane that is perpendicular to the displacement ω0(t(e))ω0(t(e)), which will be referred to as the cross-sectional area, thickness, or width of edge e. The cross-sectional area of each edge must be positive: τ2(e)>0 for all eโ„ฐ. In the example directed graph, an example choice of lengths for each edge is τ1={e11,e21,e32,e41,e53,e64}, and an example choice of areas for each edge is τ2={e11,e22,e31,e42,e53,e63}.

In summary an arbitrary directed graph ๐’ข will be characterized by:
  • the set of nodes ๐’ฉ
  • the set of edges โ„ฐ
  • the start t(e) and end t(e) of each edge eโ„ฐ
  • the volume τ3(n) of each node n๐’ฉ
  • the length τ1(e) and area τ2(e) of each edge eโ„ฐ

The point ω0(n) and space ω3(n) associated with each node n๐’ฉ, and the curve ω1(e) and surface ω2(e) associated with each edge eโ„ฐ, are not given consideration after the approximate directed graph model has been established. The parameters in the above list are all that is needed to utilize the directed graph model.

Points and multi-points

A "point" in space is quantified by a single node n0๐’ฉ, which corresponds to the space point ω0(n0).

Point n0 can be denoted by the node based function δ0(n;n0):๐’ฉโ„ where for each node n๐’ฉ it is the case that δ0(n;n0)={1/τ3(n)(n=n0)0(nn0). The term 1τ3(n) arises from the fact that the point is "spread out" over the volume of n. The notation δ0(n0) denotes δ0(n;n0) with the parameter n not shown.

A superposition of points is a "multi-point". A multi-point is effectively a set of points with varying weights, which can be any real number. Let the set W={(n1,w1),(n2,w2),...,(nk,wk)} of node/weight pairs denote a multi-point. For each i=1,2,...,k: wi is the weight associated with node ni. The node based function that denotes multi-point W is: δ0(n;W)=i=1kwiδ0(n;ni)=i=1k{wi/τ3(n)(n=ni)0(nni). Any node based function that returns real values can denote a multi-point.

Any node based function that denotes "density" is best interpreted as a multi-point.

Below is shown two examples of a multi-point W and the corresponding node based function δ0(n;W). On the left, there is a collection of points with a weight of +1 denoted by red dots, and points with a weight of -1 denoted by blue dots. For each volume ω3(n), the weights of all of the contained points are added together and the total weight is divided by τ3(n) to spread it out over the volume ω3(n). On the right, shades of red denote positive values for δ0(n;W), while shades of blue denote negative values for δ0(n;W). White means that δ0(n;W)=0 for the current node n.

Template:Gallery

Volumes and multi-volumes

The example directed graph with the example multi-volume.

The discrete analog to volumes using a directed graph is that a volume U is a collection of nodes: U๐’ฉ. The combined volume region denoted by U is ω3(U)=nUω3(n) and the total volume amount is τ3(U)=nUτ3(n).

Volume U can be denoted by a node based membership function: δ3(n;U):๐’ฉโ„ where for each node n๐’ฉ, it is the case that δ3(n;U)={1(nU)0(nU). The notation δ3(U) denotes δ3(n;U) with the parameter n not shown.

A superposition of volumes forms a "multi-volume". Any node based function that returns real values can be the membership function of a multi-volume. For example, given the node based function f={n12,n20,n34,n40.5,n50.5} can be expressed as the following superpositions:

f(n)=2δ3(n;{n1})+4δ3(n;{n3})+0.5δ3(n;{n4,n5}) is the superposition of volumes {n1},{n3},{n4,n5} with the respective weights 2,4,0.5.

f(n)=2δ3(n;{n1})+0.5δ3(n;{n3,n4,n5})+3.5δ3(n;{n3}) is the superposition of volumes {n1},{n3,n4,n5},{n3} with the respective weights 2,0.5,3.5.

It is important to note that given an arbitrary node based function, decomposing the multi-volume denoted by the function into a superposition of volumes is not unique, as shown above where a node based function is decomposed into multiple superpositions of volumes.

Any node based function that denotes a "potential" is best interpreted as a multi-volume.

Paths and multi-paths

The example directed graph with the example multi-path.

The discrete analog to paths using a directed graph is that a path P is a series of edges and orientations: P=(e1,s1),(e2,s2),,(ek,sk) where eiโ„ฐ is the ith edge and si{+1,1} is an indicator that is +1 if ei is traversed in the preferred direction, and is 1 if ei is traversed in the opposite direction. The path must be unbroken: for each i{1,2,,k1} it must be that {t(ei)(si=+1)t(ei)(si=1)={t(ei+1)(si+1=+1)t(ei+1)(si+1=1). The combined path denoted by P is ω1(P)=i=1ksiω1(ei) (path ω1(ei) is path ω1(ei) the orientation reversed) and the total length is τ1(P)=i=1kτ1(ei).

A path P can be denoted by the edge based function δ1(e;P):โ„ฐโ„ where for each edge eโ„ฐ, it is the case that δ1(e;P)=i=1ksiδ1(e;ei) where δ1(e;ei)={1/τ2(e)(e=ei)0(eei). The term 1τ2(e) arises from the fact that the path is "spread out" over the thickness of e. The notation δ1(P) denotes δ1(e;P) with the parameter e not shown.

A superposition of paths forms a "multi-path". Any edge based function that returns real values can denote a multi-path. For example, assuming that τ2(e)=1 for all eโ„ฐ, the edge based function f={e11,e21,e31,e42,e50,e60} can be expressed as the following superpositions:

f(e)=δ1(e;(e1,+1))δ1(e;(e2,+1))+δ1(e;(e3,+1))+2δ1(e;(e4,+1)) is the superposition of paths (e1,+1),(e2,+1),(e3,+1), and (e4,+1) with the respective weights 1,1,1,2.

f(e)=δ1(e;(e2,1),(e1,+1),(e3,+1),(e4,+1))+δ1(e;(e4,+1)) is the superposition of paths (e2,1),(e1,+1),(e3,+1),(e4,+1), and (e4,+1) with the respective weights 1,1.

It is important to note that given an arbitrary edge based function, decomposing the multi-path denoted by the function into a superposition of paths is not unique, as shown above where an edge based function is decomposed into multiple superpositions of paths.

Any edge based function that denotes "flow density" (flow per unit cross-sectional area) is best interpreted as a multi-path.

Below is shown two examples of a multi-path P and the corresponding edge based function δ1(e;P). On the left a superposition of multiple paths is shown. For each surface ω2(e), the total "flow" through ω2(e) is computed and is then divided by τ2(e) to spread it out over the surface ω2(e). On the right, the flow enters a surface through the green side and leaves through the red side. The density of the flow is depicted by the strength of the shading. If the green to red orientation coincides with the orientation of e, then δ1(e;P) is positive. If the green to red orientation is opposite the orientation of e, then δ1(e;P) is negative.

Template:Gallery

Surfaces and multi-surfaces

The example directed graph with the example multi-surface.

The discrete analog to oriented surfaces using a directed graph is that an oriented surface S is a collection of edges and orientations: S={(e1,s1),(e2,s2),,(ek,sk)} where all of the edges e1,e2,,ekโ„ฐ are distinct and si{+1,1} is an indicator that describes the surface's orientation. Each edge ei is an edge that passes through the surface, and si is +1 if ei passes through the surface in the preferred direction, and si is 1 if ei passes through the surface in the opposite direction. The combined surface denoted by S is ω2(S)=i=1ksiω2(ei) (surface ω2(ei) is surface ω2(ei) with the orientation reversed) and the total area is τ2(S)=i=1kτ2(ei).

A surface S can be denoted by the edge based function δ2(e;S):โ„ฐโ„ where for each edge eโ„ฐ, it is the case that δ2(e;S)={+1/τ1(e)((e,+1)S)1/τ1(e)((e,1)S)0(else). The term 1τ1(e) arises from the fact that the surface is "spread out" over the length of e. The notation δ2(S) denotes δ2(e;S) with the parameter e not shown.

A superposition of surfaces forms a "multi-surface". Any edge based function that returns real values can denote a multi-surface. For example, assuming that τ1(e)=1 for all eโ„ฐ, the edge based function f={e12,e22,e30,e40,e50,e61} can be expressed as the following superpositions:

f(e)=2δ2(e;{(e1,+1)})+2δ2(e;{(e2,+1)})δ2(e;{(e6,+1)}) is the superposition of surfaces {(e1,+1)},{(e2,+1)}, and {(e6,+1)} with the respective weights 2,2,1.

f(e)=δ2(e;{(e1,+1),(e2,+1),(e6,1)})+δ2(e;{(e1,+1),(e2,+1)}) is the superposition of surfaces {(e1,+1),(e2,+1),(e6,1)} and {(e1,+1),(e2,+1)} with the respective weights 1 and 1.

It is important to note that given an arbitrary edge based function, decomposing the multi-surface denoted by the function into a superposition of surfaces is not unique, as shown above where an edge based function is decomposed into multiple superpositions of surfaces.

Any edge based function that denotes the "rate of gain" (rate of gain per unit length) is best interpreted as a multi-surface.

Below is shown two examples of a multi-surface S and the corresponding edge based function δ2(e;S). On the left a superposition of multiple surfaces is shown. For each curve ω1(e), the net number of times edge e penetrates S in the preferred direction, referred to as the "gain" across ω1(e), is computed and is then divided by τ1(e) to spread the gain out over the curve ω1(e). On the right, the net gain is positive if an edge is traversed from the green end to the red end. The amount of gain is depicted by the strength of the shading. If the green to red orientation coincides with the orientation of e, then δ2(e;S) is positive. If the green to red orientation is opposite the orientation of e, then δ2(e;S) is negative.

Template:Gallery

Intersections

Multi-point multi-volume intersections

A multi-volume and a multi-point is shown. The red volumes and points have a weight of +1, and the cyan volumes and points have a weight of -1. The intersection contributed by a point is its weight times the weight assigned to the volume that contains the point. The total intersection weight in this image is: N = (+1)x(+1+1+1-1-1) + 0x(+1+1-1-1-1) + (-1)x(+1-1) = +1.

Given an arbitrary point n0๐’ฉ and volume U๐’ฉ, let Σ๐’ฉ(n0,U)={1(n0U)0(n0U) denote an indicator function that returns 1 if point n0 is contained by volume U and returns 0 if otherwise.

Node based function δ0(n;n0)={1/τ3(n)(n=n0)0(nn0) denotes the point n0, and node based function δ3(n;U)={1(nU)0(nU) denotes the volume U.

The indicator function Σ๐’ฉ(n0,U) can be computed via the following sum: Σ๐’ฉ(n0,U)=n๐’ฉ{1(n=n0)0(nn0)}{1(nU)0(nU)}=n๐’ฉδ0(n;n0)δ3(n;U)τ3(n). The term τ3(n) cancels out the 1τ3(n) in δ0(n;n0).

Σ๐’ฉ(n0,U) counts the number of times point n0 occurs in volume U which can only be 0 or 1 for simple points and volumes. This count can be generalized to sets of points. Let W๐’ฉ denote a collection of points. The collection of points can be denoted by the node based function δ0(n;W)={1/τ3(n)(nW)0(nW). The number of points from W that are contained by volume U can again be computed by the sum: Σ๐’ฉ(W,U)=n๐’ฉ{1(nW)0(nW)}{1(nU)0(nU)}=n๐’ฉδ0(n;W)δ3(n;U)τ3(n).

In the general case, given a node based function f that denotes a multi-point, and a node based function g that denotes a multi-volume, then the total weight of all the occurrences of f being inside of g is Σ๐’ฉ(f,g)=n๐’ฉf(n)g(n)τ3(n). The quantity Σ๐’ฉ(f,g) is called the net intersection or the total intersection weight of f with g.

It should also be noted that Σ๐’ฉ(f,g) is commutative: Σ๐’ฉ(f,g)=Σ๐’ฉ(g,f)

Multi-path multi-surface intersections

A path is shown intersecting a surface multiple times. The boundary of the surface has a counter-clockwise orientation. The net number of times that the surface is crossed in the preferred direction is +1-1+1+1+1 = 3.

Given an arbitrary path P=(eP,1,sP,1),(eP,2,sP,2),...,(eP,kP,sP,kP) and surface S={(eS,1,sS,1),(eS,2,sS,2),...,(eS,kS,sS,kS)}, let Σโ„ฐ(P,S) denote the number of times path P passes through surface S in the preferred direction minus the number of times path P passes through surface S in the opposite direction. For an arbitrary i=1,2,...,kP, and an arbitrary j=1,2,...,kS, if eP,i=eS,j then the ith link of path P coincides with the jth segment of surface S. If sP,isS,j=+1, then sP,i=sS,j and P passes through S in the preferred direction. If sP,isS,j=1, then sP,isS,j and P passes through S in the opposite direction.

Σโ„ฐ(P,S) can be computed via the following sum: Σโ„ฐ(P,S)=i=1kPj=1kS{sP,isS,j(eP,i=eS,j)0(eP,ieS,j)=eโ„ฐδ1(e;P)δ2(e;S)τ2(e)τ1(e). The term τ2(e) cancels out the 1τ2(e) from δ1(e;P), and the term τ1(e) cancels out the 1τ1(e) from δ2(e;S).

In the general case, given an edge based function f that denotes a multi-path, and an edge based function g that denotes a multi-surface, then the total weight of all the intersections of f with g is Σโ„ฐ(f,g)=eโ„ฐf(e)g(e)τ2(e)τ1(e). The quantity Σโ„ฐ(f,g) is called the net intersection or the total intersection weight of f with g.

It should also be noted that Σโ„ฐ(f,g) is commutative: Σโ„ฐ(f,g)=Σโ„ฐ(g,f)

Lumped coordinate system models

Model of Cartesian coordinates

A directed graph that models the Cartesian coordinate system. One dimension is suppressed for simplicity.

The discrete model used for Cartesian coordinates will consist of an infinite 3 dimensional grid of nodes that spans โ„3. To establish the model, the following is needed:

  • A spacing Δx for the x-coordinates.
  • A spacing Δy for the y-coordinates.
  • A spacing Δz for the z-coordinates.

For each triplet of integer indices (i,j,k)โ„ค3, there exists a node n(i,j,k) and 3 edges ex,(i,j,k), ey,(i,j,k), and ez,(i,j,k).

The origin and terminal nodes of ex,(i,j,k) are t(ex,(i,j,k))=n(i,j,k) and t(ex,(i,j,k))=n(i+1,j,k)

The origin and terminal nodes of ey,(i,j,k) are t(ey,(i,j,k))=n(i,j,k) and t(ey,(i,j,k))=n(i,j+1,k)

The origin and terminal nodes of ez,(i,j,k) are t(ez,(i,j,k))=n(i,j,k) and t(ez,(i,j,k))=n(i,j,k+1)

The Cartesian coordinate associated with node n(i,j,k) is ω0(n(i,j,k))=(iΔx,jΔy,kΔz), and the space associated with node n(i,j,k) is ω3(n(i,j,k))=[iΔxΔx2,iΔx+Δx2]×[jΔyΔy2,jΔy+Δy2]×[kΔzΔz2,kΔz+Δz2].

The volume of node n(i,j,k) is τ3(n(i,j,k))=ΔxΔyΔz.

The length of edge ex,(i,j,k) is τ1(ex,(i,j,k))=Δx. The length of edge ey,(i,j,k) is τ1(ey,(i,j,k))=Δy. The length of edge ez,(i,j,k) is τ1(ez,(i,j,k))=Δz.

The area of edge ex,(i,j,k) is τ2(ex,(i,j,k))=ΔyΔz. The area of edge ey,(i,j,k) is τ2(ey,(i,j,k))=ΔzΔx. The area of edge ez,(i,j,k) is τ2(ez,(i,j,k))=ΔxΔy.

Given a scalar field f(x,y,z) over Cartesian coordinates, f will be approximated by the node based function fapprox:๐’ฉโ„. Function fapprox is defined by fapprox(n(i,j,k))=f(iΔx,jΔy,kΔz) for each (i,j,k)โ„ค3.

Given a vector field ๐…(x,y,z)=Fx(x,y,z)๐ข+Fy(x,y,z)๐ฃ+Fz(x,y,z)๐ค over Cartesian coordinates, ๐… will be approximated by the edge based function Fapprox:โ„ฐโ„. Function Fapprox is defined by Fapprox(ex,(i,j,k))=Fx(iΔx,jΔy,kΔz); Fapprox(ey,(i,j,k))=Fy(iΔx,jΔy,kΔz); and Fapprox(ez,(i,j,k))=Fz(iΔx,jΔy,kΔz).

Model of Cylindrical coordinates

A directed graph that models the cylindrical coordinate system. For simplicity, the vertical/z dimension is not shown.

The discrete model used for Cylindrical coordinates will consist of an infinite 3 dimensional cylindrical grid of nodes that spans โ„3. To establish the model, the following is needed:

  • A spacing Δρ for the coordinate ρ.
  • A large positive integer Nϕ that will yield a spacing Δϕ=2πNϕ for the coordinate ϕ.
  • A spacing Δz for the coordinate z.

Each node n๐’ฉ will correspond to a unique triplet (i,j,k) of integers, and will be denoted by n(i,j,k). The cylindrical coordinate denoted by n(i,j,k) will be ω0(n(i,j,k))=(iΔρ,jΔϕ,kΔz).

Clearly, due to the nature of cylindrical coordinates (such as the fact that coordinate ϕ is cyclical), not every triplet (i,j,k) will be allowed. The following three domains will be defined: I0, I1, and I2.

(i,j,k)I0(i1and0j<Nϕ)

(i,j,k)I1(i0and(i=0j=0)and0j<Nϕ)

(i,j,k)I2(i0and0j<Nϕ)

There exists a node n(i,j,k) for each (i,j,k)I1.

There exists an edge eρ,(i,j,k) for each (i,j,k)I2 such that t(eρ,(i,j,k))={n(i,j,k)(i>0)n(i,0,k)(i=0) and t(eρ,(i,j,k))=n(i+1,j,k)

There exists an edge eϕ,(i,j,k) for each (i,j,k)I0 such that t(eϕ,(i,j,k))=n(i,j,k) and t(eϕ,(i,j,k))={n(i,j+1,k)(j<Nϕ1)n(i,0,k)(j=Nϕ1)

There exists an edge ez,(i,j,k) for each (i,j,k)I1 such that t(ez,(i,j,k))=n(i,j,k) and t(ez,(i,j,k))=n(i,j,k+1)

Next, the volume of each node and the lengths and area of each edge will be calculated. To simplify notation, let lϕ(ireal)=(irealΔρ)Δϕ for any nonnegative real number ireal.

For each (i,j,k)I1 the cylindrical coordinate that corresponds to n(i,j,k) is ω0(n(i,j,k))=(iΔρ,jΔϕ,kΔz), and the space (described using cylindrical coordinates) associated with n(i,j,k) is ω3(n(i,j,k))={[(i12)Δρ,(i+12)Δρ]×[(j12)Δϕ,(j+12)Δϕ]×[(k12)Δz,(k+12)Δz](i>0)[0,Δρ2]×[0,2π]×[(k12)Δz,(k+12)Δz](i=0)

For each (i,j,k)I1 the volume of node n(i,j,k) is τ3(n(i,j,k))={Δρlϕ(i)Δz(i>0)π(Δρ2)2Δz(i=0)

For each (i,j,k)I2 the length and area of edge eρ,(i,j,k) is τ1(eρ,(i,j,k))=Δρ and τ2(eρ,(i,j,k))lϕ(i+12)Δz respectively.

For each (i,j,k)I0 the length and area of edge eϕ,(i,j,k) is τ1(eϕ,(i,j,k))lϕ(i) and τ2(eϕ,(i,j,k))=ΔρΔz respectively.

For each (i,j,k)I1 the length and area of edge ez,(i,j,k) is τ1(ez,(i,j,k))=Δz and τ2(ez,(i,j,k))={Δρlϕ(i)(i>0)π(Δρ2)2(i=0) respectively.

Given a scalar field f(ρ,ϕ,z) over cylindrical coordinates, f will be approximated by the node based function fapprox:๐’ฉโ„. Function fapprox is defined by fapprox(n(i,j,k))=f(iΔρ,jΔϕ,kΔz) for each (i,j,k)I1.

Given a vector field ๐…(ρ,ϕ,z)=Fρ(ρ,ϕ,z)ρ^+Fϕ(ρ,ϕ,z)ϕ^+Fz(ρ,ϕ,z)๐ณ^ over cylindrical coordinates, ๐… will be approximated by the edge based function Fapprox:โ„ฐโ„. Function Fapprox is defined by:

(i,j,k)I2:Fapprox(eρ,(i,j,k))={Fρ(iΔρ,jΔϕ,kΔz)(i>0)limρ0+Fρ(ρ,jΔϕ,kΔz)(i=0)

(i,j,k)I0:Fapprox(eϕ,(i,j,k))=Fϕ(iΔρ,jΔϕ,kΔz)

(i,j,k)I1:Fapprox(ez,(i,j,k))=Fz(iΔρ,jΔϕ,kΔz)

Model of Spherical coordinates

A directed graph that models the spherical coordinate system. The image is a cross-section that contains the vertical/z axis, which is "up" in the image.

The discrete model used for Spherical coordinates will consist of an infinite 3 dimensional spherical grid of nodes that spans โ„3. To establish the model, the following is needed:

  • A spacing Δr for the coordinate r.
  • A large positive integer Nθ that will yield a spacing Δθ=πNθ for the coordinate θ.
  • A large positive integer Nϕ that will yield a spacing Δϕ=2πNϕ for the coordinate ϕ.

Each node n๐’ฉ will correspond to a unique triplet (i,j,k) of integers, and will be denoted by n(i,j,k). The spherical coordinate denoted by n(i,j,k) will be ω0(n(i,j,k))=(iΔr,jΔθ,kΔϕ).

Clearly, due to the nature of spherical coordinates (such as the fact that coordinate ϕ is cyclical), not every triplet (i,j,k) will be allowed. The following three domains will be defined: In, Ir, Iθ, and Iϕ.

(i,j,k)In(i0and0jNθand0k<Nϕand(i=0j=0)and((j=0orj=Nθ)k=0))

(i,j,k)Ir(i0and0jNθand0k<Nϕand((j=0orj=Nθ)k=0))

(i,j,k)Iθ(i1and0j<Nθand0k<Nϕ)

(i,j,k)Iϕ(i1and0<j<Nθand0k<Nϕ)

There exists a node n(i,j,k) for each (i,j,k)In.

There exists an edge er,(i,j,k) for each (i,j,k)Ir such that t(er,(i,j,k))={n(i,j,k)(i>0)n(i,0,0)(i=0) and t(er,(i,j,k))=n(i+1,j,k)

There exists an edge eθ,(i,j,k) for each (i,j,k)Iθ such that t(eθ,(i,j,k))={n(i,j,k)(j>0)n(i,j,0)(j=0) and t(eθ,(i,j,k))={n(i,j+1,k)(j<Nθ1)n(i,j+1,0)(j=Nθ1)

There exists an edge eϕ,(i,j,k) for each (i,j,k)Iϕ such that t(eϕ,(i,j,k))=n(i,j,k) and t(eϕ,(i,j,k))={n(i,j,k+1)(k<Nϕ1)n(i,j,0)(k=Nϕ1)

Next, the volume of each node and the lengths and area of each edge will be calculated. To simplify notation, let lθ(ireal)=(irealΔr)Δθ for any nonnegative real number ireal, and let lϕ(ireal,jreal)=(irealΔr)sin(jrealΔθ)Δϕ for any nonnegative real number ireal and any real number jreal[0,Nθ].

For each (i,j,k)In the spherical coordinate that corresponds to n(i,j,k) is ω0(n(i,j,k))=(iΔr,jΔθ,kΔϕ), and the space (described using spherical coordinates) associated with n(i,j,k) is ω3(n(i,j,k))={[(i12)Δr,(i+12)Δr]×[(j12)Δθ,(j+12)Δθ]×[(k12)Δϕ,(k+12)Δϕ](i>0and0<j<Nθ)[(i12)Δr,(i+12)Δr]×[0,Δθ2]×[0,2π](i>0andj=0)[(i12)Δr,(i+12)Δr]×[πΔθ2,π]×[0,2π](i>0andj=Nθ)[0,Δr2]×[0,π]×[0,2π](i=0)

For each (i,j,k)In the volume of node n(i,j,k) is τ3(n(i,j,k)){Δrlθ(i)lϕ(i,j)(i>0and0<j<Nθ)Δrπ(12lθ(i))2(i>0and(j=0orj=Nθ))43π(Δr2)3(i=0)

For each (i,j,k)Ir the length and area of edge er,(i,j,k) is τ1(er,(i,j,k))=Δr and τ2(er,(i,j,k)){lθ(i+12)lϕ(i+12,j)(0<j<Nθ)π(12lθ(i+12))2(j=0orj=Nθ) respectively.

For each (i,j,k)Iθ the length and area of edge eθ,(i,j,k) is τ1(eθ,(i,j,k))lθ(i) and τ2(eθ,(i,j,k))Δrlϕ(i,j+12) respectively.

For each (i,j,k)Iϕ the length and area of edge eϕ,(i,j,k) is τ1(eϕ,(i,j,k))lϕ(i,j) and τ2(eϕ,(i,j,k))=Δrlθ(i) respectively.

Given a scalar field f(r,θ,ϕ) over spherical coordinates, f will be approximated by the node based function fapprox:๐’ฉโ„. Function fapprox is defined by fapprox(n(i,j,k))=f(iΔr,jΔθ,kΔϕ) for each (i,j,k)In.

Given a vector field ๐…(r,θ,ϕ)=Fr(r,θ,ϕ)๐ซ^+Fθ(r,θ,ϕ)θ^+Fϕ(r,θ,ϕ)ϕ^ over spherical coordinates, ๐… will be approximated by the edge based function Fapprox:โ„ฐโ„. Function Fapprox is defined by:

(i,j,k)Ir:Fapprox(er,(i,j,k))={Fr(iΔr,jΔθ,kΔϕ)(i>0)limr0+Fr(r,jΔθ,kΔϕ)(i=0)

(i,j,k)Iθ:Fapprox(eθ,(i,j,k))={Fθ(iΔr,jΔθ,kΔϕ)(j>0)limθ0+Fθ(iΔr,θ,kΔϕ)(j=0)

(i,j,k)Iϕ:Fapprox(eϕ,(i,j,k))=Fϕ(iΔr,jΔθ,kΔϕ)

Model of Curvilinear coordinates

A curvilinear coordinate system is a coordinate system such as cylindrical or spherical coordinates where the position may not follow a straight line as one of the coordinates is changed. To model an arbitrary curvilinear coordinate system in 3 dimensional space, let the coordinates be denoted by ξ1,ξ2,ξ3.

To avoid unnecessary repetition, the following notation will be used:

  • Given any number kโ„, and subset C{1,2,3}, then [k]C denotes the triple [k]C=({k(1C)0(1C),{k(2C)0(2C),{k(3C)0(3C))
  • Given any two triples of numbers (x1,x2,x3),(y1,y2,y3)โ„3, then (x1,x2,x3)+(y1,y2,y3)=(x1+y1,x2+y2,x3+y3)
  • Given any two triples of numbers (x1,x2,x3),(y1,y2,y3)โ„3, then (x1,x2,x3)(y1,y2,y3)=(x1y1,x2y2,x3y3)
  • Ξ=(ξ1,ξ2,ξ3) denotes an arbitrary curvilinear coordinate (ξ1,ξ2,ξ3).
  • ΔΞ=(Δξ1,Δξ2,Δξ3) denotes an arbitrary triplet of differences in the coordinates ξ1,ξ2,ξ3.

Let ω0(Ξ) denote the position given by coordinate Ξ=(ξ1,ξ2,ξ3). For each c=1,2,3, the rate of change in the position ω0(Ξ) at coordinate Ξ with respect to ξc is given by: ๐ฎξc(Ξ)=ω0ξc|Ξ. It will be assumed that ๐ฎξ1, ๐ฎξ2, and ๐ฎξ3 are all mutually perpendicular, which is the case for Cartesian, cylindrical, and spherical coordinates. In addition, for each c=1,2,3, vector ๐ฏξc(Ξ)=๐ฎξc(Ξ)|๐ฎξc(Ξ)| will also denote a unit length normalization of ๐ฎξc(Ξ).

For the purposes of simplicity, it will be assumed that the coordinates Ξ=(ξ1,ξ2,ξ3) can be any triple of real numbers. Singularities such as the z-axis in cylindrical and spherical coordinates will not be considered by this model. Since singularities are not considered, this model will be considerably simpler than the models given for cylindrical and spherical coordinates.

To model the curvilinear coordinate system, a lattice of nodes ๐’ฉ connected by directed edges โ„ฐ will be established:

Start by choosing "resolutions" for each coordinate ξ1,ξ2,ξ3 denoted by Δξ1,Δξ2,Δξ3. The quantities Δξ1,Δξ2,Δξ3 should all be strictly positive, and ideally should be as small as possible.

  • For each triplet of integer indices Iโ„ค3, a node nI๐’ฉ will be created at position ω0(nI)=ω0(IΔΞ).
  • For each c=1,2,3 and for each triplet of integer indices Iโ„ค3, there will exist edge eξc,Iโ„ฐ such that t(eξc,I)=nI and t(eξc,I)=nI+[1]c.
  • For each Iโ„ค3, the volume of node nI is τ3(nI)=c=13(Δξc|๐ฎξc(IΔΞ)|) =(c=13|๐ฎξc(IΔΞ)|)(c=13Δξc)
  • For each c=1,2,3 and Iโ„ค3, the length and area of edge eξc,I are τ1(eξc,I)=Δξc|๐ฎξc((I+[0.5]c)ΔΞ)| and τ2(eξc,I)=ccΔξc|๐ฎξc((I+[0.5]c)ΔΞ)| respectively.

Any node n๐’ฉ for which τ3(n)=0 should be deleted along with all connecting edges.

For any edge eโ„ฐ for which τ1(e)=0 and τ2(e)>0, then nodes t(e) and t(e) should be fused into a single node, and edge e should be discarded. For any edge eโ„ฐ for which τ2(e)=0 and τ1(e)>0, then edge e should be discarded. Either action may be pursued when τ1(e)=τ2(e)=0.

Given a scalar field f(Ξ) over the curvilinear coordinate system, f will be approximated by the node based function fapprox:๐’ฉโ„. Function fapprox is defined by fapprox(nI)=f(IΔΞ) for each Iโ„ค3.

Given a vector field ๐…(Ξ)=c=13Fξc(Ξ)๐ฏξc(Ξ) over the curvilinear coordinates, ๐… will be approximated by the edge based function Fapprox:โ„ฐโ„. Function Fapprox is defined by Fapprox(eξc,I)=Fξc((I+[0.5]c)ΔΞ) for each c=1,2,3 and for each Iโ„ค3.

Discrete analog to Integrals

Volume Integrals

Let U๐’ฉ denote an arbitrary volume. Given a node based function f, the "volume integral" of f over U is nUf(n)=nUf(n)τ3(n) (recall that τ3(n) is the volume of node n, and ω3(n) is the volume of space represented by n).

If node based function f:๐’ฉโ„ is an approximation of a scalar field fcontinuous:(n๐’ฉω3(n))โ„, where n๐’ฉ:f(n)=fcontinuous(ω0(n)), then nUf(n) is an approximation of the volume integral ๐ชnUω3(n)f(๐ช)dV.

Recall that U can be described via the node based function δ3(n;U)={1(nU)0(nU). This allows the expression nUf(n)=n๐’ฉf(n)δ3(n;U)τ3(n). If node based function g denotes a multi-volume, then ngf(n)=n๐’ฉf(n)g(n)τ3(n)=Σ๐’ฉ(f,g).

f most often denotes a density function, and ngf(n) denotes the total "mass" contained by multi-volume g. The equality ngf(n)=Σ๐’ฉ(f,g) means that if f is interpreted as a multi-point, then the total "mass" contained by g is the total intersection weight of f with g.

Path Integrals

Let P=(e1,s1),(e2,s2),...,(ek,sk) denote an arbitrary path. Given an edge based function f, the "path integral" of f along P is ePf(e)=i=1ksif(ei)τ1(ei) (recall that τ1(e) is the length of edge e, and ω1(e) is the curve represented by e).

If edge based function f:โ„ฐโ„ is an approximation of a vector field ๐…continuous:(n๐’ฉω3(n))โ„3, where eโ„ฐ:f(e)=๐…continuous(ω0(t(e)))ω0(t(e))ω0(t(e))|ω0(t(e))ω0(t(e))|, then ePf(e) is an approximation of the path integral ๐ชi=1ksiω1(ei)๐…(๐ช)d๐ช.

Recall that P can be described via the edge based function δ1(e;P)=i=1ksi{1/τ2(e)(e=ei)0(eei). This allows the expression ePf(e)=eโ„ฐf(e)δ1(e;P)τ2(e)τ1(e). If edge based function g denotes a multi-path, then egf(e)=eโ„ฐf(e)g(e)τ2(e)τ1(e)=Σโ„ฐ(g,f).

f most often denotes a rate of gain function, and egf(e) denotes the total "gain" caused by f along multi-path g. The equality egf(e)=Σโ„ฐ(g,f) means that if f is interpreted as a multi-surface, then the total "gain" generated along g is the total intersection weight of g with f.

Surface Integrals

Let S={(e1,s1),(e2,s2),...,(ek,sk)} denote an arbitrary surface. Given an edge based function f, the "surface integral" of f over S is eSf(e)=(e,s)Ssf(e)τ2(e) (recall that τ2(e) is the cross-sectional area of edge e, and ω2(e) is the surface which separates ω3(t(e)) and ω3(t(e))).

If edge based function f:โ„ฐโ„ is an approximation of a vector field ๐…continuous:(n๐’ฉω3(n))โ„3, where eโ„ฐ:f(e)=๐…continuous(ω0(t(e)))ω0(t(e))ω0(t(e))|ω0(t(e))ω0(t(e))|, then eSf(e) is an approximation of the surface integral ๐ช(e,s)Ssω2(e)๐…(๐ช)๐๐’.

Recall that S can be described via the edge based function δ2(e;S)={+1/τ1(e)((e,+1)S)1/τ1(e)((e,1)S)0(else). This allows the expression eSf(e)=eโ„ฐf(e)δ2(e;S)τ2(e)τ1(e). If edge based function g denotes a multi-surface, then egf(e)=eโ„ฐf(e)g(e)τ2(e)τ1(e)=Σโ„ฐ(f,g).

f most often denotes a flow density function, and egf(e) denotes the total "flow" through multi-surface g. The equality egf(e)=Σโ„ฐ(f,g) means that if f is interpreted as a multi-path, then the total "flow" through g is the total intersection weight of f with g.

Discrete analog to the Gradient

Computing the surfaces of volumes

Given an arbitrary multi-volume denoted by node based function f, the multi-surface which is the inwards oriented surface of the multi-volume is denoted by the edge based function g(e)=f|e. When traversing an arbitrary edge, the net number (positive - negative) of transitions through surfaces is the change in f.

Consider an arbitrary volume U๐’ฉ. The inwards oriented surface of U is a surface S defined by (e,+1)S(t(e)Uandt(e)U) and (e,1)S(t(e)Uandt(e)U). Volume U is denoted by the node based function δ3(n;U)={1(nU)0(nU). The inwards oriented surface S is denoted by the edge based function: δ2(e;S)={+1/τ1(e)((e,+1)S)1/τ1(e)((e,1)S)0(else) ={+1/τ1(e)(t(e)Uandt(e)U)1/τ1(e)(t(e)Uandt(e)U)0(else) =δ3(t(e);U)δ3(t(e);U)τ1(e)

More generally, if node based function f denotes a multi-volume, then the edge based function g(e)=f(t(e))f(t(e))τ1(e) is the inwards oriented multi-surface boundary of f. One required property of the inwards oriented multi-surface boundary is that it must obey linearity: meaning that if multi-volumes f1 and f2 have inwards oriented multi-surface boundaries g1 and g2 respectively, then the inwards oriented multi-surface boundary of f1+f2 is g1+g2. In addition, given an arbitrary coefficients c1,c2, the inwards oriented multi-surface boundary of c1f1+c2f2 is c1g1+c2g2. The definition g(e)=f(t(e))f(t(e))τ1(e) satisfies this linearity condition.

Given a node based function f, the "gradient" of f is the edge based function f. For all eโ„ฐ, f|e=f(t(e))f(t(e))τ1(e). The gradient denotes both the inwards oriented surface when f is treated as a multi-volume, and the rate of change in f along each edge e in the preferred direction when f is treated as a potential. Note that the gradient satisfies linearity as described above.

Computing potential differences from the gradient

The path integral along path P of the gradient of f is the difference in f between the endpoints. The value of f at each node is shown, and along the path the value of siτ1(ei)f|ei is shown at each edge. (the edge orientations are not shown for simplicity)

Let n0,n1๐’ฉ be two nodes that are linked by edge e. Let n1 be reached from n0 by traversing edge e in the direction specified by orientation s{+1,1}.

The difference in f between n0 and n1 is:

f(n1)f(n0)={f(t(e))f(t(e))(s=+1)f(t(e))f(t(e))(s=1)=s(f(t(e))f(t(e)))=sτ1(e)f(t(e))f(t(e))τ1(e)=sτ1(e)f|e

When given an arbitrary path P=(e1,s1),(e2,s2),...,(ek,sk) that begins at node n0 and ends at node n1, the difference in f between n0 and n1 can be computed by adding the differences along each edge:

f(n1)f(n0)=i=1ksiτ1(ei)f|ei=ePf|e

The equation ePf|e=f(n1)f(n0) is referred to as the "gradient theorem".

The following sections will demonstrate that the gradient defined for node based functions is consistent with the gradient for scalar fields in โ„3. This consistency will be shown for Cartesian, cylindrical, and spherical coordinates.

The Gradient in Various Coordinate Systems

All of Cartesian, cylindrical, and spherical coordinate systems will be modeled using the discrete model of curvilinear coordinates. The same shorthand notation will be used.

Starting with an arbitrary scalar field f(Ξ), the node based function that approximates f is fapprox(nI)=f(IΔΞ) for all Iโ„ค3.

For each c=1,2,3 and Iโ„ค3, the gradient along edge eξc,I is:

fapprox|eξc,I=fapprox(t(eξc,I))fapprox(t(eξc,I))τ1(eξc,I) =fapprox(nI+[1]c)fapprox(nI)Δξc|๐ฎξc(IΔΞ)| =f(IΔΞ+[Δξc]c)f(IΔΞ)Δξc|๐ฎξc((I+[0.5]c)ΔΞ)|

Given an arbitrary coordinate Ξ, let I(Ξ)โ„ค3 index the node nI(Ξ) whose position I(Ξ)ΔΞ is "closest" to Ξ.

The gradient of scalar field f is a vector quantity with components that are multiples of the basis vectors ๐ฏξ1,๐ฏξ2,๐ฏξ3. The coefficient of ๐ฏξ1 is the gradient of fapprox along edges that are parallel to ๐ฏξ1, and similarly for ๐ฏξ2 and ๐ฏξ3. The fact that ๐ฏξ1, ๐ฏξ2, and ๐ฏξ3 are of unit length and mutually orthogonal (perpendicular) is important.

The gradient of scalar field f at Ξ can now be approximated by the following:

f|Ξc=13fapprox|eξc,I(Ξ)๐ฏξc(I(Ξ)ΔΞ) =c=13f(I(Ξ)ΔΞ+[Δξc]c)f(I(Ξ)ΔΞ)Δξc|๐ฎξc((I(Ξ)+[0.5]c)ΔΞ)|๐ฏξc(I(Ξ)ΔΞ) c=13f(Ξ+[Δξc]c)f(Ξ)Δξc|๐ฎξc(Ξ)|๐ฏξc(Ξ)

As Δξ1,Δξ2,Δξ30+, it becomes apparent that f|Ξ=c=131|๐ฎξc(Ξ)|fξc|Ξ๐ฏξc(Ξ).

The Gradient in Cartesian Coordinates

Applying the curvilinear coordinate model to Cartesian coordinates means that ξ1=x, ξ2=y, and ξ3=z. It is also the case that ๐ฎx(x,y,z)=๐ข, ๐ฎy(x,y,z)=๐ฃ, and ๐ฎz(x,y,z)=๐ค. Applying the formula for the gradient that was derived from the discrete model of curvilinear coordinates gives:

f|(x,y,z)=11fx|(x,y,z)๐ข+11fy|(x,y,z)๐ฃ+11fz|(x,y,z)๐ค =fx๐ข+fy๐ฃ+fz๐ค

which is consistent with the formula for the gradient derived for continuous functions over Cartesian coordinates.

The Gradient in Cylindrical Coordinates

Applying the curvilinear coordinate model to cylindrical coordinates means that ξ1=ρ, ξ2=ϕ, and ξ3=z. It is also the case that ๐ฎρ(ρ,ϕ,z)=ρ^, ๐ฎϕ(ρ,ϕ,z)=ρϕ^, and ๐ฎz(ρ,ϕ,z)=๐ณ^. Applying the formula for the gradient that was derived from the discrete model of curvilinear coordinates gives:

f|(ρ,ϕ,z)=11fρ|(ρ,ϕ,z)ρ^+1ρfϕ|(ρ,ϕ,z)ϕ^+11fz|(ρ,ϕ,z)๐ณ^ =fρρ^+1ρfϕϕ^+fz๐ณ^

which is consistent with the formula for the gradient derived for continuous functions over cylindrical coordinates.

The Gradient in Spherical Coordinates

Applying the curvilinear coordinate model to spherical coordinates means that ξ1=r, ξ2=θ, and ξ3=ϕ. It is also the case that ๐ฎr(r,θ,ϕ)=๐ซ^, ๐ฎθ(r,θ,ϕ)=rθ^, and ๐ฎϕ(r,θ,ϕ)=rsinθϕ^. Applying the formula for the gradient that was derived from the discrete model of curvilinear coordinates gives:

f|(r,θ,ϕ)=11fr|(r,θ,ϕ)๐ซ^+1rfθ|(r,θ,ϕ)θ^+1rsinθfϕ|(r,θ,ϕ)ϕ^ =fr๐ซ^+1rfθθ^+1rsinθfϕϕ^

which is consistent with the formula for the gradient derived for continuous functions over spherical coordinates.

Discrete analog to the Divergence

Flow generation density

When an edge based function is depicted as a superposition of paths, the divergence denotes the starting point density minus the end point density. In this image, the flow is depicted using the brown arrows along each edge. More arrows means more flow. The numbers indicate the total flow generation at each node, which is also the net starting point weight.

If the edge based function f:โ„ฐโ„ denotes the "flow density" across each edge, then for an arbitrary edge eโ„ฐ, the total flow across e in the preferred direction is τ2(e)f(e). For an arbitrary node n๐’ฉ, the total flow being generated at node n is eโ„ฐ{+τ2(e)f(e)(t(e)=nandt(e)n)τ2(e)f(e)(t(e)=nandt(e)n)0(else). The "flow generation density" or "divergence" at node n is:

f|n=1τ3(n)eโ„ฐ{+τ2(e)f(e)(t(e)=nandt(e)n)τ2(e)f(e)(t(e)=nandt(e)n)0(else)

Using a similar argument, given a multi-path denoted by edge based function f:โ„ฐโ„, then for an arbitrary edge eโ„ฐ, the total "path weight" that traverses e in the preferred direction is τ2(e)f(e) (recall that f(e) is the path weight per unit thickness of e). The total "path weight" that is "left behind" at an arbitrary node n๐’ฉ is eโ„ฐ{+τ2(e)f(e)(t(e)=nandt(e)n)τ2(e)f(e)(t(e)=nandt(e)n)0(else). The path weight that is left behind is the starting point weight minus the ending point weight, no matter how multi-path f is decomposed into a superposition of paths. The starting point weight minus the ending point weight is the "net starting point weight". By diffusing the net starting point weight over the volume of node n, the node based function that denotes the "net starting point" is derived. This is the divergence f.

It is a relatively simple matter to show that for an a simple path P that starts at node n0 and ends at node n1, that δ1(P)=δ0(n0)δ0(n1) due to the fact that only the end points of P may have a non-zero starting point weight. δ0(n0)δ0(n1) is a node based function that denotes the superposition of the starting node of P with the final node of P with respective weights of +1 and 1.

The divergence theorem

A depiction of the discrete analog of Gauss's divergence theorem. The rate (τ2(e)f(e)) and direction of the flow along each edge is shown by the number and direction of the arrows, and each node is labeled with the rate of flow generation (τ3(n)(f|n)). A net flow of -4 is flowing out from the highlighted boundary, and the total flow generation contributed by the nodes inside the boundary is also -4.

Let U๐’ฉ denote an arbitrary volume, and let S={(e,+1)|eโ„ฐandt(e)Uandt(e)U}{(e,1)|eโ„ฐandt(e)Uandt(e)U} denote the outwards oriented surface of U.

The total flow generation inside U is:

nUf|n=nU(f|n)τ3(n) =nUeโ„ฐ{+τ2(e)f(e)(t(e)=nandt(e)n)τ2(e)f(e)(t(e)=nandt(e)n)0(else) =eโ„ฐnU{+τ2(e)f(e)(t(e)=nandt(e)n)τ2(e)f(e)(t(e)=nandt(e)n)0(else) =eโ„ฐ{+τ2(e)f(e)(t(e)Uandt(e)U)τ2(e)f(e)(t(e)Uandt(e)U)0(else) =eโ„ฐτ2(e)f(e){+1((e,+1)S)1((e,1)S)0(else) =(e,s)Ssf(e)τ2(e) =eSf(e)

The total flow generated inside U is the total outwards flow through S: nUf|n=eSf(e). This is the discrete analog to Gauss's Divergence Theorem.

Given an arbitrary multi-volume and a multi-path, the net intersection weight of the path's net starting point with the volume is equal to the net intersection weight of the path with the volume's outwards oriented surface. In this case the net intersection is 3.

Interpreting f as a multi-path, and f as the net starting point of f, then Gauss's Divergence Theorem can be expressed as: Σ๐’ฉ(f,δ3(U))=Σโ„ฐ(f,δ2(S)). Due to the fact that S is the outwards oriented surface of U, it must be the case that δ2(S)=δ3(U), since δ3(U) is the inwards oriented surface of U. This gives:

Σ๐’ฉ(f,δ3(U))=Σโ„ฐ(f,δ3(U))

Replacing U with a multi-volume g gives the generalization:

Σ๐’ฉ(f,g)=Σโ„ฐ(f,g)

This equation can be interpreted as follows: The total intersection of the net starting point of multi-path f with multi-volume g is the net intersection of f with the outwards oriented surface of g.

It should also be noted that the equation can be reformatted to read as:

efg|e=Σ๐’ฉ(f,g)

When f is a simple path P that starts at node n0 and ends at node n1, the above equation reduces to the gradient theorem:

ePg|e=g(n1)g(n0)

The gradient theorem and Gauss's Divergence Theorem are therefore equivalent with the general form: Σ๐’ฉ(f,g)=Σโ„ฐ(f,g).

The following sections will demonstrate that the divergence defined for edge based functions is consistent with the divergence for vector fields in โ„3. This consistency will be shown for Cartesian, cylindrical, and spherical coordinates.

The Divergence in Various Coordinate Systems

All of Cartesian, cylindrical, and spherical coordinate systems will be modeled using the discrete model of curvilinear coordinates. The same shorthand notation will be used.

Starting with an arbitrary vector field ๐…(Ξ)=c=13Fξc(Ξ)๐ฏξc(Ξ), the edge based function that approximates ๐… is Fapprox(eξc,I)=Fξc((I+[0.5]c)ΔΞ) for all c=1,2,3 and Iโ„ค3.

For each Iโ„ค3, the divergence at node nI is:

Fapprox|nI=1τ3(nI)eโ„ฐ{+τ2(e)Fapprox(e)(t(e)=nIandt(e)nI)τ2(e)Fapprox(e)(t(e)=nIandt(e)nI)0(else) =1c=13Δξc|๐ฎξc(IΔΞ)|c=13(τ2(eξc,I)Fapprox(eξc,I)τ2(eξc,I[1]c)Fapprox(eξc,I[1]c)) =1c=13Δξc|๐ฎξc(IΔΞ)|c=13((ccΔξc|๐ฎξc(IΔΞ+[0.5Δξc]c)|)Fξc(IΔΞ+[0.5Δξc]c)(ccΔξc|๐ฎξc(IΔΞ[0.5Δξc]c)|)Fξc(IΔΞ[0.5Δξc]c))

Given an arbitrary coordinate Ξ, let I(Ξ)โ„ค3 index the node nI(Ξ) whose position I(Ξ)ΔΞ is "closest" to Ξ.

The divergence of vector field ๐… at Ξ can now be approximated by the following:

๐…|ΞFapprox|nI(Ξ)

=1c=13Δξc|๐ฎξc(I(Ξ)ΔΞ)|c=13((ccΔξc|๐ฎξc(I(Ξ)ΔΞ+[0.5Δξc]c)|)Fξc(I(Ξ)ΔΞ+[0.5Δξc]c) (ccΔξc|๐ฎξc(I(Ξ)ΔΞ[0.5Δξc]c)|)Fξc(I(Ξ)ΔΞ[0.5Δξc]c))

1c=13Δξc|๐ฎξc(Ξ)|c=13((ccΔξc|๐ฎξc(Ξ+[0.5Δξc]c)|)Fξc(Ξ+[0.5Δξc]c)(ccΔξc|๐ฎξc(Ξ[0.5Δξc]c)|)Fξc(Ξ[0.5Δξc]c)) =1c=13|๐ฎξc(Ξ)|c=131Δξc((cc|๐ฎξc(Ξ+[0.5Δξc]c)|)Fξc(Ξ+[0.5Δξc]c)(cc|๐ฎξc(Ξ[0.5Δξc]c)|)Fξc(Ξ[0.5Δξc]c))

As Δξ1,Δξ2,Δξ30+, it becomes apparent that ๐…|Ξ=1c=13|๐ฎξc(Ξ)|c=13ξc((cc|๐ฎξc(Ξ)|)Fξc(Ξ))|Ξ

The Divergence in Cartesian Coordinates

Applying the curvilinear coordinate model to Cartesian coordinates means that ξ1=x, ξ2=y, and ξ3=z. It is also the case that ๐ฎx(x,y,z)=๐ข, ๐ฎy(x,y,z)=๐ฃ, and ๐ฎz(x,y,z)=๐ค. Applying the formula for the divergence that was derived from the discrete model of curvilinear coordinates to vector field ๐…=Fx๐ข+Fy๐ฃ+Fz๐ค gives:

๐…|(x,y,z)=1111(x(11Fx)|(x,y,z)+y(11Fy)|(x,y,z)+z(11Fz)|(x,y,z)) =Fxx+Fyy+Fzz

which is consistent with the formula for the divergence derived for continuous vector fields over Cartesian coordinates.

The Divergence in Cylindrical Coordinates

Applying the curvilinear coordinate model to cylindrical coordinates means that ξ1=ρ, ξ2=ϕ, and ξ3=z. It is also the case that ๐ฎρ(ρ,ϕ,z)=ρ^, ๐ฎϕ(ρ,ϕ,z)=ρϕ^, and ๐ฎz(ρ,ϕ,z)=๐ณ^. Applying the formula for the divergence that was derived from the discrete model of curvilinear coordinates to vector field ๐…=Fρρ^+Fϕϕ^+Fz๐ณ^ gives:

๐…|(ρ,ϕ,z)=11ρ1(ρ(ρ1Fρ)|(ρ,ϕ,z)+ϕ(11Fϕ)|(ρ,ϕ,z)+z(1ρFz)|(ρ,ϕ,z)) =1ρρ(ρFρ)+1ρFϕϕ+Fzz

which is consistent with the formula for the divergence derived for continuous vector fields over cylindrical coordinates.

The Divergence in Spherical Coordinates

Applying the curvilinear coordinate model to spherical coordinates means that ξ1=r, ξ2=θ, and ξ3=ϕ. It is also the case that ๐ฎr(r,θ,ϕ)=๐ซ^, ๐ฎθ(r,θ,ϕ)=rθ^, and ๐ฎϕ(r,θ,ϕ)=rsinθϕ^. Applying the formula for the divergence that was derived from the discrete model of curvilinear coordinates to vector field ๐…=Fr๐ซ^+Fθθ^+Fϕϕ^ gives:

๐…|(r,θ,ϕ)=11rrsinθ(r(rrsinθFr)|(r,θ,ϕ)+θ(1rsinθFθ)|(r,θ,ϕ)+ϕ(1rFϕ)|(r,θ,ϕ)) =1r2r(r2Fr)+1rsinθθ(sinθFθ)+1rsinθFϕϕ

which is consistent with the formula for the divergence derived for continuous vector fields over spherical coordinates.

Discrete analog to the Curl

Loops

Consider an arbitrary path P=(e1,s1),(e2,s2),,(ek,sk) that begins and finishes on the same node. P is a closed loop, and the edge based function δ1(e;P) that denotes P satisfies δ1(e;P)|n=0 for all nodes n๐’ฉ. The divergence-free property of δ1(e;P) arises from the fact that closed loops have no starting or ending points and leave every node that they enter.

A divergence-free edge based function is a superposition of closed loops.
A directed graph with a set of basis loops highlighted in different colors.

A multi-loop is a superposition of loops, and any edge-based function that denotes a multi-loop is divergence-free. Moreover, any edge-based function that is divergence free can be expressed as a superposition of closed loops and hence denotes a multi-loop.

Given an arbitrary graph ๐’ข, a set of "basis" loops can be formed such that every multi-loop can be expressed as a unique linear superposition of the basis loops. A set of basis loops provides a means of expressing an arbitrary multi-loop as a list of coefficients. Each coefficient is a weight that is assigned to each basis loop. When the basis loops are multiplied by their respective weights and added together, the multi-loop that is represented by the list of coefficients is retrieved.

The set of all edge based functions is a vector space with dimension |โ„ฐ|, and each edge based function is a vector whose entries are the list of values assigned to each edge. The set of all multi-loops is a subspace of the set of all edge based functions, and each multi-loop can be interpreted as a vector that is a linear combination of the loops from a set of basis loops.

Three approaches for generating a set โ„ฌ of basis loops for an arbitrary graph ๐’ข will now be given:

To start, the following definitions are required:

  • A path component of graph ๐’ข is an "island" of ๐’ข where any two nodes on the island can be linked by a continuous path, and any edge that is connected to a node in the path component is part of the same component and vice versa.
  • A bridge is an edge that when removed breaks its host path component into two path components.
  • An arc, also referred to as a simple path, is a path where with the exception of the start and end nodes does not visit or traverse the same node or edge more than once.
  • A simple loop is a closed loop that does visit a node or edge twice on the same cycle.
  • A tree is a graph where any two nodes can be linked by exactly one simple path.
  • A spanning tree is a sub-graph of a path component ๐’ข that is both a tree and which includes every node from ๐’ข.

Generating Basis Loops Approach 1:

A depiction of how approach 1 generates basis loops by repeatedly including arcs. The original loop is shown in red, and successive colors add each arc.

To start, all edges that are "bridges" should be removed. After all bridges have been removed, any nodes that are not connected to any edges and are themselves path components are themselves removed. Let ๐’ข1,๐’ข2,...,๐’ขk denote the resultant path components of ๐’ข. Let the set of basis loops โ„ฌ start out empty. Let N(โ„ฌ) denote the set of nodes visited by the loops from โ„ฌ. Let E(โ„ฌ) denote the set of edges that are traversed by loops from โ„ฌ.

The following steps are now repeated for each path component ๐’ขi for each i=1,2,...,k:

Start by choosing an arbitrary simple loop P from ๐’ขi. Add loop P to โ„ฌ. For as long as there are nodes or edges in ๐’ขi that are not contained by N(โ„ฌ) or E(โ„ฌ), find an arc P that starts and ends at nodes from N(โ„ฌ). With the exception of the starting and ending nodes, arc P must not visit a node or edge from N(โ„ฌ) or E(โ„ฌ). The end nodes of P can be linked by a path through the nodes and edges from N(โ„ฌ) and E(โ„ฌ) to form a simple loop P that is then added to โ„ฌ.

The above process forms a set โ„ฌ of basis loops for ๐’ข.

Let H denote the number of path components of ๐’ข. As bridges and single nodes are removed from ๐’ข, the quantity |โ„ฐ||๐’ฉ|+H remains constant. After all bridges and single nodes have been removed, path component ๐’ขi yields EiNi+1 basis loops where Ni and Ei are the number of nodes and edges from ๐’ขi respectively. The total number of basis loops is therefore |โ„ฐ||๐’ฉ|+H. The vector space of multi-loops has |โ„ฐ||๐’ฉ|+H dimensions.

Generating Basis Loops Approach 2:

A depiction of how approach 2 generates basis loops by using a spanning tree. The solid edges are included in the spanning tree. Each dashed edge corresponds to a basis loop formed from the dashed edge and the unique path through the spanning tree.

Let ๐’ข1,๐’ข2,...,๐’ขH denote the path components of graph ๐’ข. H is the number of path components of ๐’ข. For each i=1,2,...,H, let ๐’ขT,i denote a "spanning tree" for path component ๐’ขi. Each edge e from ๐’ขi that is not part of the spanning tree ๐’ขT,i corresponds to a basis loop. This basis loop is formed from edge e and the unique arc that connects the end points of e through the spanning tree ๐’ขT,i.

For path component ๐’ขi, let Ni and Ei respectively denote the number of nodes and edges from ๐’ขi. The spanning tree ๐’ขT,i contains Ni1 edges, so EiNi+1 edges from ๐’ขi are not part of the spanning tree, and hence correspond to basis loops. The total number of basis loops from ๐’ข is i=1H(EiNi+1)=|โ„ฐ||๐’ฉ|+H.

Generating Basis Loops Approach 3:

A third approach to generating a set of basis loops for graph ๐’ข proceeds by identifying the loops that pass through each node. To start, the set of nodes ๐’ฉ is ordered to form ๐’ฉ={n1,n2,,n|๐’ฉ|}.

For each node ni, a set of basis loops is assigned to ni. These basis loops are confined to the nodes {ni,ni+1,,n|๐’ฉ|} and are required to pass through ni. These loops will be chosen such that no nonzero linear superposition of these loops will result in an edge based function where all edges that connect to ni are assigned 0.

Each edge eโ„ฐ has 2 endings: t(e) and t(e). With respect to node ni, let Ti denote the set of all edge endings that connect to ni, excluding any edges that connect to nodes from {n1,n2,,ni1}. The set Ti can now be partitioned into subsets according to the following equivalence relation: two edge endings t1,t2Ti belong to the same partition if and only if there exists a simple loop that is confined to the nodes {ni,ni+1,,n|๐’ฉ|} and that visits node ni exactly once, arriving through t1 or t2 and leaving through the other ending. Let Ti=Ui,1Ui,2Ui,ki denote the partitioning of Ti.

For each partition Ui,j, choose an ending ti,jUi,j that will serve as the "prime ending". Each other ending t from Ui,j will correspond to a basis loop that leaves ni through t and returns to ni through ti,j, never visiting any nodes from {n1,n2,,ni1}.

For each i=1,2,...,|๐’ฉ| and j=1,2,...,ki, each ending from Ui,j{ti,j} corresponds to exactly 1 basis loop. Each edge eโ„ฐ will contribute at most 1 ending to the total set S=i=1|๐’ฉ|j=1ki(Ui,j{ti,j}), including edges that start and end on the same node. To count the number of basis loops, it is necessary to count the number F of edges that do not contribute any endings to S. These edges are the edges that contain a "prime ending" ti,j and do not begin and end on the same node.

To determine F, let ๐’ขi denote graph ๐’ข where the nodes {n1,n2,,ni1} and any connected edges have been removed. Hi will denote the number of path components of ๐’ขi. H1=H where H is the number of path components of ๐’ข, and H|๐’ฉ|=1. Start with ๐’ขi+1 and reintroduce node ni and any connected edges to restore ๐’ขi. Introducing ni creates a new path component. Connecting ni to a disconnected path component via an edge will reduce the number of path components by 1, but will also create an edge that contains a prime ending. Connecting ni to an already connected path component via an edge will not change the number of path components, nor create an edge with a prime ending. The number of prime endings that are connected to node ni not counting edges that start and end on ni is Hi+1Hi+1 (the +1 compensates for the path component that ni introduces by default).

F=i=1|๐’ฉ|1(Hi+1Hi+1)=(H|๐’ฉ|H1)+(|๐’ฉ|1)=(1H)+(|๐’ฉ|1)=|๐’ฉ|H

so the number of basis loops is |โ„ฐ|F=|โ„ฐ||๐’ฉ|+H which is in agreement with the other approaches.

Surfaces

Given an arbitrary oriented closed surface and an arbitrary oriented closed path, this image demonstrates how the number of times the path leaves the surface is equal to the number of times the path enters the surface.

Consider an arbitrary surface S={(e1,s1),(e2,s2),...,(ek,sk)}. Surface S is "closed" if it has the following property: any path P that is also closed must cross surface S in the preferred direction and against the preferred direction an equal number of times. In mathematical terms, this means that given any closed path P that Σโ„ฐ(P,S)=ePδ2(e;S)=eSδ1(e;P)=eโ„ฐδ1(e;P)δ2(e;S)τ2(e)τ1(e)=0.

Any conservative edge based function (denoted by arrows in this image) is the superposition of closed surfaces (denoted by the dashed lines).

An edge based function f is "conservative" if any path integral of f along an arbitrary closed path P is 0: ePf(e)=0. In a similar manner to how any divergence free edge based function denotes a multi-loop, any conservative edge based function denotes a "multi-closed surface", which is the superposition of any number of closed surfaces.

An example of multiple surfaces sharing the same boundary.

A surface that is not closed is said to have a "boundary". Non-closed surfaces that share a common boundary can be grouped into "equivalence classes" and treated as though they are identical. It is relatively simple to observe that if surfaces S1 and S2 share a common boundary then the surface denoted by the edge based function δ2(e;S1)δ2(e;S2) is a closed surface since surfaces S1 and S2 form the two halves of a "clam shell" that when added form a closed surface (S2 is S2 with the orientation reversed). The edge based function δ2(e;S1)δ2(e;S2) is therefore conservative. The difference between edge based functions that denote multi-surfaces with a common boundary denotes a multi-closed surface, and is hence conservative. If edge based function f denotes an arbitrary multi-surface, then when given any conservative edge based function g, the edge based function f+g denotes a multi-surface with the same boundary as f.

Given an arbitrary edge based function f that denotes a multi-surface, f will denote the boundary of f, and ๐”…[f] will denote the set of all edge based functions that have the same boundary as f. For any edge based function g, g=f if and only if g๐”…[f]. Moreover, g=f if and only if gf is conservative.

Multi-surfaces, and their corresponding edge based functions, that all share a common boundary will be grouped into a single "equivalence class" and treated as if they are identical. An edge based function f "represents" its equivalence class ๐”…[f]. An equivalence class ๐”… effectively denotes the common boundary shared by all surfaces f๐”…, and will be referred to as a "boundary".

The property of an edge based function being conservative is linear, which means that given conservative edge based functions f and g and coefficients c and d, it will be the case that the linear superposition cf+dg is also conservative. The linearity of being conservative implies that: given edge based functions f1,f2 and g1,g2 where f1=f2 and g1=g2, then (cf1+dg1)=(cf2+dg2) for any coefficients c,d. The previous property implies that the linear superposition of boundaries ๐”…1 and ๐”…2 can be performed unambiguously by choosing "representative" surfaces f๐”…1 and g๐”…2 and generating a surface cf+dg that represents the linear superposition c๐”…1+d๐”…2.

The set of all conservative edge based functions (the set of all closed surfaces) is a vector space, and the set of all equivalence classes/boundaries is a vector space.

A set of basis closed surfaces can be generated by the following simple process: Let ๐’ข1,๐’ข2,...,๐’ขH denote the path components of ๐’ข. For each i=1,2,...,H, a set of basis closed surfaces for path component ๐’ขi can be produced by wrapping each node except for 1 in a basis surface as shown below. Any "bubble" can be generated by adding the bubbles that individually wrap each node inside the bubble. A surface that only wraps the remaining node can be generated by adding all of the bubbles that wrap the other nodes in the path component, and then reversing the orientation. The number of basis closed surfaces is Ni1 where Ni is the number of nodes from path component ๐’ขi. The total number of basis closed surfaces for graph ๐’ข is i=1H(Ni1)=|๐’ฉ|H.

A set of basis equivalence classes/boundaries can be generated by the following simple process: Let ๐’ข1,๐’ข2,...,๐’ขH denote the path components of ๐’ข. For each i=1,2,...,H, let ๐’ขT,i denote a "spanning tree" for path component ๐’ขi. Each edge e from ๐’ขi that is not part of the spanning tree ๐’ขT,i corresponds to a basis equivalence class which consists of all edge based functions that can be formed by adding a conservative edge based function to the edge based function that is 1 only at edge e and 0 for all other edges. The number of basis equivalence classes for path component ๐’ขi is Ei(Ni1) where Ni and Ei are the number of nodes and edges from path component ๐’ขi respectively. Ni1 is the number of edges from spanning tree ๐’ขT,i. The total number of basis equivalence classes is i=1H(EiNi+1)=|โ„ฐ||๐’ฉ|+H. This is the same as the number of basis closed loops.

The fact that the previously mentioned set of basis of equivalence classes is in fact a basis, which means that every equivalence class is a unique linear superposition of the basis equivalence classes, can be confirmed by the following observations: Let f be an arbitrary edge based function. A conservative edge based function g can be created by letting g=f for all edges that are in the spanning trees, and choosing values for g at the edges that are not in the spanning trees such that g is conservative. The difference fg is 0 for all edges in the spanning trees. The coefficients for each basis equivalence class are the values that fg attains at each non spanning tree edge. Moreover, any non-zero choice of coefficients for the basis equivalence classes will always create a non-conservative edge based function.

In the images below, the left image shows a set of basis closed surfaces, the middle image shows a set of basis non-closed surfaces, and the right image shows how any edge based function/surface (shown in blue) is the linear combination of basis non-closed surfaces plus a closed surface (shown in black).

Template:Gallery

Loop-Surface Duality

The number of dimensions of the set of multi-loops is |โ„ฐ||๐’ฉ|+H. The number of dimensions of the set of surface equivalence classes is also |โ„ฐ||๐’ฉ|+H. This equivalence implies that it is possible to form a bijective (one to one and onto) linear mapping between the set of multi-loops and surface equivalence classes. In simpler terms, any multi-loop corresponds to a unique equivalence class of surfaces, and any equivalence class of surfaces corresponds to a unique multi-loop. The correspondence is linear, which means that given multi-loops f1 and f2 which respectively correspond to equivalence classes ๐”…1 and ๐”…2, and coefficients c and d, then multi-loop cf1+df2 corresponds to equivalence class c๐”…1+d๐”…2.

Previously, when given a multi-surface denoted by edge based function g, the boundary of g was a hypothetical boundary assumed to be shared by all edge based functions whose difference with g was a conservative edge based function. The boundary g is now an edge based function that denotes the "counter-clockwise oriented boundary of g". Since the boundary of any surface is a loop, it will be required that g is a multi-loop: (g)=0. Mapping each surface to its boundary should also be linear: given surfaces g1,g2 and coefficients c,d, then (cg1+dg2)=cg1+dg2.

The bijective linear mapping between the set of multi-loops and surface equivalence classes maps each multi-loop f to the equivalence class of surfaces which have f as their common boundary.

A path is shown intersecting a surface multiple times. The boundary of the surface has a counter-clockwise orientation. The net number of times that the surface is crossed in the preferred direction is N = +1-1+1+1+1 = 3

Given path P=(eP,1,sP,1),(eP,2,sP,2),...,(eP,kP,sP,kP) and surface S={(eS,1,sS,1),(eS,2,sS,2),...,(eS,kS,sS,kS)}, the net number of times that path P intersects surface S in the preferred direction is Σโ„ฐ(P,S)=i=1kPj=1kS{sP,isS,j(eP,i=eS,j)0(eP,ieS,j)=eโ„ฐδ1(e;P)δ2(e;S)τ2(e)τ1(e)=ePδ2(e;S)=eSδ1(e;P). This formula generalizes to edge based functions that denote multi-paths and multi-surfaces. Given edge based function f that denotes a multi-path and edge based function g that denotes a multi-surface, then the net number of times f intersects g in the preferred direction is Σโ„ฐ(f,g)=eโ„ฐf(e)g(e)τ2(e)τ1(e)=efg(e)=egf(e).

It is also important to note that Σโ„ฐ(f,g) is linear with respect to f and g: Σโ„ฐ(cf1+df2,g)=cΣโ„ฐ(f1,g)+dΣโ„ฐ(f2,g) and Σโ„ฐ(f,cg1+dg2)=cΣโ„ฐ(f,g1)+dΣโ„ฐ(f,g2). It is also important to note that if f is a multi-loop, and g is a multi-closed surface (conservative), then Σโ„ฐ(f,g)=0. This latter property implies that given surfaces g1,g2 with a common boundary (g1=g2), then Σโ„ฐ(f,g1)=Σโ„ฐ(f,g2) since g2g1 is conservative.

Two surfaces, each with a counter-clockwise oriented boundary, are shown. The net number of times each boundary intersects the other surface is the same. The red boundary passes through the green surface in the preferred direction 2 times, and the green boundary passes through the red surface in the preferred direction 2 times.

One requirement of the mapping of a boundary to each surface equivalence class is that given multi-surfaces g1 and g2, the net number of times the counter clockwise oriented boundary g1 passes through g2 in the preferred direction is identical to the net number of times g2 passes through g1 in the preferred direction: eโ„ฐ(g1)|eg2(e)τ2(e)τ1(e)=Σโ„ฐ(g1,g2)=Σโ„ฐ(g2,g1)=eโ„ฐ(g2)|eg1(e)τ2(e)τ1(e). See the 2nd image on the right for an example of this property.

Since Σโ„ฐ(f,g) is linear with respect to f and g, and g is linear with respect to g, the condition Σโ„ฐ(g1,g2)=Σโ„ฐ(g2,g1) is linear with respect to g1 and g2:

Σโ„ฐ(g1,1,g2)=Σโ„ฐ(g2,g1,1)andΣโ„ฐ(g1,2,g2)=Σโ„ฐ(g2,g1,2)Σโ„ฐ((cg1,1+dg1,2),g2)=Σโ„ฐ(g2,cg1,1+dg1,2)
Σโ„ฐ(g1,g2,1)=Σโ„ฐ(g2,1,g1)andΣโ„ฐ(g1,g2,2)=Σโ„ฐ(g2,2,g1)Σโ„ฐ(g1,cg2,1+dg2,2)=Σโ„ฐ((cg2,1+dg2,2),g1)

Since the condition Σโ„ฐ(g1,g2)=Σโ„ฐ(g2,g1) is linear, mapping each multi-loop to the surface equivalence class that have the multi-loop as their common boundary is done by determining a set of basis multi-loops {f1,f2,...,f|โ„ฐ||๐’ฉ|+H} and a set of basis surface equivalence classes {๐”…[g1],๐”…[g2],...,๐”…[g|โ„ฐ||๐’ฉ|+H]} such that for all i,j{1,2,...,|โ„ฐ||๐’ฉ|+H}, it is the case that Σโ„ฐ(fi,gj)=Σโ„ฐ(fj,gi). For each i=1,2,...,|โ„ฐ||๐’ฉ|+H, ๐”…[gi] corresponds to fi and the rest of the mapping is determined via linearity. Given an arbitrary multi-surface g, expressing the equivalence class ๐”…[g] as a linear combination of basis surface equivalence classes: ๐”…[g]=i=1|โ„ฐ||๐’ฑ|+Hci๐”…[gi] means that g=i=1|โ„ฐ||๐’ฑ|+Hcifi.

One such choice of basis multi-loops and basis surface equivalence classes can be determined as follows: Let ๐’ข1,๐’ข2,...,๐’ขH denote the path components of ๐’ข. For each i=1,2,...,H, let ๐’ขT,i denote a "spanning tree" for path component ๐’ขi. Each edge e that is not part of any spanning tree corresponds to both a basis loop and a basis surface equivalence class. The basis loop fe is the loop that passes through edge e and the unique path through a spanning tree that links the endpoints of e. A surface ge that is part of the basis surface equivalence class is the surface that contains edge e alone. It is easy to check that Σโ„ฐ(fe,ge)=1, and when given different edges e and e, that Σโ„ฐ(fe,ge)=Σโ„ฐ(fe,ge)=0. This is only one example of a pair of a set of basis multi-loops and a set of basis surface equivalence classes (this example also does not make sense, as the prescribed boundary of each basis surface passes through the surface itself).

Example

This example will demonstrate the duality of loops and surfaces using an example from electrical engineering: two simple circuits that are magnetically linked to themselves and to each other.

Three images describing the scenario are shown below:

The left image depicts a circuit diagram that denotes the circuits that are the subject of this example. Each loop consists of a voltage source in series with a resistor, and a self inductance followed by a mutual inductance. At the bottom of the image, the "magnetic circuit" is shown. The magnetic circuit carries magnetic flux instead of electric current, and helps to quantify the self and mutual inductance between the two loops of current.
The center image depicts the orientation of the magnetic circuit relative to the electric circuit. As can be seen, the magnetic flux through the first loop is measured relative to "down", while the magnetic flux through the second loop is measured relative to "up".
The right image depicts the directed graph that model the electric circuit. The set of nodes is ๐’ฉ={n1,n2,n3,n4,n5,n6} and the set of edges is โ„ฐ={e1,e2,e3,e4,e5,e6,e7}.
The origin and terminal nodes of each edge are: (t(e1),t(e1))=(n1,n2); (t(e2),t(e2))=(n2,n1); (t(e3),t(e3))=(n3,n4); (t(e4),t(e4))=(n4,n3); (t(e5),t(e5))=(n5,n6); (t(e6),t(e6))=(n6,n5); and (t(e7),t(e7))=(n6,n5).
There are 4 basis loops: P1=(e1,+1),(e2,+1); P2=(e3,+1),(e4,+1); P3=(e5,+1),(e7,+1); and P4=(e7,1),(e6,+1). These loops are the respective counterclockwise boundaries of the following 4 surfaces: S1={(e5,+1)}; S2={(e6,+1)}; S3={(e2,+1)}; and S4={(e4,+1)}. It can be determined that the paths intersect the surfaces the following numbers of times:
Σโ„ฐ(P1,S1)=0 Σโ„ฐ(P1,S2)=0 Σโ„ฐ(P1,S3)=1 Σโ„ฐ(P1,S4)=0
Σโ„ฐ(P2,S1)=0 Σโ„ฐ(P2,S2)=0 Σโ„ฐ(P2,S3)=0 Σโ„ฐ(P2,S4)=1
Σโ„ฐ(P3,S1)=1 Σโ„ฐ(P3,S2)=0 Σโ„ฐ(P3,S3)=0 Σโ„ฐ(P3,S4)=0
Σโ„ฐ(P4,S1)=0 Σโ„ฐ(P4,S2)=1 Σโ„ฐ(P4,S3)=0 Σโ„ฐ(P4,S4)=0

Note that the above table is symmetric along its diagonal.

An electric and magnetic circuit that will be subject of this example.
The magnetic circuit is upright relative to the electric circuit. "Up" in the magnetic circuit protrudes from the page in the electric circuit.
A directed graph that will be used to model the electric and magnetic circuits, along with chosen basis loops and their corresponding surfaces.

The goal will be to derive expressions for the self inductances L1,L2, and the mutual inductance M1,2.

An edge based function B will denote the magnetic field density at each edge in the edge's preferred orientation.

A total current of I1 flows around loop P1. This current flows outwards through surface S3, so due to Ampere's law, the total path integral of B around P3 is eP3B(e)=μ0I1 (μ0=4π×107Tm/A is the magnetic permeability of free space). Therefore: τ1(e5)B(e5)+τ1(e7)B(e7)=μ0I1

A total current of I2 flows around loop P2. This current flows outwards through surface S4, so due to Ampere's law, the total path integral of B around P4 is eP4B(e)=μ0I2. Therefore: τ1(e6)B(e6)τ1(e7)B(e7)=μ0I2

The divergence of the magnetic field at any node is 0: B=0. Therefore: τ2(e5)B(e5)τ2(e6)B(e6)τ2(e7)B(e7)=0

The following equations describe the magnetic field which is present in the magnetic circuit:

τ1(e5)B(e5)+τ1(e7)B(e7)=μ0I1

τ1(e6)B(e6)τ1(e7)B(e7)=μ0I2

τ2(e5)B(e5)τ2(e6)B(e6)τ2(e7)B(e7)=0

Solving the above equations yields:

B(e5)=μ0(τ2(e6)τ1(e7)+τ1(e6)τ2(e7))I1+τ2(e6)τ1(e7)I2τ2(e5)τ1(e6)τ1(e7)+τ1(e5)τ2(e6)τ1(e7)+τ1(e5)τ1(e6)τ2(e7)

B(e6)=μ0τ2(e5)τ1(e7)I1+(τ2(e5)τ1(e7)+τ1(e5)τ2(e7))I2τ2(e5)τ1(e6)τ1(e7)+τ1(e5)τ2(e6)τ1(e7)+τ1(e5)τ1(e6)τ2(e7)

B(e7)=μ0τ2(e5)τ1(e6)I1τ1(e5)τ2(e6)I2τ2(e5)τ1(e6)τ1(e7)+τ1(e5)τ2(e6)τ1(e7)+τ1(e5)τ1(e6)τ2(e7)

The magnetic flux through the first loop (surface S1) is:

Φ1=τ2(e5)B(e5)=μ0(τ2(e5)τ2(e6)τ1(e7)+τ2(e5)τ1(e6)τ2(e7))I1+τ2(e5)τ2(e6)τ1(e7)I2τ2(e5)τ1(e6)τ1(e7)+τ1(e5)τ2(e6)τ1(e7)+τ1(e5)τ1(e6)τ2(e7)

The magnetic flux through the second loop (surface S2) is:

Φ2=τ2(e6)B(e6)=μ0τ2(e5)τ2(e6)τ1(e7)I1+(τ2(e5)τ2(e6)τ1(e7)+τ1(e5)τ2(e6)τ2(e7))I2τ2(e5)τ1(e6)τ1(e7)+τ1(e5)τ2(e6)τ1(e7)+τ1(e5)τ1(e6)τ2(e7)

This means that the self inductances of the first and second loop are respectively:

L1=μ0τ2(e5)τ2(e6)τ1(e7)+τ2(e5)τ1(e6)τ2(e7)τ2(e5)τ1(e6)τ1(e7)+τ1(e5)τ2(e6)τ1(e7)+τ1(e5)τ1(e6)τ2(e7) (the coefficient of I1 in the expression for Φ1)

and

L2=μ0τ2(e5)τ2(e6)τ1(e7)+τ1(e5)τ2(e6)τ2(e7)τ2(e5)τ1(e6)τ1(e7)+τ1(e5)τ2(e6)τ1(e7)+τ1(e5)τ1(e6)τ2(e7) (the coefficient of I2 in the expression for Φ2)

The mutual inductance is:

M1,2=μ0τ2(e5)τ2(e6)τ1(e7)τ2(e5)τ1(e6)τ1(e7)+τ1(e5)τ2(e6)τ1(e7)+τ1(e5)τ1(e6)τ2(e7) (the coefficient of I2 in the expression for Φ1, or the coefficient of I1 in the expression for Φ2)

The Curl

Circulation Density

Given an arbitrary edge based rate-of-gain function f, and an arbitrary multi-loop P (P|n=0), the "circulation" of f around P is ePf(e)=eโ„ฐf(e)P(e)τ2(e)τ1(e). With f fixed, the circulation is a linear function of P: ecP1+dP2f(e)=ceP1f(e)+deP2f(e).

A large loop can be decomposed into an ensemble of tiny loops.
A large loop can be decomposed into an ensemble of tiny loops.

As seen in the images to the right, a large loop can be decomposed into a sum of smaller loops, and since the circulation is linear with respect to the loop that is being followed, the total circulation around the large loop is simply the sum of the circulations around the little loops.

Each edge eโ„ฐ is its own little surface: {(e,+1)}, and any surface is a linear combination of these basis surfaces. Any surface S can be expressed as the following linear combination: eโ„ฐ:S(e)=eโ„ฐS(e)τ1(e)δ2(e;{(e,+1)}). The length term τ1(e) cancels out the factor of 1τ1(e) in δ2(e;{(e,+1)}). If the circulation of f around the counter clockwise boundary of each basis surface {(e,+1)} is computed, then the total circulation around the counter clockwise boundary of S can be computed via the same linear combination:

eSf(e)=eโ„ฐS(e)τ1(e)e({(e,+1)})f(e)

The circulation per unit area of surface {(e,+1)} is 1τ2(e)e({(e,+1)})f(e). This "circulation density" at edge e will be referred to as the "curl" and denoted by the edge based function ×f|e=1τ2(e)e({(e,+1)})f(e).

The total circulation around the counter clockwise boundary of S is eSf(e)=eโ„ฐS(e)τ1(e)e({(e,+1)})f(e)=eโ„ฐS(e)τ1(e)τ2(e)(×f|e)=eS×f|e. This is the discrete analog to Stokes' Theorem.

Computing the counter-clockwise boundary of a surface

The counter-clockwise boundary of the red surface is generated by the curl around each of the blue loops that wrap around the boundary.
Given an oriented surface, a cross-section of which is shown here, the circulation around a tiny loop is only non-zero at the boundaries. The curl is oriented in the direction of the counter-clockwise boundary.

Let S be an arbitrary multi-surface. Since S can be expressed as the linear combination eโ„ฐ:S(e)=eโ„ฐS(e)τ1(e)δ2(e;{(e,+1)}), the counterclockwise boundary S is the linear combination of boundaries: eโ„ฐ:S|e=eโ„ฐS(e)τ1(e)(({(e,+1)})|e).

Given arbitrary edges e1,e2โ„ฐ, it is the case that Σโ„ฐ(({(e1,+1)}),{(e2,+1)})=Σโ„ฐ(({(e2,+1)}),{(e1,+1)}) due to the requirement placed on the boundaries of surfaces. This restriction can also be expressed as: ({(e1,+1)})|e2τ2(e2)=({(e2,+1)})|e1τ2(e1).

The linear combination that describes S becomes:

eโ„ฐ:S|e=eโ„ฐS(e)τ1(e)(({(e,+1)})|e) =eโ„ฐS(e)τ1(e)τ2(e)(({(e,+1)})|eτ2(e)) =eโ„ฐS(e)τ1(e)τ2(e)(({(e,+1)})|eτ2(e)) =1τ2(e)eโ„ฐS(e)({(e,+1)})|eτ1(e)τ2(e) =1τ2(e)Σโ„ฐ(({(e,+1)}),S) =1τ2(e)e({(e,+1)})S(e) =×S|e

The counterclockwise boundary of multi-surface S is therefore the curl: ×S.

Stoke's theorem becomes:

e×Sf(e)=eS(×f)|e which is equivalent to: Σโ„ฐ(×S,f)=Σโ„ฐ(×f,S) which is an exact rephrasing of the condition Σโ„ฐ(S,f)=Σโ„ฐ(f,S).

The Curl in Various Coordinate Systems

All of Cartesian, cylindrical, and spherical coordinate systems will be modeled using the discrete model of curvilinear coordinates. The same shorthand notation will be used. However, the graph will be modified as follows:

Similar to the notation from the discrete model of curvilinear coordinates, the following notation will be used:

  • Given any c{1,2,3}, c+1={c+1(c{1,2})c2(c=3) and c+2={c+2(c=1)c1(c{2,3})
  • Given any number kโ„, then โ„ค+k denotes the set of integers where k has been added to each integer.
  • Given any number kโ„, and subset C{1,2,3}, then [k]C denotes the triple [k]C=({k(1C)0(1C),{k(2C)0(2C),{k(3C)0(3C))
  • Given any two triples of numbers (x1,x2,x3),(y1,y2,y3)โ„3, then (x1,x2,x3)+(y1,y2,y3)=(x1+y1,x2+y2,x3+y3)
  • Given any two triples of numbers (x1,x2,x3),(y1,y2,y3)โ„3, then (x1,x2,x3)(y1,y2,y3)=(x1y1,x2y2,x3y3)

After choosing a resolution for each coordinate: ΔΞ=(Δξ1,Δξ2,Δξ3), the graph ๐’ข=๐’ฉ,โ„ฐ has the following nodes and edges:

  • For each Iโ„ค3(โ„ค+0.5)3, there exists a node nI๐’ฉ at position ω0(nI)=ω0(IΔΞ). The volume of nI is τ3(nI)=c=13(Δξc|๐ฎξc(IΔΞ)|).
  • For each c=1,2,3 and Iโ„ค3(โ„ค+0.5)3, there exists an edge eξc,Iโ„ฐ such that t(eξc,I)=nI and t(eξc,I)=nI+[1]c. The length of eξc,I is τ1(eξc,I)=Δξc|๐ฎξc((I+[0.5]c)ΔΞ)|. The thickness of eξc,I is τ2(eξc,I)=cc(Δξc|๐ฎξc((I+[0.5]c)ΔΞ)|).

The graph consists of two interleaved 3D-grids, with nodes nI where Iโ„ค3 forming one grid and nodes nI where I(โ„ค+0.5)3 forming the other grid.

Lastly, for any edge eξc,Iโ„ฐ, the counter-clockwise boundary of the surface {(eξc,I,+1)} is the path: (eξc+1,I+[0.5]c[0.5]c+1[0.5]c+2,+1),(eξc+2,I+[0.5]c+[0.5]c+1[0.5]c+2,+1),(eξc+1,I+[0.5]c[0.5]c+1+[0.5]c+2,1),(eξc+2,I+[0.5]c[0.5]c+1[0.5]c+2,1). This path is a square that passes through nodes nI+[0.5]c[0.5]c+1[0.5]c+2;nI+[0.5]c+[0.5]c+1[0.5]c+2;nI+[0.5]c+[0.5]c+1+[0.5]c+2;nI+[0.5]c[0.5]c+1+[0.5]c+2

Given an arbitrary vector field ๐…(Ξ)=c=13Fξc(Ξ)๐ฏξc(Ξ), the edge based function that approximates ๐… is Fapprox(eξc,I)=Fξc((I+[0.5]c)ΔΞ) for all c{1,2,3} and Iโ„ค3(โ„ค+0.5)3.

For each eξc,Iโ„ฐ, the curl (circulation density/counter-clockwise boundary) of Fapprox is:

×Fapprox|eξc,I=1τ2(eξc,I)e({(eξc,I,+1)})Fapprox(e)

=1τ2(eξc,I)( Fapprox(eξc+1,I+[0.5]c[0.5]c+1[0.5]c+2)τ1(eξc+1,I+[0.5]c[0.5]c+1[0.5]c+2) +Fapprox(eξc+2,I+[0.5]c+[0.5]c+1[0.5]c+2)τ1(eξc+2,I+[0.5]c+[0.5]c+1[0.5]c+2) Fapprox(eξc+1,I+[0.5]c[0.5]c+1+[0.5]c+2)τ1(eξc+1,I+[0.5]c[0.5]c+1+[0.5]c+2) Fapprox(eξc+2,I+[0.5]c[0.5]c+1[0.5]c+2)τ1(eξc+2,I+[0.5]c[0.5]c+1[0.5]c+2))

=1|๐ฎξc+1((I+[0.5]c)ΔΞ)||๐ฎξc+2((I+[0.5]c)ΔΞ)|Δξc+1Δξc+2( Fξc+1((I+[0.5]c)ΔΞ[0.5Δξc+2]c+2)|๐ฎξc+1((I+[0.5]c)ΔΞ[0.5Δξc+2]c+2)|Δξc+1 +Fξc+2((I+[0.5]c)ΔΞ+[0.5Δξc+1]c+1)|๐ฎξc+2((I+[0.5]c)ΔΞ+[0.5Δξc+1]c+1)|Δξc+2 Fξc+1((I+[0.5]c)ΔΞ+[0.5Δξc+2]c+2)|๐ฎξc+1((I+[0.5]c)ΔΞ+[0.5Δξc+2]c+2)|Δξc+1 Fξc+2((I+[0.5]c)ΔΞ[0.5Δξc+1]c+1)|๐ฎξc+2((I+[0.5]c)ΔΞ[0.5Δξc+1]c+1)|Δξc+2 )

Using IΔΞ and (I+[0.5]c)ΔΞ as approximations for Ξ, gives:

×๐…|Ξc=131|๐ฎξc+1(Ξ)||๐ฎξc+2(Ξ)|Δξc+1Δξc+2( Fξc+1(Ξ[0.5Δξc+2]c+2)|๐ฎξc+1(Ξ[0.5Δξc+2]c+2)|Δξc+1 +Fξc+2(Ξ+[0.5Δξc+1]c+1)|๐ฎξc+2(Ξ+[0.5Δξc+1]c+1)|Δξc+2 Fξc+1(Ξ+[0.5Δξc+2]c+2)|๐ฎξc+1(Ξ+[0.5Δξc+2]c+2)|Δξc+1 Fξc+2(Ξ[0.5Δξc+1]c+1)|๐ฎξc+2(Ξ[0.5Δξc+1]c+1)|Δξc+2 )๐ฏξc(Ξ)

=c=131|๐ฎξc+1(Ξ)||๐ฎξc+2(Ξ)|( 1Δξc+1(Fξc+2(Ξ+[0.5Δξc+1]c+1)|๐ฎξc+2(Ξ+[0.5Δξc+1]c+1)|Fξc+2(Ξ[0.5Δξc+1]c+1)|๐ฎξc+2(Ξ[0.5Δξc+1]c+1)|) 1Δξc+2(Fξc+1(Ξ+[0.5Δξc+2]c+2)|๐ฎξc+1(Ξ+[0.5Δξc+2]c+2)|Fξc+1(Ξ[0.5Δξc+2]c+2)|๐ฎξc+1(Ξ[0.5Δξc+2]c+2)|) )๐ฏξc(Ξ)

As Δξ1,Δξ2,Δξ30+, it is the case that: ×๐…|Ξ=c=131|๐ฎξc+1(Ξ)||๐ฎξc+2(Ξ)|(ξc+1(Fξc+2(Ξ)|๐ฎξc+2(Ξ)|)|Ξξc+2(Fξc+1(Ξ)|๐ฎξc+1(Ξ)|)|Ξ)๐ฏξc(Ξ)

The Curl in Cartesian Coordinates

Applying the curvilinear coordinate model to Cartesian coordinates means that ξ1=x, ξ2=y, and ξ3=z. It is also the case that ๐ฎx(x,y,z)=๐ข, ๐ฎy(x,y,z)=๐ฃ, and ๐ฎz(x,y,z)=๐ค. Applying the formula for the curl that was derived from the discrete model of curvilinear coordinates to vector field ๐…=Fx๐ข+Fy๐ฃ+Fz๐ค gives:

×๐…|(x,y,z)=111(y(1Fz)|(x,y,z)z(1Fy)|(x,y,z))๐ข +111(z(1Fx)|(x,y,z)x(1Fz)|(x,y,z))๐ฃ +111(x(1Fy)|(x,y,z)y(1Fx)|(x,y,z))๐ค

=(FzyFyz)๐ข+(FxzFzx)๐ฃ+(FyxFxy)๐ค

The Curl in Cylindrical Coordinates

Applying the curvilinear coordinate model to cylindrical coordinates means that ξ1=ρ, ξ2=ϕ, and ξ3=z. It is also the case that ๐ฎρ(ρ,ϕ,z)=ρ^, ๐ฎϕ(ρ,ϕ,z)=ρϕ^, and ๐ฎz(ρ,ϕ,z)=๐ณ^. Applying the formula for the curl that was derived from the discrete model of curvilinear coordinates to vector field ๐…=Fρρ^+Fϕϕ^+Fz๐ณ^ gives:

×๐…|(ρ,ϕ,z)=1ρ1(ϕ(1Fz)z(ρFϕ))ρ^+111(z(1Fρ)ρ(1Fz))ϕ^+11ρ(ρ(ρFϕ)ϕ(1Fρ))๐ณ^

=(1ρFzϕFϕz)ρ^+(FρzFzρ)ϕ^+1ρ(ρ(ρFϕ)Fρϕ)๐ณ^

The Curl in Spherical Coordinates

Applying the curvilinear coordinate model to spherical coordinates means that ξ1=r, ξ2=θ, and ξ3=ϕ. It is also the case that ๐ฎr(r,θ,ϕ)=๐ซ^, ๐ฎθ(r,θ,ϕ)=rθ^, and ๐ฎϕ(r,θ,ϕ)=rsinθϕ^. Applying the formula for the curl that was derived from the discrete model of curvilinear coordinates to vector field ๐…=Fr๐ซ^+Fθθ^+Fϕϕ^ gives:

×๐…|(r,θ,ϕ)=1rrsinθ(θ(rsinθFϕ)ϕ(rFθ))๐ซ^+1rsinθ1(ϕ(1Fr)r(rsinθFϕ))θ^+11r(r(rFθ)θ(1Fr))ϕ^

=1rsinθ(θ(sinθFϕ)Fθϕ)๐ซ^+1r(1sinθFrϕr(rFϕ))θ^+1r(r(rFθ)Frθ)ϕ^

Intersections

Identities

Converting Paths to Surfaces and Surfaces to Paths

Template:BookCat