Open Access Article
This Open Access Article is licensed under a Creative Commons Attribution-Non Commercial 3.0 Unported Licence

Exact integrated equations to describe diffusion kinetics

Swapnil Daxinia, Jack A. Barnesb and Hans-Peter Loock*c
aDepartment of Physics, University of Victoria, Victoria, BC, Canada
bDepartment of Chemistry, Queen's University, Kingston, ON, Canada
cDepartment of Chemistry, University of Victoria, Victoria, BC, Canada. E-mail: hploock@uvic.ca

Received 7th December 2025 , Accepted 16th January 2026

First published on 23rd January 2026


Abstract

Crank's solutions for Fick's second law remain the foundation of diffusion kinetics models, yet many studies use simplified forms of these solutions for fitting experimental data. Here, we derive and summarize the exact diffusion equations that can be used to model the analyte uptake and release in permeable films, with emphasis on two cases: a free-standing film and a film mounted on an impermeable substrate. For both cases, we present the analytical expressions and their integrated forms. The integrations consider two different experimental scenarios that are common when measuring the kinetics of analyte uptake and desorption: (1) the average analyte concentration is determined across the entire film and (2) the average concentration of analyte is determined in a localized region of interest. While the former is relevant to, e.g. gravimetric measurements, the latter is particularly relevant to plasmonic sensing applications and evanescent field interactions, where the measurable signal is dependent on the analyte concentration near the film interface. We provide a comprehensive framework for fitting experimental diffusion curves to physically meaningful models, enabling a more accurate determination of diffusion coefficients across a range of polymer–analyte systems.


1. Introduction

In his seminal 1956 book “The mathematics of diffusion”, John Crank derived the differential equations describing Fick's law of diffusion for two limiting but common cases: (1) the diffusion of an analyte into a film that is supported by an impermeable substrate, and (2) the diffusion of an analyte into a free-standing film that has no analyte entering from the opposing side1 (Fig. 1).
image file: d5sm01209k-f1.tif
Fig. 1 Boundary conditions and integration bounds for a film (yellow) on an impermeable (left, grey) and permeable substrate (right) as described in the text.

Both are one-dimensional diffusion problems, and a straightforward and exact analytical solution can be obtained by integration that describes the kinetics of diffusion. Indeed, the measurement of the relative analyte concentrations in a film as a function of time is one of the most common methods to determine the diffusion rate.

Experimental concentration measurements, obtained either as an average of the concentration of the analyte in the entire film or taken at a particular distance from its surface, can be used to obtain the diffusion constant for the particular film:analyte system by fitting to the equations describing the diffusion kinetics. The concentration is obtained from some measured property, X(y, t), that has to scale linearly with the concentration of the analyte and could be the mass of the film,2 or its polarizability volume,3,4 its fluorescence intensity,5 or its absorbance,6 among others. These properties can be determined from primary measurements such as optical transmission,6 refractive index measurements,4 optical7 or mechanical8 resonance frequency shifts, etc. Since the measurement site and the film thickness, d, are usually known, these fits only require two variables, i.e. the diffusion constant, D, and a property that describes the equilibrium concentration of the analyte in the film, X.

While the exact diffusion equations are readily derived, most chemists use much simpler equations to fit the diffusion kinetics, and to obtain the diffusion constants. These are based on the exponential asymptotic growth function for analyte entering the film and on the exponential decay function for analyte diffusing out of a film

 
image file: d5sm01209k-t1.tif(1)
With these equations one can obtain an expression for the diffusion constants based on the saturated concentration by observing the half-concentration, the initial or the limiting slope.2,9 As was mentioned previously, these functions are first-order approximations to the exact analytical functions,3,10 and provide a comparably poor fit in some cases, particularly when there is uncertainty in the value of the saturated concentration. A 10% deviation in the saturated concentration can lead to an error of up to 50% in the estimation of the diffusion constant.11

In this contribution we provide “ready-to-use” integrated equations that allow a practitioner to obtain accurate diffusion constants by fitting. Despite their slightly more complex form they are readily incorporated into any fitting algorithm and use the same number of parameters as their first-order approximations. For convenience, a short Matlab script that contains the relevant functions is included in the SI.

2. Theoretical model

