;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;The code is to transfer the motion direction of the every particle in PFC to the files in '.log' type, ; ;respectively. This is a case of granular flows with fractal dimension 3.5 at the normalized time of 3.0.; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; New restore 3p5_normalized_3.sav table 1 erase table 2 erase table 3 erase ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; def dataobtain num = 0 bp = ball_head loop while bp # null bid = b_id(bp) vvx = b_xvel(bp) vvy = b_yvel(bp) vvv = (vvx*vvx + vvy*vvy)^0.5 sita = atan(abs(vvy/vvx))*180/3.1415926 ;Assume that the horizontal spreading direction is zero and that the angle increases anticlockwise. if vvx*vvy > 0 then if vvx > 0 then sita = sita else sita = sita + 180 endif endif if vvx*vvy < 0 then if vvx > 0 then sita = 360 - sita else sita = 180 - sita endif endif if vvx*vvy = 0 then if vvx = 0 then sita = 90 else sita = 0 endif endif num = num +1 xtable(1,num) = bid ytable(1,num) = sita xtable(2,num) = vvx ytable(2,num) = vvy bp = b_next(bp) endLoop end dataobtain ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;The code is to transfer the id, motion direction, x and y velocity directions of the every particle; ;in PFC to the files in '.log' type,respectively. ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; set log on set logfile 3p5_normalized_3_bid_sita pr tab 1 set log off set log on set logfile 3p5_normalized_3_vvx_vvy pr tab 2 set log off