Papers
Topics
Authors
Recent
Search
2000 character limit reached

MetaboliSim: a Python implementation of the Mader model for dynamic and steady-state simulation of muscular energy metabolism

Published 6 Jun 2026 in q-bio.QM and cs.MS | (2606.08366v1)

Abstract: The Mader model is the most widely used mathematical framework for muscular energy metabolism in German-language sport science, underpinning lactate diagnostics, maximal lactate steady state (MLSS) estimation and training prescription. Despite decades of use, neither its dynamic ODE formulation nor its steady-state equations have been available as open code, leaving results based on the model impossible to reproduce independently. We close this gap with MetaboliSim, an open-source Python implementation of both formulations: a dynamic model that integrates the five-variable ODE system (phosphate potential, V˙O<em>2\dot{V}\mathrm{O}<em>2, muscle and blood lactate, and glycogen) with a fourth-order Runge-Kutta scheme, and a steady-state model that computes MLSS power and the lactate-power relationship in one- and two-compartment variants. We verified implementation correctness against published reference values and assessed physiological plausibility across constant-load, step-test, sprint and running protocols. The implementation reproduces the published reference output within stated tolerances and remains numerically stable throughout (halving the time step changes blood lactate by less than 0.01 mmol/L), with both formulations yielding congruent MLSS estimates. Key physiological behaviour (V˙O2\dot{V}\mathrm{O}_2 on-kinetics, lactate accumulation, PCr dynamics and the sub/supra-MLSS separation) emerges directly from the model equations without protocol-specific tuning, and a sensitivity analysis shows MLSS power varying approximately linearly with V˙O</em>2max\dot{V}\mathrm{O}</em>{2\max} and nonlinearly with V˙Lamax\dot{V}\mathrm{La}_{\max}. As the first openly available implementation of the complete Mader model (AGPL-3.0), MetaboliSim lets independent groups reproduce, verify and build on published model-based results. Source code: https://codeberg.org/3phos/metabolisim; Platform: https://metabolisim.org

Summary

  • The paper introduces the first complete open-source Python implementation of the Mader model, combining dynamic ODE and algebraic steady-state formulations with verification tools and an interactive Shiny interface.
  • The implementation reproduces published reference values, including 16.46 mmol/kg muscular PCr and 1.09 mmol/L blood lactate at 50 W, while typical simulations run in approximately 50 ms.
  • The model demonstrates qualitative physiological behavior and MLSS agreement within 5–10 W across formulations, but requires external validation against measured oxygen kinetics, metabolites, and experimentally determined MLSS.

MetaboliSim is an open-source Python implementation of the Mader model of muscular energy metabolism, released under AGPL-3.0 (2606.08366). The paper's contribution is deliberately infrastructural rather than theoretical: the Mader model has anchored lactate diagnostics, MLSS estimation, and training prescription in German-language sport science for decades, yet neither its dynamic ODE formulation nor its algebraic steady-state formulation had previously existed as inspectable code. The only commercial implementation (INSCYD) is proprietary and discloses no numerical methods, so published model-based results have not been independently reproducible. MetaboliSim closes that gap by providing both formulations, a verification suite, and a Shiny-based interactive interface.

Model structure and formulations

The Mader model represents ATP turnover in working skeletal muscle as the balance of three supply pathways—the creatine-kinase (CK) equilibrium buffering ATP via the PCr shuttle, anaerobic glycolysis, and oxidative phosphorylation—against mechanical demand, with gluconeogenesis resynthesising glycogen from lactate at an energetic cost. Regulation is mediated by ADP (derived from coupled CK and adenylate-kinase equilibria), which activates both glycolysis and oxidation via Michaelis–Menten kinetics with Hill cooperativity, and by intracellular pH, which allosterically inhibits phosphofructokinase.

The dynamic formulation integrates five state variables: the global phosphate potential GP = ATP + PCr, muscle oxygen uptake VV, muscle and blood lactate, and glycogen. Using GP rather than PCr as the integrated state avoids an implicit algebraic constraint at each step; PCr is recovered after each step by Newton iteration on the CK/AK equilibrium. The steady-state formulation sets all derivatives to zero and yields the lactate–power relationship and the maximal lactate steady state (MLSS). The paper makes explicit that MLSS power and the corresponding lactate concentration (maxLassmaxLa_{ss}) are not measured quantities but emergent properties of the balance between glycolytic production and maximal oxidative elimination. In the one-compartment limit, steady-state blood lactate diverges as the production deficit approaches zero, so MLSS is found by bisection; the two-compartment formulation instead exhibits a finite bifurcation detected via the Jacobian eigenvalues of the lactate subsystem.

Numerical implementation