In his book “The mathematics of diffusion” in 19561 John Crank derived equations to describe the diffusion kinetics of analytes into a free-standing membrane and into a film supported by an impermeable substrate. He solved Fick's second law of diffusion
 
image file: d5sm01209k-t2.tif(2)
for several different cases. In the following we assume that the diffusion constant, D, is, in fact, a constant and that the film does not swell or shrink during the diffusion processes.

The Fickian diffusion model is appropriate for polymer networks for tracer diffusion, i.e. when the analyte concentration is very low12 – an assumption that we consider valid throughout this article. Fickian diffusion is also adequate at higher analyte concentrations, when the temperature is well above the glass transition temperature of the film.

Crank solved the partial differential eqn (2) by separation of variables

 
X(y, t) = C(y)T(t) (3)
and obtained a general solution of the form:
 
image file: d5sm01209k-t3.tif(4)
The constants Am, Bm, and λm, are determined using the respective boundary and initial conditions of the problem. In the present cases we determine the boundary conditions to represent a permeable membrane and an impermeable membrane, with the analyte concentration being represented by the experimental observable, X.

3. Film on an impermeable substrate

Assume first that the film is accessible to the analyte at one face and impermeable at the opposite face. We can then treat the problem as one-dimensional diffusion through a plane of finite thickness within an infinite reservoir of analyte.

In this case, we assume that the surface of the membrane (y = d) is maintained at constant concentration of X1, and we do not have any diffusion across the substrate support of the membrane (y = 0). Thus, the boundary conditions are given by

 
image file: d5sm01209k-t4.tif(5)
With these boundary conditions, Crank analytically solved the problem of diffusion into a film of finite thickness that is mounted on one impermeable wall1 and obtained an equation containing an infinite sum of exponentials
 
image file: d5sm01209k-t5.tif(6)
At short times, a large number of terms in the sum are required, and the following approximate solution is more practical:
 
image file: d5sm01209k-t6.tif(7)
Balik described a blended model that uses one-term approximations of (6) and (7), and a switching function to shift the weight between the two equations as a function of time2
 
image file: d5sm01209k-t7.tif(8)
where, F(y, t) and G(y, t) are the right-hand-sides of (6) and (7) truncated to a single term (m = 0), and ϕ(t) is the Fermi function
 
image file: d5sm01209k-t8.tif(9)
that shifts the weight between the two functions with time. The reduced time is t′ = Dt/d2, and a = 0.05326 and b = 0.004 were determined to give an optimal fit.

With today's computing abilities there is no longer a need for these complications and calculating 20–50 terms for very short time scales and at 3–5 terms at longer timescales is readily possible, and probably simpler.

3.1. Concentration gradients for the impermeable substrate

In (6) and (7), X0 is the initial concentration in the film and X1 is the equilibrium concentration of the analyte in the film. If the film is initially free of analyte, X0 = 0, as is the case for many absorption experiments, we can write (6) as:
 
image file: d5sm01209k-t9.tif(10)
The limiting case at t → ∞ gives the uniform equilibrium concentration X = X1. The other limiting case at t = 0 reduces (10) to X0 = 0, as the second term in the brackets becomes unity when applying the Leibnitz expression:
 
image file: d5sm01209k-t10.tif(11)
For the desorption case, we can take the initial concentration within the membrane to be X, i.e. the equilibrium concentration for absorption, and since X1 = 0, we obtain
 
image file: d5sm01209k-t11.tif(12)
Fig. 2 shows the concentration gradients, X(y, t), across the film for the absorption process described by (10) (Fig. 2A) and the desorption process described by (12) (Fig. 2C). The diffusion coefficient was set to D = 1 × 10−6 cm2 s−1 and the thickness of the film to d = 0.01 cm. The red traces show the concentration profile in the film at t = 0.1 s then from 1 s to 19 s in 2 second increments (blue) and finally from 30–150 s in 15 second increments (black) using (10). The curves are separated by a time interval of Δt/τ = 0.37 (black curves) and Δt/τ = 0.05 (blue) where the characteristic diffusion time is τ = π2Dt/4d2.

