Using dynamic graphs on the example of calculating the temperature field of a lead-acid battery

. This paper presents materials for modeling heat transfer in a lead-acid battery in its operating mode. The approach for modeling was based on the representation of the system under study in the form of a flow graph. This approach made it possible to create a model of a battery taking into account the chemical and physical aspects of its operation and can be supplemented with other properties of the system under study, if necessary. Calculations of the temperature dependence were carried out for a daily load and in charge and discharge modes.


Introduction
The change in time of a dynamic system is based on transfer processes. The transfer processes refer only to the additive characteristics of the system, and these processes are determined by the transfer laws, for example, the laws of Fourier, Fick, Darcy, Ohm and are caused by both external forces and the gradients of the corresponding intensive parameters. On the basis of the local balances of these flows, differential equations are written, which constitute a mathematical model of the evolution of this system.
Such systems are solved, as a rule, numerically on the basis of a difference scheme, which leads to a system of linear algebraic equations. For real objects, this can lead to an unacceptably high dimension of the problem and a long-time computation procedure. At the same time, it can be noted that the computational grid corresponding to this system of equations is a labeled graph. Its vertices correspond to grid nodes that define a certain section of the system under study, which is assumed to be equilibrium, since, in general, these values of intensive characteristics (temperature, pressure, etc.) are assigned to it.
To study the possibility of reducing the dimension of the problem in this approach, it is proposed to build a computational graph based on the structure of the object itself, bypassing the procedure for recording local balances in the form of differential equations.
Such a graph is a set of equilibrium subsystems (vertices) with intensive characteristics, into which the object under study is divided, united by the flows of extensive parameters. In this case, the direction of the flows is determined by the conditions of the physical stability of the system.
Existing models of this type of battery can be divided according to the aspects of its operation: electrical, physical and chemical [1][2][3][4]. In [2] a model was proposed to search for the temperature of a battery cell, and in the calculations, the need to find the optimal time step and spatial grid was noted.

Model of a lead-acid battery
The scheme of heat transfer in the storage battery proposed in [1] was supplemented in this work by two extreme separators, and this scheme is shown in the fig. 1. The difference from [1] here is that the reaction cells are uniformly distributed in the lead plate, so they were combined into one vertex, which made it possible to reduce the dimension of the problem. In addition, the contact area between the reaction mass and the lattice in which it is contained is so large that it can be assumed that heat exchange between the porous mass and solid lead occurs almost instantly.
Schematic representation of a storage battery. The arrows indicate the flows between the elements on fig. 2. The flow balances for the specified graph will be written as follows : where i a is an anode; j c is a cathode ; l is the sulfuric acid solution layer, surrounding a block of plates and separators; k s is a separator; w is the plastic case. In contrast to [1] the flows between the vertex AB q  were calculated how the thermal conductivity of the adjoining media according to the following relations: T are temperatures of vertices A and B, respectively. The minimum in (6) means that the minimum thermal conductivity is the limiting factor for heat transfer between two different phases. The terms in this system of equations are calculated as follows: () II  is the charge/discharge current; x  is the extent of reaction; e  is stoichiometric coefficient of a chemical reaction for electrons. In this work, the heat capacity (11) of a vertex inhomogeneous in chemical composition was calculated as the average of the heat capacities of the components of this vertex, taking into account their weight fraction at the vertex: The same operation was done for thermal conductivity: By combining balances (1-5) and equations (6-10), the following system of equations is obtained: where () T 

AA
is the Kirchhoff matrix defined by the flow graph adjacency matrix. This matrix reflects the connections during heat transfer between the vertices.

GG
is the matrix taking into account the contribution of internal sources. Vector D (14) is associated with the internal heat capacity (thermal inertia) of the tops and their internal drains and sources, in this case with chemical reactions, and looks like this:

DD
. (14) As can be seen from (14), chemical reactions occur only at the vertices that correspond to the electrodes, since the reaction mass is located there. The inertial part is inherent in all the vertices of our graph.
The inhomogeneous part (15) includes the Joule heat and the boundary condition and will look like this: The diagonal matrix (17) of the contribution of internal sources is as follows:

GG
. (17) In the course of the calculation, it was found that due to the specifics of the problem, in order to reduce computations in time, it is important to choose the most suitable difference scheme [5]. We will be guided by the following reasoning. Imagine a certain peak, the balance for which will be written in the following form: where ij A is transition coefficient between i-vertex and j-vertex; i b is internal sources of i-vertex; t  is the time step for the selected mesh. Taking into account these relations, after the necessary mathematical transformations, we arrive at the following system of equations (19) for the temperature at the step k+1: where ; E is the identity matrix.
This system (19) resembles a left-handed difference scheme. For the right-hand difference scheme, the original balance equation will look like this: This relation leads to the following difference scheme (21): Equations (18-21) reflect the physical side of the difference schemes.

