Hi, everyone. According to des_granular_temperature.f, I simplified the code to calculate the granular temperature of each particle, as follow:
DO LL = 1, MAX_PIP
IF(IS_NONEXISTENT(LL)) CYCLE
IF(IS_GHOST(LL) .or. IS_ENTERING_GHOST(LL) .or. IS_EXITING_GHOST(LL)) CYCLE
IJK = PIJK(LL,4)
DPM = 2.0d0*DES_RADIUS(LL)
IF(LL==1)THEN
write (*,*) "DES_VEL_NEW(LL,1)=", DES_VEL_NEW(LL,1)
write (*,*) "U_s(IJK,1)=", U_s(IJK,1)
write (*,*) "DES_VEL_NEW(LL,2)=", DES_VEL_NEW(LL,2)
write (*,*) "V_s(IJK,1)=", V_s(IJK,1)
write (*,*) "DES_VEL_NEW(LL,3)=", DES_VEL_NEW(LL,3)
write (*,*) "W_s(IJK,1)=", W_s(IJK,1)
write (*,*) "THETA=", THETA
write (*,*) "ReT=", ReT
ENDIF
IF(Mu_g(IJK) .GT. ZERO) THEN
THETA= ((DES_VEL_NEW(LL,1)-U_s(IJK,1))**2+(DES_VEL_NEW(LL,2)-V_s(IJK,1))**2+&
(DES_VEL_NEW(LL,3)-W_s(IJK,1))**2)/ 3.0d0
ReT = DPM * ep_g(IJK) * SQRT(THETA) * RO_g(IJK)/Mu_g(IJK)
ELSE
THETA = ZERO
ReT = ZERO
ENDIF
des_usr_var(7,LL) = THETA
! write (*,*) "THETA=", THETA
des_usr_var(11,LL) = ReT
! write (*,*) "ReT=", ReT
ENDDO
However, the results shown in the screen are:
It seems that u_s, v_s and w_s cannot represent the average velocity of particles in the cell IJK. After calculating 2 seconds, the situation is same.
How to modify the code to get the correct particle granular temperature?
Best regards
xjwuyuhao
2021.04.20