image file: d5sm01209k-f2.tif
Fig. 2 Simulated concentration gradients and absorption/desorption curves for supported films. (A) Concentration gradient of an analyte in a film mounted on an impermeable substrate as a function of time from t = 0.01 to 150 s. The red curve represents the profile at t = 0.01 s. Each curve is separated by Δt = 2 s for the lower 10 curves (blue) and by Δt = 15 s for the top 9 curves (black). (B) Uptake curve of an analyte diffusion into a film mounted on an impermeable substrate. The red curve shows the total concentration throughout the film; the blue curve shows its average concentration in the bottom 10% layer of the film. (C) and (D) as in (A) and (B) but for a desorption case.

We now evaluate X(t) for two limiting, but common cases. We derive two equations that permit the determination of the diffusion constant from either the average concentration of the analyte in the polymer film or from the concentration near the film–substrate interface. When measuring the temporal evolution of measurement X(t), we can then distinguish between these two cases.

Case (A): the measurement samples only a small sliver of the film (thickness: δy) near the bottom (y = 0) or top (y = d) surface,

 
image file: d5sm01209k-t12.tif(13)
Case (B): the measurement samples the concentration of the analyte over the entire film thickness:
 
image file: d5sm01209k-t13.tif(14)
Examples for the first case are measurements of the evanescent wave absorption or fluorescence, or when plasmonic interactions or critical angles are used to determine the film's refractive index near the substrate interface. The second case applies when gravimetric or optical density measurements are used to follow the analyte concentration.

3.2. Interface concentration (impermeable substrate)

For Case (A) measurements, one integrates (10) between y = 0 and δy.
 
image file: d5sm01209k-t14.tif(15)
which yields
 
image file: d5sm01209k-t15.tif(16)
Eqn (10) or (16) may be simplified for the concentration at the substrate interface (y = 0), when the film is thick compared to the penetration depth of the evanescent field, δy/d ≪ 1, to give
 
image file: d5sm01209k-t16.tif(17)
For the desorption case, we can perform a similar integration with (12) and the average concentration near the interface is thus given by:
 
image file: d5sm01209k-t17.tif(18)
As above, eqn (12) or (18) may also be simplified for δy/d ≪ 1, to give
 
image file: d5sm01209k-t18.tif(19)
Although (16) and (18) contain infinite sums of exponential functions, fitting is straightforward, since the arguments of the exponential functions are easily evaluated and the amplitude factors (−1)m/(2m + 1)2 converge quickly to zero. For most scenarios a fit with m = 3 to 5 should be sufficient.

3.3. Integrated concentration (impermeable substrate)

In Case B the average concentration of the analyte during its absorption can be calculated by integration of (10) across the film's thickness, d, to obtain
 
image file: d5sm01209k-t19.tif(20)
which simplifies to
 
image file: d5sm01209k-t20.tif(21)
Similarly, the average concentration during desorption is given by
 
image file: d5sm01209k-t21.tif(22)
Again, the diffusion coefficient, D, may be obtained by fitting as long as the thickness, d, is known.

Fig. 2B shows the concentration X(y, t) near the substrate interface, from (16) and the average concentration through the entire film, [X with combining macron](t) from (20), whereas Fig. 2B shows the respective desorption curves calculated using (18) and (22). Fifty exponential terms were included in the calculation of concentration profiles and of [X with combining macron](t).

4. Free-standing film

Absorption and desorption processes involving diffusion into a free-standing film, i.e. having either a fully permeable support or no support, can be described in analogy to the case of the supported film (see Fig. 1). The boundary conditions are now given by:
 
image file: d5sm01209k-t22.tif(23)

4.1. Concentration gradients for the free-standing film

The general solution of (4) with the boundary conditions in (23) is given by
 
image file: d5sm01209k-t23.tif(24)
Here, f(y) describes the initial distribution of analyte within the film. In most absorption experiments f(y) is either equal to zero or a constant. For the two-sided desorption process, we consider an initial constant concentration throughout the film, as well as a linear concentration gradient as it might be obtained following one-sided absorption process.

Setting y = 0 reduces (24) to X(0, t) = X2 for all times. Similarly, at t = 0 eqn (24) yields f(y), i.e. the boundary conditions are met.

