User Tools

Site Tools


VSP Mesh Generation for Cart3D Guide

VSP and Cart3D are very well suited to work together in conceptual design. VSP allows for quick and easy geometry generation and modification. Cart3D allows for fast, robust, and accurate Euler solutions on complex geometries. Together, it is possible to execute quick and effective design cycles.

Cart3D requires only watertight triangulated surface meshes of the model components to define the geometry for an analysis. VSP can create three different kinds of triangulated meshes and can write some of those meshes to different file formats which can work with Cart3D. Consequently, there are five paths from VSP to Cart3D which should be considered.

You should review and understand all of the surface mesh type and file format choices described on this page before selecting a path and continuing the tutorial.

Surface Mesh Types

To better illustrate the differences in the possible types of surface representation, a simple pod has been added to the Onera M6 geometry. In addition, images have been included as thumbnails so, any place you see a picture, click on it for a larger version.

Isotropic Generated Mesh

VSP includes a surface mesh generation capability which should be familiar to users who have used other unstructured surface mesh generation tools. Global and local controls on triangle size can be specified with 'sources' which are attached to the geometry components. When the geometry changes, the mesh specification changes with it.

The surface mesh generator tries to construct equilateral triangles which vary smoothly in size and meet the resolution specification from the sources. The end result is a watertight mesh generated on the smooth mathematical surface of the model.

Notice that the triangle edges meet at common nodes where the pod intersects the wing. This surface mesh represents a single watertight form.

These files can be written in a number of formats including two which may be used with Cart3D – STL and TRI. When written as a TRI file, this file is an example of the 'Wetted Surface Triangulation Format' described in the Cart3D documentation

Unintersected Component Wireframe

VSP can output a file containing all of the components in a model as individual watertight triangulated wireframe bodies. This kind of file must be processed with Cart3D's 'intersect' utility before it can be analyzed with Cart3D. Without further processing, this file does not represent the true wetted surface of the geometry.

Notice that the triangle edges do not meet at common nodes where the pod intersects the wing. These components have not been intersected into a single watertight form.

This file can be written in the TRI format which may be used with Cart3D. This file is an example of the 'Configuration file format' described in the Cart3D documentation.

Intersected Component Wireframe

VSP includes a geometry intersection routine similar to Cart3D's 'intersect'. This routine is used to process a set of unintersected components into a single watertight surface mesh.

Notice that the triangle edges meet at common nodes where the pod intersects the wing. These components have been intersected into a single watertight form.

These files can be written in a number of formats including two which may be used with Cart3D – STL and TRI. When written as a TRI file, this file is an example of the 'Wetted Surface Triangulation Format' described in the Cart3D documentation.

Hybrid Approaches

It is an intentional over-simplification to say that there are three kinds of meshes and a pair of file formats which lead to five ways VSP can work with Cart3D. Cart3D's modular approach results in great flexibility when building an input model. Specifically, the 'comp2tri' program described in the Cart3D documentation can be used to combine TRI files from various sources. The 'intersect' program can then be used to find the combined wetted surface for analysis in Cart3D. VSP's flexibility compliments these diverse Cart3D workflows.

Experienced Cart3D and VSP users will find imaginative ways to combine these tools together for interesting purposes. For example, someone may wish to combine a fuselage/tail STL file created with a traditional surface grid generation program with a wing generated in VSP using the intersected component wireframe mesh, and a nacelle/pylon generated in VSP using the isotropic mesh generation capability.

Cart3D Surface Meshing Requirements

Cart3D is a Cartesian Unstructured Euler code. Because of the nature of Cartesian Unstructured codes, Cart3D does not have the same surface mesh quality and resolution requirements as traditional body-fitted (structured or unstructured) CFD codes. In Cart3D, the triangulated surface mesh can be thought of as a knife which is used to cut the Cartesian volume mesh – like an airplane-shaped cookie cutter.

Consequently, the important consideration is how well the discrete surface mesh represents the corresponding continuous surface. Flat portions of the model can be represented with very large triangles without adverse effect on the Cart3D flow solution. If you wanted to model the aerodynamics of a cube, you could imagine using a surface mesh of just 12 triangles – two per square face.

