BattMo
BattMo is an open source simulation code for continuum modelling of electrochemical devices written in Matlab and Julia
Developing a simulator takes more than implementing equations. Physical models, numerical methods and software must work together, and the resulting tool must support testing, extension and adaptation to new requirements. We develop frameworks that simplify this process and use them to explore new ideas and build simulators for demanding applications.
We can help you:
Do you have a model you want to implement or a simulator that needs new capabilities? Contact our Applied Computational Science research group.
A well-designed software architecture allows one part of a simulator to change without requiring the rest to be rewritten. We develop abstractions and interfaces that separate physical models, computational grids, discretisation, time stepping and numerical solvers. This allows the same model to be investigated using different methods, while numerical components can be reused across models.
Discrete operators hide grid details and allow model equations to be expressed in code that closely follows their mathematical formulation. Automatic differentiation supplies the derivatives required by the solvers, while computational graphs manage dependencies between quantities and avoid unnecessary calculations. Together, these techniques simplify the introduction of new constitutive laws, the coupling of submodels and the extension of existing simulators.
New models and methods need to be explored before their potential justifies a larger development effort. Our frameworks provide established components for computational grids, physical properties, discretisation and equation solving. This allows development to focus on what is new.
A prototype can help establish whether a model captures the intended phenomena, compare numerical methods or identify computational bottlenecks. We emphasise early testing on relevant problems, so that assumptions that work in small examples are also examined as the complexity increases.
The prototype can be developed further within the same framework or serve as the basis for implementation in another codebase. Through our collaborations with energy companies and software vendors, we have experience with both approaches.
Flexible software must also deliver efficient computations. We work on the interplay between model formulation, data structures, memory use and numerical algorithms. This includes efficient assembly of equation systems, exploiting sparsity, and adapting computations for parallel execution and modern hardware.
Verification and testing are integral to development. We use conservation laws, known solutions, convergence studies and comparisons with other simulators to check that implementations behave as intended. Representative models and regression tests help establish how new capabilities affect accuracy, robustness and runtime.
We have more than 20 years of experience developing and maintaining open-source software used in research and industry. Access to the source code makes it possible to inspect model assumptions and implementations, reproduce calculations and build on existing work. It also provides common ground for collaboration between researchers, software developers and domain specialists.
Our experience includes MRST, OPM Flow, Jutul and JutulDarcy, as well as BattMo for electrochemical modelling. These tools span different programming languages, architectures and applications. Developing them has given us a broad basis for assessing which approaches suit a new development task.
We also contribute to in-house and commercial simulators. A collaboration may involve developing methods, building prototypes, implementing new capabilities or improving specific components. The use of open-source frameworks is agreed according to project requirements and licence terms; the resulting customer solution does not necessarily have to be released as open source.
A simulator often needs to work alongside tools for data processing, model calibration, optimisation and analysis. We therefore emphasise clear interfaces and access to models, parameters and results for further computation.
Differentiable simulation and sensitivity analysis can be supported from the outset, enabling the simulator to participate in model calibration and gradient-based optimisation. Well-designed interfaces, documentation and informative error messages also support automated workflows and the use of AI agents. These capabilities depend on architectural choices and are best considered early in development.
Our two MRST books show how mathematical models and numerical methods can be turned into working simulators. Although the examples concern flow in porous media, many of the principles of software design, discretisation and implementation apply to other areas of simulation. Both books are freely available and accompanied by code examples.
BattMo is an open source simulation code for continuum modelling of electrochemical devices written in Matlab and Julia
Fimbul is a modern open-source software package developed in Julia for the simulation and analysis of geothermal reservoirs and thermal energy storage systems. The tool makes it easy to explore, compare, and optimize a wide range of geo-energy...
A GPU-accelerated simulation framework for running large ensembles of simplified ocean models for real-world domains.
Experimental Julia framework for fully differentiable multiphysics simulators based on implicit finite-volume methods with automatic differentiation.
A free open-source community code for rapid prototyping of new methods for modelling and simulation of flow in porous media. Has a large user community from all over the world.
MRST-co2lab offers a set of open-source simulators and workflow tools that have been specially designed for the study of long-term, large-scale storage of CO2.
The Open Porous Media (OPM) initiative provides open-source software for simulation, upscaling and visualization of porous media processes, in particular subsurface reservoirs.
Software for static modeling and prediction of surface water and urban flooding based on analysis of topography/terrain.