Homework 5: FEM Meshes
CS 480 2009, Dr. Lawlor
Part 1: Mesh Generation
We're going to generate a 2D finite-element mesh. The basic
processing path is .svg to .poly outline (via "svg2poly"), then .poly
to .ele/.node mesh (via "triangle").
You'll need my "mesh" archive (Zip, or Tar-gzip), which includes my program "svg2poly" as well as the mesh generator "triangle".
For part 1, send me your "image.1.ele" and "image.1.node" files, which should run OK in the example program 480_gridcollide_fem2D (this program reads the mesh from "mesh/image.1.ele" and "mesh/image.1.node").
- Start by defining your mesh's outline as an SVG path, using a drawing program like Inkscape. Feel free to start with the included "mesh/path.svg".
For svg2poly's sake, your outline has to be closed, have no
holes, and consist of exactly one "path". In Inkscape, use the
"Path tool" (below the arrow) to edit a path. Double-click to add
nodes to a path. If you draw a rectangle or text, convert to a
path with "Path -> Object to Path". If you draw a line,
convert to a path with "Path -> Stroke to Path". You can
combine several paths by selecting both and choosing "Path ->
Union". For the homework's sake, your outline should be something
identifiable and interesting, like your initials, or some well-known
symbol (but please, rated PG-13 at worst!). Save your outline
as an SVG file named "path.svg" in the mesh folder.
- Next, run my little program "svg2poly", which will read "path.svg", generate "image.poly", then call Jon Shewchuk's "Triangle" program to generate "image.1.ele" and "image.1.node", all inside the mesh folder.
For UNIX users, there's a Makefile included; for Windows users, there
are binaries. If you're getting too many or not enough triangles,
you can adjust the target triangle size by passing a command-line
argument to svg2poly, like "svg2poly path.svg 0.001" for smaller
triangles, or "svg2poly path.svg 0.1" for larger triangles. Be
aware that small triangles are likely to go unstable at the default
timestep in my finite element codes!
Part 2: Parameter Tuning
For a given mesh, to get the behavior you want, you often need to
adjust the simulation's parameters. In particular, I'd like you
to adjust two parameters:
For each of these parameters, tell me:
Tell me these attributes of both values for *your* mesh (from part 1), in a small text file (part2.txt).
- How big can the parameter get, but still be stable? (You only have to figure this out within a factor of ten.)
- How small can the parameter get, but still look reasonable?
(Again, all I want is the order of magnitude, and "reasonable" is fuzzy
anyway: squashing a lot is reasonable; turning inside out isn't.)
- Generally speaking, what does the parameter do to the simulation? (A sentence or two, max!)
Turn everything in via Blackboard by midnight Tuesday, April 14.