Skip to content
Snippets Groups Projects
Select Git revision
  • main
  • Coverage
  • gitlab-ci-docker
  • test-install-requirementsshell-executor
  • 1.0
5 results

fxdgm-testing

  • Clone with SSH
  • Clone with HTTPS
  • Forked from Jan Habscheid / fxdgm
    46 commits behind, 1 commit ahead of the upstream repository.

    fxdgm

    Pipeline Status Documentation coverage report DOI GitLab Version License

    A nonlinear, mixed finite element solver for the DGM electrolyte model

    Logo

    Physical Background

    The system, which is solved, refers to the original work, Overcoming the shortcomings of the Nernst–Planck model, from Wolfgang Dreyer, Clemens Guhlke and Rüdiger Müller in 2013.
    This paper introduces a new, generalized Nernst-Planck model, which is thermodynamically consistent, as the classical Nernst-Planck model fails to predict the correct ion-concentrations close to the boundaries. The open-source package FEniCSx was used for the numerical implementation.

    Main Features

    • Solving steady DGM model in dimensionless units
      • for a ternary electrolyte (cations, anions, neutral solvent)
      • for an electrolyte of N arbitrary species
    • Local mesh refinement for one-dimensional domains towards the electrode
    • Testcases for the one-dimensional case or the two-dimensional electrolytic diode
    • Solutions for the Double-Layer Capacity, both numerical and analytical
    • Numerical Convergence with relaxation parameter for newtons method
    • Two-dimensional testcases for the example of the electrolytic diode

    Installation

    Install the fxdgm package with pip to get all the implemented functions.

    pip install git+https://git.rwth-aachen.de/JanHab/fxdgm

    For the backend, FEniCSx was used and installed via conda. The necessery dependencies can be installed with

    conda install -c conda-forge fenics-dolfinx=0.8.0 mpich=4.2.1 pyvista=0.43.10 gcc=12.4.0 -y

    It is also possible to install the FEniCSx backend in a different manner. See the FEniCSx documentation for this. Although this installation method should work, it was not tested for the purpose of this package.

    macOS installation using Docker

    The docker installation method works for linux too. It was not tested on windows.

    docker compose build
    docker compose run solver

    Testing

    For testing clone the repository, install pytest and run the tests with

    pip install pytest==8.3.3
    python -m pytest

    Usage

    Find the package source code in fxdgm. This implements the nonlinear electrolyte model.

    Furthermore, some physical examples are provided in the examples. In the subfolder ReproducableCode is the code, to execute the calculations with some first visualizations. The subfolder Data stores the data for all the simulations in a *.npz file, which can be read with numpy np.load(file.npz). Visualizations creates the necessary figures from the thesis and stores them either in *.svg or *.pdf format in "Figures".

    Contact

    Author

    Supervisor