5.6 Mesh Modification
On this page:
5.6.1 Mesh Smoothing
5.6.1.5 Adjust Boundary Orthogonal
5.6.1.6 Centroid Area Pull
5.6.1.7 Condition Number
5.6.1.8 Edge Length
5.6.1.9 Equipotential
5.6.1.10 Laplacian
5.6.1.11 Mean Ratio
5.6.1.12 Smart Laplacian
5.6.1.13 Untangle
5.6.1.14 Winslow
5.6.2 Align Mesh
5.6.3 Block Repositioning
5.6.4 Collapsing Mesh
5.6.5 Creating and Merging Mesh Elements
5.6.6 Edge Swapping
5.6.7 Matching Tetrahedral Meshes
5.6.8 Mesh Cleanup
5.6.9 Mesh Coarsening
5.6.10 Mesh Column Operations
5.6.11 Mesh Refinement
5.6.12 Mesh Scaling for Flexible Hex Refinement
5.6.13 Node and Nodeset Repositioning
5.6.14 Mesh Pillowing
5.6.15 Remeshing
5.6.16 Hexset Command
8.5

5.6 Mesh Modification

After meshing is completed, it may be desirable to change features of the mesh without remeshing the whole volume. Mesh modification methods include tools for improving mesh quality, repositioning mesh elements, or changing mesh density. These methods can be applied on the whole model, or on small sections of the model without requiring remeshing the geometry, and without modifying the underlying geometry.

5.6.1 Mesh Smoothing

After generating the mesh, it is sometimes necessary to modify that mesh, either by changing the positions of the nodes or by removing the mesh altogether. Cubit contains a variety of mesh smoothing algorithms for this purpose. Node positions can also be fixed, either by specific node or by geometry entity, to restrict the application of smoothing to non-fixed nodes.

Mesh smoothing in Cubit operates in a similar fashion to mesh generation, i.e. it is a process whereby a smooth scheme is chosen and set, then a smooth command performs the actual smoothing. Like meshing algorithms, there is a variety of smoothing algorithms available, some of which apply to multiple geometry entity types and some which only apply to one specific type (these algorithms are described below.)

To smooth the mesh on a geometry entity

  1. On the Command Panel, click on Mesh.

  2. Click on Volume, Surface or Curve.

  3. Click on the Smoothing action button.

  4. Select the desired scheme from the drop-down menu.

  5. Enter the appropriate values for Volume ID(s), Surface ID(s) or Curve ID(s). This can also be done using the Pick Widget function.

  6. Depending on the scheme selected, optionally specify the Tolerance.

  7. Enter any other appropriate settings.

  8. Click Apply.

{curve|surface|volume} <range> Smooth Scheme <scheme>

where <scheme> is any acceptable smooth scheme described in this section. Also set any scheme-specific information, using the smooth scheme setting commands described below.

smooth curve <range>

smooth surface <range> [global]

smooth {body|volume|group} <range>

Groups of entities may be smoothed, by smoothing a group or a body.

If a Body is specified, the volumes in that Body are smoothed. If a Group is specified, only the volume meshes within these groups are smoothed - no smoothing of the surface meshes is performed.

5.6.1.1 Global Smoothing

When smoothing a set of surfaces, the keyword global can be added to the smooth command such as

smooth surface <range> [global]

If the smoothing algorithm for two neighboring surfaces are both allowed to move boundary nodes, then appending the "global" keyword will often result in a higher quality mesh near the curve(s) shared by those two surfaces.

5.6.1.2 Focused Smoothing on Groups of Mesh Entities

Meshed entities such as hexes or tris can be smoothed individually or in groups by specifying the entities in a list.

To smooth hexes and tets

  1. On the Command Panel, click on Mesh.

  2. Click on Hex or Tet.

  3. Click on the Smooth action button.

  4. Enter the appropriate value for Hex ID(s) or Tet ID(s). This can also be done using the Pick Widget function.

  5. Optionally, specify the scheme.

  6. Click Apply.

To smooth quads, tris and edges

  1. On the Command Panel, click on Mesh.

  2. Click on Quad, Tri or Edge.

  3. Click on the Smooth action button.

  4. Enter the appropriate value for Quad ID(s), Tri ID(s) or Edge ID(s). This can also be done using the Pick Widget function.

  5. Optionally, specify the scheme.

  6. Enter the appropriate value for Target Surface ID or Target Curve ID. This can also be done using the Pick Widget function.

  7. Click Apply.

