You are on page 1of 7

Exercise 3 3D Geometry and Mesh Generation

Introduction This hands-on session illustrates 3D geometry creation and meshing. Example 1 Brick with Pyrimid This first example is used to demonstrate simple 3D meshing and to reinforce the concept of connectivity. 1. Create a 101010 brick using the Create Real Brick from Primitive tool. The brick should be centered about the origin. 2. Create a tetrahedron using the Create Real Pyramid form. Specify 10 for the height, 3 sides, R1 = R2 = 4 , and R3 = 0 . Direct the tetrahedron along the positive x axis. 3. Use the Move/Copy Volumes form to translate the tetrahedron by x = 5 so that its base is coplanar with the side of the cube. 4. Rotate the view.

5. Mesh the cube using the Map scheme and a spacing defined by Interval Size of 1. 6. Mesh the tetrahedron using the Tet Primitive scheme and a spacing defined by Interval Size of 1. 7. Shade the volumes using the Render Model button and examine the plane that is shared by the cube and the tetrahedron. Note that the nodes of each volume mesh in the shared plane are not aligned. This is an example of a non-conformal mesh.

8. To generate a conformal mesh, the two volumes must be connected. Reset the mesh in the command line and then perform a bidirectional split of the two volumes. In the Split Volume form, do not use the Retain option. Note that the same effect could have resulted if the square face of the cube was split with the triangular face of the tetrahedron. 9. Mesh the tetrahedron using the Tet Primitive scheme and a spacing defined by Interval Size of 1.0. 10. Mesh the cube. Note that GAMBIT selects the Cooper scheme due to the triangular cut-out imposed on the side face. Use a spacing defined by Interval Size of 1.0. 11. Examine the plane that is shared by the two volumes and note the conformal mesh.

12. Examine the mesh in the face on the cube opposite that of the tetrahedron. Note how the mesh on the base of the tetrahedron is imprinted on this face. An algorithm is used to smooth the resulting mesh and can be disabled if necessary. This can be done by changing Mesh.Cooper.SMOOTH_PROJECTED_FACE_MESH to 0 in the Edit Defaults form (1 is the default setting).

SMOOTH_PROJECTED_FACE_MESH = 1

SMOOTH_PROJECTED_FACE_MESH = 0

Example 2 Brick with Oblique Cylinder This is a short exercise to demonstrate that a relatively complex geometry can be meshed using the Cooper scheme. 1. Create a 101010 brick with the direction specification + X + Y + Z . 2. Create a cylinder with a height of 10 and a radius of 2 along the positive z axis.

3. Move the cylinder with a displacement of x = 4 , y = 4 , z = 7 .


4. Rotate the cylinder about the positive x axis by 20. 5. Unite the volumes. You can mesh the resulting volume using the Cooper scheme. Can you identify the source and side faces? 6. Mesh the volume with the Cooper scheme using a spacing of 0.8. Review which faces were used for the source and side faces.

Example 3 Spherical Void Inside a Brick (Method 1)

This example illustrates the use of volume decomposition to generate a high-quality hexahedral volume mesh. 1. Create a 101010 brick that is centered about the origin. 2. Create a sphere with a radius of 2 that is centered about the origin. 3. Subtract the sphere from the brick. 4. Create a cylinder with H = 10 and R = 1 that is centered along the y axis. 5. Split the original volume with the cylinder. 6. Referring to the lecture notes, perform an additional split using the diagonal face. 7. Mesh the volumes with the Cooper scheme using a Spacing of 0.8. Note that you may need to manually select the source faces. 8. Can you think of other ways to decompose this volume? A second method will be described in the next tutorial. There is at least one other method in addition to these two.
Example 4 Spherical Void Inside a Brick (Method 2)

This example demonstrates how the face vertex types may be used to impact a volume mesh. In some cases, it is necessary to change the vertex types to enforce a certain volume meshing scheme. This is shown in this exercise by revealing a different approach to volume decomposition of the volume used in the first example of the decomposition tutorial. The new approach requires that some face vertex types be modified. 1. Create a 101010 brick that is centered about the origin. 2. Create a sphere with a radius of 2. 3. Subtract the sphere from the brick. 4. Copy the bottom face of the brick with a displacement of y = 5 . Perform similar operations using the back face and one of the side faces. (The objective is to split the volume using three separate faces to generate eight separate (but connected) volumes.)

5. Perform split operations (split volume(s) with face(s)) using the newly created faces. After splitting there should be eight separate, connected volumes.

6. For simplicity, we will concern ourselves with meshing just one of the volumes. Use the Specify Display Attributes form to hide all but one of the volumes.

7. The resulting volume can be Coopered in a radial direction from the inner spherical surface to the three outer square faces. The three side faces that bridge the source faces must be meshable with the Map scheme before the volume can be meshed. All five vertices associated with each these faces are of the End vertex type by default. On each side face, change the vertex type of the vertex that is furthest from the spherical surface to the Side type.

8. Mesh the volume using a spacing of 0.5. Note that after changing vertex types, GAMBIT selects the Cooper scheme automatically. Forcing the Cooper scheme on this volume by simply selecting the source faces would not have worked in this case because GAMBIT is unable to choose the correct vertex to modify. GAMBIT does so in general by referring to the bound angle at each vertex. In this case, all angles are 90.

Source Faces
Example 5 Brick and Torus

Meshed Volume

1. Create a 103010 brick that is centered about the origin. 2. Create a torus with R1 = 10 and R2 = 2 that has its axis in the z direction. 3. Move the torus by x = 8 . 4. Perform the decomposition as explained in the lecture notes. 5. Mesh the volumes using the Cooper scheme using an interval spacing of 1.0. Sometimes the order of meshing the volumes when the Cooper tool is used is important. In this example, the curved cylinder must be meshed first. If the brick is meshed first, the paved mesh on the circular faces prevents the handle from being meshed using the Cooper tool.
Example 6 Two-Pipe Intersection (Different Radius)

1. Create a cylinder with H = 10 and R = 2 that is centered along the x-axis. 2. Create a second cylinder with H = 5 and R = 1 along the positive z-axis. 3. Unite the two cylinders. 4. Decompose the volume as discussed in the Meshing Strategy lecture notes. 5. Mesh the volumes with the Cooper scheme using a spacing of 0.4. You may need to manually select the source faces.

Example 7 Prismatic Void Inside a Brick

The following example does not follow any of those discussed in the lecture notes. If the volumes contain interior voids, they cannot be meshed using the submap scheme. This restriction does not apply to the tet/hybrid scheme. 1. Create a 101010 centered brick. 2. Create a 222 centered brick. 3. Subtract the small brick from the large one. 4. Note the default meshing scheme for the volume. Attempt to mesh the volume by forcing the submap scheme. Note the message in the transcript window. 5. Split the volume in half using a face. The split produces two volumes, neither of which contains an interior void. 6. Now mesh each volume with the default scheme and size of 1.0.