SMS:Editing 2D Meshes: Difference between revisions

From XMS Wiki
Jump to navigationJump to search
Line 15: Line 15:
A set of selected nodes can be deleted by hitting the ''DELETE'' key or selecting the '''Delete''' command from the ''Edit'' menu. Elements attached to the nodes are also deleted.  
A set of selected nodes can be deleted by hitting the ''DELETE'' key or selecting the '''Delete''' command from the ''Edit'' menu. Elements attached to the nodes are also deleted.  


If the ''Confirm Deletions'' option in the ''Edit'' menu is active, SMS will prompt the user to confirm each deletion. This feature is helpful in preventing accidental deletions. The ''Confirm Deletions'' item is toggled by selecting it from the menu.
If the ''Confirm Deletions'' option in the ''Edit'' menu is active, SMS will prompt to confirm each deletion. This feature is helpful in preventing accidental deletions. The ''Confirm Deletions'' item is toggled by selecting it from the menu.


Options in the [[SMS:2D Mesh Node Options Dialog#Retriangulate Voids When Deleting|''Node Options'']] dialog will affect how nodes are deleted.
Options in the [[SMS:2D Mesh Node Options Dialog#Retriangulate Voids When Deleting|''Node Options'']] dialog will affect how nodes are deleted.

Revision as of 18:35, 29 December 2015


2D Mesh nodes can be inserted, deleted, or moved.

2D Mesh elements can be edited in the following ways:

  • Elements can be converted between linear and quadratic.
  • The type of element can be changed from a 3 node element to a 4 node element by merging triangles.
  • A 4 node element can be converted to a 3 node element by splitting the 4 node element.
  • Elements can be refined automatically.
  • The material assigned to an element can be changed.
  • Poorly shaped boundary triangles can be automatically selected for deletion.
  • Breaklines can be inserted into the mesh

Deleting Nodes

A set of selected nodes can be deleted by hitting the DELETE key or selecting the Delete command from the Edit menu. Elements attached to the nodes are also deleted.

If the Confirm Deletions option in the Edit menu is active, SMS will prompt to confirm each deletion. This feature is helpful in preventing accidental deletions. The Confirm Deletions item is toggled by selecting it from the menu.

Options in the Node Options dialog will affect how nodes are deleted.

Editing Node Coordinates

The coordinates of a 2D Mesh node can be edited by selecting the mesh node and entering the new coordinates in the edit boxes in the Edit Window. It is also possible to drag an existing node to a new location by clicking on the node and moving the mouse with the button held down until the node is in the desired position.

If the snap to grid option in the Drawing Grid Options dialog is set, the node will move in increments corresponding to the drawing grid. If the node being dragged is connected to one or more elements, SMS will not allow the node to be dragged to a position where one of the surrounding elements would become ill-formed.

Since it is possible to accidentally drag points, nodes can be "locked" to prevent them from being dragged by selecting the Lock All Nodes item from the Nodes menu. The nodes can be unlocked by unselecting Lock All Nodes from the Nodes menu.

Merging Triangles

The triangulate operation creates a mesh composed entirely of triangles. In some cases it is desirable to have the mesh composed primarily of quadrilateral elements. Quadrilateral elements result in less elements which leads to faster solutions, and quadrilateral elements are often more stable numerically. To address this need, two options are provided for converting triangular elements to quadrilateral elements:

The Merge Triangles Command

The Merge Triangles command in the Elements menu can be used to automatically merge pairs of adjacent triangular elements into quadrilateral elements. Upon selecting the Merge Triangles command, the user is prompted to input a minimum interior angle. This angle should be between 0 and 90 degrees. If no elements are selected, all of the triangular elements in the mesh are then processed. If some elements have been selected, only the selected elements are processed.

The conversion process works as follows:

  1. The set of elements to be processed is traversed one element at a time. Each triangular element that is found is compared with each of its three adjacent elements. If the adjacent element is a triangle, the trapezoid formed by the triangle and the adjacent triangle is checked.
  2. Each of the four interior angles of the trapezoid is computed and compared to a minimum interior angle. If all of the angles are greater than the user-specified minimum interior angle, then the two triangles are merged into a single quadrilateral element.

This process is repeated for all of the elements. The merging scheme will not always result in a mesh composed entirely of quadrilateral elements. Some triangular elements are often necessary in highly irregular meshes to provide transitions from one region to the next.

The Merge/Split Tool

The other option for merging triangles involves the use of the Merge/Split tool in the Tool Palette. This tool can be used to manually merge triangles one pair at a time rather than using the automatic scheme described above.

The manual method is also useful to edit or override the results of the automatic merging scheme in selected areas. The Merge/Split tool can also be used to undo a merge. A quadrilateral element can be split into two triangles by clicking anywhere in the interior of the element. This tool is useful if a pair of triangles is inadvertently merged.

Splitting Quadrilaterals

Occasionally it is necessary to split quadrilateral elements into triangular elements. For example, in order for new nodes to be automatically inserted into a mesh, the elements in the region where the node is inserted must be triangular. Also, in order to process a breakline, the elements in the region of the breakline must be triangular. In such situations, it may be necessary to split a group of quadrilateral elements into triangular elements. Two options are provided for splitting quadrilateral elements:

The Split Quads Command

The Split Quads command in the Mesh menu can be used to split a group of quadrilateral elements into triangular elements. If no elements are selected, all of the quadrilateral elements in the mesh are split. If some elements have been selected, only the selected quadrilateral elements are split.

The Merge/Split Tool

The other option for splitting quadrilateral elements involves the use of the Merge/Split tool in the Tool Palette. If the Merge/Split tool is selected, clicking anywhere in the interior of a quadrilateral element with the mouse cursor will cause the element to be split into two triangles. The shortest diagonal through the quadrilateral is chosen as the common edge of the two new triangular elements.

Subset Edit Mode

When working with large meshes, even simple operations can take a long time. Therefore, it can be useful to work on only a portion of the mesh. This is referred to as Subset Edit Mode.

Entering Mesh Subset Edit Mode

To enter subset edit mode:

  1. Select elements that cover the area to be edited
  2. Enter subset edit mode in one of the two following ways
    1. Right-click on the selected elements and select Edit Subset
    2. Right-click on the mesh tree item and select Edit Subset

The icon in the tree menu for the mesh being edited is updated to indicate that a subset of this mesh is being edited.

Caution: Datasets other than the depth/elevation dataset are deleted upon entering mesh subset edit.

Prohibited Actions While in Subset Edit Mode

  • Making changes on the border of the mesh subset
  • Making changes outside of the mesh subset
  • Reading in meshes from file
  • Creating meshes from feature map or scatter data
  • Running numerical models
  • Changing attributes such as boundary conditions on nodes, nodestrings, and elements
  • Renumbering node/nodestring/element ids

Exiting Mesh Subset Edit Mode

As noted above, several operations are not allowed while in subset edit mode. It is intended that this mode only be used to facilitate editing sections of the mesh. SMS includes to commands to exit subset edit mode when the desired edits are completed, or to revert and undo any local edits.

Commit Mesh

Merge the changes made to the subset of the mesh with the rest of the mesh by selecting Commit mesh from the right-click menu of either the mesh tree item or the select element tool. Commit mesh will exit subset edit mode.

Revert Mesh

Revert to how the mesh was upon entering mesh subset edit mode by selecting Revert mesh from the right-click menu of either the mesh tree item or the select element tool. Revert mesh will exit subset edit mode.

Related Topics