/BERNAISE

Binary ElectrohydRodyNAmIc SolvEr

Primary LanguagePythonMIT LicenseMIT

BERNAISE

Build Status BERNAISE (Binary ElectRohydrodyNAmIc SolvEr) is a flexible, high-level solver of electrohydrodynamic flows in complex geometries currently under development. It is written in Python and built on the FEniCS project, which in turn effectively interfaces to optimized linear algebra backends such as PETSc.

Buoyancy-driven droplet
Buoyancy-driven droplet.

Colliding oppositely charged droplets
Two colliding oppositely charged droplets. Red: positive charge, blue: negative charge.

Two-phase dielectricum.
Two-phase dielectricum/capacitor. Red: positive charge, blue: negative charge. Top: negative surface charge, bottom: positive surface charge.

Snøvsen. Snøvsen, neutral.
Enhanced oil recovery by application of a surface charge to the pore wall, and ions dissolved in the water phase. The color indicates the charge. The flow is driven by a constant velocity at the top (Couette flow). Left: With (uniform) surface charge, the droplet is released into the bulk. Right: Without surface charge, the droplet stays within the pore. Note that the droplet is slightly asymmetric due to the imposed flow.

Hourglass with surface charge and zero bias pressure Hourglass with surface charge and small bias pressure Hourglass with surface charge and large bias pressure

Hourglass without  surface charge and zero bias pressure Hourglass without surface charge and small bias pressure Hourglass without surface charge and large bias pressure
Enhanced oil recovery in a pore throat by application of a surface charge to the pore wall, and ions dissolved in the water phase. The color indicates the charge (as above). In the four figures to the right, the flow is driven by a pressure difference; in the two to the left there is zero pressure difference between the two sides. Upper: With (uniform) surface charge in the throat, the droplet is released into the bulk even without external forcing. Lower: Without surface charge, the droplet stays within the pore, except for large external forcing.

A dolphin being cleaned from oil spill.
Animal decontamination: A dolphin initially immersed in oil is fully cleaned by the application of surface charge to the dolphin's skin, and ions in the water. Red: positive charge, blue: negative charge.

Features

  • Simulates time-dependent two-phase electrohydrodynamics in 2D using a phase-field approach.
  • Supports complex geometries represented by unstructured meshes.
  • Easy implementation of new problems and solvers.

Planned features (but currently not supported)

  • Adaptive time-stepping.
  • Two-phase EHD in 3D.

Folder structure

* BERNAISE
  * common
    * __init__.py
    * bcs.py
    * cmd.py
    * functions.py
    * io.py
    * recipe.txt
  * problems
    * __init__.py
    * simple.py
    * ...
  * solvers
    * __init__.py
    * basic.py
    * ...
  * tests
    * ...
  * meshes
    * ...
  * utilities
    * extract_polygon.py
    * generate_mesh.py
    * load_mesh.py
    * plot.py
    * units.py
  * documentation
    * ...
  * articles
    * ...
  * README.md
  * sauce.py
  * postprocess.py

Dependencies

  • FEniCS/Dolfin
  • fenicstools (for post-processing)
  • simplejson
  • mpi4py
  • h5py (parallel)
  • numpy
  • skimage (for polygon extraction tool)
  • tabulate (for post-processing)

Contributors

  • Asger Bolet
  • Gaute Linga
  • Joachim Mathiesen
  • Marek Misztal