path with APDL
path with APDL
(OP)
Hi,
Consider a analyses (let say 100) of square with different mesh sizes. I want to know some quantities on one edge - it means display them along a path. So i need to develop a macro, which is capable to create a path along the edge for different mesh sizes.
does anyone have an idea how to do that ?
I have already created one macro, which I suppose is written correctly, but it didnt work...
can anyone help me ?
sorry for my english
Regards,
Lubo
A=0.020 ! the smallest length of elements (spacing of nods are not uniform...)
B=1.400*2/A
*DIM,C,,(B+1)
*VFILL,C(1),RAMP,0,1
*DIM,PATH_01,,(B+1) ! array to store numbers of nodes...
*DO,T,1,(B+1),1
D=C(T)*B-A*0.25
E=C(T)*B+A*0.25
F=C(T)+1
NSEL,S,LOC,X,+2.620,+2.630
NSEL,R,LOC,Z,-0.010,+0.010
NSEL,R,LOC,Y,D,E
*GET,G,NODE,0,COUNT
*IF,G,EQ,O,THEN
PATH_01(F,1,1)=0
*ENDIF
*IF,G,NE,O,THEN
*GET,NOD,NODE,0,NUM,MAX
PATH_01(F,1,1)=NOD
*ENDIF
ALLSEL,ALL
*ENDDO
Consider a analyses (let say 100) of square with different mesh sizes. I want to know some quantities on one edge - it means display them along a path. So i need to develop a macro, which is capable to create a path along the edge for different mesh sizes.
does anyone have an idea how to do that ?
I have already created one macro, which I suppose is written correctly, but it didnt work...
can anyone help me ?
sorry for my english
Regards,
Lubo
A=0.020 ! the smallest length of elements (spacing of nods are not uniform...)
B=1.400*2/A
*DIM,C,,(B+1)
*VFILL,C(1),RAMP,0,1
*DIM,PATH_01,,(B+1) ! array to store numbers of nodes...
*DO,T,1,(B+1),1
D=C(T)*B-A*0.25
E=C(T)*B+A*0.25
F=C(T)+1
NSEL,S,LOC,X,+2.620,+2.630
NSEL,R,LOC,Z,-0.010,+0.010
NSEL,R,LOC,Y,D,E
*GET,G,NODE,0,COUNT
*IF,G,EQ,O,THEN
PATH_01(F,1,1)=0
*ENDIF
*IF,G,NE,O,THEN
*GET,NOD,NODE,0,NUM,MAX
PATH_01(F,1,1)=NOD
*ENDIF
ALLSEL,ALL
*ENDDO





RE: path with APDL
and when you write macros in terms of the variables in place of numbers it will be of great ease for you to revise the analysis with diff sizes meshes
RE: path with APDL
furthermore : i dont use a macro (launched from GUI) i use *.txt files.
...additional question : is there any way to use utility menu - list - nodes to fulfil an array ?
Regards,
Lubo
RE: path with APDL
I looked at your code and I have noticed that you compare the garameter G with the letter O, see *IF,G,EQ,O,THEN
. Try to use 0 (zero) instead of O.
Regards,
Alex