×
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

getting results in arrays, in each substep

getting results in arrays, in each substep

getting results in arrays, in each substep

(OP)
Hi,

I am doing a nonlinear analysis on z purlins and i have trouble with getting the results in the right form ( in order to export to excel). I am using a shell element and i want to get all the bending moments (mx,my,mz) and stresses along the section in each substep. I wrote a code for it but it doesnt work, I tried it several ways but im stuck.
Several errors came up: Parameter NEV needs subscripts then i hit ok but after that ansys says array size is 80*6 but 0*1 element is missing
This is my code:
*DO,f,1,11
SET,1,f
tav = 50
beosztas = L/tav
*DIM,nev,Array,beosztas,6
nev='igenybevetel_%f%'
*DO,i,0,L,tav
NSEL,S,LOC,Z,i
SPOINT,0,0,(h-t)/2,i
FSUM
*GET,nev(i,1),FSUM,0,ITEM,FX
*GET,nev(i,2),FSUM,0,ITEM,FY
*GET,nev(i,3),FSUM,0,ITEM,FZ
*GET,nev(i,4),FSUM,0,ITEM,MX
*GET,nev(i,5),FSUM,0,ITEM,MY
*GET,nev(i,6),FSUM,0,ITEM,MZ
*ENDDO
*CFOPEN,nev,txt
*VWRITE,nev(i,1),nev(i,2),nev(i,3),nev(i,4),nev(i,5),nev(i,6)
(15.2F,2x,15.2F,2x,15.2F,2x,15.2F,2x,15.2F,2x,15.2F,2x)
*CFCLOS
*ENDDO

Could anybody tell me how can i solve this problem?

RE: getting results in arrays, in each substep

Hi Tomi,

Your i subscripts seem weird to me. As I see it, i has values equal to 0, 50, 100, ..., L.

It may not work, but try to modify it to have i = 1, 2, 3...

Regards,

0rel

RE: getting results in arrays, in each substep

(OP)
Hi 0rel,


In my scripts i means the points in mm along the section, where I would like to get the results. My purlin is 4000m long and with 50mm distance between the points, it means 80 bending moment result, with i=1,2,3.. i would get 4000 results which is too much for.(f means the substeps so i would get f*4000 result)
Do you have any idea how should i do this scipt, or any possible solution to get result from each substep?

Thanks in advance
Tomi

RE: getting results in arrays, in each substep


Would something like this work?

beosztas = L/tav

*DO,i,0,beosztas,
NSEL,S,LOC,Z,i
SPOINT,0,0,(h-t)/2,i
FSUM
*GET,nev(i*tav,1),FSUM,0,ITEM,FX
...

Your DO loop is is incrementing by 1 every time not 50, but you're still sampling every 50mm instead of 1mm because you've multiplied the i by 50.


RE: getting results in arrays, in each substep

(OP)
Thanks for the suggestion. I tried it, but unfortunately i get the same error messages as in the previous subscript version.

RE: getting results in arrays, in each substep

Didn't see that the first time, but I think that when you write :

*DIM,nev,Array,beosztas,6
nev='igenybevetel_%f%'

you define your array but then you set it to a string, thus it is no array, so it has no subscript...

Try :
nev='igenybevetel_%f%'
*DIM,%nev%,Array,beosztas,6

or something like this.

I may not solve all the errors though.

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