1 Introduction

The kinetics of diffusion-controlled loading or unloading of a species into or out of an object, e.g., a solid, with the surface in equilibrium with the surrounding, represents a standard issue of diffusion theory. Solutions for a wide variety of boundary conditions can be found in textbooks (e.g., ref. [1]). An important research field, where this issue is of particular relevance, pertains to hydrogen in host materials or more generally to ion-insertion electrodes. Diffusion theory of insertion (loading) and extraction (unloading) of hydrogen from electrodes has been elaborated in great detail, e.g., by Montella [2] and by Lee and Pyun [3] using the Laplace transform method.

An intriguing feature of this method is that it allows in a straightforward manner to derive mean values, e.g., a mean lifetime, by calculating the Laplace transform \({\tilde{n}}(p)\) of an appropriate function n(t) for \(p=0\), rather than to derive this mean value from the solution of the diffusion model. The latter is deduced from the inverse of the Laplace transform, a step which can be avoided for this purpose. A further particular advantage is that in this way closed-form expressions for the mean lifetime can be deduced.

Stimulated by Seeger [4], the author applied this concept in the past to positron annihilation studies of defects. Closed-form expressions of the mean positron lifetime \(\overline{\tau }\) could be derived in this way for various scenarios of diffusion- and reaction-controlled trapping of positrons at extended defects, namely, at grain boundaries of spherical grains [4] with concomitant trapping at point defects [5] as well as at interfaces between matrix and cylindrical [6] or spherical precipitates [7], including spherical voids [7]. Dryzek made use of this concept for calculating the mean positron lifetime as well (e.g., ref. [8,9,10]).

Various approaches are used in literature to derive characteristic time scales for diffusion processes, such as first moment relaxation time constant [11, 12] and mean action time [13, 14] (see also ref. [15] and references therein), both of which represent position-dependent time scales. Another time scale is the so-called time lag [1, 16] which characterizes the long-time behavior approaching stationary flow. The mean time addressed in the present work represents a volume-averaged mean value for loading or unloading of an object. This mean value corresponds to the so-called mean residence time used to calculate drug absorption [17] (see Sect. 3).

In the present work, closed-form expressions are derived for the mean time \(\overline{\tau }\) of diffusion- and reaction-limited loading and unloading a species into or out of bodies of different shape (plate, cylinder, sphere) for the important type of boundary condition of fixed concentration in the surrounding. For comparison, mean values \(\overline{\tau }\) in the form of sums (Sect. 2.2.2) are deduced from the time-dependent solution of the diffusion equation (Sect. 2.2.1), i.e., from the inverse of the Laplace transform (Sect. 2.1). As a more complex case, concomitant trapping and untrapping of the diffusing species within the object during unloading is considered (Sect. 2.3).

2 The model

2.1 Solution of diffusion equation by Laplace transformation

We consider the diffusion of a species, such as for instance hydrogen, in a plate-, cylinder-, or sphere-shaped body that is in equilibrium with the surrounding, so-called surface evaporation condition according to the textbook of Crank [1] (Fig. 1). The species in the body is characterized by the density \(\rho (x, t)\) (plate) or \(\rho (r, t)\) (cylinder, sphere). Laplace transformation

$$\begin{aligned} \tilde{\rho }({\textbf{x}}, p) = \int _0^{\infty } \exp (-p t) \rho ({\textbf{x}}, t) \mathrm d t. \end{aligned}$$
(1)

yields the diffusion equations for the plate (a), cylinder (b), and sphere (c):

$$\begin{aligned} \frac{\mathrm d^2 \tilde{\rho }}{\textrm{d} x^2} - \gamma ^2 \tilde{\rho }= & {} - \frac{\rho _0}{D} \, , \end{aligned}$$
(2a)
$$\begin{aligned} \frac{\mathrm d^2 \tilde{\rho }}{\textrm{d} r^2} + \frac{1}{r} \frac{\mathrm d \tilde{\rho }}{\textrm{d} r}- \gamma ^2 \tilde{\rho }= & {} - \frac{\rho _0}{D} \, , \end{aligned}$$
(2b)
$$\begin{aligned} \frac{\mathrm d^2 \tilde{\rho }}{\textrm{d} r^2} + \frac{2}{r} \frac{\mathrm d \tilde{\rho }}{\textrm{d} r}- \gamma ^2 \tilde{\rho }= & {} - \frac{\rho _0}{D} \end{aligned}$$
(2c)

with

$$\begin{aligned} \gamma ^2 = \frac{p}{D} \end{aligned}$$
(3)

where D denotes the diffusion coefficient and \(\rho _0\) the constant initial concentration at time \(t=0\). If in the surrounding a constant concentration \(\rho _s\) is maintained in equilibrium, the Laplace transform of the boundary condition at the surface reads for the plate (a)

