error in using the TREAD command

Hi,

I am trying to apply a sinusoidal voltage on a surface (name of the surface is "pos") of a piezoelectric layer. I create a table (2 columns: time vs voltage) in excel and I save it as CSV file. Then I found an example (https://www.simutechgroup.com/tips-and-tricks/fea-articles/227-using-tread-in-ansys-mechanical-apdl-to-read-external-data) on the use of TREAD command in oder to read csv file in ansys mechanical.


to_skip=0      ! enter number of lines to skip--NONE in this example

/INQUIRE,numlines,LINES,data_example,csv

to_read=numlines-to_skip

!

*DEL,mytable,,NOPR

*DIM,mytable,TABLE,to_read                ! table array to hold data

*TREAD,mytable,data_example,csv,,to_skip

! Apply time varying voltage

d,pos,volt,%mytable%


I adapt this script to my purpose: "data_example" is substituted with my file's name and I want that the first line of the table is skipped so I write "to_skip=1". I get an error "TREAD cannot read the csv file". But I don't know where the error is. Any help?

(I am using ansys 19.1, and this is a transient structural analysis)

Comments

Sign In or Register to comment.