ASCII (Text) Files

ASCII files contain data in ASCII code, which is a human readable character representation of text. Files stored in this format can be read and edited via a text editor, such as vi, emacs or Notepad.

The data entries contained in the files are written in the form of rows and columns. The entries in a row are separated by a white space, which can be one or more character spaces or tabs. The rows are separated by use of a line break.

The number of columns in the file depend on the functionality of the data file. For example, a connectivity file, used in the ELEMENT_SET command, with tetrahedral elements looks like:
0 2774 2769 2773 2772
1 2771 2770 2768 2767
2 2778 2770 2774 2771
3 2777 2776 2767 2775
4 2786 2781 2785 2784

The first column represents the element ID and the following columns represent the node ID associated with that element.

This file is referenced in the input file as:
ELEMENT_SET( "Fluid_Vol" ) {
        elements = Read( "MESH.DIR/Fluid_Vol.tet4.cnn" )
        shape = four_node_tet
        ......
        ......}
As another example, the element ID file, used in the ELEMENT_OUTPUT command, looks like:
0
1
2
3
4
This file is referenced in the input file as:
ELEMENT_OUTPUT( "Fluid_Vol" ) {
        elements = Read( "MESH.DIR/Fluid_Vol.tet4.eid" )
        element_set = "interior tet4"
        .......
        .......}

All of the data files need to have a carriage return at the end of the file to indicate the end of the line. This is automatically added in the files created by HyperMesh CFD or SimLab. However, you need to make sure it is present if any changes are made to the data files via a text editor.

Commonly used text editors for Linux based systems, such as vi and emacs, add the carriage return automatically when the file is saved, but for text editors used in Windows systems, such as Notepad and Wordpad, you may need to add this when making changes to the data file.

If a file does not have carriage return after the last entry, it is not completely read by AcuPrep and can lead to errors in the simulation.

When AcuPrep reads an ASCII file that is referenced by an input command, the number of columns required for the specified parameter is known. As such, only the appropriate number of columns of data is retained. If a connectivity file is read with element type specified as four_node_tet, AcuPrep expects five columns of data. If the files have fewer columns, AcuPrep will issue an error while reading the input file. If the ASCII file has additional columns, they are ignored.

AcuPrep can also read an array of strings from an external file. For example, the command SIMPLE_BOUNDARY_CONDITION can read surface sets from a file, which has the surfaces listed as strings.

The data file looks like:
"Wall tri3 Fluid pyramid5"
"Wall tri3 Fluid wedge6"
"Wall quad4 Fluid wedge6"
"Wall quad4 Fluid brick8"
"Wall tri3 Fluid tet4"
This file is referenced in the input file as:
SIMPLE_BOUNDARY_CONDITION( "Wall" ) {
        surface_sets = Read( "SBC_Wall.srfst" )
        type = wall
        ...... ..
        ...... ..}

Each line is assumed to be a complete string, so it is not necessary to provide quotation marks around the strings. However, AcuPrep supports reading of the strings with surrounding quotation marks as well.