How do you create zero-length springs in Mechanical software?
Mechanical software does not allow zero-length springs, so a command object is the only way to create them. Below is the command object that will create six spring elements. Insert the command object “Analysis environment level.” It requires a named selection for the vertex, where it will attach six springs.
!!!!!!!! environment command object to create 6 zero length springs at named selection spr containing one vertex
fini
/prep7
*get,ndmax,node,,num,maxd
*get,elmax,elem,,num,maxd
*get,etmax,etyp,,num,max
cmsel,s,spr ! [Note: spr is a named selection containing one vertex created in Mechanical]
ndspr=ndnext(0)
n,ndmax+1,nx(ndspr),ny(ndspr),nz(ndspr)
!
*dim,stf,array,6
stf(1)=1,2,3,4,5,6 ! [Note: replace 1 to 6 with your stiffness values]
!
*do,kk,1,6
et,etmax+kk,14, ,kk
type,etmax+kk
mat,etmax+kk
r,etmax+kk,stf(kk)
real,etmax+kk
secn,etmax+kk
en,elmax+kk,ndmax+1,ndspr
*enddo
allsel
cmsel,all
fini
/solu