OOF: Finite Element Analysis of Microstructures

/adaptive_mesh/anneal

/adaptive_mesh/anneal

/adaptive_mesh/anneal -- optimize the mesh by moving nodes

Synopsis

Uses a Monte Carlo optimization technique to move the nodes. Nodes are moved in random directions by a specified amount and the moves are accepted or rejected depending on a Boltzmann factor. Bad moves (i.e, those that increase the mesh-energy) are accepted with probability , where ΔE is the change in E during the move. It is useful to use the Mesh dashboard to get the the characteristic size of ΔE so that T can be set sensibly.

In practice, a value of T=0 works pretty well in most circumstances. In this case, all moves that decrease E are accepted, and all moves that increase it are rejected.

Typical results of annealing are shown in Figure 4.1. Effect of the anneal function. Notice that after annealing the edges of the triangles tend to lie on the material boundaries.

On each iteration of the procedure, the program attempts to move each node exactly once, although the attempts are made in a random order. The size of the move is chosen at random from a Gaussian distribution with a specified half-width. The direction of the move is completely random, except that nodes on the edges of the image are constrained to stay on the edges, and corner nodes cannot move at all. Nodes will never move to the interior of another triangle, nor will they ever move outside the boundaries of the image.

During the annealing procedure, a large red STOP button appears on the screen. Pressing the button aborts the process at fewer than the requested number of iterations. The recorded command in the log file, however, will still record the originally requested number, so if you abort your anneals, you won't be able to recreate a session accurately from a log file. The STOP button is only queried once per iteration, so be patient--there will be a palpable delay if there are a large number of nodes.

Figure 4.1. Effect of the anneal function

A uniform mesh before annealing.

The same mesh after 20 annealing steps. Nodes have moved to the boundary.

Arguments

T

The effective temperature T of the Boltzmann distribution used in the Monte Carlo procedure. Default: 0

delta

The half-width of the Gaussian distribution used to generate the node motions, in units of the pixel size. Use large values of delta when the mesh is coarse and far from optimum. Use small values when the mesh is fine and you're trying to iron out the last little details. Default: 1

iterations

The number of iterations to take. Default: 1

Output

At each iteration, ppm2oof prints the total change in the mesh-energy (dE) and the fraction of the attempted moves that were actually performed (acceptance rate). If either of these values gets too low, the algorithm is not being effective. A low dE means that the mesh is not getting much better. A low acceptance rate means that the algorithm is wasting most of its time exploring unproductive moves. A low acceptance rate can often be cured by reducing delta or by setting an active area to concentrate effort on the regions that need it most.