During absorption, we typically assume that the film is initially free of analyte, f(y) = 0 and that the analyte emerging from the low concentration face is carried promptly away, X2 = 0. We can then simplify (24) to obtain

 
image file: d5sm01209k-t24.tif(25)
Fig. 3A shows the concentration gradients described by (25) following one-sided absorption into a permeable film, where we assume that the analyte can be completely removed from the opposite surface. Note that the red, blue and black lines correspond to lower time intervals than in Fig. 2A and C. The steady-state analyte distribution following one-sided absorption into a permeable membrane (Fig. 3A) is simply given by
 
image file: d5sm01209k-t25.tif(26)
For the desorption case for the permeable membrane, we consider two different cases.


image file: d5sm01209k-f3.tif
Fig. 3 Simulated concentration gradients and absorption/desorption curves for free-standing films. (A) Concentration gradient of an analyte in a film mounted on a permeable substrate as a function of time from t = 0.1 to 50 s. The red curve represents the profile at t = 0.1 s. Each curve is separated by Δt = 1 s for the lower 10 curves (blue) and by Δt = 4 s for the top 10 curves (black). (B) Uptake curve of an analyte diffusion into a film mounted on a permeable substrate. The red curve shows the total concentration throughout the film; the blue curve shows its average concentration in the bottom 10% layer of the film. (C) and (D) show the desorption curves with a permeable membrane for a case of linear initial concentration. (E) and (F) Show the desorption curves for a uniform initial concentration.

We first consider the case where at the start of the process the linear concentration gradient of (26) is present. The concentration gradients during desorption are then evaluated using (24) with (26), and for X1 = X2 = 0:

 
image file: d5sm01209k-t26.tif(27)
The concentration gradients of the desorption process from (27) are given in Fig. 3C.

Alternatively, we can consider the case when the analyte within the film is at a constant uniform concentration X0, and, as before, the initial conditions are given by X1 = X2 = 0. Applying these boundary conditions to (24) gives

 
image file: d5sm01209k-t27.tif(28)
These gradients are presented in Fig. 3E.

4.2. Analyte flow through the free-standing film

Many researchers determine the diffusion constant, and the solubility of the analyte in the film using the rate, dQ/dt, at which the analyte emerges from the low-concentration side of the film. The rate of analyte emerging from the film is given by13
 
image file: d5sm01209k-t28.tif(29)
and can then be determined from (24) with f(y) = X0 as
 
image file: d5sm01209k-t29.tif(30)
In most experiments the analyte concentration can initially be set to zero, X0 = 0, and the concentration at the low concentration side of the film can also assumed to remain zero, X2 = 0 so that (30) is simplified to
 
image file: d5sm01209k-t30.tif(31)
At steady state t → ∞ and all exponential terms in (31) tend to zero. Only the first two terms in (31) remain, giving a linear concentration gradient between the top and bottom surface of the film.
 
image file: d5sm01209k-t31.tif(32)
With an average concentration of
 
image file: d5sm01209k-t32.tif(33)
This forms a steady-state concentration gradient that is maintained even though analyte continues to flow through the film. From (31) the production at steady state is given as
 
image file: d5sm01209k-t33.tif(34)
The flow rate at steady state is constant at
 
image file: d5sm01209k-t34.tif(35)
and depends on the analyte concentration, X1, at the top (y = d) of the film. The diffusion constant can also be determined from the time lag, i.e. the intercept of (34):
 
image file: d5sm01209k-t35.tif(36)
which no longer depends on the concentration.

4.3. Interface concentration (free-standing film)

 
image file: d5sm01209k-t36.tif(37)
Although the concentrations at the top and bottom surface of the film are bounded by eqn (23) to give X1 and X2, respectively, it is for some experiments important to consider the concentration in a small sliver of the film as it might be interrogated by e.g. surface-specific optical techniques.

Similar to the impermeable membrane, we can find the average analyte concentration for absorption within a region defined by y1 and y2 through integration of (24) with f(y) = X0 to obtain (37).

Assuming that all analyte which is exiting the film is carried away (X2 = 0) and that the initial concentration throughout the film is X0 = 0, the equation for the absorption process becomes:

 
image file: d5sm01209k-t37.tif(38)
Within the range of the evanescent interactions (y1 = 0; y2 = δy), we obtain the simple expression for an analyte uptake process
 
