Researchers have released an open-source Python package called bryne that is designed to carry finite element simulation code beyond the first working prototype. The software, described in a paper published on 21 September 2026 in the journal Computational Science and Engineering, wraps the DUNE-FEM Python API in a structured framework that separates what a model is from how a particular simulation is configured. According to the authors, Benjamin Terschanski, Robert Klöfkorn, Andreas Dedner and Julia Kowalski, the package addresses a gap that has grown as modern finite element tools have made it dramatically easier to build a first solver but no easier to make that solver maintainable, extensible and reusable by others.
Modern open-source frameworks such as FEniCS, Firedrake and DUNE-FEM already allow modelers to write the weak form of a partial differential equation directly in the Unified Form Language, with the backend handling assembly of the linear system and automatic code generation. This shifts attention away from low-level debugging and toward numerical modeling, and the linear solves typically run in compiled C++ for performance. The authors note, however, that a typical prototype solver lives in a single notebook or Python module in which the static model definition, the solver logic and all scenario-specific inputs, from mesh type and finite element basis to material parameters and solver settings, are tightly intertwined. The input parameter space can become large even for a minimal single-purpose solver, and tracking complex metadata over research project timescales has become a genuine challenge.
The paper introduces the term “sustainable prototyping” to describe the process of moving from a draft solver to numerical software written with two re-user perspectives in mind. For the simulation model developer, the code implementing a solver must be maintainable and extensible. For users and other researchers, simulation setups should be fully transparent without requiring deep knowledge of the solver backend. The authors argue that prototype models are reproducible as functional early samples proving feasibility, but their reusability is limited in several ways: tight coupling of solver logic and simulation setup sacrifices flexibility in changing the application scenario, models cannot easily be generalized or combined in multiphysics simulations, and non-standard interfaces make it hard to compare and archive results.
Bryne tackles this with a modular, object-oriented design built on four pillars. First, a setup infrastructure introduces a semantically structured input directory whose contents are stored with the simulation results, allowing the exact setup to be re-executed and documented for external reproduction. Second, simulations are composed of finite element models implemented as Python classes sharing a common interface, so developers can extend existing models through inheritance. Third, a driver runs the main simulation time loop and executes a user-defined sequence of models at each time step. Fourth, a coupling logic lets models defined on the same discrete grid exchange data in an operator-split fashion. The package deliberately implements no low-level finite element assembly or linear solving itself; it relies on DUNE-FEM, which in turn supports PETSc as a linear solver backend.
The framework’s workflow is illustrated with a cascade of increasingly complex example models. A LaplaceModel class defines the discrete weak form and the operations needed to solve the resulting linear system. A PoissonModel with a spatially varying source term then inherits from it, modifying only the weak form, and a steady linear advection-diffusion model is built on the Poisson model in turn, adding just the advection term and a coupling input for a velocity field. Because the coupling interface is inherited, a transient version of the advection-diffusion equation, discretized with an implicit Euler scheme implemented in UFL syntax, can be combined with other models in the same way as its steady counterpart. Parameters such as the diffusion constant are exposed through model-specific settings classes with documented defaults, loaded from human-readable YAML files rather than hard-coded into the solver.
Coupling in bryne refers strictly to the passing of data between models defined on the same discrete grid at each timestep, not to exchanges across interfaces, different grids or different software packages. Models declare coupling inputs and outputs through three methods, and connections are configured in a coupling.yaml file using a coupling matrix in which each entry indicates whether the i-th model in the sequence takes an input from the j-th model. By default the framework uses weak coupling, solving the model sequence once per timestep, but it also supports strong coupling, in which the sequence is iterated until a convergence criterion based on the change in solution fields between consecutive iterations is met. The driver also supports adaptive mesh refinement on grids such as ALUGrid, driven by user-defined scalar indicator functions that can depend on any current solution field, with initial and per-timestep refinement criteria.
Simulation inputs are provided through a combination of YAML files for static parameters and small, user-modifiable Python scripts imported at runtime, the latter covering cases such as domain setup where YAML is too inflexible. For every run, bryne stores a copy of the entire simulation inputs directory in the output directory, so structured metadata on the exact polynomial type, mesh, convergence tolerances, relaxation factors and material parameters is archived with the results. Because the archived inputs folder contains the full setup, it can be rerun as a bryne simulation given a fixed bryne and DUNE-FEM version, and git metadata such as branch names and commit hashes are stored with the outputs to pin the exact model version behind each result.
To demonstrate the framework in a research context, the authors combined two discontinuous Galerkin solvers that ship with the release and are now open-source for the first time. The StokesBrinkmanDGModel solves the Darcy-Brinkman-Stokes equations for incompressible flow on heterogeneous domains, where the porosity or liquid volume fraction varies between zero, corresponding to no flow, and one, corresponding to Navier-Stokes flow. The ThermochemistryDGModel solves a two-phase energy conservation equation in which the bulk enthalpy of a liquid-solid mixture carries the latent heat contribution implicitly, a nonlinearity that makes the equation challenging to solve by standard means; the authors state that, to their knowledge, this is the first open-source implementation of such a DG-based enthalpy method. In the demonstration, a permeability model forces zero flow in the solid phase and Stokes flow in the liquid, the thermal solver computes temperature and liquid volume fraction, and the flow solver receives the temperature field as a coupling input for a Boussinesq buoyancy term.
The verification and benchmark results published with the article show the framework reproducing established reference solutions. On the one-dimensional Stefan problem, a benchmark for solidification with purely diffusive heat transport, the numerical phase change interface, approximated from the liquid volume fraction contour of 0.5, deviated from the analytical interface location by less than one percent at the final time of 1000 seconds. An almost identical solution was obtained with adaptive mesh refinement on a coarse base mesh of 25 by 1 quadrilateral elements, locally refined and coarsened around the phase change interface in two bisection steps per timestep, using an indicator based on the gradient of the liquid volume fraction. The full convection-coupled benchmark replicates an experimental melting study of Octadecane in a square cavity heated on one side, where natural convection accelerates melting at the top and produces a non-trivial interface. Computed on a 100 by 100 quadrilateral grid with a physical time step of about 3.31 seconds, the temperature and flow fields and the interface location agreed well with the experimental data and previous numerical campaigns, and the enthalpy-based nonlinear update scheme converged reliably in roughly ten nonlinear iterations per timestep.
The authors are candid about limitations. The rigorous weak enforcement of boundary values needed for the discontinuous Galerkin scheme adversely affects the conditioning of the linear system, resulting in costly linear solves in each nonlinear iteration, and they describe the benchmark as an initial physical correctness check, with improved linear solver efficiency and scalability left to future work. The current release focuses on finite element models built from the DUNE-FEM Python API, though many concepts translate to other Python frameworks such as FEniCS or Firedrake, and more complex couplings across different meshes could be realized through an external library such as preCICE. Bryne is released under the GNU General Public License v3.0 or later, with the source repository, a pinned release version, a Docker container with a fixed compatible DUNE-FEM version, and simulation data including inputs and raw figures available through Zenodo, so that other groups can test, extend and reproduce the workflows described in the paper.
Subject of Research: An open-source Python framework for building reusable and reproducible finite element simulation models on the DUNE-FEM backend.
Article Title: Bryne: sustainable prototyping of finite element models
Article References: Terschanski, B., Klöfkorn, R., Dedner, A., & Kowalski, J. (2026). Bryne: sustainable prototyping of finite element models. Computational Science and Engineering, 3(1), Article 9. https://doi.org/10.1007/s44207-026-00015-w
Image Credits: AI Generated
DOI: 10.1007/s44207-026-00015-w
Keywords: bryne, finite element method, DUNE-FEM, open-source software, reproducibility, multiphysics simulation, operator-split coupling, adaptive mesh refinement, phase change, enthalpy method, Python, scientific computing
Cite Scienmag News
Denise Maddox. (October 28, 2026). New Open-Source Python Framework Turns Prototype Finite Element Solvers into Reusable Simulations. Scienmag. https://scienmag.com/new-open-source-python-framework-turns-prototype-finite-element-solvers-into-reusable-simulations/
Denise Maddox. "New Open-Source Python Framework Turns Prototype Finite Element Solvers into Reusable Simulations." Scienmag, 28 October 2026, https://scienmag.com/new-open-source-python-framework-turns-prototype-finite-element-solvers-into-reusable-simulations/. Accessed 28 October 2026.
Denise Maddox. "New Open-Source Python Framework Turns Prototype Finite Element Solvers into Reusable Simulations." Scienmag. October 28, 2026. https://scienmag.com/new-open-source-python-framework-turns-prototype-finite-element-solvers-into-reusable-simulations/








