Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

APDL Read List of Nodes from File and Select

Status
Not open for further replies.

RealSaladsamurai

Mechanical
Apr 11, 2012
72
Hi! I am awful at this. I am trying to write my first ANSYS 'code' and I am running into some issues. I have a CSV file that contains about 2000 node numbers. I would like to be able to select those nodes by reading the file. Is there a sensible way to do this? I have the following, but it's not working out:

Code:
/PREP7
*DIM,NTABLE,TABLE,25
*TREAD, NTABLE,test,csv
alls
nsel,r,,NTABLE(0)
*DO,i,1,25,1
nsel,a,,NTABLE(i)
*ENDDO
NPLO

The result is terrible and aw The NSEL,r,,NTABLE(0) is not allowing the use of table the way I am trying. If anyone can help me get through this or offer an alternative method, I would be grateful.

NX7.5.5.4 - Teamcenter 8
ANSYS Workbench 14.5
 
Replies continue below

Recommended for you

2 things regarding OP: 1) I have no idea where that link came from ...sorry. 2) I am working on a subset of 25 nodes first. Thanks!

NX7.5.5.4 - Teamcenter 8
ANSYS Workbench 14.5
 
Any thoughts on this one?

NX7.5.5.4 - Teamcenter 8
ANSYS Workbench 14.5
 
You dont tell us the format of your csv file. Is it one node number per line?

You usually need to to assign values to the zeroth column, like this: *VFILL,ntable(1,0),ramp,1,1

I think your first nsel command should look like this: nsel,none

I think your second nsel command should look like this: nsel,a,node,,ntable(i)

I dont like tables in Ansys because I dont find them intuitive and I think the manual does a crappy job of explaining them. If you had a .txt file with one node number in each line, the following would work:

*DIM,NTABLE,,25
*vREAD,NTABLE(1),test,txt
(F12.0)
nsel,none
*DO,i,1,25
nsel,a,node,,NTABLE(i)
*ENDDO
Nlist

Rick Fischer
Principal Engineer
Argonne National Laboratory
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor