-
Hello everyone, from ansys.mapdl.core import launch_mapdl
mapdl = launch_mapdl(print_com=True)
mapdl.clear()
mapdl.prep7()
mapdl.et(1, 187) # solid
mapdl.mp("EX", 1, 10)
mapdl.mp("NUXY", 1, 0)
mapdl.mp("DENS", 1, 1000)
pos = [[-0.118498779833,0.0674275234342,0.0222713090479],
[-0.120090339784,0.0670430315701,0.0226928617557],
[-0.118498779833,0.0674275234342,0.0237713092938],
[-0.118498779833,0.0684275254607,0.0232713092119],
[-0.119294559809,0.0672352775021,0.0224820854018],
[-0.119294559809,0.0672352775021,0.0232320855248],
[-0.118498779833,0.0674275234342,0.0230213091709],
[-0.118498779833,0.0679275244474,0.0227713091299],
[-0.119294559809,0.0677352785154,0.0229820854838],
[-0.118498779833,0.0679275244474,0.0235213092528]]
for i,p in enumerate(pos):
mapdl.n(i+1,p[0],p[1],p[2])
mapdl.e(1,2,3,4,5,6,7,8)
mapdl.emore(9,10)
mapdl.et(2, "COMBIN14", kop2=0, kop3=0)
mapdl.r(2, 5)
mapdl.type(2)
mapdl.real(2)
for i,p in enumerate(pos):
mapdl.n(11+i,p[0],p[1],p[2]+0.1)
mapdl.d(11+i,"all",0)
mapdl.e(i+1,i+11)
mapdl.n(22+i,p[0],p[1],p[2]-0.1)
mapdl.d(22+i,"all",0)
mapdl.e(i+1,i+22)
mapdl.allsel()
mapdl.finish()
mapdl.slashsolu()
mapdl.antype("MODAL")
mapdl.modopt("LANB", 6)
#mapdl.mxpand(6, "", "Yes")
mapdl.solve()
mapdl.finish()
mapdl.post1()
output = mapdl.set("LIST")
print(output)
mapdl.exit() |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @bnret Mike |
Beta Was this translation helpful? Give feedback.
Hi @bnret
I think you might have in mind that the spring elements constrain in all 3 directions; they do not as they spring force is only alongs its length. You would need 3 springs at each node, one each for each x, y, z direction.
Mike