$$\begin{aligned} D \frac{\textrm{d} \tilde{\rho }}{\textrm{d} x} \mid _{x=l} + \alpha \Bigl (\tilde{\rho }(l) - \frac{\rho _s}{p} \Bigr ) = 0 \end{aligned}$$
(4a)

and for the cylinder and sphere

$$\begin{aligned} D \frac{\textrm{d} \tilde{\rho }}{\textrm{d} r} \mid _{r=r_0} + \alpha \Bigl (\tilde{\rho }(r_0) - \frac{\rho _s}{p} \Bigr ) = 0 \end{aligned}$$
(4b)

where \(\alpha\) denotes a specific rate constant, l the half-thickness of the plate (\(-l \le x \le l\)), and \(r_0\) the radius of the cylinder and sphere (\(0 \le r \le r_0\)). For the plate, in addition, the boundary condition

$$\begin{aligned} \frac{\textrm{d} \tilde{\rho }}{\textrm{d} x} \mid _{x=0} = 0 \end{aligned}$$
(5)

at the midplane \(x=0\) has to be fullfilled. With the Ansatz \(\tilde{\rho } = A \cosh (\gamma x) + \rho _0/p\) (plate), \(\tilde{\rho } = A I_0 (\gamma r) + \rho _0/p\) (cylinder, \(I_i (z)\): modified Bessel function), \(\tilde{\rho } = \sinh (\gamma r)/ (\gamma r) + \rho _0/p\) (sphere), the diffusion equation above with the respective boundary condition can be solved. From the inverse of the Laplace transform, the solution for the plate (a), cylinder (b), and sphere (c) are obtained (see textbook [1])

$$\begin{aligned} \frac{\rho (x,t) - \rho _s}{\rho _s-\rho _0}= & {} - \sum _{n=1}^{\infty } \frac{2 L \cos (\overline{\beta } x/l)}{\cos \overline{\beta }_n \bigl (\overline{\beta }_n^2 + L^2 + L \bigr )} \exp \Bigl (- \frac{D \overline{\beta }_n^2}{l^2} t \Bigr ) \, , \end{aligned}$$
(6a)
$$\begin{aligned} \frac{\rho (r,t) - \rho _s}{\rho _s-\rho _0}= & {} - \sum _{n=1}^{\infty } \frac{2 L J_0 (\overline{\beta }_n r/r_0 )}{ J_0(\overline{\beta }_n) \bigl (\overline{\beta }_n^2 + L^2 \bigr )} \exp \Bigl (- \frac{D \overline{\beta }_n^2}{r_0^2} t \Bigr ) \, , \end{aligned}$$
(6b)

with Bessel functions \(J_i (z)\) of order i,

$$\begin{aligned} \frac{\rho (r,t) - \rho _s}{\rho _s-\rho _0}= & {} - \sum _{n=1}^{\infty } \frac{{2 L r_0} \sin (\overline{\beta }_n r/r_0)}{r\sin \overline{\beta }_n \bigl ( \overline{\beta }_n^2 + L(L-1) \bigr )} \exp \Bigl (- \frac{D \overline{\beta }_n^2}{r_0^2} t \Bigr ) \, , \end{aligned}$$
(6c)

where \(\overline{\beta }_n\) denotes the roots of

$$\begin{aligned}{} & {} \overline{\beta }_n \tan \overline{\beta }_n = L \, , \end{aligned}$$
(7a)
$$\begin{aligned}{} & {} - \overline{\beta }_n J_1 (\overline{\beta }_n) + L J_0 (\overline{\beta }_n) = 0 \, , \end{aligned}$$
(7b)
$$\begin{aligned}{} & {} \overline{\beta }_n \cot \overline{\beta }_n + L -1 = 0 \, . \end{aligned}$$
(7c)

with \(\beta ^2 = - \overline{\beta }^2\), \(\beta = \gamma l\) (plate), \(\beta = \gamma r_0\) (cylinder, sphere), and

$$\begin{aligned} L= & {} \frac{\alpha l}{D} \end{aligned}$$
(8a)

for the plate and

$$\begin{aligned} L= & {} \frac{\alpha r_0}{D} \end{aligned}$$
(8b)

for the cylinder and sphere.

2.2 Mean time of diffusion-limited loading and unloading

2.2.1 Direct determination of mean time from Laplace transform

The above quoted solutions are derived from the respective Laplace transform \(\tilde{\rho } (x, p)\) or \(\tilde{\rho } (r, p)\), which reads for the plate (a), cylinder (b), and sphere (c):

