OOF2: The Manual

Name

Rationalize (Rationalize) — Fix badly shaped elements in a Skeleton.

Synopsis

Rationalize(targets, criterion, method, iterations)

Details

  • Base class: SkeletonModifier
  • Parameters:

    targets
    Which elements to modify. Type: An object of the SkelModTargets class.
    criterion
    Acceptance criterion Type: An object of the SkelModCriterion class.
    method
    Methods for rationalization. Type: An object of the RationalizeMethod class.
    iterations
    Repeat this many times. Type: A positive integer.

Description

Rationalize fixes badly-shaped Elements in a Skeleton by either removing them or modifying them and their immediate neighbors. Besides being ugly, badly shaped elements can impair the convergence and accuracy of the finite element method.

OOF2 contains three Rationalizer tools that modify different kinds of poorly shaped Elements. The types are all illustrated in Figure 6.95:

  • short: Quadrilaterals with one or two very short sides are removed or converted into triangles by RemoveShortSide.

  • wide: Quadrilaterals with a large obtuse interior angle are split into triangles by by QuadSplit.

  • flat: Triangles with a large obtuse interior angle are eliminated by RemoveBadTriangle.

  • sharp: Triangles with a small acute interior angle are also eliminated by RemoveBadTriangle. (There is overlap between the definitions of flat and sharp, but the two categories are both handled by RemoveBadTriangle so the ambiguity is unimportant.)

The method parameter determines whether the various tools will be applied automatically or whether only a specific set of tools should be used. Automatic rationalizing works better with a small set of target Elements because it tries every method on every Element. Specific rationalizing only applies the tools to Elements that meet given criteria on angles and lengths, so it does less work can can be used with any number of Elements.

Figure 6.95. Rationalizing a Skeleton

Rationalizing a Skeleton

(a) The selected red Elements have the indicated flaws.

(b) The result of rationalizing the selected elements, using

          OOF.Skeleton.Modify(
             skeleton='swoops.png:skeleton',
             modifier=Rationalize(
                targets=SelectedElements(),
                criterion=AverageEnergy(alpha=0.3),
                method=SpecificRationalization(
                   rationalizers=[RemoveShortSide(ratio=5),
                                  QuadSplit(angle=150),
                                  RemoveBadTriangle(acute_angle=15,obtuse_angle=150)]),
                iterations=1))
The flat and sharp Elements have been eliminated (causing neighboring Elements to be subdivided), the short quadrilateral has been converted into a triangle, and the wide quadrilateral has been subdivided.


The Rationalizer tools are applied sequentially. The general procedure for applying each tool is as follows:

  1. Scan the current Skeleton for target elements according to the given targets parameter. The list of target Elements is shuffled to prevent artifacts from the original internal Element ordering.

  2. Apply the Rationalizer to each Element in the target set. When using SpecificRationalization, only the Elements meeting the criteria specified in the Rationalizer's parameters are examined. When using AutomaticRationalization, all Elements are examined. The Rationalizer returns a list of possible new Element configurations.

  3. Apply the given acceptance criterion to the new configurations, and choose the best one, if any.

  4. Any new Elements created in step 3 are added to the target list, but only if the criterion is not Unconditional.[40]

  5. Return to step 2 until all Elements in the target list have been visited.

It is often necessary to apply the tools more than once, since fixing one bad Element can create others. If the iterations parameter is greater than 1, the entire sequence will be repeated.

[Tip] Tip

Remove Short Sides and Split Wide Quads inevitably create triangles and these triangles are not guaranteed to have good shapes. Thus, it's a good idea always to include Remove Bad Triangles in the set of tools to apply. It will be applied after the other Rationalizers.

See Also



[40] This is to avoid infinite loops.