Mechanical APDL Basic Analysis Guide

(Axel Boer) #1
option. This option linearly interpolates the test data to calculate test results at the ANSYS time/frequency
points. The interpolated data is then stored as a time-history variable(s) and is added to the list of variables
in the variable viewer. These variables can then be displayed, listed, or operated on as any other time-
history variable. You must ensure that linear interpolation is valid for the data imported. In addition, the
non-interpolated “raw” data from the file is available in the “overlay data” drop down list, as explained
above.

8.5.2. Bat ch Mode


You import data from a file into a time history variable using one of the following methods:



  • Use the DATA command to read in a pre-formatted file. The file should be in Fortran format as de-
    scribed in the DATA command.

  • Read the data from a free format, "comma," “blank,” or "tab" delimited file. You can store it as a time
    history variable using the two step procedure below:

    1. Read the file into a table arra y using the TREAD command. This step requires that you know the
      number of data points in the file since you will need to prespecify the table arra y size (
      DIM ).

    2. Use the VPUT command to store the arra y into a time history variable. You can store one array
      at a time into a time history variable



  • The following two 'external' commands are available to facilitate easy import of data into time-history
    variables.

    1. ~eui, 'ansys::results::timeHist::TREAD directorypath/filename arrayname'




The above command will determine the size of the data file, create a table arra y of name
'arrayname', appropriately dimension it based on the number of data sets in the file, and
then read the data into this array. This command must be issued prior to the command
shown below.


  1. ~eui,'ansys::results::timeHist::vputData arra yname variablenumber'


The above command assumes that you have already created a table arra y 'arra yname' as
described in 1) above. This command will put the data stored in the 'arra yname' table into
the time history variables starting with variable id 'variable number'.

For Example:
~eui,'ansys::results::timeHist::TREAD d:\test1\harmonic.prn TESTMID'
~eui,'ansys::results::timeHist::vputData TESTMID 5'

The first command above will read data set(s) from the file harmonic.prn in the directory d:\test1
and store this data in to the table arra y 'TESTMID'. The next command will then import the data
from TESTMID arra y into ANSYS time history variable starting from variable number 5. If multiple
data sets are in 'harmonic.prn' then the first data set will be stored in variable 5, the next data
set in variable 6 and so on. If these variables have already been defined they will be overwritten.

Release 15.0 - © SAS IP, Inc. All rights reserved. - Contains proprietary and confidential information

Importing Data
Free download pdf