Next: Elastic moduli
Up: Finite element theory
Previous: General aspects and
Variables in programs
ur = voltage at the r'th node in a pixel
σpq = conductivity tensor (differs in general from element to element)
= (Ex, Ey, Ez) = external electric field applied to image
e = (ex, ey, ez) = local field at a
point (x,y,z) inside a pixel
Drs = stiffness matrix in a pixel
Nr(x,y,z) = shape array for cubic pixel
The purpose of this kind of finite element method is to express the total energy of the system in terms of the voltages only at the nodes, thus effectively discretizing the continuum. There are many ways in which to do this. We choose here to use a linear interpolation method, in what is often called a tri-linear scheme. Essentially we write out the energy of one pixel, which involves an integral over that pixel, and then combine the pixels of the whole system into a global energy functional. The fields inside the pixel are expressed as functions of (x,y,z) via a linear interpolation scheme in terms of the nodal voltages. The integral is carried out, and we end up with an expression for the energy of the pixel that is quadratic in the nodal voltages. The global energy is then also a quadratic functional of the nodal voltages. This expression is minimized with respect to the nodal voltages, using a conjugate gradient scheme. Using the set of nodal voltages found, the interpolation scheme can then be re-used to find the average current, total energy, etc. that can be used to define the effective conductivity and other quantities of interest (see Section 5.1).
Focus on a single pixel for now. Define V(x,y,z) to be the voltage within the given pixel, where 0 < x,y,z <1. The origin is taken where the pixel label is 1 (see Table 1 and Fig. 1). V(x,y,z) is determined by linear interpolation of the nodal voltages, such that
| V(x,y,z) = Nrur | (2) |
N1 = (1 − x)(1 − y)(1 − z)
N2 = x(1 − y)(1 − z)
N3 = xy(1 − z)
N4 = (1 − x) y(1 − z)
N5 = (1 − x)(1 − y) z
N6 = x(1 − y) z
N7 = xyz
N8 = (1 − x)yz
Now the local field in the pixel,
, is given in terms of derivatives
of this local voltage, via

) then becomes

Table 2: Formulas for components of
[∂Nr /
∂xi]
matrix
Now, the total energy dissipated in the pixel is

In terms of the nodal voltages, this equation becomes

The indicated integrations can be easily carried out exactly using Simpson's rule, since they are at most quadratic in x, y, or z, and Simpson's rule is exact for quadratic expressions. These expressions could also be evaluated analytically, and then put into the program. When these programs were developed, it was decided to use Simpson's rule for simplicity, and to avoid doing all the derivations necessary to get the "stiffness" matrices in analytical form. The subroutine FEMAT in the finite element programs carries out this integration. The energy per pixel is then

