{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "# Part II: **The DFN Model overview**\n", "\n", " **Dr. Sridevi Krishnamurthi** and **Dr. Simon Clark,** *SINTEF AS, Battery Technology, Trondheim, Norway*\n", "\n", "\n", "This guide provides an introductory resource for readers who would like to learn about lithium\\-ion batteries, battery modelling, or both! Starting from the basics of how a Li\\-ion battery works, we go step\\-by\\-step, introducing new modelling concepts at each level. After completing this guide, readers should have a working knowledge of Li\\-ion battery design principles and be able to simulate a variety of designs under different conditions.\n", "\n", "- **In Part I : Introduction to Battery Modelling with BattMo** of the modeling guide **,** we provided an overview of battery modeling, introduced key terms, and explained how to use BattMo.\n", "- **In Part II:The DFN Model overview,** we will delve into the DFN model in detail, the model employs physical, chemical, and electrochemical parameters to describe the behavior of the electrodes and electrolytes, We will study these parameters, each of which impacts the cell's capacity and performance.\n", "\n", "*Please run 'startupBattMo.M' present in the home folder before running this notebook, this loads all the neccessary modules for running the simulations.*\n", "\n", "\n", "\n", "## Part II: Table of Contents\n", " [1. DFN Model Overview](#1-dfn-model-overview)\n", "\n", " [**2. Overpotentials and Voltage losses**](#-textbf-2-overpotentials-and-voltage-losses-)\n", "\n", "   [**Example 1. OCV curve and voltage loss at different C\\-rates**](#-textbf-example-1-ocv-curve-and-voltage-loss-at-different-c-rates-)\n", "\n", "  [3. Thermodynamic parameters](#3-thermodynamic-parameters)\n", "\n", "   [**Example 2. Mass** fraction of active material and binder in electrode](#-textbf-example-2-mass-fraction-of-active-material-and-binder-in-electrode)\n", "\n", "   [Example 3. Temperature](#example-3-temperature)\n", "\n", "   [Example 4. Saturation concentration of the material](#example-4-saturation-concentration-of-the-material)\n", "\n", "  [4. Kinetic parameters](#4-kinetic-parameters)\n", "\n", "   [**Example 5.** Charge transfer coefficient, anodic and cathodic at the surface of the active particles: Butler\\-Volmer equation](#-textbf-example-5-charge-transfer-coefficient-anodic-and-cathodic-at-the-surface-of-the-active-particles-butler-volmer-equation)\n", "\n", "   [**Example 6.** Reaction rate constant at the surface of the active particles: Butler\\-Volmer equation (exchange current density)](#-textbf-example-6-reaction-rate-constant-at-the-surface-of-the-active-particles-butler-volmer-equation-exchange-current-density-)\n", "\n", "  [5. Transport parameters](#5-transport-parameters)\n", "\n", "   [Example 7. Reference diffusion coefficient (Solid diffusion)](#example-7-reference-diffusion-coefficient-solid-diffusion-)\n", "\n", "   [**Example 8.** Active particle radius (Solid diffusion)](#-textbf-example-8-active-particle-radius-solid-diffusion-)\n", "\n", "   [**Example 9.** Electronic conductivity of the active material in the electrodes (effective electronic conductivity)](#-textbf-example-9-electronic-conductivity-of-the-active-material-in-the-electrodes-effective-electronic-conductivity-)\n", "\n", "   [**Example 10.** Bruggeman coefficient in the electrodes (effective electronic conductivity)](#-textbf-example-10-bruggeman-coefficient-in-the-electrodes-effective-electronic-conductivity-)\n", "\n", "   [Example 11. Bruggeman coefficient in the electrolyte (effective ionic conductivity)](#example-11-bruggeman-coefficient-in-the-electrolyte-effective-ionic-conductivity-)\n", "\n", "   [**Example 12. Initial e**lectrolyte concentration (electrolyte diffusion)](#-textbf-example-12-initial-e-lectrolyte-concentration-electrolyte-diffusion-)\n", "\n", "   [**Example 13.** Transference number (electrolyte diffusion)](#-textbf-example-13-transference-number-electrolyte-diffusion-)\n", "\n", "  [**6. Summary**](#-textbf-6-summary-)\n", "\n", "  [**7. References**](#-textbf-7-references-)\n", "\n", "\n", "\n", "## 1. DFN Model Overview\n", "\n", "Physics based battery modeling encompasses various levels of complexity, ranging from microscale models that detail individual electrode particles to single\\-particle models (SPM) that approximate the entire electrode as a single homogeneous particle.\n", "\n", "\n", "The Doyle\\-Fuller\\-Newman (DFN) model also called pseudo\\-two\\-dimensional (P2D) lies between these two approaches. While it lacks the fine spatial resolution of microscale models, which describe the three\\-dimensional microstructure, the DFN model assumes spherical symmetry for the active particles and characterizes the microstructure using a few key parameters, significantly reducing computational demands.\n", "\n", "\n", "For a detailed overview of the different models, please refer [here](https://iopscience.iop.org/article/10.1088/2516-1083/ac7d31/meta).\n", "\n", "\n", "Let us look at the model equations,\n", "\n", "

\n", " \"image_0.png\"\n", "

\n", "\n", "\n", "

\n", " \"image_1.png\"\n", "

\n", "\n", "\n", "

\n", " \"image_2.png\"\n", "

\n", "\n", "\n", "

\n", " \"image_3.png\"\n", "

\n", "\n", "\n", "The PDEs are discretized in both the spatial,meaning the electrode and electrolyte regions are divided into discrete points and temporal domains. **BattMo uses finite volume method** to achieve this discretization. This process converts the PDEs into a set of non\\-linear algebraic equations, which are then solved using numerical methods such as Newton\\-Raphson or direct solvers.\n", "\n", "## **2. Overpotentials and Voltage losses**\n", "\n", "The cell potential observed during operation differs from the thermodynamic potential, known as the Open Circuit Voltage (OCV), due to various losses that occur when a current is flowing. The additional voltage required to drive the charging and discharging at a given current is called the cell overpotential or overvoltage. This overvoltage arises from several factors, including ohmic losses, kinetic limitations, and transport limitations, each contributing to the overall voltage drop observed during cell operation, see **Figure 2** .\n", "\n", "

\n", " \"image_4.png\"\n", "

\n", "\n", "\n", " **Figure 2: Schematic breakdown of overpotentials in a lithium\\-ion battery (LIB) cell.**\n", "\n", "\n", " **a. Kinetic**\n", "\n", "\n", "The Butler\\-Volmer equation describes the kinetics of the charge transfer reaction at the electrode/electrolyte interface and the associated overpotential, as shown in the model equations. The rate of the reaction depends on the exchange current density, which is influenced by reaction rate constants, charge transfer coefficients that describe the asymmetry between the forward and backward reactions, and the charge transfer activation energy. These factors collectively determine how efficiently the electrochemical reaction proceeds and how the overpotential varies with current.\n", "\n", "\n", "**b. Transport**\n", "\n", "\n", "Transport limitations, or mass transport limitations, occur due to inefficient diffusion processes, creating resistance to the movement of ions within the electrolyte or electrode materials. Key parameters influencing these limitations include diffusion coefficients and the initial concentrations of reactants. These limitations arise when the delivery rate of reactants to the reaction sites is slower than the rate at which they are consumed by the electrochemical reactions. This resistance to mass transport can lead to the formation of concentration gradients, increased overpotential, and ultimately reduced performance of the cell.\n", "\n", "\n", " **c. Ohmic and contact**\n", "\n", "\n", "Ohmic losses occur due to the electronic resistance within the electrodes, the ionic resistance in the electrolyte, and the interfacial resistance between the electrode and the current collectors. The ionic and electronic conductivities significantly influence the overall impedance of the system. These losses contribute to the overall voltage drop and are affected by the C\\-rate and the temperature of operation.\n", "\n", "\n", "A large overpotential is detrimental to the operation of the cell, leading to significant energy losses. Therefore, understanding the processes that cause these overpotentials is crucial for optimizing cell performance and efficiency.\n", "\n", "\n", "In this tutorial, we will vary the different parameters that contribute to each of these overpotentials. By adjusting variables such as reaction rate constants, charge transfer coefficients, and material parameters such as particle radius and electronic conductivities, we will observe how these changes influence the overpotential and capacities, providing insights into the underlying mechanisms governing electrochemical behavior.\n", "\n", "#### **Example 1. OCV curve and voltage loss at different C\\-rates**\n", "\n", "Thermodynamics determines the open\\-circuit voltage (OCV) of a cell, which is defined as the difference between the OCVs of the positive and negative electrodes. The thermodynamic or equilibrium potential is influenced by factors such as the chemical nature of the species involved, their concentrations, the State of Charge (SOC), and temperature. While the Nernst equation can theoretically describe the equilibrium potential, the Gibbs free energy of the cell varies continuously with the state of lithiation in both the cathode and anode as the SOC changes, therefore experimental techniques like electrochemical impedance spectroscopy (EIS), Galvanostatic Intermittent Titration Technique (GITT) are often required to accurately measure the OCV.\n", "\n", "\n", "To simulate the OCV in BattMo, one can use a very small C\\-rate (0.1C). However, as the charging or discharging rate (C\\-rate) increases, the cell experiences pronounced capacity and voltage losses. These losses arise because the kinetic (activation polarization) and transport (concentration polarization) overpotentials increase nonlinearly with the C\\-rate, as discussed earlier.\n", "\n", "\n", " To illustrate this behavior, we discharge our NMC\\-graphite cell at C\\-rates ranging from 0.05C to 3C and observe that the potential drop becomes significant with higher rates. At the highest rate of 3C, the cell capacity shows the most substantial drop.\n", "\n", "\n", "The **`plot_capacities`** function processes the parameter array and parameter name, discharging the cell at a constant current (CC) to generate the corresponding voltage vs. capacity plots.\n", "" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "source": [ "crate_array=[linspace(0.05,3,5)];\n", "crate=\"Control.DRate\";\n", "plot_capacities(crate_array,crate)" ], "outputs": [ { "data": { "text/html": [ "
\"figure_0.png\"
" ] }, "metadata": {}, "execution_count": 1, "output_type": "execute_result" }, { "data": { "text/html": [ "
\"figure_1.png\"
" ] }, "metadata": {}, "output_type": "display_data" } ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 3. Thermodynamic parameters\n", "\n", "We will now examine the key parameters that influence the Open Circuit Voltage of a cell.\n", "\n", "#### **Example 2. Mass** fraction of active material and binder in electrode\n", "\n", "To understand the effect of Li concentration on the OCV, we begin by selecting a very small C\\-rate of 0.05C and explore how increasing the amount of the lithium content, impacts the cell's potential. This is achieved by increasing the mass fraction of the active material while simultaneously reducing the binder content. While we observe that increasing the mass fraction of active material results in higher capacity due to the greater availability of electrochemically active species, reducing the binder content excessively can lead to structural instabilities within the cell. Therefore, it is crucial to maintain an optimal ratio of binder to active material to prevent structural instability.\n", "" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "source": [ "electrode_mf=\"PositiveElectrode.\";\n", "Crate_mf=0.05;\n", "ele_mf=[linspace(0.90,0.96,3)];\n", "negative_binder_mf=0.97-ele_mf;\n", "positive_binder_mf=0.975-ele_mf;\n", "markers= {'-',\"-\",'-','-','-','-','-'};\n", "output = cell(size(ele_mf));\n", "therm_parameter_1=strcat(electrode_mf,\"Coating.ActiveMaterial.massFraction\");\n", "therm_parameter_2=strcat(electrode_mf,\"Coating.Binder.massFraction\");\n", "jsonstruct_default = parseBattmoJson('Examples/JsonDataFiles/sample_input.json');\n", "cccv_control_protocol = parseBattmoJson('cccv_control_charge.json');%loads the CCCV protocol\n", "jsonstruct_modified = mergeJsonStructs({cccv_control_protocol, jsonstruct_default});" ], "outputs": [ { "data": { "text/plain": [ "mergeJsonStructs: Parameter Control.controlPolicy is assigned twice with different values. Value from first jsonstruct is used.\n", "mergeJsonStructs: Parameter Control.upperCutoffVoltage is assigned twice with different values. Value from first jsonstruct is used.\n", "mergeJsonStructs: Parameter Control.dIdtLimit is assigned twice with different values. Value from first jsonstruct is used.\n", "mergeJsonStructs: Parameter Control.dEdtLimit is assigned twice with different values. Value from first jsonstruct is used.\n", "mergeJsonStructs: Parameter SOC is assigned twice with different values. Value from first jsonstruct is used." ] }, "metadata": {}, "execution_count": 2, "output_type": "execute_result" } ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "source": [ "% instantiate an empty figure\n", "figure()\n", "% use a for-loop to iterate through the vector of mass fraction of active materials\n", "for i = 1:numel(ele_mf)\n", " jsonstruct_modified.Control.CRate=Crate_mf;\n", " c1 = split(therm_parameter_1,'.');\n", " c2= split(therm_parameter_2,'.');\n", " jsonstruct_modified = setfield(jsonstruct_modified,c1{:},ele_mf(i)); % active material massfraction\n", " if strcmp(c1{1}, 'PositiveElectrode')\n", " jsonstruct_modified = setfield(jsonstruct_modified,c2{:},positive_binder_mf(i));% binder massfraction\n", " else\n", " jsonstruct_modified = setfield(jsonstruct_modified,c2{:},negative_binder_mf(i)); % binder massfraction\n", " end\n", " jsonstruct_modified.TimeStepping.totalTime = (1./jsonstruct_modified.Control.CRate) .* 3600 .* 1.2;\n", " % Run the simulation and store the results in the output cell array\n", " [results,output{i}] = evalc(\"runBatteryJson(jsonstruct_modified)\");\n", " % Retrieve the states from the simulation result\n", " states = output{i}.states;\n", " % Extract time and voltage quantities\n", " time = cellfun(@(state) state.time, states);\n", " voltage = cellfun(@(state) state.('Control').E, states);\n", " current = cellfun(@(state) state.('Control').I, states);\n", " % Calculate the capacity\n", " capacity = time .* current;\n", " if any(capacity>0)\n", " start_index_current_pos=find(current >= 0, 1);\n", " time_discharge=time(start_index_current_pos);\n", " discharge_capacity = (time-time_discharge) .* current;\n", " start_index = find(discharge_capacity == 0, 1);\n", " end_index = find(discharge_capacity > 0, 1,\"last\");\n", " plot(discharge_capacity(start_index:end_index)/(hour*milli),voltage(start_index:end_index), markers{i}, 'linewidth', 3)\n", " else\n", " plot(capacity/(hour*milli),voltage)\n", " end\n", " L{i} = strcat(num2str(ele_mf(i)));\n", " legend(L);\n", " hold on\n", "end\n", "\n", "hold off\n", "xlabel('Capacity / mA \\cdot h')\n", "ylabel('Voltage / V')" ], "outputs": [ { "data": { "text/html": [ "
\"figure_2.png\"
" ] }, "metadata": {}, "execution_count": 3, "output_type": "execute_result" } ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Example 3. Temperature\n", "\n", "We now examine the effect of temperature $T$ . For a C\\-rate of 0.05C, across a temperature range from \\-50°C to 50°C, there is little change in capacity or voltage profile. However, at a higher C\\-rate, we observe an elevated voltage profile with increasing temperature, which could be attributed to kinetic and transport effects. These effects, which we will study further below, may explain the variations in performance under different temperature conditions and higher current loads.\n", "" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "source": [ "crate_temp=0.5;\n", "therm_parameter_3=\"initT\";\n", "therm_parameter_3_vals=[linspace(223,323,3)];\n", "plot_capacities(therm_parameter_3_vals,therm_parameter_3,crate_temp);" ], "outputs": [ { "data": { "text/html": [ "
\"figure_3.png\"
" ] }, "metadata": {}, "execution_count": 4, "output_type": "execute_result" }, { "data": { "text/html": [ "
\"figure_4.png\"
" ] }, "metadata": {}, "output_type": "display_data" } ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Example 4. Saturation concentration of the material\n", "\n", "Another approach to increasing the concentration of lithium ions in the system is to raise the saturation concentration of lithium ions in the host material. This can lead to a notable increase in cell capacity, but only up to a certain limit, after which the capacity is constrained by the capacity of the other electrode. It is important to recognize that altering the saturation concentration inherently affects the intrinsic properties of the host material, which may impact the structural stability of the electrode. Furthermore, since the cell designer has no direct control over the saturation concentration of the host material, this is typically not a parameter that can be readily adjusted.\n", "" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "source": [ "electrode_cmax=\"PositiveElectrode.\";\n", "Crate_cmax=0.05;\n", "therm_parameter_3=strcat(electrode_cmax,\"Coating.ActiveMaterial.Interface.saturationConcentration\");\n", "therm_parameter_3_vals=[linspace(30555,80555,3)];\n", "plot_capacities(therm_parameter_3_vals,therm_parameter_3,Crate_cmax);" ], "outputs": [ { "data": { "text/html": [ "
\"figure_5.png\"
" ] }, "metadata": {}, "execution_count": 5, "output_type": "execute_result" }, { "data": { "text/html": [ "
\"figure_6.png\"
" ] }, "metadata": {}, "output_type": "display_data" } ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 4. Kinetic parameters\n", "\n", "The charge transfer at the interface between the electrolyte and electrode is governed by the Butler\\-Volmer equation,as presented in eqn (9). The equation describes the current (reaction rate) as a function of the overpotential and charge transfer co\\-efficients at the interface. We will assume that mass transfer (transport) limitations are minimal, meaning that the movement of ions from the bulk solution to the electrode interface is faster than the rate at which they are consumed at the interface. This assumption allows us to focus on the reaction kinetics at the interface without being significantly influenced by concentration gradients or diffusion limitations in the electrolyte.\n", "\n", "#### **Example 5.** Charge transfer coefficient, anodic and cathodic at the surface of the active particles: Butler\\-Volmer equation\n", "\n", "Typically, the charge transfer coefficient, $\\alpha_a ,$ is assumed to be 0.5, indicating a symmetric process where the forward and backward reaction rates (charge and discharge) are equally favorable. However, an asymmetric charge transfer can occur at the interface. The charge transfer coefficients play a crucial role in determining the slope of the current versus overpotential curve, thereby affecting the overall kinetics of the electrochemical reaction.\n", "\n", "\n", "In the example below, we observe the behavior at the negative electrode during a charge\\-discharge cycle as the charge transfer coefficient varies from 0.1 to 0.75. During charging, where the electrode undergoes reduction, increasing $\\alpha$ increases the overpotential. However, during discharge, higher values of $\\alpha$ actually decrease the overpotential. This behavior highlights the asymmetric impact of the transfer coefficient on the electrode's performance during charging and discharging.\n", "" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "source": [ "electrode_alpha=\"NegativeElectrode.\";\n", "crate_alpha=3;\n", "kinetic_parameter_2_vals=[linspace(0.1,0.75,3)];\n", "% kinetic_parameter_2_vals=0.5;\n", "kinetic_parameter_2=strcat(electrode_alpha,\"Coating.ActiveMaterial.Interface.chargeTransferCoefficient\");\n", "plot_voltage_cccv(kinetic_parameter_2_vals,kinetic_parameter_2,crate_alpha)" ], "outputs": [ { "data": { "text/plain": [ "mergeJsonStructs: Parameter Control.controlPolicy is assigned twice with different values. Value from first jsonstruct is used.\n", "mergeJsonStructs: Parameter Control.upperCutoffVoltage is assigned twice with different values. Value from first jsonstruct is used.\n", "mergeJsonStructs: Parameter Control.dIdtLimit is assigned twice with different values. Value from first jsonstruct is used.\n", "mergeJsonStructs: Parameter Control.dEdtLimit is assigned twice with different values. Value from first jsonstruct is used.\n", "mergeJsonStructs: Parameter SOC is assigned twice with different values. Value from first jsonstruct is used." ] }, "metadata": {}, "execution_count": 6, "output_type": "execute_result" }, { "data": { "text/html": [ "
\"figure_7.png\"
" ] }, "metadata": {}, "output_type": "display_data" } ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### **Example 6.** Reaction rate constant at the surface of the active particles: Butler\\-Volmer equation (exchange current density)\n", "\n", "The reaction rate constant, $k_0$ determines the exchange current density, which in turn influences both the charging and discharging rates of an electrochemical cell. When the exchange current density is large, a high charge or discharge current can be achieved with only a small overpotential. As we increase the reaction rate constant, we observe a decrease in the cell overpotential for both the positive and negative electrodes, indicating more efficient electrochemical reactions and improved cell performance.\n", "" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "source": [ "electrode_k=\"PositiveElectrode.\";\n", "crate_k=3;\n", "kinetic_parameter_3=strcat(electrode_k,\"Coating.ActiveMaterial.Interface.reactionRateConstant\");\n", "kinetic_parameter_3_vals=[5.031e-10,5.031e-11,5.031e-12];\n", "plot_capacities(kinetic_parameter_3_vals,kinetic_parameter_3,crate_k)" ], "outputs": [ { "data": { "text/html": [ "
\"figure_8.png\"
" ] }, "metadata": {}, "execution_count": 7, "output_type": "execute_result" }, { "data": { "text/html": [ "
\"figure_9.png\"
" ] }, "metadata": {}, "output_type": "display_data" } ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### 5. Transport parameters\n", "\n", "We now turn our attention to the parameters that describe mass transport within the electrolyte and the electrodes. In this analysis, we will keep the kinetic parameters fixed while varying the transport parameters.\n", "\n", "#### Example 7. Reference diffusion coefficient (Solid diffusion)\n", "\n", "We start with the paremeters that affect the diffusion coefficient within the electrodes. In BattMo, we can select from various diffusion models. For more details, please refer to the [documentation](https://battmoteam.github.io/BattMo/json.html#solid-diffusion). The input data for solid diffusion includes parameters such as particle radius, volumetric surface area, and the reference diffusion coefficient. The diffusion coefficient is calculated using an Arrhenius\\-type equation, where the reference diffusion constant, $D_0$ represents the pre\\-exponential factor. Increasing $D_0$ in one or both the electrodes aids in Li transport, reducing the overpotential at high current densities.\n", "" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "source": [ "electrode_el_refdiff=\"PositiveElectrode.\";\n", "crate_el_refdiff=3;\n", "transport_parameter_4=strcat(electrode_el_refdiff,\"Coating.ActiveMaterial.SolidDiffusion.referenceDiffusionCoefficient\");\n", "transport_parameter_4_vals=[3.9e-14,3.9e-16];\n", "plot_capacities(transport_parameter_4_vals,transport_parameter_4,crate_el_refdiff)" ], "outputs": [ { "data": { "text/html": [ "
\"figure_10.png\"
" ] }, "metadata": {}, "execution_count": 8, "output_type": "execute_result" }, { "data": { "text/html": [ "
\"figure_11.png\"
" ] }, "metadata": {}, "output_type": "display_data" } ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### **Example 8.** Active particle radius (Solid diffusion)\n", "\n", "The active particle size $R_s$ plays a crucial role in diffusion within the solid material. A smaller active particle size allows for a faster diffusion or a shorter path for the Li ions as one would expect, this means faster charging and discharging, resulting in higher power density. However, this comes at the cost of lower energy density and potentially shorter cycling lifetimes. The increased surface area associated with smaller particles leads to more interactions with the electrolyte, which can accelerate degradation processes and negatively impact the long\\-term stability of the battery.\n", "" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "source": [ "electrode_rad=\"NegativeElectrode.\";\n", "crate_radius=3;\n", "transport_parameter_1=strcat(electrode_rad,\"Coating.ActiveMaterial.SolidDiffusion.particleRadius\");\n", "transport_parameter_1_vals=[linspace(1,20,3)].*micro;\n", "plot_capacities(transport_parameter_1_vals,transport_parameter_1,crate_radius)" ], "outputs": [ { "data": { "text/html": [ "
\"figure_12.png\"
" ] }, "metadata": {}, "execution_count": 9, "output_type": "execute_result" }, { "data": { "text/html": [ "
\"figure_13.png\"
" ] }, "metadata": {}, "output_type": "display_data" } ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### **Example 9.** Electronic conductivity of the active material in the electrodes (effective electronic conductivity)\n", "\n", "Electronic conductivity $\\sigma_s$ plays an important role in determining the potential of the electrodes. Increasing the electronic conductivity should result in a lower overpotential, as it reduces the ohmic resistances within the electrode. Typically, conducting additives are added to enhance this conductivity. However, in this scenario, we are specifically increasing the intrinsic conductivity of the electrodes themselves. This enhancement is expected to lower the overpotential further by reducing internal resistive losses, thereby improving the overall efficiency and performance of the cell.\n", "" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "source": [ "electrode_el_conductivity=\"PositiveElectrode.\";\n", "crate_el_conductivity=3;\n", "transport_parameter_2=strcat(electrode_el_conductivity,\"Coating.ActiveMaterial.electronicConductivity\");%does not seem to affect the discharge profile\n", "% transport_parameter_2_vals=10;\n", "transport_parameter_2_vals=[linspace(10,1000,2)];\n", "plot_capacities(transport_parameter_2_vals,transport_parameter_2,crate_el_conductivity)" ], "outputs": [ { "data": { "text/html": [ "
\"figure_14.png\"
" ] }, "metadata": {}, "execution_count": 10, "output_type": "execute_result" }, { "data": { "text/html": [ "
\"figure_15.png\"
" ] }, "metadata": {}, "output_type": "display_data" } ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "\n", "**Bruggeman Coefficient**\n", "\n", "\n", "The Bruggemann coefficient determines the effective electronic conductivity within the electrodes, as well as the ionic conductivity and the effective diffusion coefficient within the electrolyte. This coefficient accounts for the tortuosity and porosity of the material, influencing how easily electrons and ions can move through the porous structure of the electrodes and the electrolyte. This coefficient is influenced by factors such as slurry preparation, drying, and coating processes, which affect the morphology and microstructure of the material. A higher Bruggemann coefficient indicates greater tortuosity, leading to increased difficulty in ion and electron transport, increasing the mass transport overpotential of the cell.\n", "\n", "#### **Example 10.** Bruggeman coefficient in the electrodes (effective electronic conductivity)" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "source": [ "electrode_brug=\"PositiveElectrode.\";\n", "electrode_crate_brug=3;\n", "transport_parameter_4=strcat(electrode_brug,\"Coating.bruggemanCoefficient\");% does not seem to affect the discharge profile\n", "transport_parameter_4_vals=[linspace(1.0,5,3)];\n", "plot_capacities(transport_parameter_4_vals,transport_parameter_4,electrode_crate_brug)" ], "outputs": [ { "data": { "text/html": [ "
\"figure_16.png\"
" ] }, "metadata": {}, "execution_count": 11, "output_type": "execute_result" }, { "data": { "text/html": [ "
\"figure_17.png\"
" ] }, "metadata": {}, "output_type": "display_data" } ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### Example 11. Bruggeman coefficient in the electrolyte (effective ionic conductivity)\n", "\n", "Next we turn to the Bruggemen coefficient for the electrolyte, We observe that as the Bruggemann coefficient $p_{elyte}$ increases from 1 to 2, the overpotential rises steeply, accompanied by a loss in capacity as this leads to a more 'tortuous' transport within the electrolyte .\n", "" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "source": [ "elyte_crate_brug=3;\n", "transport_parameter_5=\"Electrolyte.bruggemanCoefficient\";\n", "transport_parameter_5_vals=[linspace(1.0,2,3)];\n", "plot_capacities(transport_parameter_5_vals,transport_parameter_5,elyte_crate_brug)" ], "outputs": [ { "data": { "text/html": [ "
\"figure_18.png\"
" ] }, "metadata": {}, "execution_count": 12, "output_type": "execute_result" }, { "data": { "text/html": [ "
\"figure_19.png\"
" ] }, "metadata": {}, "output_type": "display_data" } ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### **Example 12. Initial e**lectrolyte concentration (electrolyte diffusion)\n", "\n", "The diffusion coefficient of the electrolyte is determined by fitting curves to mass transport experiments in the electrolyte \\[6\\], and it varies with the concentration of Li ions and temperature. Increasing the initial ion concentration in the electrolyte generally raises the diffusion coefficient, enhancing ion transport and improving cell performance. However, beyond a certain concentration, the capacity starts to decline. For example, at 1500 mol/m^3 (1mol/L), the discharge capacity is actually lower than at 1000 mol/m^3(1.5mol/L), indicating that the optimal concentration is 1 mol/litre. This is because the ionic conductivity of the electrolyte, which depends on Li concentration and temperature, begins to decrease when the electrolyte becomes too concentrated. As a result, resistance increases, reducing the efficiency of ion transport and ultimately lowering overall capacity. \\[5\\].\n", "" ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "source": [ "crate_elyte=3;\n", "transport_parameter_3_vals=[linspace(0.8e03,1.5e03,3)];\n", "transport_parameter_3=\"Electrolyte.initialConcentration\";\n", "plot_capacities(transport_parameter_3_vals,transport_parameter_3,crate_elyte)" ], "outputs": [ { "data": { "text/html": [ "
\"figure_20.png\"
" ] }, "metadata": {}, "execution_count": 13, "output_type": "execute_result" }, { "data": { "text/html": [ "
\"figure_21.png\"
" ] }, "metadata": {}, "output_type": "display_data" } ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "#### **Example 13.** Transference number (electrolyte diffusion)\n", "\n", "The transference number $t_+$ of an ion is defined as the fraction of the total current carried by that specific species in the electrolyte. When we increase the fraction of current carried by $Li^+$ ions in the electrolyte, equation (3), rather than by the counter ion $PF_6^-$ , we can expect to observe a lower overpotential and a higher capacity. This is because the more efficiently the ions are transported to the electrode, the less overpotential is required to drive the electrochemical reaction, as we observe below. However, as with many parameters, increasing it beyond a certain point does not lead to further significant improvements in capacity.\n", "" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "source": [ "crate_t=3;\n", "kinetic_parameter_5=\"Electrolyte.species.transferenceNumber\";\n", "kinetic_parameter_5_vals=[linspace(0.1,0.9,3)];\n", "plot_capacities(kinetic_parameter_5_vals,kinetic_parameter_5,crate_t)" ], "outputs": [ { "data": { "text/html": [ "
\"figure_22.png\"
" ] }, "metadata": {}, "execution_count": 14, "output_type": "execute_result" }, { "data": { "text/html": [ "
\"figure_23.png\"
" ] }, "metadata": {}, "output_type": "display_data" } ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### **6. Summary**\n", "\n", "In this guide, we studied the OCV curve and the various loss factors, including thermodynamic, kinetic, and transport losses, that influence a cell at different cycling rates using BattMo. We simulated each of these losses by performing parameter sweeps of the material properties to understand their effects on cell performance.\n", "\n", "\n", "In the next tutorial, we will examine the rate capability of a cell and compute key performance characteristics, such as specific energy and energy density, which are crucial for optimizing cell design.\n", "\n", "### **7. References**\n", "\n", "\\[1\\][ L. Xia, E. Najafi, Z. Li, H.J. Bergveld, M.C.F. Donkers, \"A computationally efficient implementation of a full and reduced\\-order electrochemistry\\-based model for Li\\-ion batteries,\" *Applied Energy*, vol. 208, pp. 1285\\-1296, 2017, ISSN 0306\\-2619](https://www.sciencedirect.com/science/article/pii/S0306261917313090.), [](https://doi.org/10.1016/j.apenergy.2017.09.025.)\n", "\n", "\n", "\\[2\\] [Bharatkumar Suthar, Paul W. C. Northrop, Derek Rife, and Venkat R. Subramanian, \"Effect of Porosity, Thickness and Tortuosity on Capacity Fade of Anode,\" *Journal of The Electrochemical Society*, vol. 162, no. 9, p. A1708, 2015. DOI: 10.1149/2.0061509jes. ](https://iopscience.iop.org/article/10.1149/2.0061509jes)\n", "\n", "\n", "\\[3\\] [Venkat Srinivasan and John Newman, \"Discharge Model for the Lithium Iron\\-Phosphate Electrode,\" \\*Journal of The Electrochemical Society\\*, vol. 151, no. 10, p. A1517, 2004. DOI: 10.1149/1.1785012](https://iopscience.iop.org/article/10.1149/1.1785012/meta).\n", "\n", "\n", "\\[4\\] [F Brosa Planella *et al* 2022 *Prog. Energy* 4 042003](https://iopscience.iop.org/article/10.1088/2516-1083/ac7d31/meta)\n", "\n", "\n", "\\[5\\] [Sunwook Hwang, Dong\\-Hui Kim, Jeong Hee Shin, Jae Eun Jang, Kyoung Ho Ahn, Chulhaeng Lee, and Hochun Lee,*The Journal of Physical Chemistry C* **2018** *122* (34), 19438\\-19446, DOI: 10.1021/acs.jpcc.8b06035](https://pubs.acs.org/doi/10.1021/acs.jpcc.8b06035)\n", "\n", "\n", "\\[6\\] [Nyman, A., Behm, M., & Lindbergh, G. (2008). Electrochemical characterisation and modelling of the mass transport phenomena in LiPF6–EC–EMC electrolyte. *Electrochimica Acta, 53*(22), 6356\\-6365. https://doi.org/10.1016/j.electacta.2008.04.023](https://www.sciencedirect.com/science/article/pii/S0013468608005045)\n", "\n", "" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "source": [ "function plot_capacities(parameterArray1,input_parameter1,CRate)\n", " % Function to take in the specific input parameter along with its\n", " % values and c-rate and plot the capacities\n", " %\n", " % Parameters:\n", " % parameterArray - a numeric vector\n", " % input_parameter - a string specifying the operation ('sum', 'mean', 'scale')\n", " % crate - a numeric value used for scaling (only for 'scale' operation)\n", " %\n", " % Returns:\n", " % None\n", " % instantiate an empty figure\n", " capacity_array = [];\n", " output = cell(size(parameterArray1));\n", " figure()\n", " jsonstruct = parseBattmoJson('Examples/JsonDataFiles/sample_input.json'); % load default input\n", " if nargin == 3\n", " jsonstruct.Control.DRate = CRate;\n", " end\n", " output = cell(size(parameterArray1));\n", " markers={'-',\"-\",'-','-','-','-','-','v','d','^','s','>','<'};\n", " for i = 1:numel(parameterArray1)\n", " c1 = split(input_parameter1,'.');\n", " jsonstruct = setfield(jsonstruct,c1{:},parameterArray1(i));\n", " jsonstruct.TimeStepping.totalTime = (1./jsonstruct.Control.DRate) .* 3600 .* 1.1;\n", " % run the simulation and store the results in the output cell array\n", " % output{i} = runBatteryJson(jsonstruct);\n", " [results,output{i}] = evalc('runBatteryJson(jsonstruct)');\n", " % retrieve the states from the simulation result\n", " states = output{i}.states;\n", " %plotDashboard(output{i}.model, output{i}.states, 'step', 40);\n", " % extract the time and voltage quantities\n", " time = cellfun(@(state) state.time, states);\n", " voltage = cellfun(@(state) state.('Control').E, states);\n", " current = cellfun(@(state) state.('Control').I, states);\n", " % calculate the capacity\n", " capacity = time .* current;\n", " final_capacity=capacity(find(capacity, 1, 'last'))/(hour*milli);\n", " capacity_array(i)=final_capacity;\n", " % plot capacity vs voltage\n", " plot((capacity/(hour*milli)), voltage, markers{i}, 'linewidth', 3);\n", " xlabel('Capacity / mA \\cdot h')\n", " ylabel('Voltage / V')\n", " hold on\n", " L{i} = strcat(num2str(parameterArray1(i)));\n", " legend(L);\n", " title(c1{end})\n", " end\n", " figure;\n", " scatter(parameterArray1,capacity_array,\"filled\")\n", " ylabel('Capacity / mA \\cdot h')\n", " xlabel(c1{end})\n", " title(strcat(\"Capacity vs \",c1{end}));\n", "end\n", "\n", "function plot_voltage_cccv(parameterArray1,input_parameter1,CRate)\n", " % Function to take in the specific input parameter along with its\n", " % values and c-rate and plot the capacities\n", " %\n", " % Parameters:\n", " % parameterArray - a numeric vector\n", " % input_parameter - a string specifying the operation ('sum', 'mean', 'scale')\n", " % crate - a numeric value used for scaling (only for 'scale' operation)\n", " %\n", " % Returns:\n", " % None\n", " % instantiate an empty figure\n", " fig1=figure();\n", " output = cell(size(parameterArray1));\n", " jsonstruct = parseBattmoJson('Examples/JsonDataFiles/sample_input.json'); % load default input\n", " cccv_control_protocol = parseBattmoJson('cccv_control_charge_02.json');%loads the CCCV protocol\n", " jsonstruct_modified = mergeJsonStructs({cccv_control_protocol, jsonstruct});\n", " jsonstruct_modified.Control.CRate = CRate;\n", " output = cell(size(parameterArray1));\n", " markers= {'-',\"-\",'-','-','-','-','-','v','d','^','s','>','<'};\n", " for i = 1:numel(parameterArray1)\n", " c1 = split(input_parameter1,'.');\n", " jsonstruct_modified = setfield(jsonstruct_modified,c1{:},parameterArray1(i));\n", " jsonstruct_modified.TimeStepping.totalTime = (1./jsonstruct_modified.Control.CRate) .* 3600 .* 1.1*jsonstruct_modified.Control.numberOfCycles*2;\n", " % run the simulation and store the results in the output cell array\n", " [results,output{i}] = evalc('runBatteryJson(jsonstruct_modified)');\n", " % retrieve the states from the simulation result\n", " states = output{i}.states;\n", " % extract the time and voltage quantities\n", " time = cellfun(@(state) state.time, states);\n", " voltage = cellfun(@(state) state.('Control').E, states);\n", " current = cellfun(@(state) state.('Control').I, states);\n", "\n", " % calculate the capacity\n", " capacity = time .* current;\n", " figure(fig1);\n", " plot((time/hour), voltage, '-', 'linewidth', 3)\n", " hold on\n", " % figure(fig2)\n", " % plot((time/hour), current, '-', 'linewidth', 3)\n", " %hold on\n", " L{i} = strcat(num2str(parameterArray1(i)));\n", " legend(L);\n", " title(c1{end})\n", " end\n", " hold off\n", " xlabel('Time / h')\n", " ylabel('Voltage / V')\n", "end\n", "\n", "" ], "outputs": [] } ], "metadata": { "kernelspec": { "display_name": "MATLAB (matlabkernel)", "language": "matlab", "name": "matlab" }, "language_info": { "file_extension": ".m", "mimetype": "text/matlab", "name": "matlab", "nbconvert_exporter": "matlab", "pygments_lexer": "matlab", "version": "24.2.0.2863752" } }, "nbformat": 4, "nbformat_minor": 4 }