image file: d5sm01209k-t38.tif(39)
which approaches asymptotically the constant concentration
 
image file: d5sm01209k-t39.tif(40)
The blue line in Fig. 3B describes the time evolution of the measured concentration according to (39).

For the two desorption cases (X1 = X2 = 0; f(y) ≠ 0) mentioned above, we can, again, consider a constant initial concentration, X0 = [X with combining macron]y,∞). Within the range of the evanescent interaction, we obtain the integrated expression

 
image file: d5sm01209k-t40.tif(41)
The blue line in Fig. 3D describes the time evolution of the measured concentration according to (41).

Alternatively, we can consider the case with a linear concentration gradient described by (26), and perform a similar integration of (24) within the range of the evanescent field to obtain

 
image file: d5sm01209k-t41.tif(42)
This time evolution is given by the blue line in Fig. 3F.

4.4. Integrated concentration (free-standing film)

When calculating the concentration of analyte upon one-sided absorption into a freestanding film, the average concentration of the analyte across the entire film can be calculated as a function of time by integration of (24) across the film's thickness, d. This corresponds to setting y1 = 0 and y2 = d in (38). The average analyte concentration upon absorption is then given by
 
image file: d5sm01209k-t42.tif(43)
which can be simplified by omitting all terms with zero value from the sum:
 
image file: d5sm01209k-t43.tif(44)
where we, again, assumed that X2 = 0 and that the initial concentration is X0 = 0. The red line in Fig. 3B describes the time evolution of the measured concentration in (44).

For the desorption process we, first, consider a uniform initial concentration, X0 = X. With X1 = X2 = 0 eqn (41) becomes

 
image file: d5sm01209k-t44.tif(45)
The red line in Fig. 3D describes the time evolution of the measured concentration according to (45). If we, instead, start out with a concentration gradient as in (26), the average analyte in the film during desorption is given by:
 
image file: d5sm01209k-t45.tif(46)
This time evolution is given by the red line in Fig. 3F. In all figures shown here, we included fifty exponential terms.

5. Estimate of improvement over single-term fits

How much error is introduced by terminating the infinite sums after the first term? In the following, we synthesize noisy data points for the uptake of an analyte into a supported film expected from eqn (17) or (21) each having 20 terms in the sum. We then fit the data using both the accurate equations and the one-term approximation and compare the error introduced by terminating the sum after just one term.

As mentioned, many reported diffusion constants are obtained using the uptake eqn (1) which may be seen as a one-term approximation of (17) or (21)

 
image file: d5sm01209k-t46.tif(47)
with the characteristic diffusion time
 
image file: d5sm01209k-t47.tif(48)
In (47) we included a time lag term, dt, to account for the offset that is observed in concentration measurements in evanescent field interactions.

The accurate equations for the concentration near the support are instead given by eqn (17)

image file: d5sm01209k-t48.tif
where we assumed that the evanescent field depth, δy, is very small compared to d. When the concentration is measured, instead, over the entire film, we used eqn (21)
image file: d5sm01209k-t49.tif
The systematic error that is introduced by neglecting all higher terms in the expansion and using (47) instead of (17) or (21) depends somewhat on the properties of the dataset. Here, we considered only datasets containing 600 data points and, also, introduced about 1% of amplitude noise to simulate experimental concentration measurements and corresponding fitting errors.

Given the strong deviation of (47) compared to (17) or (21) at early times, we found that the systematic error of the fit to eqn (47) depended on the fraction of fitted data that fall into the early segment of the curve, i.e. when t < 5τ.

To estimate the error in D that is introduced by fitting to (47) instead of (17) or (21) we synthesized datasets with common d = 10 µm, each sampled for 300 s with a sampling rate of 2 Hz (600 data points). To change the diffusion time, τ, with respect to the length of the sampling window, ΔtS, we produced 1000 datasets having values of D from D = 1.0 × 10−8 cm2 s−1 (τ = 40.5 s) to D = 0.1 × 10−8 cm2 s−1 (τ = 405 s), while keeping the size of the sample window constant at ΔtS = 300 s. In each case, the simulated data is fit using a least-squares method with the diffusion constant, D, and asymptotic concentration, C1, as the fitting parameters.

