×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Tip - Export nodal information from WB into Excel

Tip - Export nodal information from WB into Excel

Tip - Export nodal information from WB into Excel

(OP)
I'm in the mood to share some info, so here goes...

If, like me you're not keen on using Ansys Classic, here is a script to export/capture node information from a surface in Workbench...

Overall process is to: a) Create a named selection set (eg Face) of the surface of interest b) ensure it is sufficiently meshed (i used a regular grid) c) create a command object in the Solution section with the following script...


! This code exports the nodal information for the mirror faces

/POST1
SET,FIRST

CMSEL,S,Face

*GET, NCOUNT, NODE, 0, COUNT
*SET, NNEXT, 0
*SET, LOOP, 0

*DIM, RESULTS_Face, ARRAY, NCOUNT, 11

*DO, LOOP, 1, NCOUNT, 1

    *GET, NNEXT, NODE, NNEXT, NXTH
    *GET, RESULTS_Face(LOOP,1), NODE, NNEXT, LOC, X
    *GET, RESULTS_Face(LOOP,2), NODE, NNEXT, LOC, Y
    *GET, RESULTS_Face(LOOP,3), NODE, NNEXT, LOC, Z
    *GET, RESULTS_Face(LOOP,4), NODE, NNEXT, U, X
    *GET, RESULTS_Face(LOOP,5), NODE, NNEXT, U, Y
    *GET, RESULTS_Face(LOOP,6), NODE, NNEXT, U, Z
    *GET, RESULTS_Face(LOOP,7), NODE, NNEXT, U, SUM
    *GET, RESULTS_Face(LOOP,8), NODE, NNEXT, ROT, X
    *GET, RESULTS_Face(LOOP,9), NODE, NNEXT, ROT, Y
    *GET, RESULTS_Face(LOOP,10), NODE, NNEXT, ROT, Z
    *GET, RESULTS_Face(LOOP,11), NODE, NNEXT, ROT, SUM
    
*ENDDO,

*CFOPEN,C:\Temp\RESULTS_Face,xls,,
*VWRITE,
('X    Y    Z    UX    UY    UZ    USUM    ROTX    ROTY    ROTZ    ROTSUM')
*VWRITE,RESULTS_Face(1,1), RESULTS_Face(1,2), RESULTS_Face(1,3), RESULTS_Face(1,4), RESULTS_Face(1,5), RESULTS_Face(1,6), RESULTS_Face(1,7), RESULTS_Face(1,8), RESULTS_Face(1,9), RESULTS_Face(1,10), RESULTS_Face(1,11)
(F17.9,'    ',F17.9,'    ',F17.9,'    ',F17.9,'    ',F17.9,'    ',F17.9,'    ',F17.9,'    ',F17.9,'    ',F17.9,'    ',F17.9,'    ',F17.9)
*CFCLOS



For those familiar with classic I imagine this is fairly simple. I also use a modified version of this to create some statistical information from the nodal information for processing in DesEx...Here's the script...


! This code exports the nodal information for the mirror faces

/POST1
SET,FIRST

my_RotSumMax = 0
my_RotSumMin = 0
my_RotSumMean = 0
my_RotSumStdv = 0

CMSEL,S,Face

*GET, NCOUNT, NODE, 0, COUNT
*SET, NNEXT, 0
*SET, LOOP, 0

*DIM, RESULTS_Face, ARRAY, NCOUNT, 11

*DO, LOOP, 1, NCOUNT, 1

    *GET, NNEXT, NODE, NNEXT, NXTH
    *GET, RESULTS_Face(LOOP,1), NODE, NNEXT, LOC, X
    *GET, RESULTS_Face(LOOP,2), NODE, NNEXT, LOC, Y
    *GET, RESULTS_Face(LOOP,3), NODE, NNEXT, LOC, Z
    *GET, RESULTS_Face(LOOP,4), NODE, NNEXT, U, X
    *GET, RESULTS_Face(LOOP,5), NODE, NNEXT, U, Y
    *GET, RESULTS_Face(LOOP,6), NODE, NNEXT, U, Z
    *GET, RESULTS_Face(LOOP,7), NODE, NNEXT, U, SUM
    *GET, RESULTS_Face(LOOP,8), NODE, NNEXT, ROT, X
    *GET, RESULTS_Face(LOOP,9), NODE, NNEXT, ROT, Y
    *GET, RESULTS_Face(LOOP,10), NODE, NNEXT, ROT, Z
    *GET, RESULTS_Face(LOOP,11), NODE, NNEXT, ROT, SUM
    
*ENDDO,

*VSCFUN,my_RotSumMax,MAX,RESULTS_Face(1,11)
*VSCFUN,my_RotSumMin,MIN,RESULTS_Face(1,11)
*VSCFUN,my_RotSumMean,MEAN,RESULTS_Face(1,11)
*VSCFUN,my_RotSumStdv,STDV,RESULTS_Face(1,11)


Enjoy ;)

Rich

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources