# 4.2. Geometry¶

The Geometry pane is used to define the model geometry. This includes whether the model is 2D or 3D, and the overall domain extents (xmin, xmax, ymin, ymax, zmin, zmax). If there is complex geometry, the “Auto-size” button can automatically set the extents to surround the geometry.

The geometry section provides tools for adding geometry objects (from STL files, or primitive elements), filters to transform geometry objects, and wizards to automate creating common complex geometries. Geometry objects can be copied, removed, or combined using Boolean operations. All the geometry operations are done using the Visualization Toolkit (VTK)’s library.

Geometry toolbar icons:

Icon

Description

Modify selected geometry with filter

Remove the selected geometry

Add duplicate of the selected geometry (copy/paste)

Add union of two or more selected geometries

Add intersection of two or more selected geometries

Add difference of two or more selected geometries

In the geometry tree, the geometry object is displayed with the following icons:

Icon

Geometry Type

polydata

implicit

filter

union

intersect

difference

There are two types of geometric objects supported in the GUI: implicit functions (quadrics), and objects defined by polydata (everything else: STL files, procedural shapes, primitives, parametrics, wizard geometry).

The following geometric objects can be added:

• STL files (select a *.stl file from a file dialog)

• Procedural shapes (cylinder, bend)

• Primitives (sphere, box, cylinder, cone)

• Parametrics (torus, boy, conic spiral, etc.)

## 4.2.2. Procedural shapes¶

Procedural shapes were introduced in the 21.1 release. These are triangulated polydata objects that are defined by a series of parameters. They offer better control on the triangles quality than implicits or primitives.

### 4.2.2.1. Cylinder¶

Parameters:

• Height (H)

• Number of divisions along the height

• Starting angle in the circumferential direction

• Ending angle in the circumferential direction

• Number of divisions along the circumferential direction

• Bottom cap

• Number of divisions in the bottom cap’s radial direction

• Top cap

• Number of divisions in the top cap’s radial direction

The top and bottom caps are shaped like fans, i.e., they converge radially towards the center of the cap. Caps are not needed if the cylinder extends past the MFiX domain in the axial direction, when inlet/outlet boundary conditions are defined along the MFiX box (say at y=ymin and y=ymax for a vertical cylinder).

It is recommended to include caps when combining shapes (union, intersection, difference) since the boolean operations are more robust with closed shapes.

### 4.2.2.2. Bend¶

Front section:
• Length (L f)

• Number of divisions along the front section length

Back section:
• Length (L b)

• Number of divisions along the back section length

Bend section:

• Starting angle ($${\theta}$$ f)

• Ending angle ($${\theta}$$ b)

• Number of divisions in the angular direction

Circumference:
• Starting angle in the circumferential direction

• Ending angle in the circumferential direction

• Number of divisions along the circumferential direction

Caps:
• Bottom cap

• Number of divisions in the bottom cap’s radial direction

• Top cap

• Number of divisions in the top cap’s radial direction

## 4.2.3. Applying Filters¶

To apply a filter to the selected geometry, select a filter from the Filter menu. The filter options can be edited in the parameter section. The following filters are included:

Filter

Description

vtk class

sample implicit

converts an implicit function to polydata

vtkSampleFunction

transform

rotate, scale, translate polydata

vtkTransformPolyDataFilter

clean

merge duplicate points and remove unused points and degenerate cells

vtkCleanPolyData

fill holes

fill holes

vtkFillHolesFilter

triangle

make sure all polys are triangles

vtkTriangleFilter

decimate

reduce the number of triangles

vtkDecimatePro

reduce the number of triangles

reduce the number of triangles

linear subdivision

subdivide based on a linear scheme

vtkLinearSubdivisionFilter

loop subdivision

subdivide based on the Loop scheme

vtkLoopSubdivisionFilter

butterfly subdivision

subdivide based on 8-point butterfly scheme

vtkButterflySubdivisionFilter

smooth

move points based on Laplacian smoothing

vtkSmoothPolyDataFilter

windowed sinc

move points based on a windowed sinc function interpolation kernel

vtkWindowedSincPolyDataFilter

reverse sense

reverse order and/or normals of triangles

vtkReverseSense

Refer to the VTK website for details.

## 4.2.4. Wizards¶

Three wizards are available to more easily create common multiphase flow geometries: cyclones, reactors, and hoppers. A special “distributed” wizard is used to distribute one geometry inside another geometry with random, cubic, or body centered cubic positions. Random rotations can also be applied with the wizard.

## 4.2.5. Remove & Copy¶

To remove a selected geometry, click the (Remove) button. If a geometry is grouped as part of a Boolean Operation, removing it is disabled until that Boolean Operation is removed first.

To duplicate the selected geometry, click the (Duplicate) button. If multiple geometry objects are selected, duplication is disabled.

## 4.2.6. Boolean Operation¶

There are two types of geometric objects supported in the GUI: implicit functions (quadrics) and objects defined by polydata (everything else: STL files, primitives, parametrics, wizard geometry). Boolean operations cannot be performed between polydata and implicit geometry objects; the implicit function needs to be converted to polydata by using the sample implicit filter. Converting the implicit function also needs to be done in order for the GUI to export a STL file that the mfixsolver can use.

Boolean operations can only be performed with geometry objects of the same type (implicit, polydata). Boolean operations can not be performed between polydata and implicit geometry objects. If an implicit and a polydata must be managed together, the implicit object must be first converted to a polydata object using the sample implicit filter.

Note

Boolean operation between two polydata objects is supported by MFiX, but for complex objects the VTK library may crash.