DrAmine
Ansys Employee

I think you need to use the approach of "Mean Age of Air" with UDS if you want a spatial distribution.

Your UDF is wrong as you are trying to use Particle related variables in Eulerian Sense.