kubrix rhino manual

180
Kubrix/Rhino Users’ Manual REV012012 Page 1 1 Kubrix® is a registered trademark of Simulation Works, Inc. Kubrix/Rhino 1 Users’ Manual Complex Grid Generation for Mining& Petroleum Geomechanics

Upload: lilian-konishi

Post on 20-Nov-2015

166 views

Category:

Documents


39 download

DESCRIPTION

Rhino Manual

TRANSCRIPT

  • Kubrix/Rhino Users Manual REV012012 Page 1

    1

    Kubrix is a registered trademark of Simulation Works, Inc.

    Kubrix/Rhino1 Users Manual Complex Grid Generation for Mining& Petroleum Geomechanics

  • Kubrix/Rhino Users Manual Page 2

    Rhino is a registered trademark of Robert McNeel & Associates

  • Kubrix/Rhino Users Manual Page 3

    Contents SETTING UP YOUR RHINO/KUBRIX WORK ENVIRONMENT ...................................... 9

    Installing Kubrix and Rhino ....................................................................................................... 9

    Displaying the most useful Rhino Toolbars and the Kubrix-specific buttons ............................ 9

    The Rhino command area ........................................................................................................... 9

    Icon/button names ..................................................................................................................... 10

    Rotating and panning views ...................................................................................................... 10

    Colorizing all objects in the model ........................................................................................... 10

    Useful shortcuts ........................................................................................................................ 10

    The following shortcuts may be added to Rhino help in speeding up the mesh cleanup process: ................................................................................................................................. 10

    AlignMeshVertices: ............................................................................................................... 10

    Tolerances ................................................................................................................................. 11

    Avoiding accidental object drag ............................................................................................... 11

    Object snap options ................................................................................................................... 11

    READING CAD DATA ............................................................................................................... 13

    General Guidelines ................................................................................................................... 13

    Solids & Surfaces ...................................................................................................................... 13

    Wireframes ................................................................................................................................ 13

    Points ........................................................................................................................................ 13

    Facetized surfaces: polygonal surfaces ..................................................................................... 14

    Facetized surfaces: triangular surfaces ..................................................................................... 14

    SPACERANGER .......................................................................................................................... 15

    Modeling problems addressed by SpaceRanger ....................................................................... 15

    How SpaceRanger Helps .......................................................................................................... 15

    New in 8.2 ................................................................................................................................. 15

    How does SpaceRanger work? ................................................................................................. 15

    Examples ................................................................................................................................... 16

    Sorting 3DEC zone material IDs ............................................................................................. 16

    Sorting 3DEC block material IDs ........................................................................................... 17

    Other examples: ........................................................................................................................ 18

    SpaceRanger version 8 options: ................................................................................................ 18

    TUTORIAL 1- INTERNAL WALLS AND MULTIPLE MATERIALS .................................... 19

  • Kubrix/Rhino Users Manual Page 4

    Creating a single-material model ............................................................................................. 19 END OF TUTORIAL 1 ............................................................................................................ 21

    TUTORIAL 2 VERTICAL SHAFT IN A STRATIFIED SOIL ............................................... 22

    Startup and excavation of the shaft ........................................................................................... 22

    Creating a triangular surface mesh of the model ...................................................................... 24

    Creating an all-hexahedral mesh for FLAC3D using Kubrix ................................................... 25

    Creating a model of both the inside and outside of the excavated shaft ................................... 28

    Creating an all-hexahedral mesh of the capped model, with stratified soil .............................. 31

    Creating 3DEC blocking of the capped model, with stratified soil .......................................... 36

    Creating Octree mesh of the capped model, with stratified soil ............................................... 37

    END OF TUTORIAL 2 ............................................................................................................ 39

    TUTORIAL 3 20 BIFURCATING CIRCULAR TUNNELS ................................................ 40

    Startup and creation of a horizontal tunnel of diameter 10 and length 200 .............................. 40

    Creating the bifurcation and the box surrounding it ................................................................. 41

    Creating a Triangular Surface Mesh of the Model ................................................................... 43

    Creating a convex blocking for 3DEC ...................................................................................... 45

    Creating an all-hexahedral grid for FLAC3D Using KUBRIX ................................................ 45

    Creating a tetrahedral grid for FLAC3D Using KUBRIX ........................................................ 48

    Creating octree grids for FLAC3D or blocks for 3DEC ........................................................... 49

    Creating a FLAC3D or a 3DEC model for sequential excavation ........................................... 51

    END OF TUTORIAL 3 ............................................................................................................ 55

    TUTORIAL 4: GEOMETRY CLEANUP GIVEN AN EXISTING TRIANGULATED SURFACE..................................................................................................................................... 56

    Startup and reading, joining and centering the model around the origin .................................. 56

    Automatic sewing of neighboring free edges ........................................................................... 57

    Removal of degenerate, duplicate, non-manifold and isolated triangles .................................. 59

    Automatic closure of all nearly planar open holes ................................................................... 59

    Removal of artifacts due to triangulation noise: defeaturing. ............................................... 60

    Saving the closed triangular surface as a formatted (ASCII) STL file ..................................... 66

    Using the Kubrix surface diagnostics to identify and repair mesh self- intersections. ............. 66

    Creating a box representing the computational volume ........................................................... 67

    Reading the STL file into KUBRIX and automatic hexahedral meshing ................................. 67

    END OF TUTORIAL 4 ............................................................................................................ 70

  • Kubrix/Rhino Users Manual Page 5

    TUTORIAL 5 OPEN PIT: CREATING A MODEL FROM CONTOUR LINES .................. 71

    Startup and approximation of contour lines .............................................................................. 71

    Creating the benches ................................................................................................................. 75

    Creating the bench faces ........................................................................................................... 79

    An alternative method of creating the benches and the bench faces ........................................ 80

    Creating an outer box ................................................................................................................ 81

    Creating a surface mesh ............................................................................................................ 83

    Creating a 3DEC model ............................................................................................................ 84

    Creating a FLAC3D model ....................................................................................................... 85

    Creating an Octree model ......................................................................................................... 85

    A better Octree model ............................................................................................................... 86

    END OF TUTORIAL 5 ............................................................................................................ 88

    TUTORIAL 6: BUILDING 3DEC MODELS IN RHINO WITHOUT USING KUBRIX.......... 89

    Fundamentals ............................................................................................................................ 89

    Only certain Rhino operations result in solids .......................................................................... 89

    Exporting solids as VRML 2.0 files ......................................................................................... 89

    Exporting meshes (instead of solid) as VRML 2.0 files ........................................................... 89

    Translating VRML 2.0 files into 3DEC POLY file .................................................................. 90

    Example 1: Dynamic analysis of a Flemish bond brick wall ................................................... 90

    Export the support ................................................................................................................ 91

    Export the wall ...................................................................................................................... 91

    Running 3DEC ........................................................................................................................ 91

    Example 2: borehole in a block ................................................................................................ 93

    END OF TUTORIAL 6 ............................................................................................................ 96

    TUTORIAL 7: WORKING WITH MESHES: ADDING AN INTERNAL WALL TO AN EXISTING MESH. ....................................................................................................................... 97

    Partitioning a mesh of faces into a few manageable pieces ...................................................... 97

    Defining a Polyline that cuts the tunnel along its length .......................................................... 99

    Partitioning meshes ................................................................................................................. 101

    Building an internal wall ......................................................................................................... 102

    Putting it all together ............................................................................................................... 105

    Editing remaining naked edges ............................................................................................... 106

    END OF TUTORIAL 7 .......................................................................................................... 108

  • Kubrix/Rhino Users Manual Page 6

    TUTORIAL 8: IMPORTING INTERMITTENT FAULTS IN FLAC3D & 3DEC WITH KUBRX....................................................................................................................................... 109

    Importing meshes and extending the pit beyond its boundary ............................................... 109

    Extension of the pit ............................................................................................................. 110

    Specifying the computational domain .................................................................................... 114

    Computing intersections ......................................................................................................... 120

    Calculating intersection 1 ................................................................................................... 121

    Extending Fault2 for a clean intersection with Fault1 ........................................................ 122

    Back to intersection 1 (now with a clean intersection curve) ............................................. 126

    Calculating intersection 2 ................................................................................................... 128

    Calculating intersection 2 ................................................................................................... 128

    Calculating intersection 3 ................................................................................................... 129

    Calculating intersection 3 ................................................................................................... 130

    Calculating intersection 4 ................................................................................................... 131

    Surface quality check .............................................................................................................. 132

    Quality check with Rhino ................................................................................................... 133

    Quality check & grid generation with Kubrix .................................................................... 134

    How does KUBRIX keep track of interfaces for FLAC3D? .................................................. 140

    Running the model with FLAC3D .......................................................................................... 141

    END OF TUTORIAL 8 .......................................................................................................... 142

    TUTORIAL 9: IMPORTING INTERFACES INTO LEGACY MODELS ............................... 143

    Initial Rhino tolerance setup and model import ...................................................................... 143

    Simplifying the internal surface .............................................................................................. 143

    Translating the FLAC3D mode into a .WRL file using SpaceRanger ................................... 144

    Retrieving the shape of the dam from the flac3d model ......................................................... 145

    Trimming the draped surface with the dam ............................................................................ 147

    Identifying the zones that intersect the trimmed surface ........................................................ 148

    Preparing the surfaces for Kubrix ........................................................................................... 149

    How does KUBRIX keep track of interfaces for FLAC3D? .................................................. 150

    Combining hex and tet grids into a final hybrid grid .............................................................. 151

    Using SpaceRanger to create separate groups below and above the surface .......................... 153

    Running a FLAC3D grid containing face collections ............................................................ 154

    Running the model with FLAC3D .......................................................................................... 154

  • Kubrix/Rhino Users Manual Page 7

    END OF TUTORIAL 9 .......................................................................................................... 155

    EXERCISE 1 SALT CAVERN: USING RHINOS LOFT TO CREATE A MODEL FROM CONTOUR LINES ..................................................................................................................... 156

    Creating a solid model & meshing ......................................................................................... 156

    EXERCISE 2 OPEN PIT: USING RHINOS MESH FROM POINTS FOR FAST MODEL CREATION ................................................................................................................................ 157

    Creating a solid model & meshing ......................................................................................... 157

    EXERCISE 3-MODELS DEFINED BY HORIZONS & TOPOGRAPHY: BOOLEAN OPERATIONS ON SURFACES AND MESHES ..................................................................... 159

    IMPORTING CAD DATA INTO PFC3D ................................................................................. 162

    Summary ................................................................................................................................. 162

    Introduction ............................................................................................................................. 162

    Brief overview of Computer-Aided Design (CAD) ............................................................... 162

    Preparing a model for import into PFC3D .............................................................................. 164

    Model simplification ........................................................................................................... 164

    Model triangulation ............................................................................................................. 165

    Checking normal orientation ............................................................................................... 166

    Example applications .............................................................................................................. 167

    Stirred Tank Reactor ........................................................................................................... 167

    Additional Examples ............................................................................................................... 169

    Ball Mill .............................................................................................................................. 169

    Blade Mill ........................................................................................................................... 169

    Bulldozer ............................................................................................................................. 170

    USING CAD TO AUTOMATICALLY GENERATE OF CLUMPS FOR PFC3D: BUBBLEPACK .......................................................................................................................... 171

    Summary ................................................................................................................................. 171

    Medial axis/Mid-surface and bubble packing ......................................................................... 171

    Using BubblePack ................................................................................................................... 172

    Examples ............................................................................................................................. 172

    Input Surface ....................................................................................................................... 172

    Meshing Parameters ............................................................................................................ 172

    TROUBLESHOOTING .............................................................................................................. 174

    Where are my files? In Rhino, I clicked on the Kubrix icon and ran it but the resulting files are not in the folder they are supposed to be. ............................................................................... 174

  • Kubrix/Rhino Users Manual Page 8

    Why the Polygon Meshing Option? I have created a model in Rhino. I have meshed its surface and I want to save it, but Rhino displays the Polygon Meshing Options. I thought I did that already when I triangulated the surface! .......................................................................... 174

    Naked/free edges in the input. I run Kubrix and it says that there are free edges. I read the STL file into Rhino and use CheckMesh. Rhino reports that there are indeed naked edges. Why? ....................................................................................................................................... 174

    Kubrix reports surface self intersection .................................................................................. 175

    Tetra blocking fails! I launch Kubrix|Convex Blocking or Tetra meshing. I use all default values for parameters. Kubrix reads the STL file and the surface is remeshed but Kubrix reports intersecting triangles after remeshing or hangs and fails with the message: Tetra blocking failed ....................................................................................................................... 175

    Blocking not progressive enough. I use Kubrix|Convex Blocking to create a 3DEC model. I use a small Offset, small Cut angle and a Mesh Gradation close to 1 but I find that blocks fan out too abruptly. I would like to see a more progressive increase in block size around details. ................................................................................................................................................ 176

    License error. I obtained a Kubrix license but I get an error message saying that the license is not valid .................................................................................................................................. 176

    INDEX ........................................................................................................................................ 178

  • Kubrix/Rhino Users Manual Page 9

    Setting up your Rhino2/Kubrix3

    Installing Kubrix and Rhino

    work environment

    1. Install Rhino from your Rhino disc, or download an evaluation version of Rhino from www.Rhino3d.com. An evaluation version of Rhino allows you to save or export 25 files.

    2. Install the latest version of Kubrix from www.kubrix.com or www.itascacg.com/kubrix.

    Displaying the most useful Rhino Toolbars and the Kubrix-specific buttons 3. Start Rhino and right-click in the Toolbar area located around the edges of the graphic window.

    When the list of toolbars opens, make sure that all toolbars are checked off. 4. Open the C:\Program Files\Simulation Works\Kubrix\Rhino Stuff folder. Select all files in that

    folder and drag them over the Rhino window. These files contain the scripts and toolbars related to Kubrix that are most frequently used in Rhino. You can later on modify these tools if you so desire.

    The Rhino command area The command area is the area (generally on top) where Rhino displays text information. The location of the command area can be moved by dragging. Figure 1 shows the Rhino window after the Rhino Stuff content has been installed.

    Figure 1: The Rhino window after the kubrix toolbar and scripts have been added.

    2 Rhinoceros is a Registered Trademark of Robert McNeel and Associates, Seattle, USA. 3 KUBRIX is a Registered Trademark of Simulation Works, Inc., Saint Paul, USA.

  • Kubrix/Rhino Users Manual Page 10

    Icon/button names Throughout this tutorial we refer to the name of icons. The name of an icon is displayed when you place the mouse over it. Often, an icon has two related functions depending on whether you click the left or right mouse button. After you click an icon, the corresponding Rhino command-line appears in the command line area.

    Rotating and panning views You can rotate a view by holding down & while right-clicking the mouse and moving it around. You can pan a view using and the right mouse button.

    Colorizing all objects in the model Often, newly-created objects in Rhino appear in gray. To distinguish objects from each other, click on the icon marked ColorizeAllObjects to give a different color to each entity in your current model (Figure 2).

    Figure 2: The ColorizeAllObjects icon in the Kubrix toolbar

    Useful shortcuts The following shortcuts are pre-programmed into Rhino:

    F3 Properties

    F8 Ortho

    F9 Snap

    The following shortcuts may be added to Rhino help in speeding up the mesh cleanup process:

    AlignMeshVertices:

    Left-clicking on the Icon marked Align mesh vertices to tolerance launches the AlignMeshVertices command which is one of the most useful Rhino tools for cleaning up meshes. The most common use of this tool involves the following preliminary actions:

    left-clicking on the command setting the the DistanceToAdjust Parameter clicking on SelectVertices clicking on the first vertex that will host all the subsequent vertices Clicking on the vertices that will collapse on the host vertex

  • Kubrix/Rhino Users Manual Page 11

    hitting

    You can set a shortcut, F4, that does all this. Let-click on the icon marked Options, on the left pane, under Rhino Options select Keyboard. If the slot in front of F4 is available, type in _AlignMeshVertices SelectVertices

    CheckMesh:

    Similarly, using Option|Rhino Options|Keyboard you can set F5 to _CheckMesh

    SplitMeshEdge:

    Similarly, set F6 to _SplitMeshEdge

    Tolerances Tolerances can be the cause of problems especially when dealing with intersection and boolean operations on meshes, geometric entities. This is particularly critical when the model center is far from the origin or when the model is very large.

    When starting a new project, use the initial Rhino template to specify whether the model will be a "Large" object in "meters", "small" object in "feet", etc.., then import DXF, STL or even existing 3dm files into the new project. Please note that by default, Option|Document Properties|Units should say an absolute tolerance of 0.01, a relative tolerance of 1.0. and an angle tolerance of 1. If the center of the model is far from the 0,0,0 coordinates, you may want to use a smaller tolerance such as 0.0001 absolute, 0.01 relative and 0.01 in angles.

    Avoiding accidental object drag It may happen that you inadvertently drag a highlighted object by dragging it with the left mouse button. To avoid this left-click on the icon marked Options. In the left pane of the Rhino Options dialog box, click on Rhino Options|Mouse, and in the Click and drag section, set the Object drag threshold to 100 pixels. Now, dragging a highlighted objects requires a minimum of 100 pixel translation to occur.

    Object snap options In Rhino two snapping concepts are available: Snap and Object Snap. Snap is similar to Snap to Grid in PowerPoint. Objet Snap (Osnap) is the Rhino equivalent of PowerPoint's Snap to Objects. To be able to snap lines, polylines, corners of objects, etc. to exiting objects, Osnap must be active. Click on the word Osnap at the bottom of the graphic window to activate it. Next, you can specify to which particular point of an existing object you want to snap by placing a check mark next to any of the worda: End, Near, Point, Mid, etc...appearing at the bottom the graphic window.

    Orthogonal restriction of the mouse

    You can restrict the movements of the mouse to any of the three principal directions by clicking on the word Ortho appearing at the bottom of the graphic window or by hitting .

  • Kubrix/Rhino Users Manual Page 12

    Getting rid of the background grid

    You can get rid of the background grid in any window by hitting . To get rid of the grid in all windows, left-click on the icon marked Options. In the left pane of the Rhino Options dialog box, click on Document Properties|Grid, and in the Grid properties section, uncheck Show grid lines and Show grid axes.

  • Kubrix/Rhino Users Manual Page 13

    Reading CAD data Data transfer between different CAD tools is achieved through files. Files may differ by the entities they contain and by their format. For instance, an AutoCAD DXF and a VRML file may both describe a mesh of triangles. Both need to be converted to an ASCII STL file before KUBRIX can generate a volume mesh. If a CAD file contains only points or lines, it must be read into a CAD tool such as Rhino 4.0 before closed surfaces are created and a volume mesh is generated with KUBRIX. In summary, two files may contain the same entities but in different formats or two files of the same format may contain different geometrical entities

    General Guidelines CAD data is generally either a surface/solid/line (geometrical) model or facetized (discretized polygons). Solid/Surface/line models are mathematically exact definitions of the geometries they describe whereas facetized data represent solid/surface models that have been discretized into a collection of points and polygons.

    Surfaces/Solids must be imported as IGES or STEP files into Rhino, triangulated, cleaned-up and exported as ASCII STL files for processing with KUBRIX.

    Facetized (triangulated) data may be imported in the STL, VRML, DXF or 3DS formats into Rhino for further processing. In Rhino, facetized data will be represented as a mesh. The mesh must be first cleaned-up, that is checked for quality (no free edges, degenerate or duplicated faces) and defeatured (see Removal of artifacts due to triangulation noise: defeaturing. Section 0 in Tutorial 3) before being exported as an ASCII STL file for processing with KUBRIX

    Solids & Surfaces Solids and surfaces may be imported in the IGES, STEP or ACIS formats into Rhino. In Rhino the data will be represented as polysurfaces which should be checked for naked edges and other anomalies. The polysurfaces should then be triangulated, cleaned-up and exported as an STL file for processing with KUBRIX

    Wireframes Wireframes may be imported as IGES, STEP, VRML 2.0, DXF or DWG files into Rhino. In Rhino, the data will appear as lines. Lines should be used as a guide to create closed polysurfaces. It is a good practice not to curves directly but to retrace them by creating Polylines (using points on the curves). Often, curves produced by AutoCAD contains many degenerate line segments which, if used directly in the construction of a surface, may result in invalid surfaces. Use the retraced Polylines or curves to create surfaces. The resulting closed polysurfaces should be triangulated and cleaned-up before being exported as an STL file for processing with KUBRIX

    Points In Rhino, the points should be used as a guide to create lines and closed polysurfaces. The closed polysurfaces should be triangulated, cleaned-up and exported as an STL file for processing with KUBRIX

  • Kubrix/Rhino Users Manual Page 14

    Facetized surfaces: polygonal surfaces Polygonal surface may be imported as IGES, STEP, VRML 2.0, 3DS, STL, DXF or DWG files into Rhino. In Rhino, polygons should be split into triangular meshes. Meshes should be closed and checked for anomalies (degenerate or duplicate elements) and defeatured (see KUBRIX-Rhino users' manual). Triangular meshes should be exported as STL files for processing with KUBRIX

    Facetized surfaces: triangular surfaces Triangular surfaces may be imported as IGES, STEP, VRML 2.0, 3DS, STL, DXF or DWG files into Rhino. In Rhino, meshes should be closed and checked for anomalies (degenerate or duplicate elements) and defeatured. Triangular meshes should be exported as STL files for processing with KUBRIX

  • Kubrix/Rhino Users Manual Page 15

    SpaceRanger SpaceRanger is a generalized range function that uses complex surfaces to identify & modify groups of zones, blocks & balls in FLAC3D, 3DEC or PFC3D models.

    Modeling problems addressed by SpaceRanger You want to give different properties to certain zones of a zoned 3DEC model based on their

    location with respect to several surfaces defined as DXF file. You want to carve a group of balls out of a packed group of PFC3D balls You want to assign different group numbers to zones that will be excavated each year given a stair

    step pit model and several DXF's representing excavation surfaces You want to assign ubiquitous joint properties to zones that come within 10m of a set of faults You want to change the properties of all the balls that come within 3 mm of a surface You want to refine it locally refine a FLAC3D model before carving out a group of zones with

    SpaceRanger

    How SpaceRanger Helps SpaceRanger tests whether the centroid of a zone, block or ball is inside or outside a surface based on the parity of the number of intersections with the surface of an upward-shooting ray originating from the centroid. Surfaces need not be closed. SpaceRanger also tests whether a zone, block or ball is near a surface. SpaceRanger can also use the inside/outside status of a zone or block or its proximity to a surface to subdivide it into smaller units.

    SpaceRanger can directly process FLAC3D grid files. For other Itasca products, you can use FISH to export the x, y, z coordinates, and material or color of the zones, blocks or balls of a model into a file. SpaceRanger sorts through the file and create a new one with the same ID's and updated groups, regions or colors. using FISH, this file may be read back into the model to update it.

    New in 8.2 A single spaceranger.dat containing the names of the files replaces input0, input1,... When N surfaces are present, SpaceRanger takes the order of surfaces in spaceranger.dat as a hint

    and produces a no more than N+1 groups

    How does SpaceRanger work? A point is inside a closed surface if a ray shooting away from it crosses the surface an odd number of times. An odd number of intersections means that the point is inside the surface. For multiple surfaces, we create a binary number with as many digits as there are surfaces. The interiority of a point with respect to a surface is reflected in the value of the bit corresponding to the surface: 1 is in, 0 is out. For instance, if we have 6 surfaces, 010111 means that the point x, y, z is located inside surface 0, inside surface1, inside surface2, outside surface 3, inside surface 4 and outside surfaces 5. This approach works also with non-closed surfaces as long as a ray direction is supplied. By default, the ray direction is in the positive z direction.

  • Kubrix/Rhino Users Manual Page 16

    SpaceRanger creates a FLAC3D (if processing a FLAC3D gird file) or a file called CalculatedCentersAndProperties.dat(if processing a file containing centers an properties) and a VRML file. Read the VRML file into Rhino to have a quick view of the result. Load the grid into FLAC3D to see the new groups.

    Figure 4: Material property ID (or color) resulting from interiority bit assignment

    Examples SpaceRanger may be directly used with FLAC3D

    Just run SpaceRanger.exe, choose an option, type 1 to indicate that you want to use a FLAC3D grid file. SpaceRanger will create a new grid file called output.flac3d which you can import into your model with the USEGIVENIDS option, if you want to replace an existing model.

    Sorting 3DEC zone material IDs 1. In the FISH file WriteZoneCentersAndMaterialIds.dat, replace the name

    ModelYouWantToModify.sav with the name of the save file representing the model you want to modify.

    2. Start 3DEC and run WriteZoneCentersAndMaterialIds.dat

    The FISH function WriteZoneCentersAndMaterialIds writes out the x, y, z coordinates of each zone center and its current property ID into a file called ZoneCentersAndProperties.dat .

    Figure 3: Sorting of zones

  • Kubrix/Rhino Users Manual Page 17

    3. Run SpaceRanger.exe (after launch, enter 1, then 0, then ZoneCentersAndProperties.dat)

    The program SpaceRanger.exe reads the ZoneCentersAndProperties.dat file and produces a file called CalculatedCentersAndProperties.dat in which block property IDs have been updated based on the ray shooting logic described earlier. The file CalculatedCentersAndProperties.dat can readily be read into an existing model using the FISH function ReadZoneCentersAndMaterialIds. This will give the model its new zone prop IDs.

    4. In the FISH file ReadZoneCentersAndMaterialIds.dat, replace the name ModelYouWantToModify.sav with the name of the save file representing the model you want to modify.

    5. Start 3DEC and run ReadZoneCentersAndMaterialIds.dat

    Sorting 3DEC block material IDs 1. In the FISH file WriteBlockCentersAndMaterialIds.dat, replace the name

    ModelYouWantToModify.sav with the name of the save file representing the model you want to modify.

    2. Start 3DEC and run WriteBlockCentersAndMaterialIds.dat

    The FISH function WriteBlockCentersAndMaterialIds writes out the x, y, z coordinates of each block center and its current property ID into a file called BlockCentersAndProperties.dat .

    3. Run SpaceRanger.exe (after launch, enter 1, then 0, then BlockCentersAndProperties.dat)

    The program SpaceRanger.exe reads the BlockCentersAndProperties.dat file and produces a file called CalculatedCentersAndProperties.dat in which block property IDs have been updated based on the ray shooting logic described earlier. The file CalculatedCentersAndProperties.dat can readily be read into an existing model using the FISH function ReadBlockCentersAndMaterialIds. This will give the model its new block prop IDs.

    4. In the FISH file ReadBlockCentersAndMaterialIds.dat, replace the name ModelYouWantToModify.sav with the name of the save file representing the model you want to modify.

    5. Start 3DEC and run ReadBlockCentersAndMaterialIds.dat

    If you check your model, you will see that the block property IDs have now been updated.

    To use SpaceRanger in C++, you need to name the various surfaces, input0.stl, input1.stl, input2.stl,

  • Kubrix/Rhino Users Manual Page 18

    Other examples:

    Figure 5: Examples of SpaceRanger use: left, pit excavation sequence in 3DEC. Right: geology in FLAC3D

    SpaceRanger version 8 options: 4 space partitioning options are available to you:

    0 Ignore existing groups. Build new ones based on surfaces.

    1 Partitions existing groups based on surfaces.

    2 Everything inside surface becomes one group; outside is unchanged.

    3 Everything outside surface becomes one group; inside is unchanged.

    4 Everything intersecting surfaces becomes one group.

    5 Split large zones inside surface.

    6 Split large zones intersecting surfaces.

  • Kubrix/Rhino Users Manual Page 19

    TUTORIAL 1- Internal walls and multiple materials In this tutorial, you will become familiar with the use of internal walls to create multiple FLAC3D groups or 3DEC regions.

    Creating a single-material model 1. Start Rhino and when the Template dialog box opens, select Small Objects-Meters. 2. Click on the label of the window marked Perspective. Select the Solid|Cylinder menu item. Enter

    0 followed by to center of the base of the cylinder at the origin. , Enter 2 followed by to set the Radius of the base to 2. Enter 10 followed by to set the Height of the cylinder to 10 and complete the construction of a vertical cylinder (Figure 6).

    Figure 6: Solid representing a cylinder

    You have created a cylindrical solid. A solid is essentially a closed surface. It has a clear interior and exterior. You are now going to create a triangular mesh representing the surface of the cylinder. Creating a triangular surface mesh is a necessary step on the way to creating a volume mesh of the cylinder.

    3. Select the File|Save As menu item and save your model as cyl.3dm. 4. Select the cylinder and select the menu item Mesh|From NURBS objects. The Polygon mesh

    detailed options dialog box opens. If you see a button in the lower-right corner of the box marked Simple control, click it to see a simplified version of this dialog box.

  • Kubrix/Rhino Users Manual Page 20

    5. In the simplified dialog box, slide the horizontal cursor all the way to the right towards More Polygons and click on Preview to see a preview of the resulting surface mesh. Click on OK to create a surface mesh (Figure 7).

    Figure 7: Original highlighted cylindrical surface and the newly-created surface mesh superimposed on it.

    6. While the original cylindrical surface is still highlighted (seen in light yellow in Figure 7), select it and hit to keep only the surface mesh.

    7. Select the mesh, select the menu item File|Export Selected and when the Export dialog box opens, enter cyl for the File name and select stereolythography (*.stl) for the Save as type.

    8. When the STL Export Options dialog box opens, make sure that ASCII File type and Export open objects are both checked. Click OK to complete the Save operation.

    A triangular surface mesh saved as a formatted STL file serves as input to the Kubrix automatic mesh generator. Kubrix can be run from Rhino by clicking on the Kubrix icon (Figure 8).

    Figure 8: The Kubrix icon in Rhino

  • Kubrix/Rhino Users Manual Page 21

    9. Run the Kubrix program by clicking on the Kubrix icon and select the Hexahedral meshing tab. Click on Default to set all parameters to their default values then click on the Input File button and select cyl.stl. Kubrix will use the file cyl.stl as input to generate a hexahedral mesh of the interior.

    10. Set the Max allowable element edge length to 0.5 and click on Compute. 11. Kubrix generates two files: kubrix_out.flac3d and kubrix_out.wrl. You can inspect the resulting

    model by launching a new instance of Rhino and importing kubrix_out.wrl to visualize it. 12. You can also run FLAC3D and use File|Grid|Import to read kubrix_out.flac3d and display it

    (Figure 9).

    Figure 9: Mesh of cylinder read into FLAC3D

    END OF TUTORIAL 1

  • Kubrix/Rhino Users Manual Page 22

    TUTORIAL 2 Vertical shaft in a stratified soil In this tutorial, you will create a vertical shaft (140 ft deep, 20 ft diameter) inside a cubic block of soil (200 ft 200 ft 200 ft) composed of two materials. The surface separating the two types of soil is located at a height of 50 ft (Figure 10).

    Figure 10: A FLAC3D model (left) and a 3DEC model (right) of a vertical shaft in a stratified soil

    Startup and excavation of the shaft 1. Start Rhino and select Solid|Box|Diagonal to define a Box by 2 points. Enter -100,-100,-100 for

    the coordinates of the first point, followed by . Enter 100,100,100 for the coordinates of the second point followed by .

    2. Right-click on the Zoom Extents button to make the box fit to each window. This completes the creation of a Box (Figure 11).

    Figure 11: Four-view of a box

    3. Double-click the Perspective viewport title to maximize the Perspective viewport (Figure 12).

  • Kubrix/Rhino Users Manual Page 23

    Figure 12: Wireframe view of the box

    4. Double-click the Perspective viewport title to return to a 4-view window and click on the title of the Top viewport to activate it.

    5. Select Solid|Cylinder. Enter 0,0 followed by to specify the coordinates of the center of the cylinder base (in the x, y coordinate system). Enter 20 followed by for the radius. Enter 200 followed by to specify the center of the top of the cylinder.

    Please note that Rhino accepts both 0,0,200 and 200 as the 3rd parameter of the Cylinder Command. Since we are in a Top view, Rhino rightly assumes that 200 means 0,0,200.

    6. Left-click on the button marked Shaded Viewport to see the box and cylinder (Figure 13).

    Figure 13: Box and cylinder

    7. To move the cylinder down by 40 feet, select the cylinder and select the menu item Transform|Move. Enter 0,0,0 followed by . Enter 0,0,-40 followed by (Figure 14).

  • Kubrix/Rhino Users Manual Page 24

    Figure 14: The lowered cylinder is highlighted

    8. To excavate the well, we must subtract (in the Boolean algebra sense) the cylinder from the box. To do so, select the menu item Solid|Difference. First select the box followed by , then select the cylinder followed by (Figure 15).

    Figure 15: The Boolean subtraction of the cylinder from the box represents the excavation

    Creating a triangular surface mesh of the model Mesh generation for FLAC3D and block generation for 3DEC requires a closed triangular surface representing the surface of the object in which we want to create the model

    1. Prior to creating a surface mesh based on a solid model, you should save the Rhino model. Select File|Save As and when the Save dialog box opens, enter t1_0 for the File name and make sure that the Save as type is set to Rhino 4 3D Models (*.3dm). A file called t1_0.3dm is created in your current folder.

  • Kubrix/Rhino Users Manual Page 25

    2. Select the model and select the Mesh|From NURBS objects menu item. The Polygon mesh detailed options dialog box opens. If you see a button in the lower-right corner of the box marked Simple control, click it to see a simplified version of this dialog box.

    3. In the simplified dialog box, slide the horizontal cursor to the middle and click on Preview to see what the resulting surface mesh will look like (Figure 16).

    Figure 16: Preview of the surface mesh

    4. Click OK to accept the surface mesh. Note that the original solid is still highlighted (in yellow) while the mesh is drawn in black.

    5. Hit to delete the (highlighted) solid. What is left is the surface mesh. 6. Select the mesh and left-click on the icon marked Check mesh objects for error located in the

    Geometry Fix toolbar. Rhino responds with the CheckMesh message box providing global information about the mesh indicating that, among other qualities, the mesh contains no naked edges. Naked or Free edges are edges attached to only one polygon. Their presence indicates that the mesh is not closed.

    7. The mesh contains both triangular and quadrilateral polyhedra. As mentioned earlier, we need an all-triangular surface mesh to proceed. To triangulate the mesh, select the mesh and left-click on the icon marked Triangulate Mesh.

    8. Select the model and select the File|Export selected menu item and when the Export dialog box opens, enter t1_0 for the File name and select stereolythography (*.stl) for the Save as type.

    9. When the STL Export Options dialog box opens, make sure that Ascii File type and Export open objects are both checked. Click OK to complete the Save.

    Creating an all-hexahedral mesh for FLAC3D using Kubrix 1. Run the Kubrix program by clicking on the Kubrix icon. Select the Hexahedral meshing tab

    (Figure 17). Click on the Input file button and select t1_0.stl.

  • Kubrix/Rhino Users Manual Page 26

    Figure 17: Kubrix hexahedral meshing default values

    2. Click on the Default button to resort to the default values of all parameters. Please note that the output file type is .flac3d which is an ASCII format that can be directly read into FLAC3D. Click Compute to launch the computation. The screen output is shown blow.

    ............................................................................ Welcome to KUBRIX version 10.4.2 Copyright (C) 1995-2008 Simulation Works, Inc. All rights reserved. ............................................................................ PLI001: The input surface file name is: C:\Users\Sina\Itasca\tutorials\Manuals\Tutorial1\t1_0.stl ... PLI007: REQUEST: STL input surface (-it stl) ... PLI002: The output mesh file name is: C:\Users\Sina\Itasca\tutorials\Manuals\Tutorial1\t1_0.flac3d ... PLI065: REQUEST: output type is FLAC3D (-ot flac3d) ... PLI003: The minimum mesh block resolution is 1 ... PLI033: REQUEST: 1000 surface smoothing iterations (-m) ... PLI031: The max. allowed element edge length is infinity ... PLI056: The blocking efficiency is 0.50 (-e) ... PLI042: A block-structured mesh is built (-str 2) ... PLI044: Correct all negative Jacobian elements ... ISI002: Finished reading 400 triangles and 202 nodes. MGI066: Feature refinement: final triangles count 1372 ... MGI068: Fuzzy-logic block decomposition ... MGI037: Done. 1/1 iters beta 0.000100, sp 11, st 7.09e+000 ... MGI001: Block decomposition completed (17) ... MGI013: Volume decomposed into 17 blocks and 1 material... MGI018: Final check ........ all Jacobians are positive. MGI082: Block reduction complete (9)... MGI012: Output mesh contains 9 hex elements ... MGI012: Output mesh contains 24 vertices ... MGI012: Output mesh contains 1 material ... MGI054: Max. edge offset ... 5.92e+000 u between nodes 7, 14

  • Kubrix/Rhino Users Manual Page 27

    MGI057: Max. non-dim offset 0.2101 between nodes 7, 14 MGI018: Final check ........ all Jacobians are positive. MGI021: Max. edge length ... 2.00e+002 u between nodes 1, 10 MGI052: Min. edge length ... 2.81e+001 u between nodes 7, 8 MGI020: Max. aspect ratio .. 7.11e+000 at element 1 ............................................................................ MGI031: Writing a VRML file ... MGI067: Writing a FLAC3D file ... ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MGI999: Successful termination of KUBRIX in 0.5 seconds! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    3. KUBRIX generates a file called kubrix_out.flac3d. Run FLAC3D and use File|Import grid to read kubrix_out.flac3d.

    4. Select Plot|1 Base/0|Show to open the FLAC3D graphic window. Click somewhere in the background of this window to activate it, and select Plotitem|Add|Plot|Group to open the Block group dialog box. Click OK to display the grid in FLAC3D.

    5. Hit 3 times followed by , 3 times to rotate the object the object 3 times around the z and x axes. Hit twice to zoom out and properly see the grid in FLAC3D (Figure 18).

    Figure 18: View of the grid in FLAC3D containing 9 zones and 24 vertices

    By default, KUBRIX produces a coarse mesh. In the KUBRIX screen output, the maximum edge length in the mesh is reported as 200. To create a finer mesh, you need to specify a smaller maximum edge length.

    6. Go back to the Kubrix application. In the Mesh parameters section of the dialog box, check the square marked Max. allowable element edge length, and enter 10 in the corresponding field. In the same section, choose a Resolution of 3 to make sure that all details are captured with at least 3 elements across. Click Compute to launch the hexahedral mesh generation.

    7. In FLAC3D, click on the Command Window to activate it. Select File|New to remove the existing model, followed by File|Import Grid. Read t1_0.flac3d into FLAC3D and display it (Figure 19).

  • Kubrix/Rhino Users Manual Page 28

    Figure 19: A finer FLAC3D grid containing 9,888 zones and 11,450 vertices

    8. To create a fully structured grid ( a structured grid is one where all elements can be addressed by three integers: I, J and K), go back to the Kubrix application, and in the Mesh parameters section, select 3 for the Structure of the mesh, and click Compute. In FLAC3D, delete the old model and read and display the newly-created t1_0.flac3d (Figure 20).

    Figure 20: A structured FLAC3D grid containing 13,284 zones and 15,250 vertices

    Creating a model of both the inside and outside of the excavated shaft 9. In your current folder, double-click the file t1_0.3dm you saved earlier. This file contains the

    solid model prior to surface meshing. Double-click the title of the Perspective view port to maximize it.

    10. Select the menu item Surface|Planar Curves and click on the circle representing the rim of the shaft opening (Figure 21). Hit to complete the command and create a planar surface the cap of the shaft.

  • Kubrix/Rhino Users Manual Page 29

    Figure 21: Highlighted curve representing the shaft rim (top) and the capped shaft (bottom)

    So far you have been dealing with solids. Solids are closed surfaces that have an unambiguously defined interior and exterior. The surfaces defining such solids are called manifold surfaces. In contrast, consider a solid cut in half. Consider the surface made up of the surface of the solid and the surface of wall separating the two walls. This surface is closed but doesnt have a clear interior. To be exact, it has two interiors. Such surfaces are called non-manifold surfaces.

    So far our model was a perfect solid. Its surface was a manifold surface. The addition of the cap to the shaft creates two separate interior regions: inside the well, and outside the well but inside the box. The set of surfaces representing this object constitute non-manifold surfaces. Joining surfaces into a non-manifold surface in Rhino requires a special command. This command joins several manifold or non-manifold surfaces into one non-manifold surface. You can join multiple surfaces into a single non-manifold surface with the MergeBreps icon

    1. Select all the surfaces you want to join and click on the MergeBreps icon. The resulting polysurface is a non manifold polysurface. This can be verified by highlighting the model and pressing to display the Properties of the selected surface and clicking on Details.

    2. Prior to creating a surface mesh based on a solid model, you should save the Rhino model. Select File|Save As and when the Save dialog box opens, enter t1_1 for the File name and make sure that the Save as type is set to Rhino 4 3D Models (*.3dm). A file called t1_1.3dm is created in your current working folder.

    3. Select the model and select the Mesh|From NURBS Objects menu item. If the Polygon Mesh Detailed Option dialog box opens, click on the Simple controls button to bring up the simpler Polygon Mesh Options dialog box.

    4. Move the slider to the middle of the scale and click OK to create the surface mesh (Figure 22).

  • Kubrix/Rhino Users Manual Page 30

    Figure 22: Mesh of the capped model showing the highlighted solid model

    5. While the solid model is still selected hit the button to just keep the mesh. 6. Check the mesh by left-clicking on the icon marked Check mesh objects for error located in the

    Geometry Fix toolbar. Rhino responds with the following message box:

    This is a bad mesh. Here is what is wrong with this mesh: Mesh has 29 non manifold edges. Skipping face direction check because of positive non manifold edge count. General information about this mesh: Mesh does not have any degenerate faces. Mesh does not have any zero length edges. Mesh does not have any naked edges. Mesh does not have any duplicate faces. Mesh does not have any disjoint pieces. Mesh does not have any unused vertices.

    Rhino qualifies this mesh as bad because it contains non-manifold triangles (edges shared by 3 or more triangles), but this was intended because the solid model itself was non-manifold so as to allow the representation of both the inside and outside volumes.

    7. The mesh contains both triangular and quadrilateral polyhedra. As mentioned earlier, we need an all-triangular surface mesh to proceed. To triangulate the mesh, select the mesh and left-click on the icon marked Triangulate Mesh.

    8. Select the model, select the File|Export selected menu item, and when the Export dialog box opens, enter t1_1 for the File name and select stereolythography (*.stl) for the Save as type.

    9. When the STL Export Options dialog box opens, make sure that Ascii File type and Export open objects are both checked. Click OK to complete the Save operation

    10. Run the Kubrix program by clicking on the Kubrix icon. Select the Hexahedral meshing tab and make sure that the input file is t1_1.stl.

  • Kubrix/Rhino Users Manual Page 31

    11. If you have not changed any meshing parameters they should have remained unchanged, but if you have changed them, click on Default. In the Mesh parameters section of the dialog box, check the square marked Max. allowable element edge length, and enter 10 in the corresponding field. In the same section, choose a Resolution of 3 to make sure that all details are captured with at least 3 elements across. Click Compute to launch the hexahedral grid generation.

    12. The resulting grid is composed of two groups. All the zones located outside the shaft belong to Group 1. The rest belongs to Group2.

    13. Run FLAC3D and visualize the mesh (Figure 23).

    Figure 23: FLAC3D grid of the capped model containing 10,368 zones and 11,825 vertices. In this Figure, a first plot item representing the geometry is overlayed by a block group plot item representating the interior of he shaft.

    Creating an all-hexahedral mesh of the capped model, with stratified soil 1. In your current folder, double-click the file t1_1.3dm you saved earlier. This file contains the

    Rhino solid model prior to surface meshing. If the Perspective viewport is maximized, double-click the title of the Perspective view port to return to a 4-Viewport view.

    2. You are now going to represent the stratification by a cut at height z=50. To do so, double-click the Front viewport title to maximize the Front view, and select the Curve|Line|Line segment menu item.

    3. Enter -150,50 followed by to set the first point, then 150,50 followed by to set the second one (Figure 24).

  • Kubrix/Rhino Users Manual Page 32

    Figure 24: View of the model with horizontal line segment at z=50.

    4. Select the menu item Edit|Split. Click on the box and hit . Click on the horizontal line and hit . Delete the horizontal line and note that the model is now split into 2 parts.

    Please note that the Split operation splits the surface of the solid into 2 surfaces (that are not closed). To split a solid into two solid you must use Wire cut. This function will be discussed in a later section.

    5. Select the top part and left-click on the icon marked Hide Objects. Double-click the title of the viewport to return to a 4-viewport view and double-click the Perspective view port to maximize it (Figure 25).

    Figure 25: Perspective view of the lower part of the split model

    6. Select the Curve|Curve From Object|Duplicate Border menu item. Click on the box then on the cylindrical part of the model followed by . This operation extracted a square and a circular curve from the model. Hide the box and the cylinder to only see the two extracted curves shown in Figure 26.

  • Kubrix/Rhino Users Manual Page 33

    Figure 26: The highlighted square and circular curves represent the Naked Edges of the selected Polysurfaces.

    You are now going to create 2 horizontal walls based on these curves: one inside the cylinder and the other outside. These walls will act as a partition between the top and bottom of the model.

    7. Select the Surface|Planar Curves menu item and click on the square curve to fill its interior with a square surface. Double-click the Title of the Perspective Viewport to return to 4-viewport. Double-click the title of the Top view port to maximize it (Figure 27).

    Figure 27: Top view of the square surface patch

    8. Select the menu item Edit|Split and click on the surface of square, then hit . Click on the curve representing the circle and press to split the square into two parts. Figure 28 shows the two surfaces with the outer surface highlighted.

  • Kubrix/Rhino Users Manual Page 34

    Figure 28: The two surfaces resulting from the split with the outer surface highlighted

    9. While in the Top view, select the circular and square curves and delete them. 10. Right-click on the button marked Show Objects to unhide all the surfaces, select a Perspective

    view of the model and resize it by left-clicking the Zoom Extents button. 11. Select the Edit|Select Objects|All Object menu item and note that Rhino responds with the

    message 3 polysurfaces, 2 surfaces added to selection. on the command-line.

    You must now join all the surfaces and polysurfaces into one non-manifold surface.

    12. Select all the surfaces and click on the MergeBreps icon to create one single non-manifold polysurface.

    13. Prior to creating a surface mesh based on the solid model, you should save the Rhino model. Select File|Save As and when the Save dialog box opens, enter t1_2 for the File name and make sure that the Save as type is set to Rhino 4 3D Models (*.3dm). Note that a file named t1_2.3dm is created in your current folder.

    14. Select the model and select the menu item Mesh|From NURBS Objects. If the Polygon Mesh Detailed Option dialog box comes up, click on the Detailed Controls button to bring up the simpler Polygon Mesh Options dialog box.

    15. Move the slider to the middle of the scale and click OK to create the surface mesh. Delete the solid model which has remained highlighted (Figure 29).

  • Kubrix/Rhino Users Manual Page 35

    Figure 29: Surface mesh of capped shaft in stratified soil

    16. The mesh contains both triangular and quadrilateral polyhedra. As mentioned earlier, we need an all-triangular surface mesh to proceed. To triangulate the mesh, select the mesh and left-click on the icon marked Triangulate Mesh.

    17. Select the model, select the File|Export Selected menu item and when the Export dialog box opens, enter t1_2 for the File name and select stereolythography (*.stl) for the Save as type.

    18. When the STL Export Options dialog box opens, make sure that Ascii File type and Export open objects are both checked. Click OK to complete the Save operation

    19. Run the Kubrix program by clicking on the Kubrix icon. Select the Hexahedral meshing tab. Make sure that the input file is t1_2.stl

    20. If you have not changed any meshing parameter they should have remained unchanged, but if you have changed the parameters, click on Default. In the Mesh parameters section of the dialog box, check the square marked Max. allowable element edge length, and enter 10 in the corresponding field. In the same section, choose a Resolution of 3 to make sure that all details are captured with at least 3 elements across. Click Compute to launch the hexahedral grid generation.

    The resulting grid is composed of 4 groups. Group2 and Group4 represent the shaft interior; Group1 and Group3 represent the exterior of the shaft (Figure 30).

  • Kubrix/Rhino Users Manual Page 36

    Figure 30: FLAC3D model of the capped shaft in a stratified soil with Group3 masked

    Creating 3DEC blocking of the capped model, with stratified soil 1. Run the Kubrix program by clicking on the Kubrix icon. Select the Convex Blocking tab. Make

    sure that the input file is t1_2.stl. 2. Click on Default, enter 1 for the Relative Offset and click on Compute. The resulting file is

    t1_2.3dec. 3. Run 3DEC 4.0, call t1_2.3dec as a data file and in the Plot Item Menu select color by Region

    (Figure 31).

    Figure 31: 3DEC model of the capped shaft in stratified soil (relative offset 1.)

    The resulting 3DEC model is made up of a number of 1,166 tetrahedral blocks. The large number of bloc for such a relatively simple geometry is due to 2 factors:

    We are creating tetrahedral blocks. Manually, we would have created hexahedral blocks and as a result there would have been about 6 times fewer blocks.

  • Kubrix/Rhino Users Manual Page 37

    The shaft is discretized too finely. Indeed, a relative offset of 1 means that the absolute offset is 1/1000 times the longest dimension of the bounding box containing the model, which is 200 feet. As a result, the absolute offset is 0.2 feet for a shaft diameter of 40 feet.

    To obtain a coarser model do as follows:

    1. Run the Kubrix program by clicking on the Kubrix icon. Select the Convex Blocking tab. Make sure that the input file is t1_2.stl.

    2. Click on Default , and enter 100 for the Relative Offset and click on Compute. The resulting file is t1_2.3dec.

    3. Run 3DEC 4.0 call t1_2.3dec and in the Plot Item Menu select color by Region (Figure 32).

    Figure 32: 3DEC model of the capped shaft in stratified soil (relative offset 100.)

    Creating Octree mesh of the capped model, with stratified soil Octree meshes are based on an increasingly finer subdivision of space into hexahedral blocks (Figure 33 & Figure 34). One of the main attractions of this approach is that the input surface need not be closed. In fact, octree meshes can be obtained from surface data containing many gaps and overlaps. This approach is to be compared with other forms of meshing requiring a perfectly watertight input surface in which all surface intersections are accounted for.

  • Kubrix/Rhino Users Manual Page 38

    Figure 33: Octree blocking: left, mesh featuring 5 levels of refinement, right, a balanced octree where adjacent zones are at most one generation apart.

    Figure 34: Octree meshing: left: boundaries are detected in dark blue, right; there are no boundary (joint) regions.

    4. Run Kubrix by clicking on the Kubrix icon. Select the Octree Meshing tab (Figure 35).

    Figure 35: Octree meshing dialog box

    5. You can use this approach for both 3DEC and FLAC3D model generation. Click on Default, select FLAC3D for the Output type, select 7 for the Octree level, and click on Compute to create the mesh.

  • Kubrix/Rhino Users Manual Page 39

    6. Run FLAC3D, import t1_2.flac3d and display it (Figure 36).

    Figure 36: Octree model where a portion of the zones have been masked for the sake of clarity

    END OF TUTORIAL 2

  • Kubrix/Rhino Users Manual Page 40

    TUTORIAL 3 20 bifurcating circular tunnels In this tutorial, you will learn to create a circular tunnel bifurcating into two circular tunnels making an angle of 20 degrees between them and located inside a cubic block. To create this shape, you will first model the tunnels, and then subtract them from a cube (Figure 37).

    Figure 37: A FLAC3D tetra model (left) and octree model (middle), and a 3DEC model (right) of the bifurcating tunnels

    Startup and creation of a horizontal tunnel of diameter 10 and length 200 1. Start Rhino and click on the label of the Right view to activate it. Click on the word Snap at the

    bottom of the screen to activate background grid snap. 2. Select the Curve|Circle|Center, Radius menu item and click on the coordinate system origin in

    the Right view. This sets the center of the circle. Type 10 on the command window to specify its radius

    3. Double-click the label of the Right view to once again bring up the four views. Click once on the label of the Perspective view to activate it. Select the Surface|Extrude Curve|Straight menu item and select the circle in the Perspective view, followed by . The curve extrusion parameters appear in the command window.

    4. Clicking on any option appearing on the command line lets you modify it. Direction should be, by default, already be set to 1,0,0 since the circle was built in the Right viewports Construction Plane. Set the remaining options as follows: BothSides=Yes, Cap=Yes, DeleteInput=Yes.

    5. Enter 100 on the command line followed by to complete the construction of a closed 200 m long horizontal cylinder. Select Zoom Extents All Viewports4

    Figure 38 to get a full view of the

    model so far ( ).

    4 The commands associated with left or right-clicking on each icon can be seen by moving your mouse over the icon and leaving it there for a second.

  • Kubrix/Rhino Users Manual Page 41

    Figure 38: First horizontal cylinder

    Creating the bifurcation and the box surrounding it 1. Select the cylinder in any view, select Edit|Copy followed by Edit|Paste to duplicate it in place.

    While the copy is still selected, click on the button marked Hide Objects to hide it. 2. Select the remaining visible cylinder and select Transform|Scale 2D, and in the Right viewport,

    click on the origin of the coordinate system. Type 0.7 followed by to scale the cylinder down to a diameter of 7.

    3. While the cylinder is still selected, select Transform|Rotate. Click on the origin of the coordinate system in the Top view. Enter 20 followed by to complete the rotation of the smaller cylinder by 20 around the z-axis. Right-click on the button marked Show Objects to render both cylinders visible (Figure 39).

    Figure 39: Two intersecting tunnels

    We need to split the smaller cylinder, using the larger one, into 3 sections and delete a portion of the smaller cylinder to complete the bifurcation.

  • Kubrix/Rhino Users Manual Page 42

    4. Hit the button to unselect everything. Select the Solid|Boolean Split menu item. For the Polysurface to split, select the smaller cylinder, then type . Select the larger cylinder for the Cutting polysurface, followed by . This operation splits the smaller cylinder into 3 sections.

    Figure 40: In the Top view, the highlighted section of the smaller cylinder must be deleted to create the branching

    5. In the Top view, select the lower-left and the middle sections of the smaller cylinder (Figure 40) and delete them. This leaves only one section (upper right) of the smaller cylinder. Select the two remaining polysurfaces; that is the larger cylinder and the remaining upper-right section of the smaller cylinder, and select Solid|Union to complete the creation of one single closed solid representing the bifurcation. Click on the button marked Shaded Viewport to display a shaded view of the completed bifurcation (Figure 41).

    Figure 41: Bifurcation resulting from the union of the larger and the remaining section of the smaller cylinder

    To create a model of the soil surrounding the tunnels, you must create a cube representing the volume in which the tunnels are excavated, and subtract the tunnels from it.

  • Kubrix/Rhino Users Manual Page 43

    6. To create a parallelepiped, select the Solid|Box|Diagonal menu item. Enter -60,-60,-60 followed by to specify one end of the diagonal, and 60,60,60, followed by for the other end to create a cube of side 120 centered at the origin.

    7. To subtract the tunnels from the cube, select the Solid|Difference menu item. For the First set of polysurfaces, select the box, then type . For the second set, select the bifurcation, then to complete the Boolean difference operation (Figure 42).

    Figure 42: Result of the Boolean difference

    Creating a Triangular Surface Mesh of the Model Mesh generation for FLAC3D and block generation for 3DEC require a closed triangular surface representing the surface of the object in which we want to create the model

    1. Prior to creating a surface mesh based on the solid model, you should save the Rhino model. Select File|Save As and when the Save dialog box opens, enter t2_0 for the File name and make sure that the Save as type is set to Rhino 4 3D Models (*.3dm). As a result, a file called t2_0.3dm is created in your current folder.

    2. Select the model and select the Mesh|From NURBS objects menu item. The Polygon mesh dialog box opens. If you see a button in the lower-right corner of the window marked Detailed controls, click it to see the Polygon Mesh Detailed Option dialog box.

    3. Set all parameters to 0 (inactive) except for the Maximum distance, edge to surface which should be set to 0.1 and Aspect ratio which should be 1. All check buttons should be unchecked except for Refine mesh (Figure 43). Click OK to create the surface mesh.

  • Kubrix/Rhino Users Manual Page 44

    Figure 43: The surface meshing dialog box

    4. While the original solid model is still selected, hit the button to delete it so the mesh is the only remaining object in the model (Figure 44).

    Figure 44: Preview of the surface mesh

    5. Select the mesh and left-click on the icon marked Check mesh objects for error located in the Geometry Fix toolbar. The Check Mesh message box opens and provides global information about the mesh indicating that, among other qualities, the mesh contains no naked edges. Naked or Free edges are edges attached to only one polygon. The presence of naked edges indicates that the mesh is not closed.

    The present mesh is closed. It contains both triangular and quadrilateral polyhedra. As mentioned earlier, we need an all-triangular surface mesh to proceed.

    6. To triangulate the non-triangular elements, select the mesh and left click on the icon marked Triangulate Mesh (located in the Mesh toolbar).

    7. Select the model, select the File|Export Selected menu item and when the Export dialog box opens, enter t2_0 for the File name and select stereolythography (*.stl) for the Save as type.

    8. When the STL Export Options dialog box opens, make sure that Ascii File type and Export open objects are both checked. Click OK to complete the Save operation

  • Kubrix/Rhino Users Manual Page 45

    Creating a convex blocking for 3DEC 1. Start Rhino. Open t2_0.stl. Run Kubrix by left-clicking on the Kubrix icon. Select the Convex

    Blocking tab. Click on Default and set the Relative offset to 10 (Figure 45). Make sure that the input file is t2_0.stl.

    Figure 45: Convex blocking dialog box

    2. Click on Compute to create the blocking. Kubrix generates two files: kubrix_out.3dec and kubrix_out.wrl. You can inspect the resulting model by launching a new instance of Rhino and importing kubrix_out.wrl to visualize it.

    3. You can also run 3DEC 4.0 and use File|Call to read kubrix_out.3dec and display it (Figure 46).

    Figure 46: 3DEC model where each block is a different color

    Creating an all-hexahedral grid for FLAC3D Using KUBRIX 1. Start Rhino. Open t2_0.stl. Click on the Kubrix icon and select the Hexahedral meshing tab

    (Figure 47). Make sure that the input file is t2_0.stl.

  • Kubrix/Rhino Users Manual Page 46

    Figure 47: Kubrix hexahedral meshing default values

    2. Click on the Default button to resort to the default values of all parameters. Please note that the output file type is .flac3d which is an ASCII format that can be directly read into FLAC3D. Click Compute to launch the computation. The screen output is shown below.

    ---------------------------------------------------------------------------- ............................................................................ Welcome to KUBRIX version 10.4.4 Copyright (C) 1995-2008 Simulation Works, Inc. All rights reserved. ............................................................................ PLI001: The input surface file name is: C:\Users\Sina\Itasca\tutorials\RhinoFlac3d3decPfc3dTutorials\Tutori l2\t2_0.stl ... PLI007: REQUEST: STL input surface (-it stl) ... PLI002: The output mesh file name is: C:\Users\Sina\Itasca\tutorials\RhinoFlac3d3decPfc3dTutorials\Tutori l2\t2_0.flac3d ... PLI065: REQUEST: output type is FLAC3D (-ot flac3d) ... PLI003: The minimum mesh block resolution is 1 ... PLI033: REQUEST: 1000 surface smoothing iterations (-m) ... PLI031: The max. allowed element edge length is infinity ... PLI056: The blocking efficiency is 0.50 (-e) ... PLI042: A block-structured mesh is built (-str 2) ... PLI044: Correct all negative Jacobian elements ... ISI002: Finished reading 6398 triangles and 3197 nodes. ISI014: Sharpest wedge 160 deg @ (4.786e+001,9.988e+000,-3.488e-001) MGI066: Feature refinement: final triangles count 6524 ... MGI068: Fuzzy-logic block decomposition ... MGI037: Done. 34/1 iters beta 0.000100, sp 15, st 2.16e+001 ... MGI001: Block decomposition completed (37) ... MGI013: Volume decomposed into 37 blocks and 1 material... MGI033: First check ........ 2 elems (5%) need Jacob. correction MGI018: Final check ........ all Jacobians are positive.

  • Kubrix/Rhino Users Manual Page 47

    MGI082: Block reduction complete (33)... MGI012: Output mesh contains 33 hex elements ... MGI012: Output mesh contains 84 vertices ... MGI012: Output mesh contains 1 material ... MGI054: Max. edge offset ... 7.16e+000 u between nodes 36, 47 MGI057: Max. non-dim offset 0.4995 between nodes 36, 47 MGI018: Final check ........ all Jacobians are positive. MGI021: Max. edge length ... 1.20e+002 u between nodes 1, 29 MGI052: Min. edge length ... 6.35e-001 u between nodes 35, 38 MGI020: Max. aspect ratio .. 1.32e+002 at element 11 ............................................................................ MGI031: Writing a VRML file ... MGI067: Writing a FLAC3D file ... ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MGI999: Successful termination of KUBRIX in 2.6 seconds! ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

    3. KUBRIX generates two files: kubrix_out.flac3d and kubrix_out.wrl. You have two options for inspecting the resulting mesh. You can open a new instance of Rhino and use File|Import to import kubrix_out.wrl.

    4. For a more in-depth inspection of the grid launch FLAC3D and use File|Import grid to read kubrix_out.flac3d. Select Plot|1 Base/0|Show to open the FLAC3D graphic window. Click somewhere in the background of this window to activate it, and select Plot item|Add|Plot|Group to open the Block group dialog box. Click OK to display the grid in FLAC3D (Figure 48).

    Figure 48: View of the grid in FLAC3D containing 33 zones and 84 vertices

    By default, KUBRIX produces a coarse mesh. In the KUBRIX screen output, the maximum edge length in the mesh is reported as 120. To create a finer mesh, you must specify a smaller maximum edge length.

    5. Launch Kubrix, and in the Mesh parameters section of the dialog box, check the square marked Max. allowable element edge length, and enter 20 in the corresponding field. In the same section, choose a Resolution of 5 to make sure that all details are captured with at least 5 elements across. Set Structure of the mesh to 3 to create a fully-structured mesh and click Compute to launch the hexahedral mesh generation.

  • Kubrix/Rhino Users Manual Page 48

    6. In the FLAC3D, click on the Command Window to activate it. Select File|New to remove the existing model, followed by File|Import Grid. Read t3.flac3d into FLAC3D and display it (Figure 49).

    Figure 49: Flac3D grid containing 6875 zones and 8464 vertices

    Creating a tetrahedral grid for FLAC3D Using KUBRIX 1. Start Rhino. Open t2_0.stl. Run the Kubrix program by clicking on the Kubrix icon. Select the

    Tetrahedral meshing tab (Figure 50).

    Figure 50: The tetrahedral meshing dialog box

    2. Click on the button marked Default, then on Compute to create a tetrahedral grid (Figure 51).

  • Kubrix/Rhino Users Manual Page 49

    Figure 51: An all tetrahedral grid

    Creating octree grids for FLAC3D or blocks for 3DEC Octree meshes are based on an increasingly finer decomposition of space into hexahedral blocks (Figure 52 & Figure 53). One of the main attractions of this approach is that the input surface doesn't have to be closed. In fact, octree meshes can be obtained from surface data containing many gaps and overlaps. This approach is to be compared with other forms of meshing presented in this document where a perfectly watertight input surface is required in which all surface intersections are accounted for.

    Figure 52: Octree blocking: left, mesh featuring 5 levels of refinement, right, a balanced octree where a maximum of 1-to-2 refinement is enforced on adjacent cells

  • Kubrix/Rhino Users Manual Page 50

    Figure 53: Octree meshing: left: boundaries are detected in dark blue, right; various regions are identified and colorized

    1. Start Rhino. Open t2_0.stl. Run the Kubrix program by clicking on the Kubrix icon. Select the Octree Meshing tab (Figure 35).

    2. You can use octree meshing for both 3DEC and FLAC3D model generation. Click on Default, select 3DEC for the output type and click on Compute to create the blocking.

    Figure 54: Octree meshing dialog box

    3. Kubrix generates a file called t3.3dec. Run 3DEC 4.0 and use File|Call to read t3.3dec and display it (Figure 55).

  • Kubrix/Rhino Users Manual Page 51

    Figure 55: Coarse octree blocking where blocks intersecting the boundary have been masked

    4. To obtain a finer FLAC3D grid, run Kubrix , select the Octree Meshing tab, click on Default, select 7 for the Octree level, select FLAC3D as the output type and click on Compute to create a file called t3.flac3d

    5. Run FLAC3D, import t3.flac3d and display it (Figure 56).

    Figure 56: An octree FLAC3D mesh using an octree level of 7. Group 2 has been masked for clarity purposes

    Creating a FLAC3D or a 3DEC model for sequential excavation The Kubrix/Rhino logic may be used to create models featuring sequential excavation. Whereas in traditional model building for FLAC3D or 3DEC the range command based on geometrical criteria is used to excavate material, in the CAD-based mesh generation logic embodied by Kubrix/Rhino, the zones destined to be nulled must, in advance, belong to separate groups (or regions) so they can be identified. You can create groups of zones (FLAC3D) or regions of blocks (3DEC) by adding internal walls representing the location of the excavation fronts at various stages of the excavation. For all practical purposes, Kubrix will assume that the added walls represent boundaries between different materials. For the user, these groups represent essentially the same material.

  • Kubrix/Rhino Users Manual Page 52

    The most straight-forward way to add internal walls is to add them to the CAD definition before triangulation. A closed surface with internal walls is a non-manifold surface.

    It is also possible to add walls to a surface mesh after is has been triangulated. In all cases, the resulting STL file should not have any naked or free edges. Once used with Kubrix, the STL file will produce a number of additional groups which can then be individually turned on or off (nulled) in a data file to represent sequential excavation during a simulation.

    1. Start Rhino and open t2_0.3dm which represents the CAD definition of the model so far. Double-click the label of the Top view to maximize this view. Right-click on the icon marked Wireframe Viewport to see a wireframe representation.

    2. Select the model and left-click the icon marked Explode. This operation which is the reverse of the Join operation breaks up the model into 8 separate surfaces (Figure 57, left). Left-click on the icon marked ColoriseAllObjects to give each surface a different color. Select the main tunnel (the horizontal one in the figure), left-click the icon marked Hide Objects, hold the mouse button down and select Invert Selection and Hide Objects to see the main tunnel alone (Figure 57, right).

    Figure 57: Top view of the branching tunnels (left) and main tunnel, alone, after the Explode and ColorizeAllObjects

    command (right)

    3. Select Curve|Line|Single Line. Enter -30,30 followed by to define the first point of a vertical line. Enter -30,-30 followed by to complete the line. This line will be used to split the main tunnel.

    4. Select Edit|Split, select the main tunnel for Objects to Split followed by . Select the vertical line for the Cutting Object, followed by to finish splitting the main tunnel with the vertical line. Click on the icon marked ColorizeAllObject to see the two parts of the tunnel (Figure 58, left).

    5. Double-click the label of the Top view to return to a 4-view representation of the model. Double-click the label of the Perspective view to maximize that view. Select the left portion of the tunnel, left-click the icon marked Hide Objects, hold the mouse button down and select Invert Selection and Hide Objects to see the left portion of the tunnel alone (Figure 58, right). Note the line used to cut the main tunnel in two.

  • Kubrix/Rhino Users Manual Page 53

    Figure 58: Top view showing line along which the tunnel will be cut (left) and perspective view of the portion of the main

    tunnel after hiding the right portion (right)

    6. Delete the line that was used to cut the tunnel. Select Curve|Curve From Objects|Duplicate Edge. Left-click on the newly cut edge of the tunnel to extract the circle representing that edge (Figure 59, Left). Select the edge and select Surface|Planar Curves to create the circular surface bounded by the circle (Figure 59, Center). This surface represents an excavation front dividing the tunnel into two regions. Right-click on the Icon marked Show Objects, then right-click on the icon marked Shade All Viewports. When Choose Shade Settings appears on the command line click on the word DisplayMode and select Ghosted to see a transparent view (Figure 59, Right).

    Figure 59: Extracting the circular edge of the cut tunnel (Left), creating a planar wall representing an excavation front

    (Center) and the complete model with the internal wall (Right)

    Before the addition of the internal wall, the model was composed of one closed volume, namely the volume comprised between the tunnels and the outer box. The addition of an internal wall did not add to the number of closed volumes. For Kubrix to treat the interior of the tunnels as groups, you must close the tunnels at their three openings. This will result in two groups in the tunnels and one group out