##### Personal tools
You are here: Home OCC Exercise 5

# Example of usage mesh 2D algorithms and hypothesis

## Example of usage mesh 2D algorithms and hypothesis

This sample is known to work on the latest SALOME release.
The compatibility with previous versions of SALOME is not guaranteed, though the sample can work on old versions also.

### Objective

This exercise illustrates the use of SMESH SALOME 2D algorithms and hypothesis and functionalities for meshing of the prism shape.

### Geometry

The sequence of actions is as follows:
• Launch SALOME.
• Create a new study.
• Launch GEOM module.
• Tap in Object Browser from popup menu - Refresh
• Explode into basic elements: (menu New Entity/Explode)
Explode Prism_1 into Faces.

### Construction and modification of the mesh

Launch SMESH module.
• Creation of Mesh_1: (menu Mesh/Create Mesh)
Geometry: Prism_1
2D algorithm: Netgen 1D-2D
2D hypothesis: Netgen 2D parameters
Max Size = 30
Fineness Fine
Uncheck “Second order”, “Allow quadrangles”, “Optimize” check-boxes
Validate => Mesh_1
• Compute Mesh_1
• Controls/Face Controls/Area
It is not necessary to define 1D algorithms and hypothesis for Netgen 1D-2D algorithm. Computed Mesh may to differ from the picture depending of algorithm Netgen.

• Edit hypothesis Netgen 2D parameters: (object browser – popup Edit Hypothesis)
OK
• Compute Mesh_1
As much quadrangles as possible is created when “Allow quadrangles” option is activated. Optimize permits to improve quality of mesh (compare meshes obtained with and without optimization).

• Edit Mesh_1 : (menu Edit Mesh/Sub-mesh)
1D algorithm: Wire Discretisation
1D Hypotesis: Local Length = 30
OK, Apply and Close

• Compute Mesh_1
Quadrangle mapping algorithm creates only quadrangles with exception of the last layer near edges where triangles can exist if necessary

• Creation of SubMesh_1 : (menu Mesh/Create Sub-mesh)
Geometry: Face_3 (side face in plane OXZ)
2D algorithm: Triangle (Mefisto)
2D hypothesis: Length from Edges
Apply and Close

• Compute Mesh_1
If  1D hypothesis and algorithm for sub-mesh are not defined then they are taken from the parent mesh

• Show only SubMesh_1
• Activate Control Aspect Ratio (Controls/Face Controls/Aspect Ratio)

• Smoothing of SubMesh_1: (menu Modification/ Smoothing)
Check “Select whole mesh, sub-mesh or group” check box
Method: Laplacian
Iteration limit: 50
Max Aspect ratio: 1.1
Apply and Close
Smoothing improves quality of mesh - reduce distortions of elements.

• Show Mesh_1
• Activate control "Area"
• From the Popup menu select Numbering / Display Elements
Select elements 236, 226
Check “Use numeric functor” radio button
Select functor: Minimum angle
Apply and Close

• Creation of SubMesh_2 : (menu Mesh/Create Sub-mesh)
Mesh: Mesh_1
Geometry : Face_4 (side face)
2D algorithm: Projection 2D
• 2D hypothesis: Source Face
Source  Face - Face 3
OK, Apply and Close
• Compute Mesh_1
Projection_2D algorithm permits to create the same mesh on face as already existing mesh. All missed parameters of hypothesis: Source Face are filled automatically. Note, that 1D hypothesis for both Faces have to be the same. Otherwise  algorithm Projection 2D fails.

• Union of triangles: (menu Modification/ Union of Triangles)
Check “Select from/ SubMesh” check box
Select SubMesh_2 or some elements