Jutul.jl: fully differentiable finite-volume simulation in Julia

  • Møyner, Olav (SINTEF Digital)
  • Klemetsdal, Øystein (SINTEF Digital)
  • Brostrøm, Andreas (SINTEF Digital)
  • Krogstad, Stein (SINTEF Digital)
  • Lie, Knut-Andreas (SINTEF Digital)

Please login to view abstract download link

This contribution demonstrates Jutul.jl, a Julia-based open‑source framework for high‑performance, fully implicit finite‑volume simulation, designed from the ground up to be fully differentiable. Taking a no-compromise approach to the use of automatic differentiation in all parts of the software, Jutul enables accurate, end‑to‑end differentiation of complex implicit finite-volume multiphysics simulations. We show how Jutul‑based simulators can be treated as end‑to‑end differentiable operators, enabling efficient computation of sensitivities of quantities of interest with respect to model parameters, initial conditions, and operational controls. Gradients are obtained via the adjoint method [1], and we discuss how the associated backward (adjoint) solve can be performed efficiently by a systematic treatment of variables and parameters and their sparsity, and leveraging detailed knowledge of the underlying finite‑volume discretization. This allows sensitivity analysis and gradient evaluation at a cost that is comparable to that of a forward solve, with respect to any input parameter used in the problem definition. We further demonstrate how these gradients enable low‑cost, gradient‑based optimization for inverse problems and control, including model calibration against reference or observational data, and optimization of time‑dependent control strategies. The approach integrates naturally with modern optimization libraries while retaining full control over timestepping, solver tolerances, and physical constraints. The capabilities of the framework are illustrated using several real‑world case studies. These include Darcy‑scale porous‑media flow problems from geoenergy applications, implemented using JutulDarcy [2] and Fimbul [3], as well as process engineering examples involving simulation and control of volatile organic compounds using VOCSim. Together, these examples demonstrate how differentiable, fully implicit solvers provide a practical and scalable foundation for sensitivity analysis, inversion, and optimal decision‑making in large‑scale science and engineering applications.