Trelis 16.5 User Documentation

**Applies to**: Triangular or Quadrilateral Surface Meshes Tetrahedral or Hexahedral Volume Meshes. Does not apply to Mixed Element Meshes.

**Summary**: Removes as many negative Jacobians from the mesh as possible by minimizing a certain objective function.

To use untangle smoothing

- On the Command Panel, click on
**Mesh**. - Click on
**Volume**or**Surface**. - Click on the
**Smoothing**action button. - Select
**Untangle**from the drop-down menu. - Enter in the appropriate values for
**Volume ID(s)**or**Surface ID(s)**. This can also be done using the**Pick Widget**function. - Enter the appropriate values for
**Scaled Jacobian**and**Time (minutes)**. - Click
**Apply**.

Surface <surface_id_range> Smooth Scheme Untangle [beta <double=0.02>] [cpu <double=10>]

Volume <volume_id_range> Smooth Scheme Untangle [beta <double=0.02>] [cpu <double=10>]

**Related Commands:**

**Discussion**:

The Untangle 'smoother' is designed to eliminate negative Jacobians from a given mesh by moving nodes to appropriate locations. If a mesh node is not involved in causing a negative Jacobian it will not be moved. If a mesh has no negative Jacobians, the Untangler will not move any of the nodes. This smoother is not magic: if an untangled mesh does not exist for the given mesh topology, the untangler will not untangle the mesh. Instead, it will do the best it can and exit gracefully. An untangled mesh produced by this smoother will often have poor shape quality; in that case it is recommended that untangling be followed by condition number smoothing. The untangle smoother is automatically called by the condition number smoother.

There is no "fixed/free" option with this command; boundary nodes are always held fixed. As a result, users should be aware that the volume untangler cannot succeed if the volume contains a surface mesh which contains a negative Jacobian. In that case, one must first remove the surface mesh negative Jacobians by invoking the surface Untangler and then invoke the volume Untangler.

The command above only sets the smoothing scheme; to actually smooth the mesh one must subsequently issue the command "smooth surface <surface_id_range>" or "smooth volume <volume_id_range>".

**Stopping Criteria**: Untangling will proceed until the objective function has been minimized or the optional user input "cpu" has been satisfied. The latter stopping criterion tells the code how many minutes to spend trying to untangle the mesh. The default value is 10 minutes. Optimization may also be halted by using "control-C" on your keyboard.

**Beta Parameter**: An optional user input parameter "beta" plays a role in determining the optimal mesh. Optimization proceeds until the minimum scaled Jacobian of the mesh is (roughly) greater than beta. To remove negative Jacobians one would need beta=0 (however, as a safety margin, we choose beta=0.02 as the default). To further improve the scaled Jacobian of the mesh, input a larger value of "beta". If a mesh with all scaled Jacobians greater than "beta" does not exist, optimization will continue until the cpu time stopping criterion has been met. Therefore, it is best not to use "beta" values too large (say, greater than 0.2) without also decreasing the cpu time limit.

To view a detailed report of the smoothing in progress issue the command "set debug 91 on" prior to smoothing the surfaces or volumes. You will get a synopsis of whether or not untangling is needed and whether the stopping criteria are satisfied. In addition the following printout information is given for each iteration of the conjugate gradient numerical optimization:

Iteration=n, Evals=m, Fcn=value1, dfmax=value2, time=value3 min_jsc=value4

**n** is the iteration count, **m** is the number of objective function evaluations performed per iteration, **value1** is the value of the objective function (this usually decreases monotonically), **value2** is the norm of the gradient (does not always decrease monotonically), and **value3** is the cumulative cpu time (in seconds) spent up to the current iteration. The minimum possible value of the objective function is zero; this value is attained only when the minimum scaled Jacobian of the mesh exceeds "beta". The **minimum scaled jacobian** is also reported.