FLAC3D Modeling • Problem Solving with FLAC3D

Working with Geometric Data

FLAC3D has the capability to import and define arbitrary geometric data. For instance, CAD data from AutoCAD can be imported from a DXF file. This geometry information can be manipulated after creation, and it can also be used for reference in visualization. There are certain (as yet somewhat limited) commands that allow zones or building blocks to be generated from polygons forming a closed volume. In addition, the data can be used to filter the objects affected by a FLAC3D command and to identify objects in certain regions by assigning group names.

This section provides a high-level description of how geometric data can be used in the current version of FLAC3D. For details, including all available options, see the reference information on the c geometry commands.

The data files and geometry data used to generate all the images in this section can be found in the project “UsersGuide\ProblemSolving\GeometricData\GeometricData.f3prj” in the “datafiles” folder of the FLAC3D distribution.

Note that a discussion of using geometric data to create densified “octree” grids can be found in Grid Generation under Geometry-Based Densification: Octree Meshing.

Geometric Data

FLAC3D organizes geometric data into sets, which are named collections of polygons, edges, and nodes. The data are topologically connected. Polygons are defined by a series of edges, and edges are defined by two nodes.

The easiest way to create a geometric set is via the geometry import command. For example, the command

model largestrain off

will import the data in the file surface1.stl and place it into a geometric set called surface1. Currently available formats are DXF, STL, and an Itasca-defined format that preserves added metadata (e.g., group names, FISH extra variables, etc.). You can also simply go to the File ‣ Open into Project… menu command (Ctrl + O) and select a geometry file with a recognized extension (STL, DXF, and GEOM) in the ensuing dialog.

click to enlarge image in a new window

Figure 1: The FLAC3D Open into Project dialog.

Geometric data can also be created via commands. For instance, the geometry polygon create command can be used to directly add a polygon to a geometric set. For example,

geometry import 'surface1.stl'

will add a simple quadrilateral to the current geometry set.

In addition, all data in all sets are available through FISH (see the topic Geometry FISH Functions for a list of functions). FISH can be used to both modify and create geometric data. For instance, the following is a simple FISH function that creates a geometric set called “FISH Example” and then adds polygons forming a cylinder:

Example: “fish_cylinder.fis”

model new
fish define fish_cylinder(start,radius,height,segments)
    local gset = geom.set.find("FISH Example")
    if gset = null then
        gset = geom.set.create("FISH Example")
    endif
    loop local i (1,segments)
        local ang1 = float(i-1) * math.pi * 2.0 / float(segments)
        local ang2 = float(i)   * math.pi * 2.0 / float(segments)
        local p1 = start + vector(math.cos(ang1),math.sin(ang1),0.0)
        local p2 = start + vector(math.cos(ang2),math.sin(ang2),0.0)
        local p3 = vector(p2->x,p2->y,height)
        local p4 = vector(p1->x,p1->y,height)
        local poly = geom.poly.create(gset)
        geom.poly.add.node(gset,poly,p1)
        geom.poly.add.node(gset,poly,p2)
        geom.poly.add.node(gset,poly,p3)
        geom.poly.add.node(gset,poly,p4)
        geom.poly.close(gset,poly)
    end_loop
end
@fish_cylinder((0,0,0),1.0,4.0,40)

The results are shown below. Following figure has no caption.

click to enlarge image in a new window

Geometry Visualization

Geometric data can be visualized in a Plot Pane. When the Open into Project… dialog is used, the geometry will be automatically rendered in a new plot.

If the set is added by command at the command prompt, it will need to be added manually to a plot to be seen. To do so:

  1. Create a plot (File ‣ Add New Plot… or Ctrl + Shift + N).
  2. Use the Build Plot tool ( buildplot ) to get the Build plot dialog, pick the “Geometry” item from the list in the “User Defined Data” category.
  3. In “Attributes”, make sure that the desired set is selected in the “Sets” control. (Note: With this control, more than one set maybe visualized on the same plot item.)

Geometry Painting

To help visualize how model variables vary with respect to geometry data, data from the zones can be used to “paint” values on to geometric nodes. These values can then be contoured to visualize how model variables vary in relation to geometric features that might not be explicitly modeled.

By switching the “Type” attribute to “Contour”, and switching the “ContourBy” value to “FieldData”, you can select from the list of all zone field variables. This data is used only for plotting, and is not visible to the model state.