Fig. 4A and B show the systematic error of the diffusion constant, D, as a function of the relative sampling windows length, i.e. as ΔtS/τ. It is apparent that for all models the error is reduced when the concentrations are sampled to within about 1% of the asymptotic limit, i.e. when ΔtS > 5τ.

It is also apparent that the approximate solutions of (47) (red and purple curves) are inferior compared to the exact solutions (green and blue curves) given by (17) (Fig. 4A) and (21) (Fig. 4B).


image file: d5sm01209k-f4.tif
Fig. 4 (A) Fractional fit error of diffusion constant, D, as a function of the number of characteristic diffusion times, τ, sampled for evanescent film concentration, and (B) for average film concentration using synthetic data. Both plots show the error obtained when using the approximate solution, eqn (47), with (red) and without time lag (purple) as a fitting parameter. The blue and green curves show the fit error when using the exact solutions, (17) and (21), with and without time lag, respectively. The dashed lines represent the fit error for a dataset sampled for 5τ. (C) Synthetic data sampled for 5τ for evanescent wave measurement, and (D) average concentration measurement, fit with, both approximate and exact solutions with and without time lag as a fitting parameter.

The fractional error associated with the fit δD/D is listed in the last column of Table 1. It was obtained by fitting multiple synthetic uptake curves with τ = 5ΔtS having 1% random noise. The error is therefore comprised of the fitting uncertainty (<1%) and the systemic error arising from the quality of the model.

Table 1 Systematic fractional error in the determination of the diffusion constant D, when using different equations for the fit to the synthetic data in Fig. 4. The asterisk indicates that the error is dominated by the uncertainty in the fit. The colours correspond to the line colours in Fig. 4. Details are given in the text
image file: d5sm01209k-u1.tif


When the time lag, dt, was added as a fitting parameter, the quality of the fit to the approximate eqn (47) improved (red curves). The fitted time lag is positive for the evanescent field measurements (Fig. 4A and C, Table 1) as expected. When fitting the integrated concentration measurements (Fig. 4B and D) we found, however, that dt < 0. This unphysical solution illustrates the limitations of the approximate model of (47).

Introducing the time lag, dt, as a fitting parameter for the exact equations provides no advantage. First, the time lag determined from the fit is only 1 s or less in a 300 s sampling window and has a fitting error of similar magnitude. More importantly, the determination of the diffusion constant does not substantially improve by including the time lag as an additional parameter. If the start point of the process is well known, it should not be necessary to include the time lag parameter in the fit.

6. Conclusions

It may be surprising that a discussion of one-dimensional diffusion processes is of relevance nearly 70 years after Crank laid the foundation with his mathematical models. This paper should have been published 65 years ago – well before the authors were born.

And, yet, it appears that the exact numerical models collected and provided by Crank have either been forgotten or have not been commonly applied. To the best of our knowledge, there are no reports, yet, of the integrated equations that are required for fitting experimental data.

We hope that our work may help those who need to extract accurate diffusion constants from experimental data, and believe that future diffusion models no longer have to rely on a first-order approximation as given in (1).

We presented only 1-D diffusion through a plane sheet, but those models are readily expanded to other diffusion geometries. In the 1950s Crank already discussed diffusion through a cylinder and through a sphere,1 and these expressions may be integrated similarly to those for the plane sheet.

Time-varying concentrations are posing another interesting variant of the diffusion problem. We believe that they may be best addressed by treating, for example, (17) or (21) as equivalent to transfer functions, that describe the impulse response of a system. The system's response to more complex inputs such as varying concentration, thickness, or even diffusion rate may then be calculated using the respective Laplace transforms.

Finally, we emphasize that it is much easier to control “experimental parameters” in simulations than in experiments. Diffusion constants may be erroneous or have large uncertainties due to many experimental uncertainties. For example, in this study we assumed that the uncertainty (or variation) of the film's thickness, d, does not limit the accuracy of the measurement of the diffusion constant, D. As is apparent from all integrated equations, a 10% experimental error in d generates a 21% error in D. Experimental uncertainties can therefore also contribute to the decrease of accuracy of the value of the measured diffusion constant.

7. MatLab functions

