Konstantine Kourbatski
Ansys Employee

Your code is wrong, dt is the dynamic zone thread, which is a face in you case, and using it in begin_c_loop will result is SIGSEGV. You also cannot NODE_Y(v) -= C_UDMI(c,tf,0)*dtime; as C_UDMI is a cell value not available on the face. Instead, you need to retrieve the gradient value from the cell center of the adjacent cell. Macros for this are described in the UDF manual