Smooth {Hex|Tet} <range>[Scheme {Equipotential|Laplacian|Random}]

Smooth {Face|Tri} <range>[Scheme {Laplacian|Centroid|Winslow}] [Target Surface <id>]

Smooth Edge <id_range> [Scheme Laplacian] [Target Surface <id>]

The smooth edge command allows the user to smooth individual edges owned by a curve. Specifying a target curve allows the user to move the edges on a meshed curve to a different curve. The target curve or surface does not necessarily need to be the owning curve or surface of the nodes. For example, if given two curves (A and B) and curve A was meshed, the target smoothing could be used to move all of the edges of curve A onto curve B. The smooth scheme option for the edge smoothing is currently limited only to the laplacian scheme.

The smooth face|tri command is used to smooth individual faces or triangles. The target option is similar to the curve target option above. Faces or Tris can be smoothed to a surface that is not necessarily the owning surface; in fact, the faces or tris do not even have to be attached to any surface. This makes this option especially helpful for smoothing free meshes. Specifying a smooth scheme allows for relaxation based surface smoothers (i.e. centroid area pull, laplacian, winslow) to be utilized during targeted smoothing. It is not currently enabled for optimization based smoothing schemes.

5.6.1.3 Smooth Tolerance

Smoothing algorithms move nodes in an attempt to improve the quality of the mesh elements. Most of these algorithms are iterative, and the algorithm terminates when some criterion is met. Specifically, for the Laplacian and Equipotential style smoothers, smoothing is terminated either by satisfying a smoothing tolerance or by performing the maximum number of smoothing iterations. For these smoothers, the smooth tolerance may be set by the user:

[Set] Smooth Tolerance <tol>

The value <tol> tells the smoother to stop when node movement is less than tol * local_minimum_edge_length.

The default value for tol is 0.05. The maximum number of iterations may be set by the user. For volumes, the smooth tolerance and iterations may also be set by

(Note: The above command affects all smoother that respect tolerance.)

Volume Smooth Tolerance <tol>

Volume Smooth Iterations <iters>

(Note: The above two commands only affect the volume smoothers.)

5.6.1.4 Boundary Mesh Smoothing

Where used in the smooth schemes below, the Free keyword permits the nodes lying on the bounding entities to "float" along those entities; without this keyword, boundary nodes remain fixed.

Nodal positions may be fixed so that no smoothing scheme, either implicit or explicit, will move them, with the following command:

{Curve|Surface|Volume} <range> Node Position {Fixed|Free}

Node <range> Position {Fixed|Free}

The following command does not fix nodal positions, but does fix the connectivity of the mesh, preventing certain volume schemes from changing the bounding mesh:

{Curve|Surface|Volume} Mesh {Fixed|Free}

The additional following scheme is available for research purposes and can be used only after issuing a set developer on command.

5.6.1.5 Adjust Boundary Orthogonal

Applies to: Surface Meshes

Summary: This smoother creates a near orthogonal grid and optionally will make an orthogonal grid if the geometry permits.

To adjust boundary orthogonal

  1. On the Command Panel, click on Mesh and then Surface.

  2. Click on the Smooth action button.

  3. Select Orthogonal from the drop-down menu.

  4. Enter in the appropriate values for Surface ID(s). This can also be done using the Pick Widget function.

  5. Optionally enter in the appropriate settings for Normal to Curve and Fix Nodes On Curve.

  6. Click Apply.

adjust boundary [orthogonal] {surface|group} <id_range> [Iterations <val>] [snap_to_normal [curve <id>] [fixed curve <id>]]

Discussion:

Adjust Boundary Orthogonal iteratively applies the centroidal area pull algorithm with free boundary nodes. This approximates the affects of an elliptical smoothing algorithm. This algorithm works best with mapped meshes which have an element aspect ratio close to 1. The snap_to_normal option is not allowed for non-mapped meshes.

Figure 366

Figure 367

Figure 1. The affect of the "adjust boundary orthogonal surface 1" on a chevron shape. Note that the nodes are pulled into the acute angles and the edges at the boundary are pulled into a position that is closer to perpendicular at the boundary.

