Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross on being selected by the Tek-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
Nov 26, 2018
11
0
0
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?
 
Replies continue below

Recommended for you

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.
Back
Top