The answer to your question is more complicated than you might think.
There are (at least) five ways to get from VSP to Cart3D. They each
have strengths & weaknesses, I'll try to explain it as best as I can.
All five ways can be done from the GUI or from the command line. I'll
assume you're working with the GUI for now. If you need help
accomplishing the same thing from the command line, I can help with
that later.
There are three kinds of triangulated surface data which VSP can write
-- and most of them can be written in STL or TRI format. Since one
kind of data can't be written to STL, there are five options.
You can use either STL or TRI files. The stl2tri converter which
comes with Cart3D is very good at fixing small problems with
triangulations. So, if you're having trouble which you think might be
related to mesh connectivity or triangle orientation, using STL and
then converting can sometimes repair those things. On the other hand,
STL files do not maintain tags to identify the components in the
model.
There are three options for the triangulated data:
1) Unintersected components. If you use this option, you will need to
use Cart3D's 'intersect' tool before you can get a solution.
Unintersected components only work with TRI files. To write this kind
of file, simply click 'File' then 'Export...' then choose 'CART3D File
(.tri)'. VSP will present a dialog to choose a location and filename
to store the file. Once you click 'Accept', VSP will convert the
wireframe model to triangulated components by inserting diagonals. A
'Mesh' component will appear in the geometry browser. You will
probably want to dispose of the Mesh component when you are done
exporting -- use 'Cut' in the geometry browser to get rid of it.
2) Intersected components. To write this kind of file, you first need
to intersect the components. Click 'Geom' then 'CompGeom (Union)...'
then 'Execute'. You can close the CompGeom menu at that time. You
will see that VSP has intersected the components and has created a new
'Mesh' component in the geometry browser. To write this information
to a file, click 'File' then 'Export...' and then choose 'CART3D File
(.tri)' or 'Stereolith File (.stl)'. VSP will present a file dialog,
choose your location/file and click 'Accept'.
You can control the surface resolution for 1) or 2) by changing the
wireframe resolution in the model. Each component has controls to
adjust the number of points per cross section (or airfoil) and also
the number of cross sections in the model.
Although the triangle quality of these files can be very poor, Cart3D
only uses them for cutting the mesh (and for integrating
loads/visualizing the solution) so they work very well. Because they
are constructed in parametric coordinates on the components, the
triangles are nicely aligned with the curvature -- which can lead to
very efficient surface meshes.
3) Isotropic triangulated surface mesh. To write this kind of file,
you need to first generate a high quality surface mesh. To do this
click 'Geom' then 'CFD Mesh...'. This will bring up the mesh
control/generation dialog.
If you need to, you can add 'sources' to control the mesh resolution.
Each source will be attached to a component, so when the component
moves or changes, the sources go with it. VSP has the ability to add
default sources to each component type, they can help speed up the
sourcing process a lot. For starters, I recommend you start with no
sources (uniform mesh) and then add sources where you think you need
them. I won't discuss sourcing here.
To control the uniform mesh size, you'll use the 'Max Edge Len' at the
top of the CFD Mesh dialog; it specifies the maximum length of any
triangle edge in the mesh -- with no sourcing, it will specify the
edge length for the uniform mesh. When you set 'Max Edge Len' for the
first time, think about a representative dimension of your model --
say the wingspan or the fuselage length. If you wingspan is 1000 and
Max Edge Len is .001, you are going to end up with 1,000,000 triangles
across the span. On the other hand, if your wingspan is 10 and Max
Edge Len is 3, you will only get three triangles across the span.
At the bottom of the CFD Mesh dialog, there are buttons to choose
which file formats will be exported. Click the '...' button at the
right to change the location/file name for each file type. I
generally turn off all the file formats I'm not going to use. All
these files are saved in ASCII format; ASCII STL files are pretty
inefficient -- they can get very large.
Once you have chosen your export types, click the big 'Mesh and
Export' button located just above the export file section. VSP will
run through the entire mesh generation process and will write out your
files. These files are written automatically, there is no need to go
to 'File, Export...'.
Once you have generated your first mesh, go ahead and adjust 'Max Edge
Len' to your needs. Modest adjustments are best. Cutting it in half
will quadruple the number of triangles. Moving the decimal point to
the left one spot will yield 100x the triangles. VSP can handle large
meshes, but there probably is no need to get crazy.
---------- End of file output information. General Cart3D
information from here.
You are correct, you do need to use the -y_is_spanwise flag. You will
also need to take care identifying the symmetry plane in the
input.cntl file. In another email, I will send you examples of
'aero.csh' and 'input.cntl' which I used recently with VSP. Finally,
when you run autoInputs, you will need the '-symmY' flag.
VSP can generate half-meshes (for types 2) or 3) above). However,
because of the way Cart3D works, it isn't a big deal to keep the whole
model.
I hope this helps,
Rob
Irian Ordaz and Wu Li at NASA Langley are using VSP and Cart3D to work
the boom optimization problem. You should check out what they have
done and are doing.
Much of their work pre-dates the native *.tri file support, so they
have found other solutions to many of these issues. They also have
some other needs in their process, so their use may not look like what
I described.
Help describing the use of vsp from the command line is available by typing in
vsp -help
If you want unintersected tri files
vsp -batch myplane.vsp -tri
If you want intersected tri files
vsp -batch myplane.vsp -mesh -tri
If you want an isotropic surface mesh as a tri file
vsp -batch myplane.vsp -cfdmesh 1.0 -tri
The 1.0 is a scalar applied to the mesh lengths.
Some of these will write out other files which you may not need --
feel free to delete them.
If you need STL files instead, change the -tri to -stereo .
Rob