lavecchiasignora
Structural
- Mar 3, 2011
- 48
Hello, I want to write all my node results to a text-file for all 4 layers of a composite laminate. My code looks like this so far:
/post1 ! Enter postproccesing
*get,Num_nodes,NODE,,COUNT ! Get number of nodes
*dim,results_sx,, 1,4 ! Create a array (1*20)
*dim,node_list,char,Num_nodes
*do,i,1,Num_nodes
node_list(i)='node %(1+i-1)%'
*enddo
*do,i,1,4 ! loop over all 4 layers
layer,i
rsys,solu
shell,mid
*vget,results_sx(1,i),node,1,s,x ! Get stresses in the x-direction
*enddo
*cfopen,testresults,txt !create a text-file
*vwrite,'Node'
(A8)
*vwrite,node_list(1),results_sx(1,1),results_sx(1,2),results_sx(1,3),results_sx(1,4) !help: *vwrite, example
(A8,' ',F10.3,' ',F10.3,' 'F10.3,' 'F10.3)
*cfclose
The above code is just for node 1, but now I want to list all the nodes for all the 4 layers in testresults.txt.
Anyone who could help me?
Thanks alot!
/post1 ! Enter postproccesing
*get,Num_nodes,NODE,,COUNT ! Get number of nodes
*dim,results_sx,, 1,4 ! Create a array (1*20)
*dim,node_list,char,Num_nodes
*do,i,1,Num_nodes
node_list(i)='node %(1+i-1)%'
*enddo
*do,i,1,4 ! loop over all 4 layers
layer,i
rsys,solu
shell,mid
*vget,results_sx(1,i),node,1,s,x ! Get stresses in the x-direction
*enddo
*cfopen,testresults,txt !create a text-file
*vwrite,'Node'
(A8)
*vwrite,node_list(1),results_sx(1,1),results_sx(1,2),results_sx(1,3),results_sx(1,4) !help: *vwrite, example
(A8,' ',F10.3,' ',F10.3,' 'F10.3,' 'F10.3)
*cfclose
The above code is just for node 1, but now I want to list all the nodes for all the 4 layers in testresults.txt.
Anyone who could help me?
Thanks alot!