With some geometries with a mapped mesh it is possible to draw a line that is orthogonal to a boundary curve along the entire u or v direction of the mesh. In these cases, this command optionally allows the user to specify the option snap_to_normal. Nodal lines will be created normal to the first curve this is found that will allow perpendicular element edges to span the mesh. The user may optionally specify a curve that is used as the perpendicular basis for projecting the edges.

An edge may also be set as fixed so that a subsequent adjust boundary orthogonal will not affect that edge. If both snap_to_normal and fixed are set, the curve ids MUST be identical.

Figure 368

Figure 369

Figure 2. The affect of adjust boundary orthogonal with the snap to normal curve option is shown. The resulting mesh is orthogonal to the given boundary and projects straight through the mesh.

The following is an example of how to use this command to create the desired grid in Cubit. Note that to get the desired orthogonal grid the user must adjust the surfaces one at a time.

reset
create surface ellipse major radius 2 minor radius 1 zplane
imprint volume 1with position 0 1 0
create curve offset curve 2 distance 1 extended
create curve offset curve 4 distance 2 extended
create surface skin curve 2 4
create surface skin curve 4 5
delete surface 1
merge all
surface all scheme map
mesh surf all
adjust boundary orthogonal surface 2 snap_to_normal curve 6
adjust boundary orthogonal surface 3snap_to_normal curve 4 fixed curve 4

5.6.1.6 Centroid Area Pull

Applies to: Surface Meshes

Summary: Attempts to create elements of equal area

To create elements of equal area

  1. On the Command Panel, click on Mesh and then Surface.

  2. Click on the Smooth action button.

  3. Select Centroid Area from the drop-down menu.

  4. Enter in the appropriate values for Surface ID(s). This can also be done using the Pick Widget function.

  5. Click Apply.

Surface <range> Smooth Scheme Centroid Area Pull [Free]

Discussion:

This smooth scheme attempts to create elements of equal area. Each node is pulled toward the centroids of adjacent elements by forces proportional to the respective element areas (Jones, 74).

5.6.1.7 Condition Number

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

Summary: Optimizes the mesh condition number to produce well-shaped elements.

To use the condition number smoother

  1. On the Command Panel, click on Mesh and then Surface.

  2. Click on the Smooth action button.

  3. Select Condition Number from the drop-down menu.

  4. Enter in the appropriate values for Surface ID(s). This can also be done using the Pick Widget function.

  5. Enter in the appropriate settings for Condition Number and Time (minutes).

  6. Click Apply.

Surface <surface_id_range> Smooth Scheme Condition Number [beta <double=2.0>] [cpu <double=10>]

Related Commands:

Untangle

Discussion:

The condition number smoother is designed to be the most robust smoother in Cubit because it guarantees that if the initial mesh is non-inverted then the smoothed mesh will also be non-inverted. The price exacted for this capability is that this smoother is not as fast as some of the other smoothers.

Condition Number measures the distance of an element from the set of degenerate (non-convex or inverted) elements. Optimization of the condition number increases this distance and improves the shape quality of the elements. Condition number optimization requires that the given mesh contain no negative Jacobians. If the mesh contains negative Jacobians and this command is issued, Cubit automatically calls the Untangle smoother and attempts to remove the negative Jacobians. If successful, condition number smoothing occurs next; the resulting mesh should have no negative Jacobians. If untangling is unsuccessful, condition number smoothing is not performed.

There is no "fixed/free" option with this command; boundary nodes are always held fixed.

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: Smoothing will proceed until the objective function has been minimized or until one of two user input stopping criteria are satisfied. To input your own stopping criterion use the optional parameters ’beta’ and ’cpu’ in the command above. The value of beta is compared at each iteration to the maximum condition number in the mesh. If the maximum condition number is less than the value of beta, the iteration halts. In Cubit condition number ranges from 1.0 to infinity, with 1.0 being a perfectly shaped element. Thus the smaller the maximum condition number, the better the mesh shape quality. The default value of the beta parameter is 2.0. The value supplied for the "cpu" stopping criterion tells the code how many minutes to spend trying to optimize the mesh. The default value is 10 minutes. Optimization may also be halted by using "control-C" on your keyboard.

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 first and whether the stopping criteria have been 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 ave_cond=value4, max_cond=value5, min_jsc=value6

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 but this is attained only for a perfect mesh. ave_cond, max_cond, and min_jsc are the average and maximum condition number, and the minimum scaled jacobian. ave_cond generally decreases monotonically because it is directly related to value1.

