|
Version 1.01
Abstract
The TETIN file is composed of a list of commands and arguments which serve to define the CAD geometry and the parameters for the unstructured grid generation. Unless otherwise specified, the order in which the commands are written in the TETIN file is not important. Each command can take a set of arguments. Not all commands and/or arguments are necessary for the file to be read successfully. The user can therefore use only the commands and arguments which apply to this particular geometry. The file is written in ASCII with no specific format. Tetin files should begin with the following two lines:
// tetin file version version_number
// written by application_name
The version number for this documentation is 1.0 .
General notes on names:
1) Names should not start with the characters 0-9.
2) Names should not exceed NAMELEN in proj/project.h which is 100.
3) Names may contain the characters "a-zA-Z0-9.,_/\" . Spaces are bad because they are used as separators.
4) Names must not contain \ (backslash) because it confuses TCL.
5) Family names should not contain lower case letters.
6) Names must not contain $ (dollar sign) because it is used in TCL and sh.
7) * is bad because it is used as a wild card for specifying names in many applications. Quotes, paranethesis, braces and brackets are bad because they are used for grouping in TCL and other languages.
Commands used in the TETIN file
An example file
tetin.sphere is an actual tetin file that has been lightly parsed by a cgi script.
// or # comment line
Description: Comments may be added into the tetin file using two slashes or the pound sign at the start of a line.
- Line 1: // comment
- Line 1: # comment
[Return to command list]
\ continuation character
Description: A line may be continued on a subsequent line by using the \ continuation character.
[Return to command list]
include
Description: Other files may be included by reference using the include command. The search for the file is first in the current directory, then in the directory where the tetin file resides.
[Return to command list]
return
Description: This statement causes the reading of the tetin file to be terminated. Statements following the return line are ignored.
define_group
Description: This statement exists for historical reasons but no longer has any effect.
boco_file
Description: This command causes the bocofile to be read.
- Line 1: boco_file pathname
[Return to command list]
read_family_boco
Description: This command causes the family_boco file to be read. This command is the newer and preferred option to the boco_file command. Note that the formats of the boco file and the family_boco file are very different.
- Line 1: read_family_boco pathname
[Return to command list]
affix
Description: If 'affix' is set, the curves are moved to the nearest surface or intersection of surfaces, if the distance from the curves to the surface(s) is sufficiently small.
Lines of data:
- Line 1: affix affix
where affix: Integer, flag. If affix = 0, do it. If affix = 1, don't do it.
[Return to command list]
define_curve
Description: Defines a curve in a 3D space.
Curve types:
Lines of data:
- Line 1: define_curve [ family fam ] [ tetra_sizesize] [ name name ] [ width width ] [ ratioratio ] [ min min ] [ dev dev ]
where
- fam:
- Integer [0,infty) or character string. Family number or family name. The name is preferred since it is invariant under reordings of the families. The family number 0 is reserved for entities not part of any families. The family name ORFN is reserved for family number 0.
- size:
- Real, size>0, default 1E10. Maximum tetrahedra size along the curve.
- name:
- Character string. Name of the entity.
- width:
- Integer [0,infty), default is 0. Number of layers with constant thickness away from the surface.
- ratio:
- Real, ratio > . Expansion parameter away from the surface.
- min:
- Real, default is 0. Minimum tetrahedra size (overwrites the deviation).
- dev:
- Real, default is infty. Maximum deviation allowed between the grid lines and the b-spline curve. The grid is refined to match the deviation limit up to the minimum tetrahedra size.
- Line 2: curve_type
where curve type: Character string {bspline, unstruct_curve}. Type of curve.
- B-spline curves
- Line 3: npnts order rational
where
- npnts :
- Integer [1,10000]. Number of control points in the b-spline.
- order :
- Integer [1,30]. Order of the b-spline.
- rational:
- Integer. Flag to specify if b-spline is rational (=1) or non-rational (=0).
- Line 4: knot(1), knot(2), .... knot(N)
where knot(i), 1<=i<=N, Real. Knot vector.
N: Number of knots in knot vector. N=npnts+order
- Line 5 to line (5+npnts-1):
if rational=1: X(i) Y(i) Z(i) W(i)
if rational = 0: x(i) y(i) z(i)
where x(i), y(i), z(i): Real. Cartesian coordinates of control point i.
X(i)=x(i)*W(i), Y(i)=y(i)*W(i), Z(i)=z(i)*W(i): Real. Weighted coordinates of control point i.
W(i): Real. Weight of control point i.
- Unstructured curves
This type of curve comes in two flavors, the old one and the new one. In the old style the path name of a domain file was given. In the new style the data that defines the surface is given directly in the tetin file.
- Old style
Line 3: path_name
where path_name: Character string. Pathname of the file containing the unstructured curve definition in the form of a list of bar elements (unstructured domain format).
- New Style
In the new format Line 2 is
unstruct_curve n_points n_points n_edges n_edges
The coordinates or the points follow on the next n_points lines each line consisting of the x y and z coordinates of each point. Following that are n_edges lines describing the edges edges of the unstructured curve. Each line contains the two indices of the endpoints of the edge. Note that the points are indexed starting at 0 not 1. Thus a simple 1 edge curve would be
unstruct_curve n_points 2 n_edges 1
1.1 2.2 3.3
4.4 5.5 6.6
0 1
[Return to command list]
define_density_poly
Description: Defines a polyhedron specifying an element size. This is used to control the size of the tetrahedra in a subregion of a volume.
- Line 1: define_density_poly npnts npnts size size [ name name ]
where
- npnts:
- Integer, default is 0. Number of points in the polyhedron.
- name:
- Character string. Entity name.
- size:
- Real, default is 0.0. Element size in the polyhedron.
- Line 2 to line (2+npnts): x(i) y(i) z(i)
where
- x(i) y(i) z(i) [ name ]:
- Real. Cartesian coordinates of point i of the polyhedron.
- Character string. Name of the point.
[Return to command list]
define_model
Description: Creates the search structure for projection from the surfaces defined so far. This must be the last command specified in the TETIN file.
- Line 1: define_model size [natural_size_refinementrefinement] [reference_size ref_size] [natural_sizenat_size] [edge_criterion edge_criterion] [on_surface_epson_surface_eps] [n_cells_in_gap n_cells_in_gap] [no_smear] [report_interfering] [fast_transition] [ignore_wall_thickness] [hgrid_jumphgrid_jump] [hgrid_n_layers hgrid_n_layers]
where
- size:
- Real. Global maximum tetrahedra size in model.
- nat_size:
- Real, default is 0.0. When this value is non-zero the mesher will try to resolve geometric detail by using smaller and smaller elements. This value is the smallest size that may be used
- refinement:
- Integer. [1,infty) Used in conjunction with the natural_size. A value of 10 indicates that a circle (or similar geometry) should be resolved using 10 edge segments. Smaller values imply coarser meshes. Larger values imply finer meshes
- ref_size:
- Real. This sets the reference size. This has no effect in the projection library. However, applications that set up the tetin file often specify sizes as factors of the reference size. Applications can query the projection library for this value.
- edge criterion:
- Real. (0, 1) Used by the tetra mesher to deal with dirty geometry. The default value is .2 . For a perfect model the value could approach 0.0. This value is used to determine if an edge is intersected by a surface. If one end of an edge is on a surface and the edge is intersected by a surface, the second intersection might or might not be used to split the edge depending on the edge_criterion. If the distance from the end of the edge to the intersection is less than edge_criterion times the length of the edge then the intersection will be ignored. Otherwise the intersection will be used to split the edge.
-
- n_cells_in_gap:
- Integer. Default: 1. If the natural size feature is enabled then the user can specify how many cells will be created in the gap between two surfaces.
- hgrid_jump:
- Integer. Default: 1. sets the parameter hgrid_jump which is used by global.
It determines the jump size 1:1 1:2 etc. in the hgrid cells.
- on_surf_eps:
- Real. Default: 0.01. This is a parameter used in global. It does not have any affect on the projection model. See global documentation for more information.
- hgrid_n_layers:
- Integer. Default: 1. set the parameter hgrid_n_layers which is used global. It is the
number of layers of same sized cells between jumps in cell sizes.
[Return to command list]
define_surface
Description: Defines a surface in the 3D space.
Surface Types:
Lines of Data:
- Line 1: define_surface [ height height ] [ devdev ] [ min min ] [ ratio ratio ] [ widthwidth ] [ name name ] [ familyfam ] [ levellevel ] [ number num ] [ tetra_sizesize ] [ pidpid ] [ by_pids ]
where
- height:
- Real, default is 0.0. Initial height of element perpendicular to the surface.
- dev:
- Real, default is infty. Maximum deviation allowed between the grid and the b-spline surface. The grid is refined to match the deviation limit up to the minimum tetrahedra size.
- min:
- Real, default is 0.0. Minimum tetrahedra size (overwrites the deviation).
- ratio:
- Real, ratio > 1.0. Expansion parameter away from the surface.
- width:
- Integer [0,infty), default is 0. Number of layers with constant thickness away from the surface.
- name:
- Character string. Name of this entity. Entity names must be distinct.
- fam:
- Integer [0,infty) or character string. Family number or name. The character string is the preferred form.
- level:
- Integer, default is 0. DDN level.
- num:
- Integer, default is 0. DDN number.
- size:
- Real, size>0, default is 1E10. Maximum tetrahedra size.
Used only for surface type 'unstruct_mesh':
By default, when a surface type 'unstruct_mesh' is imported, the program extracts all the elements from the unstructured domain file and place them into one surface. However, the arguments pid and by_pids allow to specify a different handling/selection of the elements:
- pid:
- Integer, default is -1. If a pid is specified, the program extracts only the elements with the given pid from the unstructured domain file.
- by_pids:
- Flag. If this flag is specified, the program extracts all the elements from the unstructured domain file and divides them into several surfaces (one surface per pid).
-
- B-spline surface
- Line 2: surface_type
where
- surface_type:
- Character string {bspline}. Type of surface.
- Line 3: u_npnts v_npnts u_order v_order rational
where
- u_npnts:
- Integer. Number of control points in the u direction.
- v_npnts:
- Integer. Number of control points in the v direction.
- u_order:
- Integer, [1,30]. B-spline order in the u direction.
- v_order:
- Integer, [1,30]. B-spline order in the v direction.
- rational:
- Integer. Flag to specify if b-spline is rational (=1) or non-rational (=0).
- Line 4: u_knot(1), u_knot(2), ... , u_knot(N)
where
- u_knot(i), 1<=i<=N:
- Real. Knot vector in direction u.
- N:
- Number of knots in the u knot vector. N=u_npnts+u_order
- Line 5: v_knot(1), v_knot(2), ... , v_knot(M)
where
- v_knot(j), 1<=j<=M:
- Real. Knot vector in direction v.
- M:
- Number of knots in the v knot vector. M=v_npnts+v_order
- Line 6 to line (6+M*N-1):
- if rational=1:
- X(i,j) Y(i,j) Z(i,j) W(i,j) 1<=i<=N, 1<=j<=M
- if rational = 0:
- x(i,j) y(i,j) z(i,j)
where
- x(i,j), y(i,j), z(i,j):
- Real. Cartesian coordinates of control point (i,j).
- X(i,j)=x(i,j)*W(i,j), Y(i,j)=y(i,j)*W(i,j), Z(i,j)=z(i,j)*W(i,j):
- Real. Weighted coordinates of control point (i,j).
- W(i,j):
- Real. Weight of control point (i,j).
-
- Trim surface
Description: A trim surface is a b-spline or unstructured mesh surface associated with triming curves. For a b-spline surface these curves defines which parts of the surface are to be kept. For an unstructured mesh surface the trimming curves are simply the boundary of the surface. There are two formats for this, the old format and the new format. For unstructured mesh surfaces only the new format is used.
Old Format
- Line 2: surface_type
where
- surface_type:
- Character string {trim_surface}. Type of surface.
- Line 3 and up: ncurves npnts(c) x(c,i) y(c,i) for 1<=i<=npnts(c); for 1<=c<=ncurves
where
- ncurves:
- Integer. Number of triming curves.
- npnts(c):
- Integer. Number of points in curve c.
- x(c,i), y(c,i):
- Real. 2D coordinates of point i curve c in u,v space.
New Format:
- Line 2: trim_surface n_loops n_loops
where
- n_loops:
Integer. Number of trimming loops.
n_loop loop definition(s) must follow the trim_surface command. A b-spline surface or unstructured mesh surface or thickness description definition comes after the triming curves definition.
- Thickness
A thickness definition gives the thickness as a function of the u and v of the surface. It is given as a general 1 dimensional bspline function of two variables and is in the same format as the B-spline surface, except that the rational flag is given as -2. (The dimension of the B-spline is the rational flag + 3 for all B-splines) .
- Unstructured mesh
This type of surface comes in two flavors, the old one and the new one. In the old style the path name of a domain file was given. In the new style the data that defines the surface is given directly in the tetin file.
n_triangles
Integer. Number of triangles in the surface.
The point data follows, one point per line as three floating point numbers. Following the point data is triangle data, one triangle per line as three integers refering to the points. Note that the points are numbers from 0 so that an example of a single triangle might be:
unstruct_mesh n_points 3 n_triangles 1
0.0 0.0 0.0
1.0 0.0 0.0
0.0 1.0 0.0
0 1 2
A face surface is a trim surface without the surface. It is simply several loops of curves. It is currently used to define meshing regions for the QUAD mesher.
Line 2: face_surface n_loops n_loops
n_loops:
Integer. Number of trimming loops.
quad mesher. (With ICEMCFD-4.1 n_loops must always be 1)
Loop definition.
Loop definitions are used for face_surfaces as well as trimmed surfaces. A loop definition is as follows:
loop n_curves n_curves
-
n_curves:
-
-
-
- Integer. Number of curves in the loop.
n_curves coedge definition(s) must follow the loop command. The coedge definition must be either a coedge or any valid pcurve definition. Face_surfaces require a valid coedge 3dcurve definition!
Coedge definition
A coedge definition defines the 2-d and 3-d curves that make up a segment of a loop. Either, both or neither of the 2-d and/or 3-d curve need to be supplied. In a full definition a coedge is given, which supplies the name of the 3-d curve and the pcurve (2-d curve) follows. Alternatively, if a pcurve follows, the the coedge is defined implicitly as a coedge pointing to that pcurve. One more possibility is that the coedge is given but the pcurve is given as a null_pcurve.
coedge [ 3dcurve [-] curve_name ]
curve_name:
A pcurve definition must follow the coedge definition. The pcurve definition may be one of polyline, bspline
If the "-" is present the coedge is reversed with respect to the 3-D curve.
Pcurves
A pcurve defines a parameter space (2-d) curve on a surface. There are three pcurve types: Polyline, bspline, and null_pcurve.
polyline n_points n_points
where
n_points:
integer. The number of points defining the polyline. The points are given one per line on the following lines.
At least 2 points are required. To trim the surface correctly the last point of the pcurve must be identical
to the first point of the next curve. However, if this is not the case, some CAD cleanup software should be
able to read the data and fix it.
bspline
The definition of a bspline is identical as for a 3-d bspline curve except that the number of coordinates in each control point should be two if the curve is polynomial and three if the curve is rational.
- null_pcurve
This command has no arguements.
[Return to command list]
define_thin_cut
Description: Specifies that thin (stretched) tetrahedra shall be generated between the given families forcing elements to be generated in tiny gaps or slots.
- Line 1: define_thin_cut family1 family2
where
- family1, family2:
- Character strings. Name of the 2 families.
[Return to command list]
material_point
Description: Defines the different material. Typically, one material point is defined per volume of uniform material.
- Line 1: material_point x y z [ family fam ] [ name name ]
where
- x y z:
- Real. Cartesian coordinates of the point.
- fam:
- Integer [0,infty) or character string. Family number or name. The character string is the preferred form.
- name:
- Character string. Name of the entity
[Return to command list]
merge_surface
Description: Specifies that no tetrahedra shall be generated between the given families when they are close. For the purpose of 'natural size', this command allows to treat two surfaces separated by a very small gap like a unique surface. This command is the opposite of the 'define_thin_cut' command.
- Line 1: merge_surface family1 family2
where
- family1, family2:
- Character strings. Name of the 2 families.
[Return to command list]
periodic
Description: Specifies that two surfaces are periodic to ensure compatibility in their node distribution.
- Line 1: periodic { x y z nx ny nz { angle | per_n=n } | { translational dx dy dz }
where
- x, y, z:
- Real Cartesian coordinates of the periodic base.
- nx, ny, nz:
- Real. Periodic axis of rotation.
- n:
- Integer. The angle is 360.0/n
- angle:
- Real. Angle of rotation between the two surfaces.
[Return to command list]
prescribed_point
Description: Forces the mesher to generate a node at this location.
- Line 1: prescribed_point x y z [ name name ] [ family fam ]
where
-
x y z:
- Real. Cartesian coordinates of the point.
- name:
- Character string. Name of the point.
- fam:
- Integer [0,infty) or character string. Family number or name. The character string is the preferred form.
[Return to command list]
set_triangulation_tolerance
Description: Sets the triangulation tolerance. The triangulation tolerance is a fraction of the area enclosing the curves or surfaces. This must be the first command specified in the TETIN file.
- Line 1: set_triangulation_tolerance toler
where
- toler:
- Real. Triangulation tolerance.
[Return to command list]
define_coordinate_system
Description: Defines a coordinate system.
- Line 1: define_coordinate_system [ name name ] [ typetype ] [ originx y z ] [ {x|y|z}axisx y z ]
where
type is one of "cartesian" , "cylindrical" or "spherical".
Description: This is not reqired by any application. It is convenient in HEXA or MED for specifying the coordinates of things in alternative coordinate systems (i.e the coordinate system of the cylinder in an engine). In GLOBAL it can be used to specify the orientation of the global cartesian of cylindrical mesh.
[Return to command list]
|