Numerical Treatment of a Thermodynamic Consistent Electrolyte Model
University
Bachelor
In my last bachelor semester I wrote my bachelors thesis with the title Numerical Treatment of a Thermodynamic Consistent Electrolyte Model at the institute for applied and computational mathematics at the RWTH Aachen University
Batteries play a crucial role in the energy transition. The production of green energy depends on external factors. Storing energy in batteries is necessary to access green energy at any time. Better optimized batteries are essential for the future. Lifetime, loading time, and energy loss are just some aspects that must be improved to prepare for a greener future. Numerical simulations are crucial to understanding and optimizing batteries’ behavior. Those simulations enable researchers to test many different materials without considerable additional expenses to, for example, find the best combination of anions and cations. The classical Nernst-Planck model for the ion transport in an electrolyte fails to predict the correct concentration in the boundaries of the electrolyte. This work will present and analyze a thermodynamically consistent electrolyte model with dimensionless units under isothermal conditions. A simplified version of the system for the one-dimensional equilibrium of an ideal mixture and the incompressible limit will be considered. The numerical implementation of the model with the open-source software FEniCSx will be discussed. Furthermore, the influence of different boundary conditions, material parameters, solvation, and compressibility on the electric potential, pressure, and ion concentration will be investigated, and the model will be compared with the classical Nernst-Planck model. Examples of the double layer capacity and electrolytic diode will be considered.
Code Example for a simple ternary electrolyte
This example illustrates the strenght of the new model. The ion-concentrations do not exceed the range of [0, 1] and therefore stay in a physical meaningful range. For the classical Nernst-Planck model, the concentrations would diverge at the left boundary.
# import my python package# Install this with: pip install git+https://git.rwth-aachen.de/JanHab/fxdgm# Careful: FEniCSx for the backend and the gcc compiler need to be installed# For further instructions see: https://git.rwth-aachen.de/JanHab/fxdgmfrom fxdgm import solve_System_4eqimport matplotlib.pyplot as pltimport numpy as np# Define problem settingphi_left =8.0phi_right =0.0p_right =0.0y_A_R =1/3y_C_R =1/3z_A =-1.0z_C =1.0K ='incompressible'Lambda2 =8.553e-6a2 =7.5412e-4# Define grid and tolerance for newtonnumber_cells =1024refinement_style ='log'rtol =1e-8# solve the systemy_A, y_C, phi, p, x = solve_System_4eq(phi_left, phi_right, p_right, z_A, z_C, y_A_R, y_C_R, K, Lambda2, a2, number_cells, relax_param=0.05, x0=0, x1=1, refinement_style='hard_log', return_type='Vector', max_iter=1_000, rtol=rtol)# Plot the atomic fractionsplt.figure()plt.plot(x, y_A, label='$y_A$')plt.plot(x, y_C, label='$y_C$')plt.plot(x, 1- y_A - y_C, label='$y_S$')plt.xlabel('x [-]')plt.ylabel('$y_\\alpha$ [-]')plt.title('Atomic Fractions')plt.xlim(0,0.05)plt.grid()plt.legend()plt.show()# Plot the electric potentialplt.figure()plt.plot(x, phi)plt.xlabel('x [-]')plt.ylabel('$\\varphi$ [-]')plt.title('Electric Potential')plt.xlim(0,0.05)plt.grid()plt.show()# Plot the pressureplt.figure()plt.plot(x, p)plt.xlabel('x [-]')plt.ylabel('$p$ [-]')plt.title('Pressure')plt.xlim(0,0.05)plt.grid()plt.show()