Prior to any simulation solution, you must create the physical model and associated mesh to which boundary conditions will be attached. This procedure is collectively known as preprocessing.
Although throughout this course we will use ANSYS DesignModeler to construct models, it is generally easier for you to use a dedicated CAD program to construct nontrivial models. So that you can see this import process and understand some of its difficulties, we will import a part describing a Venturi flow geometry.
Download the file venturi
, and open venturi-1
, a SolidWorks model. Open ANSYS Workbench and add the component Mechanical Model
to the Project Schematic
. Double-click on Geometry
to open DesignModeler, where you can File→Import External Geometry File...
venturi.sldprt
. Generate
the imported model, which takes a few seconds as the model is parsed and rendered. You can manipulate and rotate this model now.
What do we need to do with this model to make it work as a fluid simulation?
There's a catch! Recall that Fluent requires a description of the negative space, the space through which the fluid will flow. This model file won't work for that, since any mesh will fill the solid portion of the part. Fortunately, most CAD tools include a tool we can use to invert the occupied volume and render the part suitable for CFD simulation: boolean subtraction. In DesignModeler, this is called Enclosure
, but it doesn't work properly if there is a lot of external junk to subtract as well. In this case, we need to extract the set of inner surfaces and use them to define a new flow volume first.
venturi
files to see the converted internal flow volume.Meshing is generally a dark art, relying on a number of heuristics as well as a gut feeling for what works and what doesn't.
Cells are surfaces with centroids, used to track fluxes of conserved quantities across control volumes. "CFD problems usually require discretization of the problem into a large number of cells/gridpoints (millions and more), therefore cost of the solution favors simpler, lower order approximation within each cell." (Wikipedia) [FVM cells are also good for unstructured meshing.]
ANSYS has several meshing tools. The following discussion refers to the ANSYS Meshing tool, NOT the ANSYS Fluent Meshing tool.
Many techniques are utilized to generate meshes. Although we'll cover these in more detail with Abaqus (since you can tweak things more), some basic techniques are discussed below. Differences can also be illustrated by examples in the ANSYS slides associated with this lesson.
It is frequently more computationally straightforward to mesh a shape or volume using triangles or tetrahedra, as these can be generated rapidly without reference to the overall alignment or axial structure. Popular methods for generating triangles and tetrahedra are:
Quad-tree/Oct-tree. A shape or volume is progressively subdivided by squares or cubes in the neighborhood of geometric features until the desired resolution is reached. Then triangles or tetrahedra are generated from the intersection of the surface with the mesh skeleton. Surface facets may not directly reflect geometric features as a result. ANSYS Meshing does not support this method but it is occasionally used in third-party meshing packages.
Advancing-Front. Mesh seeds are present at the boundaries and new elements are progressively added throughout the domain volume in a traveling wave. This is commonly used to generate unstructured meshes. Difficulties can arise where the advancing fronts from different sides meet, as well as when parallel lines are desired near domain boundaries. ANSYS Meshing supports this technique.
Structured meshes are generally constructed of quadrilateral or hexahedral cells. These can be generated in a few ways:
Structured Grid Generation. A regular array of grid points is transformed by a mathematical mapping onto the domain. This is used with quadrilateral or hexahedral elements to generate a structured mesh. In three dimensions, the face mapping may be swept along the axis or a three-dimensional mapping may be applied directly. ANSYS Meshing supports this technique.
Indirect. An unstructured tri/tet mesh is generated first, then either subdivided or combined to generate a quad/hex mesh. It is not clear whether ANSYS Meshing supports this technique, but it is likely employed at least near transitions where one mesh is stitched to another.
Once a candidate mesh has been generated, it often requires some adjustment before it can be used for an optimal CFD calculation:
There are several figures of merit available for assessing the suitability of a mesh. Unfortunately, there are valid exceptions to nearly all of these rules of thumb! So keep in mind that having high-quality mesh statistics does not equate to having a good mesh, and other considerations like the overall resolution, the distribution of elements, and the application need to be included.
Let's first play a game, judging meshes. You haven't learnt yet what makes a mesh good or bad, so let's see how well your intution works.
TODO coarse hyperrefined narrow boundary layer cells too high transition from coarse to fine unstructured next to structured Minimize grid skewness near boundary
flec02 workbench has some good examples
The following quantities are available:
Element Quality: area or volume over sum of the square of the edge lengths. EQ measures how far elements are from being perfect. For example, a value of 1 indicates a perfect tetrahedron or cube, whereas 0 means a terrible element.
Aspect ratio: basically ratio of the longest edge to the shortest edge (actual calculation more complicated); AR should not exceed 100.
Skewness: determines how close to ideal (i.e., equilateral or equiangular) a face or cell is.
Orthogonal quality: similar to skewness on a reverse scale.
Unacceptable | Bad | Acceptable | Good | Very good | Excellent | |
---|---|---|---|---|---|---|
Skewness | 0.98-1.00 | 0.95-0.97 | 0.80-0.94 | 0.50-0.80 | 0.25-0.50 | 0-0.25 |
OQ | 0-0.001 | 0.001-0.10 | 0.10-0.20 | 0.20-0.69 | 0.70-0.95 | 0.95-1.00 |
(For visual examples of each of these, check the ANSYS slides.)
Exceptions to these rules thumb include the avoidance of overly coarse meshes; boundary layers (which may permissibly have high AR elements); and areas with high curvature.
In Fluent, check the mesh at General→Check.
access mesh diagnostics in the main menu: Mesh→Statistics→Mesh Diagnostics.