The ODE system is integrated with classical RK4 using "frozen metabolic coefficients": all enzymatic rates are evaluated once per step and held constant across the four RK4 stages, following the original strategy of Mader. This decouples the fast CK/AK equilibration (milliseconds) from slow lactate diffusion (minutes) and avoids oscillatory coupling, though the authors note that a formal stiffness analysis was not performed and that a fully implicit BDF or Radau solver would be the cleaner treatment. An adaptive RKF45 option with embedded error estimation is provided. Numerical safeguards include physiological bounds on state variables, guarded logarithmic arguments, and a bisection fallback for the PCr Newton solver.

The software is layered so that the model layer depends only on NumPy, SciPy and Pandas, with no UI dependencies; parameters are immutable dataclasses, making every simulation exactly reproducible from its inputs.

Verification and numerical performance

Following verification-and-validation terminology, the paper claims numerical correctness rather than physiological validation. The implementation reproduces the published reference values of Heck et al. under standardised conditions (50 W for 600 s): PCr of 16.46 mmol/kgm_m and blood lactate of 1.09 mmol/L, within stated tolerances. Halving the time step from 0.1 s to 0.05 s changes 5-minute blood lactate by less than 0.01 mmol/L, and the PCr Newton iteration converges to residuals below 101210^{-12} mmol/kgm_m in 4–6 iterations at every step. Execution times are short enough for interactive and batch use: a 300 s constant-load simulation completes in roughly 50 ms, the full steady-state intensity grid (900 power points) in 15–80 ms, and a nine-point V˙O2\dot V O_2 parameter sweep in under 150 ms.

Physiological plausibility is demonstrated across protocols without protocol-specific tuning. Constant-load simulations show mono-exponential V˙O2\dot V O_2 on-kinetics, PCr buffering at exercise onset, and sub-MLSS lactate stabilisation. A simulated step test reproduces the characteristic exponential lactate–power response, and a 500 W sprint to exhaustion yields peak blood lactate of approximately 12–18 mmol/L at 2–4 minutes post-cessation with the expected post-exercise overshoot. Running simulations at five velocities reproduce the classical sub-/supra-MLSS separation (steady lactate below ~3.2 m/s, continuous accumulation above), using the historical V˙\dot V–velocity relationship without re-parameterising the core metabolic equations.

MLSS congruence and sensitivity

The one- and two-compartment steady-state models yield MLSS estimates within 5–10 W of each other, and the dynamic model converges below MLSS to the algebraic steady-state lactate within 3–10 minutes of simulated time. A self-consistency check fits V˙\dot V to synthetic step-test lactate data generated by the dynamic model itself, recovering 58.4 mL/min/kg against a true value of 60.0 (RMSE 0.11 mmol/L); the systematic underestimation is attributed to 5-minute stages not fully reaching equilibrium at higher intensities. The authors are explicit that this is an internal consistency check, not validation, since data and model share the same equations. Sensitivity analysis shows MLSS power varying approximately linearly with V˙\dot V and nonlinearly (and antagonistically) with maxLassmaxLa_{ss}0, the maximal glycolytic lactate production rate.

Limitations

The authors state plainly that the work establishes numerical correctness and qualitative plausibility but not quantitative validity: no comparison against measured maxLassmaxLa_{ss}1 kinetics, invasive muscle metabolites, or directly determined MLSS has been performed, and this external validation is identified as the primary open objective now enabled by the open code. Several further caveats apply. Five of the seventeen default parameters are effective fitting values with no direct experimental correlate, and predictions near MLSS are sensitive to them; the two-parameter athlete characterisation (maxLassmaxLa_{ss}2, maxLassmaxLa_{ss}3) can yield non-unique solutions when fitted jointly to sparse data. The default creatine pool (23 mmol/kgmaxLassmaxLa_{ss}4) sits at the low end of the literature range (30–40), and the default muscle-level time constant (5 s) is faster than pulmonary phase-II kinetics (20–50 s), which the authors justify as reflecting intramuscular rather than pulmonary dynamics. The model treats muscle as a single homogeneous compartment, ignoring fibre-type heterogeneity and non-exercising-tissue contributions, assumes constant mechanical efficiency, and was developed primarily for cycling. Finally, no empirical stiffness analysis of the stiff fast–slow system has been conducted.

Conclusion

MetaboliSim provides the first complete, openly licensed implementation of the Mader model, covering both its dynamic and steady-state formulations with documented numerics, automated verification against published reference values, and demonstrated qualitative physiological fidelity. Its principal value lies in enabling what was previously impossible: independent groups can now reproduce, verify, and externally validate model-based lactate diagnostics and MLSS predictions against experimental data, rather than relying on proprietary tools or re-implementation from primary literature.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.