Cart3D does interpolate the cut-cell solution back onto the surface triangulation. This interpolated solution is used for visualization and can be used for calculating loads (loads are also calculated on the cut cells). Consequently, if you did model a cube with just 12 triangles, you would expect the resulting visualization to have significant flaws - and the triangle-based loads to be quite inaccurate. Refining the model of the cube to 120, 1,200, or 12,000 triangles would improve the visualization and triangle-based loads, but would not effect the Cart3D flow solution.

This feature of Cartesian unstructured CFD codes is what allows them to use surface meshes whose resolution and element quality would not be suitable for traditional body-fitted CFD codes. When judging the quality of a surface mesh for Cart3D, one must first be concerned with how accurately the surface mesh represents the underlying surface. In addition, one must ensure that the surface mesh is adequate for the visualization and loads calculations which will be done after the Cart3D solution is complete.

VSP uses the structured wireframe representation of the model to generate both kinds of triangulated component wireframe meshes. This structured wireframe is constructed such that the mesh lines on wings run chordwise and spanwise. This means that the resulting surface meshes will naturally be curvature aligned. When compared to an isotropic surface mesh with no curvature alignment, a relatively small number of chordwise elements will be able to accurately represent an airfoil.

Surface Mesh Type Summary

Isotropic Unintersected Intersected
Simplicity of Use good excellent excellent
Speed good excellent excellent
Robustness good excellent excellent
Sensitivity no yes no
Equilateral Tris. yes no no
Curvature Aligned no yes yes
Local Refinement yes no no
STL yes no yes
TRI yes yes yes

For most users and purposes, the intersected component wireframe approach will be the best way to use Cart3D with VSP. It is easy to set up, it is fast, it is robust, and the curvature aligned triangles provide good solutions without unreasonable mesh sizes. Because of the nature of Cartesian unstructured codes, the non-equilateral triangles are not an issue for Cart3D solutions. Although fine-tuned local control of mesh resolution is not possible, VSP provides resolution controls which should be adequate for most purposes; even if they result in a few more surface triangles than absolutely required.

Users using the Cart3D optimization framework's ability to calculate finite difference sensitivities of the geometry must use the unintersected component wireframe approach.

Surface Mesh File Formats

VSP can write surface mesh files to a number of file formats, two of which may be used with Cart3D.

Cart3D Native TRI File

The Cart3D native TRI file is a plain text file which can compactly represent a triangulated surface. The node coordinates and their connectivity are explicitly defined in the TRI file. The triangles in a TRI file can be 'tagged' to identify which component they represent.

TRI file description

Stereolithography Triangulated Surface STL File

The ubiquitous STL file is the most universal triangulated surface file format. These files are plain text, but they can be very large – approximately six times an equivalent TRI file. STL files specify the node coordinates of each triangle, but they do not explicitly specify the connectivity between triangles. In addition, STL files are not able to 'tag' triangles to identify which component they represent.

STL files must be converted to TRI format before they can be used with Cart3D. The conversion script distributed with Cart3D '' uses the admesh program to discern the connectivity of the mesh. Fortunately, the admesh program is very good at fixing minor topology or geometry problems in STL files. Consequently, using a STL file can sometimes succeed where the native TRI files will fail.

STL file description

Mesh File Format Summary

Size compact large
Connectivity explicit implied
Plain Text yes yes
Component Tagging yes no
Repaired by Admesh no yes
Isotropic VSP Mesh yes yes
Unintersected Mesh yes no
Intersected Mesh yes yes

For most users and purposes, native TRI files will be the best way to use Cart3D with VSP. They require no extra conversion, are compact, and allow the components in a model to be separately tagged.

STL files should be considered when small problems with the TRI file arise and the repair performed by Admesh is found to be useful.

Next Steps

Once you understand the merits of each kind of triangulated mesh, you are ready to choose your path and continue to the next step of the VSP to Cart3D tutorial – generating that mesh.

Or, feel free to jump to your topic of choice.

  1. Mesh Generation (This Page)
meshoverview.txt · Last modified: 2018/04/01 14:41 by