Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations KootK on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Composite laminate input-code

Status
Not open for further replies.

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!

 
Replies continue below

Recommended for you

I don't know your program language, but if you want an array with (ply,nodes) you should have 2 do cicle ,one for ply (1 .. 4) and one for node (1 ... number_nodes), one inside the other.
I think that this is the mistake.
Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor