Personal tools
You are here: Home User Section SALOME Tutorials 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.
  • Load script Prism.py (menu File/Load script)
  • 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.




  • Edit hypothesis Netgen 2D parameters: (object browser – popup Edit hypothesis)
    Check “Allow quadrangles”, “Optimize” check-boxes
    Validate => Mesh_1
  • 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/SubMesh)
    2D algorithm: Quadrangle mapping
    1D algorithm: Wire Discretisation
    1D hypotesis: Local Lenght = 30
    Validate => Mesh_1

  • 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 SubMesh)
    Geometry: Face_3 (side face in plane OXZ)
    2D algorithm: Triangle Mefisto
    2D hypothesis: Length from Edges
    Validate => SubMesh_1

  • Compute Mesh_1
If  1D hypothesis and algorithm for submesh 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, submesh or group” check box
    Fixed nodes ids: Select submesh_1
    Method: Laplacian
    Iteration limit: 50
    Max Aspect ratio: 1.1
    Validate
Smoothing improves quality of mesh - reduce distortions of elements.

  • Show Mesh_1
  • Activate control "Area"
  • From the Popup menu select Numbering / Display Elements
  • Cutting of quadrangles: (menu Modification/ Cutting of quadrangles)
    Select elements 236, 226
    Check “Use numeric functor” radio button
    Select functor: Minimum angle
    Validate
Cutting of quadrangles allows to split quadrangles with bad shape into 2 triangles.

  • Creation of SubMesh_2 : (menu Mesh/Create SubMesh)
    Mesh: Mesh_1
    Geometry : Face_4 (side face)
    2D algorithm: Projection 2D
  • 2D hypothesis: Source Face
    Source  Face_ Face 3
    Validate => SubMesh_2
  • 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/ Sub-Mesh” check box
    Select submesh_2 or some elements
    Click "Add"
    Select criterion: Minimum angle
    Validate
Union of triangles allows to combine 2 triangles into quadrangle for several triangles taking into account selected criterion.

  • Controls/Face Controls/Minimum angle
Different controls check quality of mesh. Elements with bad shape should be repaired using different modifications.





Document Actions