# Geometry and shapes¶

## Base points¶

Base points are used to draw base lines, which form the skeleton of a cross section. They can be either actually on the base lines, or not, as reference points, for example the center of a circle. Points that are directly referred to in the definitions of base lines are called key points, such as starting and ending points of a line or an arc, or the center of a circle. The rest are normal points. The coordinates provided in the input file are defined in the basic frame z and then transformed into the cross-sectional frame x, through processes like translating, scaling and rotating. If none of those operations are needed, then those data also define the position of each point in the frame x.

Users can define points using sub-element <point> one-by-one, or list all points in a sepsrate file and include it here.

### Points defined in a data file¶

The file storing these data is a plain text file, with a file extension .dat. This block of data has three columns for the name and coordinate in the cross-sectional plane.

Listing 8 Template for a separate file of points (point_list_file_name.dat)
 1 2 3 4 label_1 z2 z3 label_2 z2 z3 label_3 z2 z3 ... 

Specification

• Three columns are separated by spaces.
• label can be the combination of any letters, numbers and underscores “_”.

Note

Normal points’ names can be less meaningful, even identical.

Note

If a base line is defined using the range method (explained below), e.g. ‘a:b’, then all points from ‘a’ to ‘b’ will be used. In this case, the order of points is important. Otherwise, points can be arranged arbitrarily.

Note

This data file can be used for storing airfoil data.

### Points defined in the XML file¶

In this method, all points are enclosed by the XML element <basepoints>.

Listing 9 Base points input file syntax.
 1 2 3 4 5 6  point_list_file_name 0 0 1 0 ... 

Specification

• <include> - Name of the point data file, without the file extension.
• <point> - Coordinates of the point. Two numbers are seperated by blanks.
• name - Name of the point. Required.

## Base lines¶

Base lines form the skeleton of a cross section. PreVABS can handle three types of base lines, straight, arc and circle, as shown in Fig. 13. Some types have several ways to define the base line. In PreVABS, all curved base lines are in the end converted into a chain of short straight lines. User can provide those short straight lines directly for spline, arc and circle. Or, for arc or circle, user can use simple rules to draw the shape first and then PreVABS will discretize it.

Data for base points and lines are stored in an XML formatted file. The general arrangement of data is shown in Listing 10. The root element is <baselines>. Under the root element, there is a sub-element <basepoints> storing all definitions of points.

Each <baseline> element is a definition of a base line. Each one has a unique name and a type, which can be straight, arc or circle. Inside the baseline element, the straight and arc types have several different ways of definition, and thus the arrangements of data are different, which will be explained in details below.

Figure 13 Three types of Base lines in PreVABS.

Listing 10 Base line input file template.
 1 2 3 4 5 6 7 8 9  ... ... ... ... ... 

Specification

• <baseline> - Definition of a base line (explained below).
• name - Required. Name of the base line.
• type - Required. Type of the base line. Choose one from ‘straight’, ‘arc’ and ‘circle’.

### Straight¶

For this type, the basic idea is to provide key points for a chain of straight lines The direction of a base line is defined by the order of the point list. There are three ways defining a base line of this type, as shown in Fig. 14.

• Use an explicit list of two or more points delimited by commas to define a polyline (i, ii).
• Use two points delimited by a colon to represent a range of points (iii). The first two methods can be used in combination.
• Use a point and a incline angle to define an straight line (iv). In this case, PreVABS will calculate the second key point (a’) and generate the base line. The PreVABS-computed second key point will always be “not lower” than the user-provided key point, which means the base line will always be pointing to the upper left or upper right, or to the right if it is horizontal.

Figure 14 Different ways of defining a straight type base line in PreVABS.

Note

Use type="straight" for splines.

Listing 11 Input syntax for the base lines shown in Fig. 14
  1 2 3 4 5 6 7 8 9 10 11 12  ... a,z a,b,c,z a:z atheta ... 

Specification

• <points> - Names of points defining the base line, delimited by commas (explicit list), or colons (range). Blanks are not allowed.
• <point> - Name of a point.
• <angle> - Incline angle of the line. The positive angle (degree) is defined from the positive $$z_2$$ axis, counter-clockwise.

### Arc¶

A real arc can also be created using a group of base points, in which case the straight type should be used. The arc type provides a parametric way to build this type of base line, then PreVABS will discretize it. To uniquely define an arc, user needs to provide at least four of the following six items: center, starting point, ending point, radius, angle and direction, as shown in Fig. 15.

There are two ways of defining an arc as shown in Fig. 16.

• Use center, starting point, ending point and direction.
• Use center, starting point, angle and direction.

Figure 15 Items in an arc.

Figure 16 Two possible cases of defining an arc.

Listing 12 Input syntax for the base lines shown in Fig. 16
  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18  ...
c
s e ccw
c
s a 10
... 

Specification

• <center> - Name of the center point.
• <start> - Name of the starting point.
• <end> - Name of the ending point.
• <direction> - Optional. Direction of the circular arc. Choose from ‘cw’ (clockwise) and ‘ccw’ (counter-clockwise). Default is ‘ccw’.
• <angle> - Central angle of the arc.
• <discrete> - Number of discretization. If ‘by=”angle”’, then new points are created every specified degrees of angle. If ‘by=”number”’, then specified number of new points are created and evenly distributed on the arc.
• by - Optional. Choose one from ‘angle’ and ‘number’. Default is ‘angle’.

### Circle¶

Defining a circle is simpler than an arc. User only need to provide a center with radius or another point on the circle. The corresponding element tags are <center>, <radius> and <point>. A sample input file demonstrating the two methods is presented in Listing 13.

There are two ways of defining a circle.

• Use center and a point on the circle.
Listing 13 Input syntax for the ‘circle’ type base line.
  1 2 3 4 5 6 7 8 9 10 11 12  ...
c
r
c
p
...


Specification

• <center> - Name of the center point.