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?
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
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
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
RE: getting results in arrays, in each substep
*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.