Professional Documents
Culture Documents
015-Using Tables in ANSYS
015-Using Tables in ANSYS
Figure1.1b Explanation
The primary variable, x in this case, is highlighted in the black box. The secondary variable, y in this case, is highlighted in the red box. At the point x=2, y=3 the value is 80. For a 3D table ANSYS needs more information, it requires the x-y plane information at different off sets of z. As shown in figure1.2. Figure 1.2: 3D table
GeorgeEllwoodCCLRC
Figure 1.3a & b shows how this looks when opened in notepad. Figure 1.3a: 3D table opened in Notepad
The primary variable is highlighted in the black box. The secondary variable in the red box. The third variable in the green box.
10 15
0 50 55 60
GeorgeEllwoodCCLRC
Figure 2.1 shows how table needs to be represented in excel in order for the file to be readable for ANSYS. Figure 2.1:Excel representation of table
A break down of what this means is shown in figure 2.2. The first variable, x in this case, is shown in blue. The second variable, y, is shown in red, these form the x-y coordinates, the grid shows the values at these positions. The z coordinate is shown in brown. This is in the top left hand corner. For multiple values of z this grid is repeated but the z value is changed, as shown in figure 2.1. The values of the x, y and z are free to change between planes. The formatting must be that shown in figure 2.1 or there may be problems interpreting the file in ANSYS. Figure 2.2: Explanation of table spacing
GeorgeEllwoodCCLRC
Once the table has been created in excel it needs to be saved as a .txt file. These are tab delimited text files. It should be saved in the working directory that ANSYS will be using. In this example it has been saved as tabletest.txt. Excel may give a few warnings when saving but just click ok to carry on. The text file can be opened in a text editor such as notepad. This is shown in figure 2.3. Figure 2.3: tabletest.txt viewed from notepad
In the macro or the command window on ANSYS type the following commands. *DIM,Txyz,table,3,3,2,x,y,z *TREAD,Txyz,tabletest,txt,, The first line tells ANSYS to create a table array called Txyz that is 3 x 3 x 2. With the first variable x, second variable y and third variable z. The second line tells ANSYS to read the values from tabletest into the Txyz table. You can check that the table has been created correctly by going to Parameters>Array Parameters>Define/Edit Choose the table you want to look and click edit. This will then display the table and you can confirm it has been created correctly.