|
Surface Modeling and Geometry Import
Component based approach
The Process
Geometry import into Cart3D -
fem2tri, off2tri, dxf2tri, & triangulate
Auxiliary Programs -
intersect, comp2tri & diagnoseGeom
A Few Technical Topics and Comutational
Geometry
Component based approach
Loosely
speaking, all geometry comes into Cart3D as a collection of components,
which we call a
configuration. In the exploded view of a space
shuttle
at the right, there are 20 "component
triangulations" which comprise this congifuration. By
treating
each of these components as its own entity, we're free to move or
modify
an individual component to alter the configuration. Using this Component
Based Approach you can do a study in which components move or
change (for example a control surface gets deflected, or the wing
is modified), without having to re-generate a completely new surface
triangulation
for the modified geometry. |
|
In more specific
language, each
component is a simplicial polytope. Think of this as a solid
whose
surface is a triangulation. Thus, each component must be represented as
a single, watertight, triangulation, (no internal geometry). By
"watertight"
I mean that this triangulation must be locally manifold, so that one
can
traverse the entire surface by starting in any triangle, and traversing
(recursively) over that triangle's edges into the next triangle. If one
paints each triangle when it is visited, all the triangles on the
component
will get painted, regardless of where one begins the process. By this
defination,
every edge in the triangulation will have exactly 2 neighboring
triangles.
A "component"
is one such
simplicial polytope, and a "configuration" is a collection of
components
which describe the geometry you want to grid and run a flow simulation
on. A configuration may have any number of components. Cart3D has been
used on configurations with up to 1800 components, and there is (in
primciple)
no upper limit. The package comes with tools which will diagnose
problems
with incomming geometry and help you to correct them. Follow this link
for details about Cart3D
triangulation
formats.
(top)
The Process
-
Import the
components that make
up your configuration
-
Extract the
wetted surface (using
intersect)
-
Build the
Cartesian mesh (using
cubes)
-
Launch the flow
solver (flowCart)
Modifying your
configuration
and then repeating steps 2-4 allows you to conduct parametric studies
on
a given configuration.
(top)
Geometry Import
Tools are
available for
importing both geometry from both unstructured and structured sources.
These are summarized in the table below.
Unstructured Sources |
Typical
source
|
import
path
|
STL triangulations |
CAD
programs, or www |
admesh->off2tri |
OFF triangulations |
CAD
programs, or www |
off2tri |
DXF
triangulations |
AutoCad,
other PC based
CAD |
dxf2STL->admesh->off2tri |
FNF triangulations |
CAD
programs (esp. ProE) |
fem2tri |
Structured
Sources |
|
|
plot3d surface
grids |
CFD
codes/mesh generators |
triangulate |
LaWGS networks |
various |
net2p3d->triangulate |
Import
Tools:
fem2tri:
takes a "finite
element
neutral" format triangulation and converts it into an individual
component
triangulation (which you can feed to "comp2tri" to build a
configuration).
The perl script *$CART3D/perl/fem2tri.pl" is extensively documented.
Usage: fem2tri infile.fem >
outfile.tri
(top)
STL:
Stereolithography
files
(*STL) should be first converted to OFF format
triangulations
and then converted into Cart3D triangulations using off2tri
(below).
off2tri:
takes a "OFF
triangulation"
format triangulation and converts it into anindividual component
triangulation
(which you can feed to "comp2tri" to build a configuration).The perl
script
*$CART3D/perl/off2tri.pl" is extensively documented. OFF format
triangulations
are relatively common. Of particular note is that "admesh" which is a
code
that tries to produce manifold triangulations from StereoLithography
(STL)
files, produces "OFF" format triangulations. This is particularly
useful
for geometry acquisition from CAD since most CAD systems now produce
*STL
triangulations. Admesh is freely distributed under the gnu public
license
from:
http://www.varlog.com/products/admesh/
Usage: off2tri infile.fem >
outfile.tri
(top)
dxf2STL:
takes a "dxf
triangulatiol"
format triangulation and converts it into an STL triangulation.The perl
script $CART3D/perl/dxf2tri.pl is extensivey documented. DXF format
triangulations
are put out by autoCAD and some other popular CAD programs.
usage: dxf2STL infile.dxf
> outfile
-
Generate
an STL file with dxf2STL
-
Use admesh
to convert this to an OFF format triangulation
-
Convert
the *off file to an ascii format component triangulation
(*.a.tri)
with off2tri
(top)
triangulate:
triangulate a
Multiple-grid
plot3d file. Triangulate takes a multiple-grid plot3d format
configuration
and triangulates it component-by-component. Points with duplicate
geometry
(same point in physical space) are removed. It is used for converting
components
specified from structured geometry sources into
intersection-ready
triangulations. Component information is retained for each
triangulation.
To prevent problems downstream, The default behavior includes
slightly
(10x machine zero) perturbing vertices which are shared between
separate
components. This behavior can be suppressed with the "-n"
option.
Extremely
degenerate geometry can be inflated (slightly - 10xMachineZero) around
component centers in an attempt to avoid excessive tie-breaking
down-stream.
Normally the "-r" flag is set when triangulate is run to remove
duplicate vertices from the geometry. Component lists generated by net2p3d
(or by hand) may be fed into triangulate with the -C flag. The output
of
triangulate is a Cart3D
component triangulation or a Cart3D
configuration triangulation (*.tri) file which has a
component-by-component
triangulation of the configuration, ready for intersection.
% triangulate -
Usage: triangulate [-i
infile -o outfile
-T -v -r -n
-C comp_file -inward -inflate ]
Options:
-i ..... Input
file name, def:<mgrid.unf>
-o ..... Output
file name, def:<Components.tri>
-T ..... Output
to tecplot file "tec.dat"
-fast .. Output
to unformatted FAST file "Components.fast"
-C ..... Component
list for infile, def:<Component.list>
-v ..... Verbose
Mode
-r ..... Remove
duplicate nodes in input file
-n ..... Dont
perturb identical pts on diff components
-inward. Norm
vectors on input geom face inward. def:<outward>
-ascii . input
file is ascii fmt - (output still unformatted)
-zero .. set
(data
< ZERO) to 0.0000 - (param ZERO = 1.E-12)
-inflate.Inflate
geometry by 10*Eps to break degeneracies |
(top)
net2p3d ::
Converts a LaWGS
net into
multiple grid plot3d format. The LaWGS format consists of any number of
structured patches with header information between each.
Currently
net2p3d
does not parse scaling, translations or rotations in the LaWGS header.
When a single watertight component is described by several meshes
within
the LaWGS file, these are identified by the component number in the
LaWGS
file. (In the LaWGS file, this is the first integer following the
string
which is the component's name, and comes just before the dimensions of
the network. In addition to the multiple-grid plot3d representation of
the mesh, net2p3d outputs a (human readable) Components.list
file which describes the mapping of LaWGS networks to component
numbers.
This file can be suppressed with the "-no" option when this mapping is
1-to-1 (the default for triangulate).
% net2p3d -
Usage: net2p3d
[-i infile -o outfile -v -m
-C Compfile -no -ascii]
Options:
-i ........
Input file
name, def:<LaWGS.net>
-o ........
Output file name,
def:<mgrid.unf>
-v ........
Verbose mode
-m ........
"memory verbose"
report malloc/free
-C ........
Component list
file name,def:<Component.list>
-no .......
Dont write out
a Component list
-ascii.....
Output file ascii
format |
(top)
Other Auxiliary Programs
comp2tri:
combines any
number of individual
components into a cart3d "configuration" (generally *.tri file
extension).
Original component numbers of triangles are retained. The output of
comp2tri
is a Cart3D configuration
triangulation (*.tri) file ready for intersection.
% comp2tri -
Usage: comp2tri
[-ascii
infile1
infile2 infile3 ... -o outfile]
Options: -ascii...
Input files are
ascii (write(iunit,*))
-o....... Output filename, def:<Components.tri>
-ZY...... Map coordinates (Z:-> Y) and (Y:-> -Z)
|
(top)
intersect:
Extracts th411e
wetted surface
of a configuration. "Configurations" are collections of components
output
either by triangulate, comp2tri, or made by some other method.
intersect
is extensively documented in AIAA
97-0197. The wetted surface extracted by intersect is in the form
of
a Cart3D
wetted surface triangulation and is watertight. Component
information
is retained. By convention, output files are generally named *.i.tri
to
indicate that they are post-intersection and do not contain any
internal geometry. If "intersect" ever fails, it drops an "Error.dat"
file
which is a tecplotable file containing geometry local to the problem
which
caused it to fail. One may then view the complete geometry and
overlay
the geometry contained in "Error.dat" to diagnose the source of the
problem.
Intersect is quite robust, and it begins and ends with a geometry
verification
phase. If intersect stops during the initial geometry verification it
will
suggest possible problems in the input geometry (e.g. Component N
is not closed", "Component X is non-manifold" etc These checks are
topological
in nature and do not depend on floating point math. They are therefore
robust, and I've never seen a case where they were incorrect. In
verbose
mode ("-v"), this verification phase is step #4. Try to diagnose any
geometry
verification problems by viewing the Error.dat geometry against
overlaid
with the input geometry. Check in KNOWN_BUGS for a current listing.
Intersect
is based on boolean intersection
predicates
and uses adaptive precision floating point math with automatic
tie-breaking to resolve degeneracies.
% intersect -
Usage:
intersect [
-i infile
-o outfile -T -v -intersections
-ascii -mem]
Options:
-i ............
Input file
name, def:<Components.tri>
-o ............ Output
file name,
def:<Components.i.tri>
-ascii ........
Input geometry
file is ASCII
-T ............ Also
output tecplot
file "Components.i.plt"
-fast.......... Also
output unformatted
FAST file
"Components.i.fast"
-v ............ Verbose
Mode
-mem .......... Report
memory useage
(auto on with "-v")
-intersections. write
tecplot file
of intersections
<intersect.dat> |
(top)
diagnoseGeom:
diagnoseGeom is
a utility
aimed at helping you diagnose configuration
geometries that intersect rejects. It verifies that components in your
configuration are all valid and then performs intersection checks on
all
combinations of components in the configuration. When errors are found,
they are reported and logged into a (newly created) subdirectory called
"diagnosis". From this information you can quickly identify the
offending
component and make a repair.
Usage:
diagnoseGeom
[-ascii -base=basename
-split -verbose]
Example: (Tell
me what's wrong with the ascii configuration triangulation
"myConfig.a.tri")
% diagnoseGeom
-ascii myConfig
(top)
A Few Technical Topics and Comutational Geometry
(top)
last
update 3
Aug. 2000, M. Aftosmis
|
|