Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

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

Apply load on nodes without *do loop

Status
Not open for further replies.

julia_page

Mechanical
Joined
Nov 26, 2018
Messages
11
Location
ES
Hello,

I have a problem in wich i want to input a heat load on each node at contact. This heat must be proportional to the contact pressure (or nodal contact force). I did this with a *do loop, in wich I did fsum on each contact node and put a heat load on this node proportional to de fsum result. My problem is that in some cases when i have a lot of contact nodes this *do loop takes a lot of time in each iteration. My question is: is there a way to do this without loops?
 
You can use the vectors and masks for your purpose:

CMSEL, S, NODESINCONTACT
*get, nnodes, num, max
*dim, nmask, nnodes
*vget, nmask, NODE,,NSEL

*dim, reacarry, array, nnodes, 6
*vmask, nmask
*vget,reacarry(1,1),node,1,rf,fx
*vmask, nmask
*vget,reacarry(1,2),node,1,rf,fy
*vmask, nmask
*vget,reacarry(1,3),node,1,rf,fz
*vmask, nmask
*vget,reacarry(1,4),node,1,rf,mx
*vmask, nmask
*vget,reacarry(1,5),node,1,rf,my
*vmask, nmask
*vget,reacarry(1,6),node,1,rf,mz

by this way you have a vector with dimension nnodex6 in which only positions of vector matching the node number are filled with the reactions of the node, according to the nodes selected on the component above
Then you can use the vector to be scaled as you want and use it to apply the Heat Load
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top