1 # CEA/LGLS 2004, Francis KLOSS (OCC)
2 # ==================================
13 # grid compound of 3 x 3 elements
14 # an element is compound of 3 cylinders concentriques
15 # an element is centered in a square of the grid
16 # the smaller cylinder is a hole
41 e_boite = MakeBox(g_x-g_arete, g_y-g_hauteur, g_z-g_arete, g_x+g_arete, g_y+g_hauteur, g_z+g_arete)
44 e_hauteur = 2*g_hauteur
45 e_centre = MakeVertex(g_x, g_y-g_hauteur, g_z)
46 e_dir = MakeVectorDXDYDZ(0, 1, 0)
48 e_cyl0 = MakeCylinder(e_centre, e_dir, g_rayon3, e_hauteur)
49 e_cyl1 = MakeRotation(e_cyl0, e_dir, e_pi4)
51 e_blo1 = MakeCut(e_boite, e_cyl1)
53 e_cyl0 = MakeCylinder(e_centre, e_dir, g_rayon2, e_hauteur)
54 e_cyl2 = MakeRotation(e_cyl0, e_dir, e_pi4)
56 e_blo2 = MakeCut(e_cyl1, e_cyl2)
58 e_cyl0 = MakeCylinder(e_centre, e_dir, g_rayon1, e_hauteur)
59 e_cyl3 = MakeRotation(e_cyl0, e_dir, e_pi4)
61 e_blo3 = MakeCut(e_cyl2, e_cyl3)
67 p_tools.append(MakePlane(e_centre, MakeVectorDXDYDZ( 1, 0, 1), g_trim))
68 p_tools.append(MakePlane(e_centre, MakeVectorDXDYDZ(-1, 0, 1), g_trim))
70 p_element = MakePartition([e_blo1, e_blo2, e_blo3], p_tools, [], [], ShapeType["SOLID"])
75 piece = MakeMultiTranslation2D(p_element, MakeVectorDXDYDZ(1, 0, 0), 2*g_arete, g_grid,
76 MakeVectorDXDYDZ(0, 0, 1), 2*g_arete, g_grid)
81 piece_id = addToStudy(piece, "Grid3partition")
86 # Create hexahedrical mesh on piece
87 # ---------------------------------
89 m_hexa=MeshHexa(piece, 4, "Grid3partitionHexa")