** Next:** Finite difference theory
**Up:** Finite element theory
** Previous:** Elastic moduli

In the case of thermal strains, sometimes called eigenstrains (terms used
interchangeably in this manual) [7],
each phase can have a
stress-free strain that comes about by thermal or moisture expansion/shrinkage,
or other causes.
We denote this strain as *e _{α}*, where α = 1,6
as usual in the Voigt notation. The stress then becomes
σ

Substituting for the strain using the linear interpolation scheme described earlier, we can then perform the integration over a single pixel, keeping in mind that the thermal strains are constants over the pixel and are not linearly interpolated. The resulting equation in the nodal displacements is

where the first term is identical to the case without thermal strains, the second term is a constant
quadratic in the thermal strains, and the third term is linear in nodal displacements, with *T _{rp}* given by

So even without periodic boundary conditions, there are terms linear and constant in the
displacements. Periodic boundary conditions are very similar to the
elastic case studied
previously, except for an extra term picked up via the *T _{rp}*
term. In a
pixel at the face, edge,
or corner of the image, the energy becomes

where the components of δ* _{rp}* were given in Table
7, and
the

In the programs THERMAL3D.F or THERMAL2D.F, the whole system size is
allowed to change in order find the overall thermal expansion that minimizes
the energy of the system. In this
case, the applied strains, *E*_{α}, are now called the
macrostrains, and become
dynamic variables that define the size and shape of the periodic unit cell.
Their values are determined in the conjugate gradient relaxation process, on an
equal footing with the elastic
displacements. In the programs, the length of the *u* vector changes from
*ns* = *nx* x *ny* x *nz* to *nss* = *ns* + 2, where *u*(*ns* + 1,1)=*E _{xx}*,

In subroutine DEMBX, the matrix of second derivatives, or the Hessian matrix, is used to
update the gradient and conjugate gradient direction in the relaxation process.
For the regular
nodal displacements, the stiffness matrices make up the Hessian matrix.
However, when the six
macrostrains are considered to be variables as well, the Hessian matrix goes
from being (*ns*,3) x (*ns*,3) in size to (*ns* + 2, 3) x
(*ns* + 2, 3) in size. The extra partial derivatives that have to be
evaluated
are (1) the mixed second derivatives, or the second derivative of the energy
with respect to a nodal
displacement and a macrostrain, and (2) the second derivative with respect to a
macrostrain squared or two different macrostrains.

Figure 2 illustrates schematically what the full Hessian matrix looks like. The upper
left-hand corner is the main section, where the second derivatives of the energy
are taken with
respect to the nodal displacements. Multiplication of a vector by this piece
is taken care of in the
large DO loop involving the stiffness matrices in subroutine DEMBX. The upper
right and lower
left-hand parts of the Hessian involve mixed second derivatives with respect to a nodal
displacement and a macrostrain. Examining eq. (24),
which is the full elastic energy with periodic
boundary conditions and thermal energy terms, one can see that the only term that has
dependence on both the nodal displacements and the macrostrains is the
term *b _{rp} u_{rp}* .
The kind of second derivative that is needed is

**Figure 2:** Schematic view of the structure of the Hessian matrix when thermal
strains are used (*u* stands for elastic displacements, ε represents
the macrostrains).

where all the other macrostrains have been set to zero. This is the
technique used in the
subroutine BGRAD, which computes the terms needed for these parts of the Hessian matrix.
The bottom right-hand part of the Hessian matrix involves second derivatives
with respect to
the macrostrains. Again looking at eq. (24), the only term that has quadratic
dependence on the
macrostrains is what was called the constant term before, that comes from
the periodic boundary
conditions. In all the finite element programs with fixed macrostrains,
this term is designated *C*.
In the two thermal strain programs, this term is expressed by a matrix called *zcon*.
The second
derivative terms are given simply by the various components of this matrix.
The subroutine
CONST computes the elements of this matrix, which are constant with respect to nodal
displacements and macrostrains.

In subroutine DEMBX, the main part of the multiplication by the Hessian matrix
is carried out,
and then the other three parts of the matrix multiplication are filled in
using subroutine BGRAD
and the matrix *zcon*.