Results of calculation
To test this method, we used data from the same lead-acid battery as in [1]. In contrast to [1], the calculations of the temperature dependence on time are supplemented by the calculation of coefficients at each step, which are polynomials in temperature. Fig. 3 shows the change in the temperature of the battery cells depending on the operating modes at a current equal to 100 A. Fig. 3. The temperature of the components inside the battery? Its capacity is 1000 A with external load 100 A; "PC" calles positive electrodes, "NC" calles negative electrodes, "sep" calles separators, "l" calles the sulfuric acid solution layer, "w" calles the plastic case.
As can be seen from fig. 3, the temperature during charging is higher than during discharge, while after about 4 hours of operation during discharge and 3 hours of operation during charging, the temperature of the battery becomes higher than the optimal temperature of its operation (~25 C o ). Separator and electrode temperatures are not very different. This is due to the fact that between these vertex there is a fairly fast heat transfer, which at the selected time step leads to a state of equilibrium. The difference in the temperature of the plastic case from other elements is more noticeable: the thermal conductivity coefficient of the plastic case (0.2 W/(m·K)) adopted by us is two times lower than the thermal conductivity of the sulfuric acid layer, and according to the proposed formula (6) this value will be limiting. In addition, this circumstance reflects the condition of the constancy of the external temperature for the battery, adopted in the model. From the calculations performed, it follows that it is impossible to judge the internal temperature of the battery by its outer casing and external temperature control may not provide permissible internal temperature loads. For more reliable results, experimental estimates of the transfer coefficients used in the computational experiment are required.
In the calculations, it was assumed that after a full charge (discharge), the chemical reaction of sulfuric acid and the reaction mass in the cells stops. When calculating the charge mode, the initial battery charge was 0%, while in the discharge mode, the initial charge was 100%. The results obtained are in good agreement with the results obtained in [6], where the total battery temperature was calculated. The step was chosen by selection 10 t  s, at which the computation time in the Matlab environment is about 100 times longer than that of the left-hand difference scheme, which requires a much smaller step equal to 0,01 t  s. However, this was achieved by combining identical vertices into one, with the exception of the extreme separators. Thus, instead of 43 vertices, 8 vertices were obtained, which led to a system of equations of 8 unknownsIn this case, at each step, the coefficients were calculated depending on the temperature, namely: the heat capacity of the components, their thermal conductivity and the entropy of the reacting substances (PbO2, Pb, PbSO4 and solutions of H2SO4). Thus, the task is to find an algorithm for calculating the optimal time step for the chosen difference scheme. Also, during the simulation, an assumption was made that the mixing of acid solutions occurs instantly and its concentration due to a chemical reaction changes throughout the entire volume of the battery also instantly, depending on the degree of its charge. Fig. 4 shows a comparison of the temperatures of the elements depending on the daily load. The daily load in fig. 4 was modeled on the basis of a sinusoid to reflect the frequency of energy consumption: during the day the load is maximum (50 A), at night it is minimum (0 A). As shown in fig. 4, the battery is discharged within 38 hours. The battery temperature rises over time and may rise above its optimum operating temperature. In order to prevent this, it is necessary to regulate the ambient temperature in the storage room, which will be the boundary condition for the system under study.

Conclusion
This work is a continuation of the study of the use of flow graphs in modeling dynamic systems using the example of a lead-acid battery. This object was chosen for modeling due to the significant functional heterogeneity of its structure, which leads to problems in the construction of a differential model and its numerical solution. This is due to the need to reconcile dissimilar physical aspects when describing battery performance and to deal with discontinuous functions. In contrast to previous studies, calculations of the temperature of the components under dynamic conditions are carried out here. The calculations were carried out in the Matlab environment.
During the study, it was found that the choice of the difference scheme affects the calculation time: to calculate according to the Euler scheme (right-hand difference scheme) it is necessary to spend 100 times more time than when calculating according to the lefthand difference scheme.
There is one more aspect of the numerical search for the equation of evolution of a dynamical system, and this aspect is the choice of the optimal time step. The authors assume that its choice is influenced by the internal structure of the object under study, which is reflected by its connectivity matrix of the flow graph of the object. This structure, in fact, we set ourselves, building a graph for the dynamical system under study.