]> SALOME platform Git repositories - modules/smesh.git/blobdiff - doc/salome/gui/SMESH/input/tui_defining_hypotheses.doc
Salome HOME
0020832: EDF 1359 SMESH : Automatic meshing of boundary layers
[modules/smesh.git] / doc / salome / gui / SMESH / input / tui_defining_hypotheses.doc
index 1581e7c2fbb4f495a4d0719af05e136de7ec1cf5..4ced1731af1869d3d47c36e9c75af26554ea6726 100644 (file)
@@ -673,6 +673,51 @@ import2hyp.SetCopySourceMesh(True,True)
 tgtMesh.Compute()
 \endcode
 
+\anchor tui_viscous_layers
+<h2>Viscous layers construction</h2>
+
+\code
+from smesh import *
+SetCurrentStudy(salome.myStudy)
+
+X = geompy.MakeVectorDXDYDZ( 1,0,0 )
+O = geompy.MakeVertex( 100,50,50 )
+plane = geompy.MakePlane( O, X, 200 ) # plane YZ
+
+box = geompy.MakeBoxDXDYDZ(200,100,100)
+
+shape = geompy.MakeHalfPartition( box, plane )
+
+faces = geompy.SubShapeAllSorted(shape, geompy.ShapeType["FACE"])
+face1 = faces[1]
+ignoreFaces = [ faces[0], faces[-1]]
+
+geompy.addToStudy( shape, "shape" )
+geompy.addToStudyInFather( shape, face1, "face1")
+
+
+mesh = Mesh(shape, "CFD")
+
+mesh.Segment().NumberOfSegments( 4 )
+
+mesh.Triangle(NETGEN_2D)
+mesh.Quadrangle(face1)
+mesh.Compute()
+algo3D = mesh.Tetrahedron(NETGEN)
+
+thickness = 20
+numberOfLayers = 10
+stretchFactor = 1.5
+layersHyp = algo3D.ViscousLayers(thickness,numberOfLayers,stretchFactor,ignoreFaces)
+
+mesh.Compute()
+
+mesh.MakeGroup("Tetras",VOLUME,FT_ElemGeomType,"=",Geom_TETRA)
+mesh.MakeGroup("Pyras",VOLUME,FT_ElemGeomType,"=",Geom_PYRAMID)
+mesh.MakeGroup("Prims",VOLUME,FT_ElemGeomType,"=",Geom_PENTA)
+
+\endcode
+
 \n Other meshing algorithms:
 
 <ul>