Preparation of Geometry Models for Mesh Generation and CFD


Making geometry models suitable for CFD meshing is often a time-consuming bottleneck in CFD analysis. Here we will discuss why this is so and some ways to alleviate the problems.

 

NASA’s CFD Vision 2030 Study stated that “most standard CFD analysis processes for the simulation of geometrically complex configurations are onerous.” A major factor contributing to this perception is the preparation of geometry models for mesh generation, a task deemed a “significant bottleneck” in CFD workflows.

Geometry Modeling Fundamentals

A computational geometry model is an idealized mathematical representation of an object’s shape. Broadly speaking, there are two categories of solid object representation: boundary representation and volumetric representation.

Boundary Representation

Boundary representation is the method of describing a solid object implicitly from its boundary and generally consists of two sub-representations: geometry and topology. Geometry describes individual shapes such as points, curves, and surfaces. Topology describes the entities that limit the portion of each geometric shape and the interconnections between those limited shapes.

Analytic Geometry

Geometry models produced in mechanical computer-aided design (MCAD) software are referred to as analytic boundary representations. The surfaces can be explicit and piecewise or implicit. The predominant form of parametric spline used in MCAD software is NURBS (Non-Uniform Rational B-Spline).

A T-Spline is a spline with a partially empty parametric space; the spline’s control points need not be defined at each parametric (u,v) coordinate. In general, a T-Spline model can consist of fewer surfaces than a NURBS model on the same shape. A U-Spline (Unstructured Spline) is a further generalization of NURBS that are defined on triangular unstructured meshes versus the structured grid that is the rectangular parametric space of a NURBS or T-Spline.

Subdivision (Sub-D) is a method for modeling freeform surfaces that starts with a coarse mesh and through recursive point insertion achieves a limit surface that either interpolates or approximates the points in the original coarse mesh.

Discrete Geometry

Geometry models in the form of explicit surface meshes, independent of degree or element type, whether originally created for rendering, 3D printing, simulation, etc., are referred to as discrete boundary representations.

Discrete models can be produced by most CAD software (by tessellating an analytic model). There are other situations where the source of discrete models are 3D scans and extant meshes. 3D scans of an object allow the as-built versus the as-designed object to be represented for simulation. 3D scans also capture an object in its loaded configuration such as the upward flex of an aircraft’s wings in flight.

 

It is important to understand that analytic geometry has effectively unlimited resolution, but discrete geometry is limited to the resolution of the point density used to describe the shape. In other words, you can evaluate a NURBS surface anywhere and get coordinates that lie on the surface, but when you evaluate a discrete surface, you get a shape defined by linear interpolation between the known discrete points.

 

Boundary Topology

Topology is a mapping of logical connections that unifies a collection of subsets of geometric entities into a whole, often called a solid model or just a solid.

The bounding (limiting) of surfaces in a B-Rep topology is accomplished through an operation called trimming. This operation imprints curve(s) into a surface’s parametric space and limits the surface to the portion of the parametric space bounded by that curve and others. The resulting trimmed surface has a non-rectangular parametric space which affords it a great deal of flexibility in modeling complex shapes.

Volumetric Representation

Volumetric representation is the method of describing a solid object explicitly from a series of solid, space-filling primitives.

Constructive Solid Geometry (CSG) is the method of taking solid primitives and combining them hierarchically using the standard Boolean operations: union, intersection, and difference. The individual solid primitives are typically trivial shapes such as spheres and blocks, but can be arbitrarily complex.

Spatial occupancy modeling involves “digitizing” the region of interest into pixels (2D) or voxels (3D). The relative properties of adjacent pixels are used to define boundaries within the region. X-ray, MRI, and CT scan are examples of spatial occupancy models.

Implicit geometry modeling defines a shape by an implicit function that evaluates to zero on the shape’s surface, a negative value on its interior, and a positive value elsewhere.

Originating Intent & Software

A geometry model may be created specifically for the purpose of simulation. Whether or not this model is derived from a master model in MCAD software, it will typically include simplifications and abstractions that vary based on the type of simulation to be performed (e.g., solid mechanics, fluid dynamics, electromagnetics).

Simulation models are often created using software other than MCAD, such as software developed in-house or commercial off-the-shelf (COTS) software. This is especially true during the conceptual design phase when software tools like these may be the predominant tool for generating the outer mold line (OML).

 

In order to circumvent the complexity associated with using geometry models created in MCAD software, many organizations utilize design software tailored to their specific application. Notable among these tools for aerospace applications are OpenVSP [1] and ESP [2].

 

Sources of Geometry Model Unsuitability

All of the geometry modeling techniques described above can produce geometry models that are perfectly suitable for mesh generation and CFD simulation. In practice, however, their use often presents challenges for the downstream user.

Interoperability & Translation

It is fair to say the most widely employed interoperability method for geometry models is transmission via a file. A wide variety of geometry model file formats are available including standard formats, native CAD formats, and de facto standards. All file formats suffer from a common problem; nothing prevents them from being written in ways that violate the format’s specification. In turn, any standard-conforming application that attempts to read these violating files is likely to fail.

It is important that a mesh generator be flexible enough to support a wide variety of geometry model file formats so that you can work with geometry provided by different sources. In addition, the ability to automatically assemble the model into a solid that’s ready for meshing is invaluable. Read our tips and tricks for file management for mesh generation.

 

