

The dimension for the number of rows is the same as the number of rows of data in the CSV file. It is assumed that there is no primary or other variable for the Column positions when a 2-column CSV file is loaded, so no data is placed in the Zeroth Row of the Table Array. What is special about the treatment of a 2 column CSV file table of data is that the First Row of the CSV file is to go into the First Row of the table array. If the data comes from a 2-column CSV data table, it is assumed that the first column of the data table is intended for use in the Zeroth column of the Table Array, and that the second column in the data table is intended for use in the First column of the Table Array. The principal purpose of the *TREAD command is to load data into a table array that is in turn to be used in Ansys commands. The Zeroth column is intended to represent the primary variable TIME if the above Table Array is used in an Ansys command, as indicated by the 6th argument. In the above command, the Table Array’s name will be “my_table”, it is an array of type Table, it is to have 5 rows, 1 column of data (plus a Zeroth column of data), and one plane of data. *TREAD Behavior with 2-Column CSV Files versus Multi-Column CSV FilesĪ Table Array in Ansys is created by the *DIM command, for example: Movement of data from a Table Array into a numerical ARRAY is also illustrated. This article illustrates use of the *TREAD command, and differences in where data is placed in a Table Array when a 2-column CSV file is read, versus a multi-column CSV file. Users might use *TREAD to enter CSV file data, even if the ultimate use for the data was not in a Table Array. A CSV file is easily written from an EXCEL spreadsheet, or by other software. 0.123e-2 versus 0.00123), plus, a variety of numbers of digits of accuracy is supported. *TREAD loads data into a Table Array, and is flexible in whether the data is in floating point or exponential format (e.g. The *TREAD command can read data from a Comma Separated Variable (CSV) file, without a format statement. *VREAD loads data into a numerical Array and requires a file with data in a fixed format specified by the format statement. *VREAD, like *VWRITE, requires a format statement to follow immediately. The *VREAD and *TREAD commands read numerical data from an ASCII text file. More complex data structures are possible, but not discussed in this document. The most common data reading needs include numbers from a two-column 2D table, or from a multiple-column 2D table. The *TREAD Command and Comma-Separated Values (CSV)Įngineers using TREAD command in Ansys or the *VREAD command to get data into Ansys Mechanical APDL, sometimes get stuck in the process. Industrial Equipment and Rotating Machinery.