In order to be able to link up local energy with the global energy, it is important to see how the local numbering scheme for the pixel nodes links up with the global numbering scheme. The digital images are in the form pix(m), where pix is a 2-byte integer vector (defined INTEGER*2 in FORTRAN 77), and m is a one dimensional label. The digital image in 3-D is defined by (i,j,k), where i = 1, nx, j = 1, ny, and k = 1, nz, with the origin of the image being the (1,1,1) node. The one dimensional labelling scheme is defined by:
| m = nx · ny · (k − 1) + nx · (j − 1) + i | (8) |
The label m refers to the m'th node, and the m'th pixel. The m'th pixel has the m'th node at its corner that is labelled "1" in the 1-8 local finite element numbering scheme. In 3-D , every node is part of 8 pixels. All the nodes in these pixels will need to be known with respect to the node, since they are connected to it in the global energy via the local stiffness matrices, and so their labels are encoded in the array ib. If the m'th node corresponds to (i,j,k), then the 27 nodes that are part of these 8 pixels are given by the m labels corresponding to adding or subtracting 0 or 1 from the i,j, k labels, so that ib = ib(m,27) has 27 entries for each value of m. Table 3 gives this neighbor labelling scheme. For example, ib(m,15) would be the m label of the node located at (−1,0,−1) with respect to the (i,j,k) position of the m'th node. Table 3 also gives the neighbor labelling scheme for 2-D, where Δk = 0, since there is no third dimension. Note that in the interior of an image, the m labels of the neighbors would always be simply known anyway, because of their fixed relationship in terms of i, j, and k, but with periodic boundary conditions (discussed below) a "neighbor" could be at the other side of the image. The relationship between the local (1-8) labelling, and the global (1-27) neighbor labelling used in array ib, is given in Table 4.
Table 3:
Neighbor labelling in 2-D and 3-D
Table 4:
Relation between finite element labelling and neighbor labeling
Before going into the solution technique, one must first consider the boundary conditions of the problem. Equation (7) is positive definite, and so has its minimum value when all the voltages are zero, an uninteresting result. We use periodic boundary conditions to apply an electric field, so that the energy is minimized with respect to an applied field, a more useful case.
Consider a pixel as before, with i = nx, j < ny, k < nz, and label m. When we go to evaluate the energy expression above, we find no voltages at the 2,3,6, and 7 nodes, because these would have i labels of (nx + 1), which is undefined. We use the voltages from across the system, numbers 1,4,5, and 8 from the pixel with the same j and k label but with i = 1, and label M = m − nx + 1. However, there is a jump of nx in length from where these voltages are defined. If the applied field (Ex,Ey, Ez) is present, then on average there is a drop in voltage of −Ex nx between these nodes. Therefore, the voltages to be used in the energy expression for the m'th pixel are:
u1 = u1(m),
u2 = u1(M) − Ex nx,
u3 = u4(M) − Ex nx,
u4 = u4(m),
u5 = u5(m),
u6 = u5(M) − Ex nx,
u7 = u8(M) −
Ex nx,
and u8 = u8
(m).
We can write this, in general for a pixel at a boundary, as ur = Ur + δr, where Ur is an 8−vector of the voltages that are given by the ib(m,n) labels, and δr is an 8−vector that corrects them to what they should be in the pixel in question. The neighbor array ib is designed to pick up the appropriate nodal voltages from across the image when evaluating the energy of pixels on faces, edges, and corner.
Inserting this choice of voltages into the expression for the energy involving the stiffness matrix, eq. (7), we get for the given pixel

We can rewrite eq. (9) as
Adding these up over every pixel is done in the subroutine FEMAT, giving a global array b that gives the term in the energy that is linear in the voltages, and a global constant C. It is important to remember that the only contributions to b and C come from pixels having nodes at the unit cell boundaries and having a non-zero stiffness matrix. That makes it easy to make non-periodic boundary conditions by surrounding the system of interest by a layer of insulating material, one pixel thick, which effectively gets rid of the periodic boundary conditions and makes b and C equal to zero (see Sec. 6.2). Table 5 shows the values of the δr variable for the various faces and edges of the digital image.
Table 5:
Values of Δr variable for system
Once the energy equation is set up, all that remains is to find the set of voltages that minimize the electrical energy dissipated. This is done by a conjugate gradient method, similar to that described in Ref. [5]. The subroutine DEMBX contains this routine, and is the same for both electric and elastic problems, aside from some minor labelling differences of indices, due to the fact that voltage is a scalar while elastic displacement is a 3-D vector. (see Section 4.2). No preconditioning of the matrix to be solved is done. It is not clear, since the full Hessian matrix is never stored, whether it would even be possible to carry out pre-conditioning in this case.
In the subroutine ENERGY, the gradient of the energy is computed, as this must become very small in order to solve the problem, which is exactly solved when the gradient is zero. Remember that the gradient is a vector containing all the partial derivatives of the energy with respect to all the nodal voltages. Using the above expression, the gradient of the energy will then be

Next: Elastic moduli Up: Finite element theory Previous: General aspects and