XY Plotting > Overview of the XY Plot Application > Preparing Curve Data Files
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX''">   
Preparing Curve Data Files
This section describes how to prepare curve data files using systems, applications, or editors that are external to Patran. A curve data file is a formatted ASCII text file containing one or more data sets, each of which consists of a series of records. Each data set provides the data for one curve.
Data Set Format
A data set is made up of a single header record and one or more data records followed by a termination.
The Header Record contains the curve data type identifier string and (optionally) a character string defining the curve title, separated by a delimiter. The curve data type identifier must be one of the following two strings:
XYDATA indicates that the data records for the data set contain alternating X and Y values.
YDATA indicates that the data records for the data set contain Y data only.
The Data Records contain the data point values for the curve. These data point values must be listed in the sequence in which they will be plotted. If the curve data type is XYDATA, the data record(s) must contain alternating X and Y values (i.e., an X value followed by a Y value) for each data point. If the curve data type is YDATA, the data record(s) must contain a Y value for each data point. Each X or Y value must be separated from the next value by a delimiter.
A Data Set is Terminated by one of the following:
A new header record.
A termination record containing “END” as the only character string.
The end of file.
Records
Each record is limited to 80 characters and must be terminated by a new line or carriage return. Data within a record is entered in free format. If a record contains more than one value or character string, each value or string must be separated by a delimiter (slash, comma, or space). It is not necessary to consistently use a particular delimiter within a file, data set, or record. A number of separate values can fit into a single record as long as they are separated by delimiters and the total number of characters (including delimiters) does not exceed 80.
Format for Data Point Values
Data point values can be specified in any mixture of integer, fixed-point, and floating point formats. The floating point representation of a number is accomplished by handling the number as a signed mantissa, multiplied by 10 (the radix) raised to a signed integral exponent. For example:
 
-1.23E-2
is the notation that would be used to specify the floating point number -1.23 * 10-2, where:
 
-1.23
E
-2
is the mantissa,
signifies that an exponent (to the base 10) follows, and
is the signed exponent.
Example
An example of a curve data file containing two data sets is shown below. The actual file only the Record Contents column.
 
Record
Record Contents
Comments
1
XYDATA,CURVE NO.1
Header record for set 1 indicates that this set contains data of type XY Pairs. The data type identifier is followed by a comma and the curve title.
2
1/56.3,2/7,3/6.25E-2
First data record for set 1 contains XY values for the first three data points. Note that the values are a mix of fixed-point, integer, and floating point format. Note also that slashes are used to separate the X and Y values of an XY pair, and commas are used to separate XY pairs.
3
4
The second and third data records for set 1 contain respectively the X and Y values for the fourth data point. This demonstrates that X and Y values for the same data point do not need to be in the same record.
4
7.5
5
YDATA
Header record for set 2 terminates set 1, and indicates that set 2 contains data of type Y Data. No curve name is included for set 2, thus the curve name will have to be specified by XY Plot when set 2 is imported.
6
3,4,5,6,7.9,8.6,10
The data record for set 2 contains the Y values for all 7 data points in data set 2.
7
END
This is the termination record for set 2. This record would not be necessary here if record number 6 is the last line of the file or if record number 6 were followed by a header record for another data set.