5.6.1.8 Edge Length

Applies to: Surfaces

Summary: This smoother tries to make all edge lengths equal

To use edge length smoothing

  1. On the Command Panel, click on Mesh and then Surface.

  2. Click on the Smooth action button.

  3. Select Edge Length from the drop-down menu.

  4. Enter in the appropriate values for Surface ID(s). This can also be done using the Pick Widget function.

  5. Click Apply.

Surface <range> Smooth Scheme Edge Length

Discussion:

Edge Length smoothing in Cubit is provided by MESQUITE, a mesh optimization toolkit by Argonne National Laboratory and Sandia National Laboratories. (See Brewer, et al. 2003 for more details on the MESQUITE toolkit.) This smooth scheme may be useful for lengthening the shortest edge length in paved meshes.

Interior node positions are adjusted in an optimization loop where the optimal element has an ideal shape (square) and has an area equal to the average element area of the input mesh.

NOTE: This smoother should be avoided when the mesh contains high aspect-ratio elements that the user wants to keep.

Because this smoother essentially tries to make all the edge lengths equal, it is designed to work well on meshes whose elements have aspect ratios close to 1. The farther from 1 the aspect ratio is, the less applicable this smoother will be.

5.6.1.9 Equipotential

Applies to: Volume Meshes

Summary: Attempts to equalize the volume of elements attached to each node

To use edge length smoothing

  1. On the Command Panel, click on Mesh and then Volume.

  2. Click on the Smoothing action button.

  3. Select Equipotential from the drop-down menu.

  4. Enter in the appropriate values for Volume ID(s). This can also be done using the Pick Widget function.

  5. Optionally, select Specify Tolerance to set a specific Tolerance value.

  6. Click Apply.

Volume <range> Smooth Scheme Equipotential [Free]

Discussion:

This smoother is a variation of the Equipotential (Jones, 74) algorithm that has been extended to manage non-regular grids (Tipton, 90). This method tends to equalize element volumes as it adjusts nodal locations. The advantage of the equipotential method is its tendency to "pull in" badly shaped meshes. This capability is not without cost: the equipotential method may take longer to converge or may be divergent. To impose an equipotential smooth on a volume, each element must be smoothed in every iteration–a typically expensive computation. While a Laplacian method can complete smoothing operations with only local nodal calculations, the equipotential method requires complete domain information to operate.

5.6.1.10 Laplacian

Applies to: Curve, Surface, and Volume meshes

Summary: Tries to make equal edge lengths

To use laplacian smoothing

  1. On the Command Panel, click on Mesh.

  2. Click on Volume, Surface or Curve.

  3. Click on the Smoothing action button.

  4. Select Laplacian from the drop-down menu.

  5. Enter in the appropriate values for Volume ID(s), Surface ID(s) or Curve ID(s). This can also be done using the Pick Widget function.

  6. Optionally, select Specify Tolerance to set a specific Tolerance value.

  7. Click Apply.

{Surface|Volume} <range> Smooth Scheme Laplacian [Free] [Global]

Discussion:

The length-weighted Laplacian smoothing approach calculates an average element edge length around the mesh node being smoothed to weight the magnitude of the allowed node movement (Jones, 74). Therefore this smoother is highly sensitive to element edge lengths and tends to average these lengths to form better shaped elements. However, similar to the mapping transformations, the length-weighted Laplacian formulation has difficulty with highly concave regions.

Currently, the stopping criterion for curve smoothing is 0.005, i.e., nodes are no longer moved when smoothing moves the node less than 0.005 * the minimum edge length. The maximum number of smoothing iterations is the maximum of 100 and the number of nodes in the curve mesh. Neither of these parameters can currently be set by the user.

Using the global keyword when smoothing a group of surfaces will allow smoothing of mesh on shared curves to improve the quality of elements on both surfaces sharing that curve.

5.6.1.11 Mean Ratio