The geometry paint-extra command, however, can be used to “paint” zone field data values from the model to an extra variable stored in geometric nodes. For example, to paint the minimum principal stress in the model onto the active geometric set, you use the command

geometry paint-extra 2 stress quantity minimum

which will calculate minimum principal stresses at the location of all nodes in the active set, and assign that value to extra variable index 2. The complete list of zone field variables available can be found in the geometry paint-extra command documentation.

The result of painting can be visualized by using the Geometry plot item (with attributes “Type” = “Contour”, “Contour By” = “Node Extra”, and “Index” = “2”). The figure below is an example of painting the displacement magnitudes on a simple tunnel next to the main excavation.

click to enlarge image in a new window

Figure 3: Displacement magnitude painted on geometry.

Geometric Filtering - Geometry Range Elements

The primary method for selecting objects in FLAC3D is to provide a filter that determines the objects affected by a given command. This is done using the range logic. There are two range elements that exist to filter objects based on their relation to data in geometric sets: geometry-distance and geometry-space.

The geometry-distance range element can be used to select objects that fall within a given distance of data in a geometric set. This includes polygons, free edges and free nodes. The minimum distance from the object centroid to any data in the set determines the distance value.

The extent keyword is valid for the geometry-distance range element, finding the minimum distance to the Cartesian extent of an object. This can be used with a distance value of zero to return an approximation of all objects that actually intersect the geometric set. For example, the following command can be used with the above data to assign group name “Intersect” to all zones that have a Cartesian extent that intersects the geometric set “intcylinder.”

geometry import 'intcylinder.stl' set 'intcylinder'

The result of that operation is shown here.

click to enlarge image in a new window

Figure 4: Zones selected by the geometry dist range element.

The geometry-space range element selects objects based on how many times a ray starting from the object intersects polygons from the geometric set. If the intersection count matches the number provided, it is considered selected. The following sentence and the one after the code block seem to be cut off. This can be used to

geometry translate (1,0,0)

is given, the results can be seen here.

click to enlarge image in a new window

Figure 5: Zones selected by the geometry count range element.

As a special case, the keywords odd or even can be substituted in place of a count number in the geometry count range element. If the geometric set effectively forms a closed volume, the odd keyword will result in selecting all objects inside, and the even will select all objects outside. No checking is done to make certain the polygons actually form a single closed surface. The results of the command

geometry import 'intcylinder.stl'

are shown in in the next figure. Note that the intersecting cylinder geometry set does not form a single closed surface, and therefore, the range element does not select zones in the shared region.

click to enlarge image in a new window

Figure 6: Zones selected by the geometry count range element using the odd keyword.

If the geometric set does form a perfect topologically closed volume, then the inside and outside keywords can be used to select objects instead of the count keyword.

Geometry Data and Group Assignment

There are occasions when you wish to select objects that fall into regions of space delineated by complex geometric data. Sometimes these data are not neatly separated into distinct surfaces that can be assigned to different geometric sets. Sometimes the relation between the data is complex, and manually identifying specific regions (e.g., above this surface, behind that, and ahead of this) is burdensome. The geometry assign-groups command lets you assign group names to objects based on how they relate to all these surfaces at once.

The operation works by first assigning a unique ID number to all polygons that form a single contiguous surface. Specifically, all polygons in a single set that are connected across edges will be given the same ID number. A ray is then passed from the centroid of the object through those polygons, and a group name is generated based on how many times the ray intersects polygons of each ID.

As a simple example, we will use a geometric set consisting of two intersecting cylinders. The geometry assign-groups command is used to assign group names to zones based on their relation to the surfaces using the command

geometry import 'intcylinder.stl' set 'intcylinder'

The figure below shows the group name assigned to zones in a cut-plane through the model. Each letter represents a different intersection region as defined by surface ID and intersection count.

click to enlarge image in a new window

Figure 7: Groups assigned by the geometry assign-groups command.

This operation may be performed on zones, gridpoints, user-defined data and structural element objects (elements, nodes, and links).

While the geometry assign-groups command can quickly separate objects into separate geometric regions, it does have limitations. The user has no control over the ID numbers assigned to surfaces, and determining the group names assigned to desired regions has to be done via visual inspection. Often, multiple groups will need to be combined into the actual region of interest.