Brakke’s samples: strings, metrics and other dimensions

One-dimensional “surfaces” (strings) in the plane and in space, a background metric, and a three-dimensional bubble in four-dimensional space. For strings, relax() averages vertices but can’t equiangulate.

Each sample is run twice from its datafile: once with the recipe Brakke wrote into it (its gogo command, or the usage its comments describe), once with a default ev.relax() given as many refinements as the recipe does (levels). The table shows the energy each ends with, the residual (how far from equilibrium, see Relaxing a surface), the facet count, the time, and what relax() reports: converged, stable, and any health issues. A lower energy on the same mesh is not always the better answer: a coarse mesh can lower its energy in ways the smooth surface can’t, so where an exact value is known, the error against it is the measure. Times are from the documentation build and vary.

This gallery assumes Getting started and Relaxing a surface; its pages can be read in any order.

import numpy as np
import pyvista as pv
import pysurfaceevolver as pyse
import brakke_helpers as bh

pv.set_jupyter_backend("static")

popstr.fe: popping a string junction

Four strings meeting at a point. For strings, Plateau’s rule is three at a point, at 120 degrees: the recipe pops the junction into two triple points (o), and so does relax() after converging.

print(bh.recipe("popstr.fe"))
runs = bh.compare("popstr.fe")
bh.show(runs, view="xy")
o; g 5
energyresidualfacetssecondsconvergedstablenotes
recipe: o; g 52.7320508085.3e-0800.00
relax(levels=0), 1 popped2.7320508088.2e-1600.00yesyes
_images/bd2438afa280090e8d54f08dceb4ab2adf38b80a27ce3430ac5f621d85bed473.png

slidestr.fe: a drop held in a corner

A drop (in two dimensions: an area bounded by a string) on a hyperbolic slide, gravity pulling it down into the corner that holds it.

print(bh.recipe("slidestr.fe"))
runs = bh.compare("slidestr.fe")
bh.show(runs, view="xy")
r; {g 10; V;} 40
energyresidualfacetssecondsconvergedstablenotes
recipe: r; {g 10; V;} 405.5261417849.9e-0310.02
relax(levels=1)5.5249154573.2e-1010.01yesyes
_images/03799de862d46f30eaf04e08b840f469943785c7bfcdb6d1ebc8a40f70e80f33.png

100grain.fe: a two-dimensional foam coarsening

A Voronoi diagram of 100 cells in a periodic square, with automatic popping and chopping (autopop, autochop): edges that shrink away are deleted and the junctions popped as the foam coarsens. The cells have no fixed areas, so there is no equilibrium to reach; the file says to “just do ‘g’ steps in big chunks”. Here 1000 of them, against a default relax(), which reports the foam unconverged.

runs = bh.compare("100grain.fe", "g 1000")
bh.show(runs, view="xy")
energyresidualfacetssecondsconvergedstablenotes
recipe: g 100015.824830981.0e+02790.33
relax(levels=0)15.794186141.1e+02790.76no
_images/62d8c754b53bb2d9bcf544d554103312e8709740fee6ee7a4f25174f2611e6e7.png

metric.fe: a string in a curved metric

A background metric that turns the punctured plane into a catenoid: the string loop shrinks onto the catenoid’s throat (drawn in the plane’s coordinates).

print(bh.recipe("metric.fe"))
runs = bh.compare("metric.fe")
bh.show(runs, view="xy")
g 5; r; g 5; r; g 5; r; g 5;
energyresidualfacetssecondsconvergedstablenotes
recipe: g 5; r; g 5; r; g 5; r; g 5;12.586667676.9e-0200.00
relax(levels=3)12.58656665.2e-0900.01yesyes
_images/3deeef7a790038f9ca92e208f46973b51889a3fa3523bdb1a8ae373b28b7c91a.png

knotty.fe: a trefoil knot

A trefoil (3,2 torus knot) with a knot energy that keeps the string from crossing itself. The file defines several energies and length constraints; this is its default combination. Knot energies have many local minima: the recipe uses conjugate gradients (U) and may end in a different one.

print(bh.recipe("knotty.fe"))
runs = bh.compare("knotty.fe")
bh.show(runs)
g 50; U; g 50;
energyresidualfacetssecondsconvergedstablenotes
recipe: g 50; U; g 50;547.53479092.4e-0200.01
relax(levels=0)547.55187842.6e-0900.03yesyes
_images/daaad6a62f9c88c6e95059a491487d388d7af7b40e39f9f6bc8054d2073a8b93.png

quadm.fe: a film in a metric

A soap film on a quadrilateral wire, in a background metric.

print(bh.recipe("quadm.fe"))
runs = bh.compare("quadm.fe")
bh.show(runs)
r; g 12; U; r; g 12; r; g 12; r; g 20;
energyresidualfacetssecondsconvergedstablenotes
recipe: r; g 12; U; r; g 12; r; g 12; r; g 20;1.7503680681.5e-025120.41
relax(levels=4)1.750413222.0e-095121.09yesyes
_images/3fd0051ed968987fddb635a2482a8382cfcdf8e9ffbe7382d1e6e4cb9ac21ff6.png

simplex3.fe: a bubble in four dimensions

A three-dimensional bubble in four-dimensional space, starting as a simplex and becoming a 3-sphere, in Evolver’s simplex representation. Evolver has no Hessian for bodies there (outside the Lagrange model), so relax() takes gradient steps only, and there is nothing to draw in three dimensions.

print(bh.recipe("simplex3.fe"))
runs = bh.compare("simplex3.fe")
r; g 5; U; g 10; r; g 10; r; g 20; r; g 20;
energyresidualfacetssecondsconvergedstablenotes
recipe: r; g 5; U; g 10; r; g 10; r; g 20; r; g 20;0.53473300111.7e-01204801.18
relax(levels=4)0.53466590231.2e-022048083.94no

Next

Curved elements: Brakke’s samples: quadratic and Lagrange elements.