X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=doc%2Fsalome%2Fexamples%2Fdefining_hypotheses_ex17.py;h=36d8f6c1f4f2e091cd456e00e7a7a9c23f21e147;hp=d21638fcc2a717235a51c5a7844df9a613e1f2d0;hb=3c2cd16c45db08d42627b9bd4003fb2d604ea5b1;hpb=65c94961fc7741ab11105fa7ca31beeac77d686b diff --git a/doc/salome/examples/defining_hypotheses_ex17.py b/doc/salome/examples/defining_hypotheses_ex17.py index d21638fcc..36d8f6c1f 100644 --- a/doc/salome/examples/defining_hypotheses_ex17.py +++ b/doc/salome/examples/defining_hypotheses_ex17.py @@ -25,6 +25,7 @@ ignoreFaces = [ faces[0], faces[-1]] geompy.addToStudy( shape, "shape" ) geompy.addToStudyInFather( shape, face1, "face1") +# 3D Viscous layers mesh = smesh.Mesh(shape, "CFD") @@ -45,3 +46,21 @@ mesh.Compute() mesh.MakeGroup("Tetras",SMESH.VOLUME,SMESH.FT_ElemGeomType,"=",SMESH.Geom_TETRA) mesh.MakeGroup("Pyras",SMESH.VOLUME,SMESH.FT_ElemGeomType,"=",SMESH.Geom_PYRAMID) mesh.MakeGroup("Prims",SMESH.VOLUME,SMESH.FT_ElemGeomType,"=",SMESH.Geom_PENTA) + +# 2D Viscous layers + +# 3 edges of the 4 edges of face1 +edgeIds = geompy.SubShapeAllIDs( face1, geompy.ShapeType["EDGE"])[:-1] + +mesh = smesh.Mesh(face1,"VicsousLayers2D") +mesh.Segment().NumberOfSegments( 5 ) + +# viscous layers should be created on 1 edge, as we set 3 edges to ignore +vlHyp = mesh.Triangle().ViscousLayers2D( 2, 3, 1.5, edgeIds, isEdgesToIgnore=True ) + +mesh.Compute() + +# viscous layers should be created on 3 edges, as we pass isEdgesToIgnore=False +vlHyp.SetEdges( edgeIds, False ) + +mesh.Compute()