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
On the Command Panel, click on Mesh.
Click on Volume, Surface or Curve.
Click on the Smoothing action button.
Select the desired scheme from the drop-down menu.
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.
Depending on the scheme selected, optionally specify the Tolerance.
Enter any other appropriate settings.
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
On the Command Panel, click on Mesh.
Click on Hex or Tet.
Click on the Smooth action button.
Enter the appropriate value for Hex ID(s) or Tet ID(s). This can also be done using the Pick Widget function.
Optionally, specify the scheme.
Click Apply.
To smooth quads, tris and edges
On the Command Panel, click on Mesh.
Click on Quad, Tri or Edge.
Click on the Smooth action button.
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.
Optionally, specify the scheme.
Enter the appropriate value for Target Surface ID or Target Curve ID. This can also be done using the Pick Widget function.
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 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
[Set] Smooth Tolerance <tol>
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
Volume Smooth Tolerance <tol>
Volume Smooth Iterations <iters>
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.
{Curve|Surface|Volume} <range> Node Position {Fixed|Free}
Node <range> Position {Fixed|Free}
{Curve|Surface|Volume} Mesh {Fixed|Free}
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
On the Command Panel, click on Mesh and then Surface.
Click on the Smooth action button.
Select Orthogonal from the drop-down menu.
Enter in the appropriate values for Surface ID(s). This can also be done using the Pick Widget function.
Optionally enter in the appropriate settings for Normal to Curve and Fix Nodes On Curve.
Click Apply.
adjust boundary [orthogonal] {surface|group} <id_range> [Iterations <val>] [snap_to_normal [curve <id>] [fixed curve <id>]]
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 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 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
On the Command Panel, click on Mesh and then Surface.
Click on the Smooth action button.
Select Centroid Area from the drop-down menu.
Enter in the appropriate values for Surface ID(s). This can also be done using the Pick Widget function.
Click Apply.
Surface <range> Smooth Scheme Centroid Area Pull [Free]
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
On the Command Panel, click on Mesh and then Surface.
Click on the Smooth action button.
Select Condition Number from the drop-down menu.
Enter in the appropriate values for Surface ID(s). This can also be done using the Pick Widget function.
Enter in the appropriate settings for Condition Number and Time (minutes).
Click Apply.
Surface <surface_id_range> Smooth Scheme Condition Number [beta <double=2.0>] [cpu <double=10>]
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
On the Command Panel, click on Mesh and then Surface.
Click on the Smooth action button.
Select Edge Length from the drop-down menu.
Enter in the appropriate values for Surface ID(s). This can also be done using the Pick Widget function.
Click Apply.
Surface <range> Smooth Scheme Edge Length
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
On the Command Panel, click on Mesh and then Volume.
Click on the Smoothing action button.
Select Equipotential from the drop-down menu.
Enter in the appropriate values for Volume ID(s). This can also be done using the Pick Widget function.
Optionally, select Specify Tolerance to set a specific Tolerance value.
Click Apply.
Volume <range> Smooth Scheme Equipotential [Free]
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
On the Command Panel, click on Mesh.
Click on Volume, Surface or Curve.
Click on the Smoothing action button.
Select Laplacian from the drop-down menu.
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.
Optionally, select Specify Tolerance to set a specific Tolerance value.
Click Apply.
{Surface|Volume} <range> Smooth Scheme Laplacian [Free] [Global]
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.