OpenFOAM
OpenFOAM is an open source CFD library supporting single and multiphase-simulation of laminar and turbulent flows. Moreover, modelling of electric field and current as well as magnetic fields and electrochemistry is easily possible.
OpenFOAM is used intensively at HZDR for the simulation of liquid metal batteries. HZDR supports actively the development of OpenFOAM by integrating developed models into the official OpenFOAM software or providing the developed solvers as open-source.
Moreover, also software developed in other programming language, such as Python, is published as open-source.
Simulation of flow and mass transfer in electrolytes
In oder to quantify the influence of convection in the electrolyte on the performance of liquid metal batteries, a model has been developed which solves the Species-Transport equations, the flow and the electric potential in the electrolyte of the cells.
Source code: https://doi.org/10.14278/rodare.3414, Version: OpenFOAM v2006
- Duczek et al., Solutal convection in Na–Zn liquid metal batteries and its impact on self-discharge,
Physics of Fluids 37(2025) 023370
Diffusive mass transfer in electrolytes
In order so simulate liquid metal batteries, a model has been developed which describes the mass transfer also in the electrolyte of such cells.
Source code: https://doi.org/10.14278/rodare.2312, Version: OpenFOAM v2006
- Duczek et al., Simulation of potential and species distribution in a Li||Bi liquid metal battery using coupled meshes,
Electrochimica Acta 437(2023) 141413
Modelling of the influence of flow on cell voltage
By coupling a flow model with a cell potential model the influence of mass transfer on the cell performance of liquid metal batteries can be well described.
Source code: will be provided soon
- Weber et al., Numerical simulation of mass transfer enhancement in liquid metal batteries by means of electro-vortex flow,
Journal of Power Sources Advances 1(2020) 100004
Simulation of solutale and thermal convection in liquid metal batteries
For simulating the interaction of solutal with thermal convection in liquid metal batteries, a model has been developed which describes flow in both the electrodes, and electrolyte in a coupled way.
Source code: https://doi.org/10.14278/rodare.3596, Version OpenFOAM-v2006
- Personnettaz et al., Layer coupling between solutal and thermal convection in liquid metal batteries,
International Journal of Heat and Mass Transfer 188(2022) 122555
Cell voltage model for Li-Bi liquid metal batteries
The cell potential of Li-Bi cells can be approximated by a simple 1-dimensional model.
Source code: https://doi.org/10.14278/rodare.1368, Version: Python 3
- Weber et al., Cell voltage model for Li-Bi liquid metal batteries,
Applied Energy 209(2022) 118331
Modelling of fuel cells
A three-dimensional model to simulate fuel cells has been developed, which describes all major effects.
Source code: https://gitlab.com/dl6tud/fuelcellfoam, Version: OpenFoam v2112
- Weber et al., Open-source computational model for polymer electrolyte fuel cells,
OpenFOAM Journal 2(2023) 26-48
Modelling electrode-reactions with diffusive mass transfer
The cell potential of liquid metal batteries is generated at their electrodes. The electrochemical double layer can be described in a simplified manner as jump in the electric potential, which is implemented by a modified Laplace and gradient term into the finite-volume method.
Source code: will be provided soon
- Weber et al., Modeling discontinuous potential distributions using the finite volume method, and application to liquid metal batteries,
Electrochimica Acta 318(2019) 857-864
Modelling droplet movement in liquid metal batteries
Describing the movement of metal droplets in between the electrodes of liquid metal batteries requires simulating the current and magnetic field distribution within a multiphase model.
Source code: will be provided soon
- Bénard et al., Anode-metal drop formation and detachment mechanisms in liquid metal batteries,
Journal of Power Sources 510(2021) 230339
Thermal convection in multiphase systems
A solver to simulate thermal convection in liquid metal batteries based on a multiphase model has been developed.
Source code: will be provided soon
- Personnettaz et al., Thermally driven convection in Li||Bi liquid metal batteries,
Journal of Power Sources 401(2018) 362-374
Interfacial intabilities
The simulation of interfacial instabilities requires coupling of the current and magnetic field distribution with a multiphase model.
Source code: will be provided soon
- Weber et al., Sloshing instability and electrolyte layer rupture in liquid metal batteries,
Physics of Fluids 29(2017), 044101
Electro-vortex flow
Electro-vortex flows appear in many liquid conductors. Their modelling requires typically the coupling of liquid with solid conductors as well as the computation of magnetic fields via Biot-Savart's law.
Source code: will be provided soon
- Weber et al., Electro-vortex flow simulation using coupled meshes,
Computers and Fluids 168(2018) 101-109
Tayler-Instability
The simulation of the Tayler instability, which is known from astrophysics and liquid metal battery research requires computing current and magnetic field distributions via Biot-Savart's law.
Source code: will be provided soon
- Weber et al., Numerical simulation of the Tayler instability in liquid metals,
New Journal of Physics 15(2013), 043034
WeightedFlux interpolation scheme
Computing mass or heat fluxes or electric current densities, the velocity, temperature or electric potential needs to be interpolated between cell centres and cell faces. In order to achieve exact results, the interpolation scheme needs to account for the diffusivities or the thermal or electric conductivities.
Source code: available since OpenFOAM-v1912, Version: since OpenFOAM-v1912
- Weber et al., Electro-vortex flow simulation using coupled meshes,
Computers and Fluids 168(2018) 101-109
Function Object "Capillary Courant Number"
Simulating multiphase flows using the volume-of-fluid method, unphysical ("spurious") velocities appear at the interfaces. These velocities can be reduced by several orders of magnitude by defining the time step of the simulation based on the capillary velocity.
Source code: will be provided soon
- Personnettaz et al., Thermally driven convection in Li||Bi liquid metal batteries,
Journal of Power Sources 401(2018) 362-374
Ultrasound-beam model
An ultasound beam measures the velocity in a certain volume. In order to compare simulated velocities with experiments, and appropriate beam model has therefore been developed.
Source code: https://doi.org/10.14278/rodare.3399, Version: OpenFOAM-v2406
- Ashour et al., Competing forces in liquid metal electrodes and batteries,
Journal of Power Sources 378(2018) 301-310
PCG solver
When solving the pressure equation, the pressure has to be fixed at a certain point. This can lead sometimes to convergence problems. Therefore, a PCG solver has been developed which fixes the integral of the pressure.
Source code: https://doi.org/10.14278/rodare.3401, Version: OpenFOAM-v2406
- Weber et al., Electro-vortex flow simulation using coupled meshes,
Computers and Fluids 168(2018) 101-109
Simulation of 3D electromagnetic eddy-current driven flows
Source code: https://codebase.helmholtz.cloud/galindo/foam-extend, submodule of foam-extend-4.1
- Beckstein, P.; Galindo, V.; Vukčević, V.: Efficient solution of 3D electromagnetic eddy-current problems within the finite volume framework of OpenFOAM,
Journal of Computational Physics, Volume 344, 1 September 2017, Pages 623-646 - Beckstein, P.; Galindo, V.; Gerbeth, G.: Free-Surface Dynamics in Induction Processing Applications.
(2019) Nóbrega J., Jasak H. (eds) OpenFOAM®. Springer, Cham. - Beckstein, P.: Methodenentwicklung zur Simulation von Strömungen mit freier Oberfläche unter dem Einfluss elektromagnetischer Wechselfelder
(2018) PhD Thesis