We present a numerical approach to estimating the effective diffusion coefficients of drug diffusion from a device into a container with a source and sink condition due to a fluid flowing through the system at a constant rate. In this approach we first formulate this estimation problem as a continuous, nonlinear, least-squares problem subject to a set of constraints containing a partial differential equation system. The nonlinear optimization problem is then discretized by applying a finite volume scheme in space and an implicit time-stepping scheme to the equation system, yielding a finite-dimensional, nonlinear, least-squares problem. An algorithm is proposed for the resulting finite-dimensional, constrained, nonlinear optimization problem. Numerical results using experimental data are presented to demonstrate the usefulness and accuracy of the method. © 2014 Springer Science+Business Media Dordrecht.