×
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

Listing the Node Coordinates along with Solutions in the same file

Listing the Node Coordinates along with Solutions in the same file

Listing the Node Coordinates along with Solutions in the same file

(OP)
I was wondering if it's possible to list both Nodes coordinates and their solutions in the same file. I need this because the solution is provided only in a few selected nodes, and the listing of their coordinates lists all nodes selected. So I can't plot any results as a function of X or Y coordinates.Here is an example:
/PREP7
/TITLE,Bump
ET,1,PLANE121,,,1                      
V1=200                          
H1=15   !(V1/H1)*3=EFSUM_MAXIMO
V0=0                           
R1=0.5                
L1=10
MP,PERX,1,1                        
k,1,0,R1,0
k,2,0,0,0
k,3,R1,0,0
LARC,1,3,2,R1
k,5,L1,0,0
k,6,L1,H1,0
k,7,0,H1,0
l,3,5
l,5,6
l,6,7
l,7,1
LESIZE,1,,,39
al,all
SMRTSIZE,1
aatt,1
AMESH,1
FLST,2,2,4,ORDE,2   
FITEM,2,1   
FITEM,2,-2  
/GO
!*  
DL,P51X, ,VOLT,V0   
FLST,2,1,4,ORDE,1   
FITEM,2,4   
/GO
!*  
DL,P51X, ,VOLT,V1
FINISH
/SOLUTION    
SOLVE
FINISH
/POST1
ETABLE,SENE,SENE                   
ETABLE,EFX,EF,X                    
ETABLE,EFY,EF,Y
/NUMBER,1
PLNSOL,VOLT                       
/SHOW,WIN32C
/CLABEL,1,0
/CONTOUR,1,100,AUTO,,   
/DEVICE,VECTOR,0
/CTYPE,0
/FOC,1,,-0.3,,1
/REP,FAST   
/EFACE,1
!*  
PLNSOL,EF,SUM,0,
LSEL,S, , ,       1
lplot   
NSLL,S,1
nplot   
/AUTO,1
/REP,FAST   
PRNSOL,EF,COMP  
NLIST,ALL, , , ,NODE,NODE,NODE


Thanks in advance!

RE: Listing the Node Coordinates along with Solutions in the same file

Hi!

You can create your own file.
For your example copy the following lines in to the ANSYS input line!


LSEL,S,,,1   
NSLL,S,1

*create,hhhh,mac

  !maximum node number
  *get,n_max,node,,num,maxd
  !node count
  *get,n_num,node,,count
  !temporary array
  list_tmp=
  *dim,list_tmp,array,n_max,10
  
  !status of selection (masking vector)
  *vget,list_tmp(1,1),node,,nsel
  
  !filling array with node numbers
  *vfill,list_tmp(1,2),ramp,1,1
  
  !####################
  !# geting locations #
  !####################
  
  !node coordinates (X , Y , Z)
  
  !X
  *vmask,list_tmp(1,1)
  *vget,list_tmp(1,3),node,,loc,x
  !Y
  *vmask,list_tmp(1,1)
  *vget,list_tmp(1,4),node,,loc,y
  !Z
  *vmask,list_tmp(1,1)
  *vget,list_tmp(1,5),node,,loc,z
  
  !##################
  !# geting results #
  !##################
  
  !EFX
  *vmask,list_tmp(1,1)
  *vget,list_tmp(1,6),node,,ef,x
  !EFY
  *vmask,list_tmp(1,1)
  *vget,list_tmp(1,7),node,,ef,y
  !EFZ
  *vmask,list_tmp(1,1)
  *vget,list_tmp(1,8),node,,ef,z
  !EFSUM
  *vmask,list_tmp(1,1)
  *vget,list_tmp(1,9),node,,ef,sum
  
  !##################
  !# reduce results #
  !##################
  
  !EFSUM <> 0?
  *voper,list_tmp(1,10),list_tmp(1,9),gt,0
  !count
  *vscfun,sum_count,sum,list_tmp(1,10)
  
  !Array for reduced nodes (nodes with EFSUM <>0)
  list_red=
  *dim,list_red,array,sum_count,8
  
  !reducing array
  *do,i_,2,9
    *vmask,list_tmp(1,10)
    *vfun,list_red(1,i_-1),comp,list_tmp(1,i_)
  *enddo
  
  !##############################
  !# writing array to text file #
  !##############################
  
  *mwrit,list_red(1,1),list_file,txt,,jik,8,sum_count
  (1F6.0,7F10.5)
  
  !############################
  !# writing min / max values #
  !############################
  
  !index locations of min / max values
  *vscfu,m1,lmin,list_red(1,5)
  *vscfu,m2,lmin,list_red(1,6)
  *vscfu,m3,lmin,list_red(1,7)
  *vscfu,m4,lmin,list_red(1,8)
  
  *vscfu,n1,lmax,list_red(1,5)
  *vscfu,n2,lmax,list_red(1,6)
  *vscfu,n3,lmax,list_red(1,7)
  *vscfu,n4,lmax,list_red(1,8)
  
  !writing min / max values append to file
  /nopr
  /out,list_file,txt,,append
  /gopr
  /com,
  /com,
  /com,
  /com,MINIMUM VALUES
  /com,NODE :%list_red(m1,1)%;%list_red(m2,1)%;%list_red(m3,1)%;%list_red(m4,1)%
  /com,VALUE:%list_red(m1,5)%;%list_red(m2,6)%;%list_red(m3,7)%;%list_red(m4,8)%
  /com,
  /com,
  /com,MAXIMUM VALUES
  /com,NODE :%list_red(n1,1)%;%list_red(n2,1)%;%list_red(n3,1)%;%list_red(n4,1)%
  /com,VALUE:%list_red(n1,5)%;%list_red(n2,6)%;%list_red(n3,7)%;%list_red(n4,8)%
  /out

*end

hhhh

/del,hhhh,mac

*list,list_file,txt


have a nice day ..... Stefan.

RE: Listing the Node Coordinates along with Solutions in the same file

Also you can sort the matrix with the *MOPER command with SORT option!

RE: Listing the Node Coordinates along with Solutions in the same file

(OP)
Thank you alot! It really worked for me and now I can continue with my work. Thanks again!
Best Regards!

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