$$\begin{aligned} \tilde{\rho }(x,p)= & {} \frac{\alpha (\rho _s -\rho _0) \cosh (\gamma x)}{p \bigl (\alpha \cosh (\beta ) + D \gamma \sinh (\beta ) \bigr )} + \frac{\rho _0}{p} \end{aligned}$$
(9a)
$$\begin{aligned} \tilde{\rho } (r,p)= & {} \frac{\alpha \bigl (\rho _s - \rho _0 \bigr ) r_0 }{p D \bigl (\beta I_1 (\beta ) + L I_0 (\beta ) \bigr )} I_0 \bigl (\gamma r\bigr ) + \frac{\rho _0}{p} \, , \end{aligned}$$
(9b)
$$\begin{aligned} \tilde{\rho } (r,p)= & {} \frac{\alpha \bigl (\rho _s - \rho _0 \bigr ) \beta r_0}{p D \sinh \beta \bigl ( \beta \coth \beta + L -1 \bigr )} \frac{\sinh (\gamma r)}{\gamma r} \nonumber \\{} & {} + \frac{\rho _0}{p} \end{aligned}$$
(9c)

with \(\beta = \gamma l\) for the plate and \(\beta = \gamma r_0\) for cylinder and sphere.

For calculation of the mean time of unloading, we consider the spatial average by integration of \(\tilde{\rho } (x, p)\) (\(\tilde{\rho } (r, p)\)), which yields for the plate (a), cylinder (b), and sphere (c):

$$\begin{aligned} {\tilde{n}}(p)= & {} \frac{1}{l \rho _0} \int _0^l \tilde{\rho }(x,p) \textrm{d}x \, , \end{aligned}$$
(10a)
$$\begin{aligned} {\tilde{n}}(p)= & {} \frac{1}{\pi r_0^2 \rho _0} \Bigl ( 2 \pi \int _0^{r_0} \tilde{\rho }(r,p) r \textrm{d}r \Bigr ) \, , \end{aligned}$$
(10b)
$$\begin{aligned} {\tilde{n}}(p)= & {} \frac{1}{4/3 \pi r_0^3 \rho _0} \Bigl ( 4 \pi \int _0^{r_0} \tilde{\rho }(r,p) r^2 \textrm{d}r \Bigr ) \, . \end{aligned}$$
(10c)

The spatial integral \({\tilde{n}}(p)\) represents the Laplace transform

$$\begin{aligned} {\tilde{n}}(p)= & {} \int _0^{\infty } \exp (-p t) n(t) \mathrm d t \end{aligned}$$
(11)

of the fraction n(t) of diffusion species which is still present at time t. The mean lifetime of the diffusing species, i.e., the mean time of unloading, is given by

$$\begin{aligned} \overline{\tau }= & {} \int _0^{\infty } \Bigl ( - \frac{\textrm{d} n}{\textrm{d} t} \Bigr ) t \textrm{d} t \, . \end{aligned}$$
(12)

Partial integration

$$\begin{aligned} \overline{\tau }= & {} \int _0^{\infty } n(t) \mathrm d t = {\tilde{n}} (p=0) \end{aligned}$$
(13)

shows that \(\overline{\tau }\) is given by the Laplace transform (Eq. 11) at \(p=0\) in the case of complete unloading (\(\rho _s =0\)) [4].

Calculating the mean time of unloading for \(\rho _s >0\), one has to consider the fraction \({\tilde{n}}_{ex}(p)\) in excess to the concentration \(\rho _s\) in the surrounding, which is obtained by replacing in the integral \(\tilde{\rho }(r,p)\) by \((\tilde{\rho }(r,p) - \rho _s/p)\). Correspondingly, in the prefactor for normalization \(\rho _0\) has to be replaced by \(\rho _0 - \rho _s\). Integrating with this substitution yields for the plate (a), cylinder (b), and sphere(c):

$$\begin{aligned} {\tilde{n}}_{ex}(p)= & {} - \frac{\alpha l}{D} \frac{\sinh (\beta ) }{p \beta \bigl (L \cosh (\beta ) + \beta \sinh (\beta ) \bigr )} + \frac{1}{p} \, \end{aligned}$$
(14a)
$$\begin{aligned} {\tilde{n}}_{ex}(p)= & {} - \frac{2 \alpha r_0}{D} \frac{I_1(\beta )}{p\beta \bigl (\beta I_1(\beta ) + L I_0(\beta ) \bigr )} + \frac{1}{p} \, , \end{aligned}$$
(14b)
$$\begin{aligned} {\tilde{n}}_{ex}(p)= & {} - \frac{3 \alpha }{r_0} \frac{\beta \coth \beta - 1}{p^2 \bigl ( \beta \coth \beta +L - 1 \bigr )} + \frac{1}{p} \, . \end{aligned}$$
(14c)

The mean time \(\overline{\tau }\) of unloading from \(\rho _0\) down to \(\rho _s\) is given by

