In times of a pandemic, one of the most useful tools in developing strategies to contain the advance and damage of Sars-VOC 2 is computer simulation. With different models of population contagion, recovery and evolution of the general number, comparing the infected population and the number of beds available, for example, it is possible to make serious planning and predict different scenarios. ATS- Aerothermal Solutions (ats4i.com.br) developed original studies based on the open literature on the situation in Brazil and the state of São Paulo using different infection models. This is part of a pro-bono collaboration between ATS and the IPT (Instituto de Pesquisas Tecnológicas) in the humanitarian effort to forecast ICU and ventilator demand for the State of São Paulo. The model was validated with real data from several countries such as China, Germany, Spain, Belgium and Brazil. In this article, we will explore the SIR model: a biological model of population dynamics that emerged in the early 20th century, being the precursor of all models epidemiological tests and which was also used in the ATS for initial analyzes that were improved and will be discussed in future articles.

This method is important in the current situation because, being able to predict the evolution of the disease in a given region or country, it is possible to predict when the highest peak of infections and deaths will occur. It is then possible to compare this number to the number of beds available in the same region to verify and classify the situation of the pandemic locally. Recently, the concept of flattening the curve has been very much in evidence for precisely this reason: it is a dilution of the number of infected people as a function of time to avoid the collapse of health systems. Mathematically, this is a result obtained according to the SIR model, which will be explored later.

## SIR Mathematical Model

The SIR model takes into account the division of a population of size N, affected by a disease, into three subgroups. The first of them is the S group, composed of people who are susceptible to contagion, I the infected people and R the group of recovered. The latter is the group that brings together both individuals who, in fact, recovered from the disease, as well as those who lost their lives. The way these three groups evolve over a period of time is represented by S(t), I(t) and R(t). First, birth and mortality rates of the general population are disregarded, so that the total number N remains the same during the course of the disease. This is important, as recovery and infection/mortality rates from COVID-19 are fast-paced events, within just a few weeks. Based on these three rates, it is possible to forecast the population of a country, using the data published by the health agencies of each locality.

The population susceptible to contagion is, initially, the entire population, with infection and recovery rates equal to 0 at the moment just before the confirmation of the first case in the country, when individuals are assigned to group I. When the first cases of infection are confirmed, the variable of infection velocity over the time of the disease is considered, which plays a key role in the analysis: the higher the infection velocity, the faster the peak of the curve, which, in terms of public health, it’s dangerous. This is because there is no way to guarantee an excessively large number of infected people needing ICU beds, as is the case with several patients affected by COVID-19. From these data, the curve of infected as a function of time is constructed.

In the same way that the variable of infection speed over time arises, fortunately, the recovery rate over time also arises. This is the rate at which the number of individuals who recover as a function of time or who, unfortunately, lose their lives, assigned to group R. For example, given 1 week of analysis, how many people recovered or died in the country/state? From these data, then, the evolution of the number of recovered ones is constructed as a function of time.

Now, we have in hand the evolution rates of the groups I and R as a function of time. Group S, in general, will have an evolution according to the speed of infection in time in relation to the total number of individuals in the population. The group of infected, I, will vary according to the effective number of infected, but reduced by the recovery rate over time. This rate, in turn, is the only one that will affect the number of individuals in the R group.

Mathematically, the variations of the three groups are written as ordinary differential equations, basically, as the already mentioned time evolution of the growth/decay of the three groups. These equations are shown below. In them, it corresponds to the speed of infection in time and the rate of recovery in time.

The solution of these equations provides the variation for each individual group. Comparing them, one can get an idea about the maximum peak of contamination, for example. Below, the graph for Brazil follows the evolution of the three groups as a function of time, allowing important predictions regarding the peak of infections in the country.

The peak of the red curve should be used for the percentage calculation of the need for ICU beds. Social distancing measures have the function of diluting this maximum number of infected so that, in percentage, this percentage obtained by the red curve is lower than the available number of ICU beds.

## Collaboration for the development of the SIR-D model

As an implementation of the SIR model, the ATS, in collaboration with Giuliano Belinassi, from the Institute of Mathematics and Statistics at USP, divided the R group into two subgroups: that of deaths and those who effectively recovered from COVID-19. This change, mathematically, does not change the form of the differential equations mentioned above, but provides precious information about the evolution of the disease in society. This model is called SIR-D. Applied to Brazilian society, for example, the results presented in the figure below are obtained, which compares the forecasts with the real situation in Brazil according to data released by health agencies. In blue, the group S of susceptible people; in orange, official data on the number of infected people; in red, data on those actually recovered from the disease; in purple, the group R in general (recovered and dead); in brown the official numbers of deaths in the country; finally, in pink, the estimated number of deaths.

## The Equations of the Mathematical Model

The equations solved for the SIR-D model are presented below, where the term corresponding to the number of recovered is divided into two new variables, and , which also evolve in time and correspond to the cured and dead rates, respectively.

The SIR model is the most simplistic to be considered in a pandemic situation, since it disregards the birth and mortality rates of individuals, but this is not its only simplification. In different contexts, the applications of the SIR model may also vary. The SIR model is important and was the precursor of all the other epidemiological models that will be presented throughout this series, in addition to having applications in different contexts, some studies show: spreading of internet viruses, digital marketing, social media and finance/economy.

See the image gallery