Computers & Geosciences 29 (2003) 301–318 Reactive transport in surface sediments. II. Media: an object-oriented problem-solving environment for early diagenesis Filip J.R. Meysman a, *, Jack J. Middelburg b , Peter M.J. Herman b , Carlo H.R. Heip b a Marine Biology Department, Ghent University, K.L. Ledeganckstraat 35, Gent 9000 , Belgium b The Netherlands Institute of Ecology (NIOO-KNAW), Korringaweg 7, Yerseke 4401 NT, The Netherlands Received 1 December 2001; received in revised form 22 May 2002; accepted 22 May 2002 Abstract The MEDIA (Modelling Early DIAgenesis) software package comprises a flexible and extensible software system that provides problem-solving assistance for simulating 1D reactive transport in surface sediments. MEDIA allows multiple diagenetic models to be built by extending a model template with new model components from a toolbox of available objects (elements, species, parameters, reactions). A detailed review is given of the transport and reaction components available for model construction. Upon assemblage, the model is channelled to the numerical subunit of the MEDIA package. Via a canonical transformation, the user-defined mixed kinetic-equilibrium model is rearranged into a proper set of differential algebraic equations (DAE), for which both steady state and transient solutions can be calculated. Steady-state profiles are obtained either directly using a Newton–Raphson method, or alternatively, as the asymptotic result of a dynamic simulation. Dynamic simulations involve a global implicit procedure based on the stiff- ODE solver package VODE, employing a direct substitution approach to reduce the number of equations in the DAE system. Verification of the MEDIA code was accomplished (1) by comparison with analytic models and (2) by emulating the model formulation and output of the existing diagenetic model code STEADYSED. As an example application, a diagenetic model was constructed to analyse an extensive dataset collected from a marine sediment in the Santa Barbara Basin (California). The different pathways of organic matter mineralization were modelled, and the coupling among the biogeochemical cycles of C, O, N, S, Mn and Fe was investigated. Depth profiles of both porewater and solid-phase constituents could be reproduced with great accuracy. r 2003 Elsevier Science Ltd. All rights reserved. Keywords: Reactive transport modelling; Early diagenesis; Biogeochemical cycling; Mixed kinetic-equilibrium problem; Direct substitution approach 1. Introduction In recent years, a number of studies have illustrated the capabilities of sophisticated reactive transport codes for the integrated modelling of biogeochemical cycles in surface sediments (Soetaert et al., 1996b; Wang and Van Cappellen, 1996; Boudreau et al., 1998; Herman et al., 2001). Although powerful applications, current numer- ical model codes have a number of severe limitations, as *Corresponding author. Present address: The Netherlands Institute of Ecology (NIOO-KNAW), Korringaweg 7, Yerseke 4401 NT, The Netherlands. Tel.: +31-113-577-489; fax: +31- 113-573-616. E-mail address: f.meysman@nioo.knaw.nl (F.J.R. Meysman). 0098-3004/03/$ - see front matter r 2003 Elsevier Science Ltd. All rights reserved. doi:10.1016/S0098-3004(03)00007-4