$$\begin{aligned} \overline{\tau } = {\tilde{n}}_{ex}(p=0) \, . \end{aligned}$$
(15)

Taylor expansion of the \(\beta\)-dependent functions in Eq. (14) and finally taking into account \(\beta ^2 = pl^2/D\) (plate) or \(\beta ^2 = pr_0^2/D\) (cylinder, sphere) yields for the mean unloading time of plate (a), cylinder (b), and sphere (c) after some algebra:

$$\begin{aligned} \overline{\tau }= & {} \frac{l^2}{3D} + \frac{l}{\alpha } \, , \end{aligned}$$
(16a)
$$\begin{aligned} \overline{\tau }= & {} \frac{r_0^2}{8D} + \frac{r_0}{2 \alpha } \, , \end{aligned}$$
(16b)
$$\begin{aligned} \overline{\tau }= & {} \frac{r_0^2}{15D} + \frac{r_0}{3 \alpha } \, . \end{aligned}$$
(16c)

The calculation of the mean loading time from an initial value \(\rho _0 = 0\) up to the density \(\rho _s\) in the surrounding is done in an analogous manner. The fraction of diffusing species reads in this case of loading for the plate

$$\begin{aligned} {\tilde{n}}(p)= & {} \frac{1}{l \rho _s} \int _0^l \Bigl (\frac{\rho _s}{p} - \tilde{\rho }(x,p) \Bigr )\textrm{d}x \end{aligned}$$
(17)

yielding in analogy to Eq. (14a):

$$\begin{aligned} {\tilde{n}}(p)= & {} \frac{1}{p} - \frac{\alpha l}{D} \frac{\sinh (\beta ) }{p \beta \bigl (L \cosh (\beta ) + \beta \sinh (\beta ) \bigr )} \, . \end{aligned}$$
(18)

After Taylor expansion, as mean loading time

$$\begin{aligned} \overline{\tau }= & {} {\tilde{n}}(p=0) = \frac{l^2}{3D} + \frac{l}{\alpha } \end{aligned}$$
(19)