The translation of a B-Rep model through the interoperability toolchain is a potential source of data loss and introduction of errors. While the general mathematics of analytic B-Reps are well known, the manner in which they are implemented in the MCAD software and the receiving applications may differ significantly, especially in terms of the tolerances used in surface-surface intersections and related computations.

 

Benefits of Native CAD over Neutral Files

 

A mesh generator requires a variety of geometry modeling capabilities to prepare and supplement the model provided by the CAD software. Are you interested in learning more about geometry manipulation in Pointwise? Check out the playlist of short videos.

 

Interoperability by Direct Interface

In order to minimize the potential data loss due to translations of a geometry model through intermediate format(s), an alternative approach is for the receiving software to directly interface with the CAD software through an application programming interface (API).

A receiving application would implement a direct interface for each MCAD platform from which geometry models will be received. Within a single organization or a group or organizations that have standardized on a single MCAD application, this limitation should not be too severe. To alleviate the need for multiple implementations, the receiving application could implement a CAD-neutral API. Using a CAD-neutral API allows the interface to multiple CAD systems to be implemented once.

Intersections, Trimming, and Tolerances

What is often revelatory is the fact that the intersection of surfaces in a model comprised of analytically defined splines is approximate, inexact, and based on a tolerance. This is not a mathematical necessity but one of practicality. Consider that the analytically derived intersection of two bicubic B-Spline surfaces results in an intersection curve of polynomial degree 324. It is impractical for MCAD software to compute, store, and edit curves of this complexity for issues of memory usage, speed, and flexibility.

Therefore, the intersection is computed approximately using a process that involves point sampling on each surface to within a tolerance and then fitting the resulting collection of points into a curve. A byproduct of this computation is an intersection curve that does not precisely conform to either of its parent surfaces.

The majority of engineers find analysis-suitable model preparation from CAD data to be a tedious and time-consuming task that consumes up to 73 percent of their time (by one study), for reasons not often understood. A natural question arises as to why such a barrier exists between the CAD geometry and analysis model when the CAD system seems to display an accurate representation of the intended design.

Chart of Approximated Curves from SSI Sampling Points

The intersection of the red and blue surfaces is comprised of a fit of sampled points in each surface's parametric space. Image from Urick & Marussig [3].

Details – Too Many, Too Few

Excessive Detail

In manufacturing organizations, the geometry model’s primary use is often a complete product definition. Gammon [4] identifies ten fundamental differences between CAD and CAE (or CFD) geometry models, several of which fall into the category of excess detail.

  • Excess (and complex) topology which results from the combination of the underlying mathematics and usage practices.
  • Geometry in excess of the wetted surfaces or OML (i.e., the boundaries of a CFD domain).
  • Excess realism in the form of geometric details such as embossed or engraved text, fasteners, fillets, and chamfers.
  • Too idealistic in the sense that “non-manufacturable” geometry is created that includes sliver surfaces, cusps, knife-edges, and similar degeneracies.

Excess and complex topology, as cited above, can be resolved by using higher-level topological abstractions (often called sheets or quilts) that account for the distinction between design features and artifacts of the modeling process or tool.

Geometry model “repair” and “healing” are the umbrella terms used to address excessive detail. Repair functionality is available in many dedicated software tools, interoperability libraries, and mesh generation and CFD software.

Importing and manipulating CAD geometry to make it more suitable for meshing is not always well understood. By editing and creating geometry and using solid model assembly, most models can be readily prepared for mesh generation. Master geometry cleanup in Pointwise.

 

Tips for Handling Complex Geometries, Very Large Grids

 

Insufficient Detail

The problem of insufficient detail in a geometry model pertains mostly to geometry required by meshing that has nothing to do with the true product definition as designed, such as outer boundaries, farfield boundaries, closure of certain components, and more.

The refeaturing of geometry models imported from STL has to recover the sharp edges and feature lines so that they may be accurately reproduced in the mesh. In addition, it is useful to be able to reduce the density of the facets by merging them where they are coplanar. Here is a video about Pointwise’s tools for importing unstructured wireframe data.

 
Discrete geometry models present an interesting case of insufficient detail. The lack of topology in a discrete model hampers its use. Without topology, the model is a “triangle soup” when, in reality, the object being modeled has distinct geometric features likely significant to the CFD simulation. The facets in a discrete model can be assembled into surfaces bounded by feature lines (aka hard edges). These hard edges can be defined by the relative turning angle of the facet normal vectors on either side of the line.

Summary

Geometry modeling is a highly capable field of technology representing a broad range of established and emerging technologies. The models produced by geometry modeling software are essential for the application of CFD. Use of geometry models for CFD can be streamlined by understanding a few basic factors and utilizing tools that can best handle them.

References

  1. OpenVSP
  2. Haimes, R. & Dannenhoffer, J.F. III, “The Engineering Sketch Pad: A Solid-Modeling, Feature-Based, Web-Enabled System for Building Parametric Geometry,” AIAA paper no. 2013-3073, June 2013.
  3. Urick, B., & Marussig, B., “Why CAD Surface Geometry is Inexact,” https://blog.pointwise.com/2017/11/29/why-cad-surface-geometry-is-inexact/, November 2017.
  4. Thomas, D.C., Engvall, L., Schmidt, S.K., Tew, K., & Scott, M.A., “U-splines: Splines Over Unstructured Meshes,” https://coreform.com/technology/u-splines/.

Handle any geometry efficiently.

See for yourself how Pointwise helps alleviate geometry modeling problems.

Free Trial