set facet tension ... command.
The contribution to the total energy is the sum
of all the facet areas times their respective surface
tensions. The surface tension of a facet may also be specified
as depending on the phases
of the bodies it separates.
In the string model, the
tension resides on edges instead of facets.
Example datafile: cube.fe
E = \int\int\int_{body} G \rho z dV
but is calculated using the Divergence Theorem as
E = \int\int_{body surface} G\rho {z^2\over 2} \vec k \cdot \vec{dS}.
This integral is done over each facet that bounds a body.
If a facet bounds two bodies of different density, then
the appropriate difference in density is used. Facets
lying in the z = 0 plane make no contribution, and may be
omitted if they are otherwise unneeded. Facets lying
in constraints may be omitted if their contributions to
the gravitational energy are contained in
constraint energy integrals.
In the string model,
all this happens in one lower dimension.
Example datafile: mound.fe
E = \int_{edge} F . dl.
The integrand is defined in the
constraint declaration in the datafile.
The integral uses the innate orientation of the edge,
but if the orientation attribute of the edge is negative,
the value is negated.
This is useful for prescribed contact angles on walls
(in place of wall facets with equivalent tension)
and for gravitational potential energy that would
otherwise require facets in the constraint.
The mound example illustrates this.
Example datafile: ringblob.fe
E = k\left\Vert \vec S \times \vec Q \right\Vert / 6
where \vec S is the edge vector and \vec Q is the
projection of the edge on the tangent plane
of the constraint at the tail vertex of the edge.
The constant k is a global constant called the "gap
constant". A gap constant of 1 gives the best
approximation to the actual area of the gap. A larger
value minimizes gaps and gets vertices nicely spread
out along a constraint. You can set the
value of k in the
datafile or
with the k command.
The gap energy falls off quadratically as the surface is refined. That is, refining once reduces the gap energy by a factor of four. You can see if this energy has a significant effect on the surface by changing the gap constant.
Note: gap energy is effective only in the linear model.
Example datafile: tankex.fe
E = P*V_0*ln(V/V_0)
where P is the ambient pressure, V_0 is the target volume of the body,
and V is the actual volume. To account for work done against the
ambeint pressure, each body also makes a negative contribution of
E = -P*V.The ambient pressure can be set in the datafile or with the p command. This energy is calculated only for bodies given a target volume.
Example datafile: crystal.fe