Numerical simulation of the transient hydrogen trapping process using an analytical approximation of the McNabb and Foster equation