the same expression as for unloading is obtained (see Eq. (16a).

2.2.2 Determination of mean unloading time from solution \(\rho (x, t)\), \(\rho (r, t)\)

The mean unloading time can also be determined from the solutions \(\rho (x, t)\), \(\rho (r, t)\) Eq. (6). The number of diffusing species \(\textrm{d} N_s/ \textrm{d}t\) leaving per time interval \(\textrm{d}t\) the plate per area (a), the cylinder per length (b), or the sphere (c) reads

$$\begin{aligned} \frac{\textrm{d} N_s}{\textrm{d} t}= & {} D \frac{\partial \rho }{\partial x} \mid _{x=l} = \alpha (\rho _s- \rho (l)) \, , \end{aligned}$$
(20a)
$$\begin{aligned} \frac{\textrm{d} N_s}{\textrm{d} t}= & {} 2 \pi r_0 D \frac{\partial \rho }{\partial r} \mid _{r=r_0} = 2 \pi r_0 \alpha (\rho _s- \rho (r_0)) \, , \end{aligned}$$
(20b)
$$\begin{aligned} \frac{\textrm{d} N_s}{\textrm{d} t}= & {} 4 \pi r_0^2 D \frac{\partial \rho }{\partial r} \mid _{r=r_0} = 4 \pi r_0^2 \alpha (\rho _s- \rho (r_0)) \, . \end{aligned}$$
(20c)

The mean unloading time is obtained from

$$\begin{aligned} \overline{\tau }= & {} \frac{1}{N_{\infty }} \int _0^{\infty } \Bigl ( - \frac{\textrm{d} N_s}{\textrm{d} t} \mid _{(r=r_0) \textrm{or} (x=l)} \Bigr ) t \textrm{d} t \end{aligned}$$
(21)

with \(N_{\infty } = (\rho _0 -\rho _s)l\) (plate), \(N_{\infty } = \pi r_0^2(\rho _0-\rho _s)\) (cylinder), \(N_{\infty } = 4 \pi r_0^3/3 (\rho _0 -\rho _s)\) (sphere). Inserting the solutions Eq. (6) and integrating Eq. (21) yields the mean unloading time for the plate (a), cylinder (b), and the sphere (c):

$$\begin{aligned} \overline{\tau }= & {} \sum _{n=1}^{\infty } \frac{2 L^2 l^2}{D} \frac{1}{\overline{\beta }_n^4 ( \overline{\beta }_n^2 + L^2 + L) } \, , \end{aligned}$$
(22a)
$$\begin{aligned} \overline{\tau }= & {} \sum _{n=1}^{\infty } \frac{4 L^2 r_0^2}{D} \frac{1}{\overline{\beta }_n^4 ( \overline{\beta }_n^2 + L^2) } \, , \end{aligned}$$
(22b)
$$\begin{aligned} \overline{\tau }= & {} \sum _{n=1}^{\infty } \frac{6 L^2 r_0^2}{D} \frac{1}{\overline{\beta }_n^4 \bigl ( \overline{\beta }_n^2 + L (L-1) \bigr ) } \, . \end{aligned}$$
(22c)

with the respective roots according to Eq. (7).

The sums given by Eq. (22) yield identical values for the mean unloading time as the closed-form expressions (Eq. 16). This is verified for selected values of the parameter L making use of the tabulated roots for Eq. (7) given, e.g., in the textbook of Crank [1]. Equating \(\overline{\tau }\) according to Eq. (22) with the respective one according to Eq. (16) yields equations with L as single parameter, e.g., for the cylinder

$$\begin{aligned} \frac{1}{8} + \frac{1}{2L} = \sum _{n=1}^{\infty } \frac{4 L^2}{\overline{\beta }_n^4 ( \overline{\beta }_n^2 + L^2) } \, . \end{aligned}$$
(23)

2.3 Unloading taking into account trapping and detrapping

Next we consider in addition trapping of the diffusing species with a rate \(\sigma\) at homogeneously distributed traps within the sample and detrapping with a rate \(\eta\) from these traps, restricting to a plate-shaped sample. The fraction of trapped species is characterized by the density \(\rho _t(t)\) for which the rate equation

$$\begin{aligned} \frac{\textrm{d} \rho _t}{\textrm{d} t}= & {} \sigma \rho - \eta \rho _t \end{aligned}$$
(24)

with the corresponding Laplace transform

$$\begin{aligned} \tilde{\rho }_t= & {} \frac{\sigma }{p + \eta } \tilde{\rho } + \rho _{t, 0} \frac{1}{p + \eta } \end{aligned}$$
(25)

holds with the initial density in traps \(\rho _{t, 0}\). The diffusion equation for this extended model reads

$$\begin{aligned} \frac{\partial \rho }{\partial t}= & {} D \frac{\partial ^2 \rho }{\partial x^2} - \sigma \rho + \eta \rho _t \end{aligned}$$
(26)

with the Laplace transform

$$\begin{aligned} \frac{\mathrm d^2 \tilde{\rho }}{\textrm{d} x^2} - \gamma ^2 \tilde{\rho }= & {} - \frac{1}{D} \Bigl (\rho _0 + \rho _{t, 0} \frac{\eta }{\eta + p} \Bigr ) \end{aligned}$$
(27)

where

$$\gamma ^{2} \,\, = \,\,\frac{{p(p + \sigma + \eta )}}{{D(p + \eta )}}{\mkern 1mu} .$$
(28)

We note that the ansatz according to Eqs. (24) and (26) implies that \(\sigma\) is independent of \(\rho _t\), i.e., inexhaustible sink behavior is assumed, meaning that the trap concentration is high compared to \(\rho _t\) or else that multiple trapping at a trap site may occur with constant rate.

With the boundary condition Eq. (4a) the following solution is obtained

$$\tilde{\rho }(x,p)\,\, = \,\,\frac{1}{{(p + \sigma + \eta )}} \times \left[ {\alpha \frac{{\rho _{s} (p + \sigma + \eta ) - \rho _{0} (p + \eta ) - \rho _{{t,0}} \eta }}{{p(D\gamma \sinh (\beta ) + \alpha \cosh (\beta ))}}\cosh (\gamma x) + \frac{{\rho _{0} (p + \eta ) + \rho _{{t,0}} \eta }}{p}} \right]$$
(29)

(\(\beta = \gamma l\)) which reduces to Eq. (9a) for \(\rho _{t, 0} = \eta = \sigma =0\).

For calculating the mean unloading time, the limiting density in the plate \(\rho _s (1+\sigma /\eta )\) after unloading has to be taken into account, leading in extension to Eq. (10a) to

$$\begin{aligned} {\tilde{n}}_{ex}(p)= & {} \frac{1}{l \bigl (\rho _0 + \rho _{t,0} - \rho _s (1+\frac{\sigma }{\eta })\bigr )} \nonumber \\{} & {} \int _0^l \Bigl (\tilde{\rho }(x,p) + \tilde{\rho }_t(x,p) - \frac{\rho _s}{p} (1+\frac{\sigma }{\eta }) \Bigr )\textrm{d}x \, . \end{aligned}$$
(30)

Insertion of \(\tilde{\rho }(x,p)\) (Eq. 29) and \(\tilde{\rho }_t(x,p)\) Eq. (25) and integration leads to

$$\begin{aligned} \tilde{n}_{{ex}} (p)\,\, & = \,\,\frac{1}{{(\rho _{0} + \rho _{{t,0}} - \rho _{s} (1 + \frac{\sigma }{\eta }))(p + \eta )}} \times \\ & \left[ {\alpha \frac{{\rho _{s} (p + \sigma + \eta ) - \rho _{0} (p + \eta ) - \rho _{{t,0}} \eta }}{{p(D\gamma \sinh (\beta ) + \alpha \cosh (\beta ))}}\frac{{\sinh (\beta )}}{\beta } + \frac{{(\rho _{0} + \rho _{{t,0}} - \rho _{s} (1 + \frac{\sigma }{\eta }))(p + \eta )}}{p}} \right] \\ \end{aligned}$$
(31)

Taylor expansion of \(\sinh ({\beta })\) and \(\cosh ({\beta })\) yields the mean time of unloading from \(\rho _0 + \rho _{t,0}\) down to \(\rho _s (1+\sigma /\eta )\):

$$\bar{\tau }\,\, = \,\,\tilde{n}_{{ex}} (p = 0) = (\frac{1}{\eta })\frac{{\rho _{{t,0}} - \rho _{s} \frac{\sigma }{\eta }}}{{\rho _{0} + \rho _{{t,0}} - \rho _{s} (1 + \frac{\sigma }{\eta })}}{\text{ }} + (\frac{{l^{2} }}{{3D}} + \frac{l}{\alpha })(1 + \frac{\sigma }{\eta }){\mkern 1mu} .$$
(32)

The special case of detrapping exclusively, i.e., \(\sigma = 0\), reads

$$\bar{\tau }{\mkern 1mu} {\mkern 1mu} = {\mkern 1mu} {\mkern 1mu} \left( {\frac{1}{\eta }} \right)\frac{{\rho _{{t,0}} }}{{\rho _{0} + \rho _{{t,0}} - \rho _{s} }} + \left( {\frac{{l^{2} }}{{3D}} + \frac{l}{\alpha }} \right),$$
(33)

which includes as further special case for \(\rho _{t,0} = 0\) the solution (Eq. 16a) quoted above. Another special case pertains to vanishing concentration in the surrounding (\(\rho _s = 0\)):

$$\begin{aligned} \overline{\tau }= & {} \Bigl ( \frac{1}{\eta } \Bigr ) \frac{\rho _{t,0} }{\rho _0 + \rho _{t,0}} + \Bigl ( \frac{l^2}{3D} + \frac{l}{\alpha } \Bigr ) \Bigl (1+\frac{\sigma }{\eta } \Bigr ) \, . \end{aligned}$$
(34)

The determination of the mean unloading time from the solution \(\rho (x, t)\) as done in Sect. 2.2.2 is a bit more laborious here. We restrict to the special case of exclusive detrapping (\(\sigma = 0\)) and vanishing concentration in the surrounding (\(\rho _s = 0\)) which leads to

$$\begin{aligned} \overline{\tau }= & {} \displaystyle { \frac{1}{1 + R} \Bigl \{ \sum _{n=1}^{\infty } \frac{2 L^2 l^2 \bigl [\frac{D\overline{\beta }_n^2}{l^2} - \eta (1 +R) \bigr ] }{D \overline{\beta }_n^4 \bigl (\frac{D\overline{\beta }_n^2 }{l^2} -\eta \bigr ) \bigl (\overline{\beta }_n^2 + L^2 + L \bigr )} + } \nonumber \\{} & {} \displaystyle { \frac{R \alpha }{l \eta ^2} \bigl [\frac{1}{1 - \frac{1}{L} {\overline{q}} l \tan ({\overline{q}}l)} - 1 \bigr ] \Bigr \} } \end{aligned}$$
(35)

with

$$\begin{aligned} R= & {} \frac{\rho _{t,0}}{\rho _0} \, , \end{aligned}$$
(36)
$$\begin{aligned} {\overline{q}}= & {} \sqrt{\frac{\eta }{D}} \, , \end{aligned}$$
(37)

L according to Eq. (8a) and the roots \(\overline{\beta }_n\) according to Eq. (7a). The derivation of Eq. (35) is outlined in the appendix.

The solution Eq. (35) reduces to Eq. (22a) for the special case of \(R=0\), i.e., \(\rho _{t,0} = 0\). Again it can be verified for given data sets that Eq. (35) yields identical values for the mean unloading time as the closed-form expression (Eq. 33).

3 Discussion and conclusion

The main objective of this work lays on the closed-form expressions for the mean time \(\overline{\tau }\) of unloading Eq. (16) and loading Eq. (19) for various geometries (plate, cylinder, sphere) and the extension to concomitant trapping and detrapping Eqs. (32), (33) and (34). These closed-form expressions for \(\overline{\tau }\) are derived in a straight-forward manner from the Laplace transform \({\tilde{n}}(p)\) Eq. (11) at \(p=0\), avoiding their calculation by means of sums Eqs. (22) and (35) for which roots Eq. (7) have to be determined.

On the same concept used here to deduce a mean value (Eq. 12) from a Laplace transform for \(p \rightarrow 0\) (Eq. 13) also the mean action time [15], the mean residence time [17], or the mean-first-passage time [18] is based. In fact, it can be shown that the mean value according to Eq. (13) also follows by applying the relation for the first moment considered in references [17] and [18] [\(\int _0^{\infty } - t f(t) \textrm{d} t = - \textrm{lim}_{p \rightarrow 0} (\textrm{d}/ \textrm{d} p) \tilde{f(p}\))].

The rate-limiting processes in the considered diffusion model is, on the one hand, the diffusion characterized by D Eq. (2), and, on the other hand, the rate constant \(\alpha\) Eq. (4), describing the surface reaction. Both rate-limiting processes contribute to the mean times of unloading and loading Eqs. (16) and (19). A relation analogous to that of the mean time for the one-dimensional case Eq. (16a) is reported for the mean residence time of percutaneous drug absorption [17]. Also from a consideration of the mean action time, sum terms of type \(l^2/D\) and \(l/\alpha\) are found for the characteristic time constant [15].

For obvious reason, \(\overline{\tau }\) increases both with decreasing diffusivity and reactivity. The solutions contain the two limiting cases, namely,

  • The entirely diffusion-controlled process where the surface acts as ideal sink (i.e., \(\alpha \rightarrow \infty\)), and

  • The entirely reaction-controlled process for \(D \rightarrow \infty\).

Since the reaction-limitation \(1/\alpha\) of \(\overline{\tau }\) scales linearly with the size (\(l, r_0\)) of the object, whereas the diffusion-limitation (1/D) with the square of the size (\(l^2, r_0^2\)), for decreasing object size reaction-limitation gets more relevant compared to diffusion-limitation and vice versa for increasing object size.

For a quantitative comparison of the contributions for \(\overline{\tau }\) arising from diffusion- (\(l^2/D\)) and rate-limitation (\(l/\alpha\)), we consider one example of materials science (i) and one of biology (ii):

  1. (i)

    For electrochemically induced hydrogen transport through an amorphous Pd-rich alloy, the values \(D = 1.6\times 10^{-8}\) cm\(^2\)/s and \(\alpha = 2.3 \times 10^{-4}\) cm/s are reported [19].Footnote 1 For the one-dimensional case, reaction-limitation exceeds diffusion-limitation for a layer thickness l smaller than about \(2~\mu\)m, and vice versa.

  2. (ii)

    For oxygen uptake in a spherical cell, the values \(D = 1.6\times 10^{-5}\) cm\(^2\)/s and \(\alpha = 2 \times 10^{-2}\) cm/s are quoted [20]. From Eq. (16c), a cell radius \(r_0 = 5\times 10^{-3}\) cm is obtained for which reaction- and diffusion-limitation contribute in equal amount.

For comparison of \(\overline{\tau }\) for plate, cylinder, and sphere, one may consider \(\overline{\tau } l^2/D\) (plate), respectively \(\overline{\tau } r_0^2/D\) (cylinder, sphere), yielding from Eq. (16)

$$\left( {\frac{1}{3} + \frac{1}{L}} \right)\left| {_{{{\text{plate}}}} } \right. > \left( {\frac{1}{8} + \frac{1}{{2L}}} \right)\left| {_{{{\text{cylinder}}}} } \right. > \left( {\frac{1}{{15}} + \frac{1}{{3L}}} \right)\left| {_{{{\text{sphere}}}} } \right.$$
(38)

with L according to Eq. (8). The comparison Eq. (38) shows that the mean unloading time is highest for the plate and shortest for the sphere. This reflects the decreasing mean diffusion length for reaching the surface when going from planar to cylindrical and further to spherical symmetry. Related to identical L-values, diffusion-limitation is stronger for a plate than for a sphere; this becomes also evident from the ratio of the diffusion-limited first summand and the reaction-limited second summand of \(\overline{\tau }\) Eq. (16), which is L/3, L/4, and L/5 for plate, cylinder and sphere, respectively.

It is worthwhile to mention that the mean time for unloading Eq. (16) does neither depend on the initial concentration \(\rho _0\) nor on the concentration \(\rho _s\) in the surrounding. As evident from the solution Eq. (6), \(\rho _0\) and \(\rho _s\) affect the magnitude of \(\rho (x,t)\) or \(\rho (r,t)\), but not their temporal evolution.

For unloading with concomitant trapping and detrapping, the following conclusions can be drawn with respect to the mean unloading time:

  • \(\underline{\sigma =0, \rho _s>0,}\) Eq. (33): Release of trapped species by detrapping with a rate \(\eta\) increases the time \(\overline{\tau }\) needed for unloading. The first summand in Eq. (33) describes the mean time \(1/\eta\) of release from traps weighted by the density of species \(\rho _t\) being trapped initially related to the density (\(\rho _0 + \rho _{t,0}-\rho _s\)) being unloaded. The second term, which corresponds to the solution without detrapping Eq. (16a), describes the mean time for diffusion- and reaction-limited outdiffusion.

  • \(\underline{\sigma >0, \rho _s=0}\), Eq. (34): Additional trapping with a rate \(\sigma\) further increases the time for unloading. Intermediate trapping with subsequent detrapping slows down the outdiffusion; this is the reason why the \(\overline{\tau }\)-increase is determined by the ratio \(\sigma / \eta\) of trapping and detrapping rate.

  • \(\underline{{\textrm{General} \,{\textrm{case }} (\sigma>0, \rho _s>0)}}\), Eq. (32): For non-vanishing concentration in the surrounding (\(\rho _s >0\), Eq. (32), the weighting factor of the first summand (\(1/\eta\)) is modified compared to Eq. (33). The factor \((\rho _{t,0} - \rho _s \sigma /\eta ) / (\rho _0 + \rho _{t,0} - \rho _s (1+\sigma /\eta ))\) takes into account that for \(\rho _s >0\), the part of species released from the traps is reduced by \(\rho _s \sigma /\eta\) and the part of species, which is unloaded by diffusion to the surface, is reduced by \(\rho _s (1+\sigma /\eta )\).

For \(\sigma >0\), the mean time \(\overline{\tau }\) is essentially determined by the ratio \(\sigma / \eta\) of trapping and detrapping rates Eqs. (32) and (34). For a quantitative assessment of this ratio, we consider an example of hydrogen trapping at dislocations in steel [21, 22]. For a low occupancy of trap sites by hydrogen, as underlying the present model, the ratio \(\sigma / \eta\) can be written as \(\sigma / \eta = N_t/N_l \exp (- E_T/k_{\mathrm B} T)\), where \(N_t\), \(N_l\) denotes the trap and lattice site density, respectively, and \(E_T\) the binding energy of hydrogen at dislocations.Footnote 2 For \(N_t = 2\times 10^{21}\) 1/m\(^3\), corresponding to a dislocation density of \(10^{12}\) 1/m\(^2\), \(N_l = 5.1\times 10^{29}\) 1/m\(^3\), and \(E_T = - 60\) kJ/mol (values from [21]), a ratio \(\sigma / \eta = 195\) follows for ambient temperature (293 K). This high value reflects the fact that due to thermally activated process of detrapping, the detrapping rate may be much lower than the trapping rate. As evident from Eqs. (32) and (34), a sluggish detrapping may give rise to a strong increase of the mean unloading time (factor \((1+\sigma / \eta )\) in Eqs. (32) and (34). The slowing down of the diffusion process by trapping is in literature also described by means of a reduced effective diffusivity \(D_{eff}\) in comparison to D. It is worthwhile to mention that the ratio between \(D_{eff}\) and D in the above mentioned case is given by inverse of the same factor \((1+\sigma / \eta )\) (see [21]).

In conclusion, comparing the two approaches for calculating the mean unloading/loading time, i.e., by means of the Laplace transform Eq. (11) at \(p=0\) or via Eq. (21) by means of \(\rho (x,t)\) or \(\rho (r,t)\), the advantage of the first one becomes evident, even for the simple model presented in this work, and most clearly for the complexer model including detrapping. When with increasing complexity the calculation of \(\rho (x,t)\) (\(\rho (r,t)\)) from the inverse of the Laplace transform \(\tilde{\rho }(x,p)\) (\(\tilde{\rho }(r,p)\)) becomes more and more laborious, the determination of mean values from \({\tilde{n}}(p)\) pays off as a most direct and simple way. Above all, in contrast to sum-type solutions the closed-form expressions enable in a straightforward manner physical insight in the mean loading or unloading time and its relation to the various controlling parameters, such as D, \(\alpha\), or \(\rho _s\).

Fig. 1
figure 1

Geometry of diffusion-reaction model: plate (half-thickness l), cylinder, sphere (radius \(r_0\)) with initial density \(\rho _0\) of diffusing species embedded in a surrounding in which the density \(\rho _s\) is held constant. Temporal and spatial evolution of the concentration within the body is characterized by \(\rho (x,t)\) or \(\rho (r,t)\). D: diffusion coefficient; \(\alpha\): specific rate constant at boundary (surface)