Calculations of the distribution of trace impurities in cylindrical pores