To make the – admittedly confusing – equations somewhat more accessible we provide the key equations using Matlab code. In the supplementary information eqn (16), (18), (20) and (22) for a film mounted on an impermeable substrate are given as Matlab functions to which experimental data may be fit. We also provide Matlab functions for (39), (41), (42), (44), (45), and (46) that describe absorption and desorption of analyte into a free-standing film. These functions are illustrated in the right columns of Fig. 2 and 3. The average concentrations are calculated either by integrating over a small sliver of the film (red lines) or over the entire film (blue lines). The former is relevant, for example, for evanescent field or plasmonic interaction measurements. The latter pertains to gravimetric, optical absorption or bulk refractive index measurements of concentration.

In the SI we also provide the equations to generate the concentration gradients and provide examples for the use of some of these functions.

Author contributions

The mathematical models were developed jointly by JB and SD, and the effort was coordinated by HPL who also initiated this study. The Matlab code was written by SD and HPL. The manuscript was written with equal contributions from all authors.

Conflicts of interest

There are no conflicts to declare.

Data availability

No experimental data were generated or used in the course of this study.

In the supplementary information (SI) we provide the code for 10 Matlab functions as described in Section 7. See DOI: https://doi.org/10.1039/d5sm01209k. All these functions and an example of their use, specifically their use to generate Fig. 2 of the main text, can also be downloaded from: Swapnil-dx/integrated-diffusion-equations-for-polymers: diffusion kinetics equations (Matlab) (v1.1.1). Zenodo. https://doi.org/10.5281/zenodo.17832809.

Acknowledgements

We thank Dr John Saunders for the initial motivation of this work and for providing a helpful discussion of the problem in his Dissertation. The authors acknowledge financial support by the Natural Sciences and Engineering Research Council (NSERC) of Canada and by the University of Victoria.

References

  1. J. Crank, The mathematics of diffusion, Clarendon Press, Oxford, 1956 Search PubMed.
  2. C. M. Balik, Macromolecules, 1996, 29, 3025–3029 CrossRef CAS.
  3. J. E. Saunders, H. Chen, C. Brauer, M. Clayton and H. P. Loock, Soft Matter, 2018, 14, 2206–2218 RSC.
  4. J. E. Saunders, H. Chen, C. Brauer, M. Clayton, W. Chen, J. A. Barnes and H. P. Loock, Soft Matter, 2015, 11, 8746–8757 RSC.
  5. H. Megahd, M. Carlotti, M. Martusciello, L. Magnasco, A. Pucci, D. Comoretto and P. Lova, Adv. Sens. Res., 2024, 3, 2300114 Search PubMed.
  6. M. Prabhugouda, M. T. Lagare, N. N. Mallikarjuna, B. V. K. Naidu and T. M. Aminabhavi, J. Mol. Liq., 2005, 116, 51–54 CrossRef CAS.
  7. H. Chen, J. E. Saunders, S. Borjian, X. Wu, C. M. Crudden, D.-X. Xu and H.-P. Loock, Adv. Sustainable Syst., 2019, 3, 1800084 CrossRef.
  8. R. L. Shang, Y. D. Deng, W. D. Bao, X. C. Cai, L. Cao, Y. X. Liu, F. F. Cong, H. Y. Zhang, X. Z. Wang, X. Yan and J. Xie, ACS Appl. Mater. Interfaces, 2024, 16, 64907–64915 CrossRef CAS PubMed.
  9. S. J. Lue, S. F. Wang, L. D. Wang, W. W. Chen, K.-M. Du and S. Y. Wu, Desalination, 2008, 233, 277–285 Search PubMed.
  10. D. Kouzoudis, T. Baimpos and G. Samourgkanidis, Sensors, 2020, 20, 3251 CrossRef CAS PubMed.
  11. J. E. Saunders, PhD thesis, Queen's University, 2016.
  12. L. S. Zhou, A. Wanga, S. C. Wu, J. Sun, S. Park and T. N. Jackson, Appl. Phys. Lett., 2006, 88, 083502 CrossRef.
  13. This equation difffers from Crank's equation by a negative sign due to our coordinate system that places the high-concentration, X1, side of the film at the position y = d.

This journal is © The Royal Society of Chemistry 2026
Click here to see how this site uses Cookies. View our privacy policy here.