Bernaise (Binary Electrohydrodynamic Solver) is a flexible high-level finite element solver of two-phase electrohydrodynamic flow in complex geometries. Two-phase flow with electrolytes is relevant across a broad range of systems and scales, from 'lab-on-a-chip' devices for medical diagnostics to enhanced oil recovery at the reservoir scale. For the strongly coupled multi-physics problem, we employ a recently developed thermodynamically consistent model which combines a generalized Nernst-Planck equation for ion transport, the Poisson equation for electrostatics, the Cahn-Hilliard equation for the phase field (describing the interface separating the phases), and the Navier-Stokes equations for fluid flow. As an efficient alternative to solving the coupled system of partial differential equations in a monolithic manner, we present a linear, decoupled numerical scheme which sequentially solves the three sets of equations. The scheme is validated by comparison to limiting cases where analytical solutions are available, benchmark cases, and by the method of manufactured solution. The solver operates on unstructured meshes and is therefore well suited to handle arbitrarily shaped domains and problem set-ups where, e.g., very different resolutions are required in different parts of the domain. Bernaise is implemented in Python via the FEniCS framework, which effectively utilizes MPI and domain decomposition, and should therefore be suitable for large-scale/high-performance computing. Further, new solvers and problem set-ups can be specified and added with ease to the Bernaise framework by experienced Python users. * linga@nbi.dk arXiv:1805.11642v1 [physics.comp-ph] 29 May 2018 Two-phase flow with electrolytes is encountered in many natural and industrial settings. Although Lippmann already in the 19th century [1, 2] made the observation that an applied electric field changes the wetting behaviour of electrolyte solutions, the phenomenon of electrowetting has remained elusive. Recent decades have seen an increased theoretical and experimental interest in understanding the basic mechanisms of electrokinetic or electrohydrodynamic flow [3,4]. Progress in micro-and nanofluidics [5,6] has enabled the use electrowetting to control small amounts of fluid with very high precision (see e.g. the comprehensive reviews by Mugele and coworkers [2,7] and Nelson and Kim [8] and references therein). This yields potential applications in, e.g., "lab-on-chip" biomedical devices or microelectromechanical systems [9][10][11], membranes for harnessing blue energy [12], energy storage in fluid capacitors, and electronic displays [13][14][15][16].It is known that electrohydrodynamic phenomena affects transport properties and energy dissipation in geological systems, as a fluid moving in a fluid-saturated porous medium sets up an electric field that counteracts the fluid motion [17][18][19]. Electrowetting may also be an important factor in enhanced oil recovery [20,21]. Here, the injection of water of a particular salinity, or "smart water" ...