Mobile Application Development to Assess the Level of a Safety Warehouse of Petroleum Product

The importance of oil for Russia, its storage in warehouses of oil and oil products, as well as the danger associated with the occurrence of accidents and incidents are considered. Examples of accidents that have occurred with the resulting consequences are given. The necessity of carrying out checks using checklists is revealed. Using the modeling method, a mobile application has been designed and developed, which contains a checklist consisting of questions on assessing the industrial safety of an oil product storage warehouse. The mobile application will allow you to conduct a “self-test” of the protected object on all issues of industrial safety, according to the checklist. Notification of upcoming inspections will provide an opportunity to prepare in advance for inspection by regulatory authorities in the field of industrial safety. Notification of violated dead-lines for eliminating the comments and shortcomings identified during the check will allow the management of the facility to respond in a timely manner and thereby ensure reliable protection of the protected object.


Introduction
It is difficult to imagine the modern world today without the use of crude oil and gas processing products. [1], [2], and also from it you can get plastic, various chemicals, rubber, synthetic fibers and even cosmetics. Therefore, oil is in great demand [3]. Currently, the key energy re-sources in Russia are oil and gas. Oil and petroleum products account for 80%, and natural gas makes up 20% of the export of energy carriers from Russia [4].
The oil and gas industry is a huge complex of enterprises for exploration, production, transportation, oil and gas processing [5]. Due to the high demand, there are a lot of such objects throughout the country. According to the legislation of the Russian Federation [6], most of the production facilities in the oil and gas industry are hazardous production facilities, which means an object where an accident may occur during its operation.
In the event of an accident, an explosion, fire, oil or oil product spill may occur. Such accidents occur at facilities with flammable or combustible liquids, warehouses or storage facilities for oil and oil products. possible for the fire to spread beyond the tank farm. In such cases, fires can develop into man-made environ-mental disasters.
For example, in the Kiev region on June 8 -June 16, 2015, a major man-made disaster occurred. It was caused by the ignition of oil products at the oil depot. As a result, 6 people died and 15 were injured. 17 tanks were destroyed, at the time of the fire there were 15,000 tons of oil products at the oil depot. Burned out a huge amount of petroleum product [19].
The fire causes environmental harm to nature and humans. As a result of the combustion of an oil product, sulfurous and sulfuric anhydride, carbon monoxide, nitrogen oxides, gaseous and solid products of incomplete combustion of fuel, sulfur oxide are released into the air, which in turn causes the formation of acid rain containing sulfuric acid, sulfites and sulfates ammonium [20].
In addition to enormous environmental damage, oil spills entail large economic costs, including for the repair of damaged equipment and elimination of the consequences of oil spills, which include: costs of oil spill response; costs of land reclamation; losses of oil and oil products; equipment restoration costs; equipment downtime; the cost of paying the environmental fine.
Scientists analyze the causes of accidents at oil depots and study technologies to ensure safety by improving the risk management system. In work [21] It is shown that the use of the FLACS program for modeling the cause of an accident, such as a change in pressure and temperature of an explosion, will allow using the results obtained to investigate an accident, assess the safety of equipment, and also develop proposals for the prevention and improvement of safety at a hazardous production facility. The article [22] a forecasting method is proposed aimed at assessing the probability of a domino effect at different levels caused by a lightning strike into a reservoir and further propagation of the consequences of a lightning strike on a tank farm. In research [23] Based on the studied accidents associated with large fires and / or explosions at oil depots storing flammable liquids, norms, standards and models have been determined that provide safer distances for these types / sizes of tanks. In work [24] it is proposed to apply a safety management assessment system for two petrochemical tanks, which allows to identify problems existing in the safety management of enterprises. The article [25] provides an overview of tanks and tank farm with significant causes of incidents related to aboveground tank design failures, operational problems and maintenance issues, with appropriate discussion of the implementation of process safety management and regulations. In [26] the safety of technological processes and the procedure for eliminating emergency situations arising at explosive and fire hazardous facilities with the presence of flammable liquids, as well as the causes and mechanisms of the occurrence of an emergency are considered. In work [27] three stages of static storage tank leaks are analyzed and a model is proposed that has been tested on small scale tank leakage for the leak alarm time. The article [28] the reasons for the failure of a tank in a crude oil refinery have been analyzed, and fracture models and hydrodynamic calculations have been developed to identify the causes of failure, as well as to reconstruct the sequence of events.
Consequently, the problem of ensuring fire and industrial safe operation of the tank farm remains relevant.
One of the mechanisms for ensuring fire and industrial safety at tank farms is the control over the object of protection by the employees of the facility and supervisory authorities.
Control over the safety of a tank farm is a rather complex task, which can be solved by using IT technologies, using automated workstations, as well as mobile systems (laptop, tablet).
In the legislation of the Russian Federation [29] introduced provisions on the use of check-lists (checklists) during inspections. Checklists can be used by both the regulatory authorities and the inspected persons, who can use them to conduct a "self-test" of the protected object and eliminate the existing comments and shortcomings [30]. Safety checks of the protected object are carried out by examining the object itself, using visual inspection, instrumental measurements, as well as comparing the actual state of the protected object to the requirements of regulatory documents.
The idea of creating an application for conducting checks (control) using mobile devices is not new. However, the creation of an application that will facilitate the conclusion of questions for checking the industrial safety of oil and oil products warehouses, compose them in the required order, ensure the output of results at any time, and also send timely notifications, according to the authors of the article, is a necessity today.
The relevance of the work lies in the lack of software that allows the use of mobile gadgets for assessing the industrial safety of oil and oil products warehouses.
The purpose of the research is to develop a mobile application for assessing the industrial safety of an oil and oil products storage warehouse.
Tasks to be solved: 1. Determine the list of questions that will be included in the checklist of the storage warehouse for oil and oil products. 2. Determine the services that will allow you to present the necessary functionality of the mobile application in the form of an image, will allow you to draw the design of the toolbar and the layer panel, ensure its stable operation and protection. 3. To develop a mobile application for assessing the industrial safety of an oil and oil products storage warehouse.

Methods
In the course of this study, the following were used: the method of analysis of literary sources, the method of modeling and the method of synthesis.
The method of analysis of literary sources allows you to analyze the regulatory documents from which the main content of the mobile application will be selected.
A mobile application was designed and developed using the simulation method. Initial data of the modeling method: Figma online service, Android Studio development environment.
Figma online service [31] allows you to present the necessary functionality of a mobile application in the form of an image and develop its design.
The use of Android Studio is due to the fact that Android operating systems have spread to mobile devices around the world [32]. Android studio is a development environment that supports programming languages such as Kotlin, Java, C ++. With the help of it, the application design will be translated into code.
At the end of the research work, a synthesis method will be used, which will allow to com-bine the information received, draw conclusions about the research results.

Results and discussion
First of all, in order to determine the necessary information that will appear in the application, it is necessary to analyse the requirements of regulatory documents in the field of industrial and fire safety for oil and oil products warehouses.
In the Russian Federation, to ensure industrial safety at warehouses of oil and oil products, the Federal norms and rules in the field of industrial safety "Rules of industrial safety of warehouses of oil and oil products" [33] and Rules for the technical operation of tanks and instructions for their repair [34]. In industrial safety regulations [33] the requirements for ensuring the safe operation of hazardous production facilities of oil and oil products warehouses, industrial safety requirements for the systems of engineering support for hazardous production facilities of oil and oil products warehouses, the procedure for maintenance and repair of technological equipment, tanks and process pipelines, engineering systems provision of oil and oil products warehouses at hazardous production facilities, as well as requirements for the maintenance of the territory, buildings and structures of hazardous production facilities of oil and oil products storage facilities.
Requirements in the field of fire safety of the tank farm are given in the Technical Regulations "On Fire Safety Requirements" [35], Fire safety regulations in the Russian Federation [36] and the Codes of Rules "Warehouses of oil and oil products" [7].
The constituent parts of the oil and oil products warehouse include linear branches from the main oil product pipelines, railway racks and automobile stations with the function of unloading and loading oil products, unloading berths, tank farms, warehouse buildings that perform the function of storing oil products, process pipelines, pumping units.
Engineering support systems include automated control systems, electrical supply and electrical equipment, lightning protection of equipment and protection against static electricity, communication and warning systems, ventilation equipment, water supply and industrial sewerage systems.
In the Russian law N 294-FZ [29] the provisions on the use of checklists (checklists) by control (supervision) bodies when conducting scheduled inspections have been spelled out. Check-lists are developed and approved by state control bodies in accordance with the general requirements determined by the Government of the Russian Federation [30].
For the implementation of state supervision in the field of industrial safety during inspections at warehouses of oil and oil products, a checklist form was developed [37]. The list of control questions allows to assess compliance with the requirements of the rules of industrial safety of warehouses of oil and petroleum products [33]. The checklist form contains a list of 433 checklist questions.
Checklists can be used to conduct a "self-test" of the protection object and prepare for the upcoming scheduled inspection, thereby eliminating the existing comments and shortcomings and increasing the level of industrial safety at the protected object.
Nowadays, almost everyone has a smartphone or tablet, and mobile applications have become an integral part of our life. For many companies, one of the main advantages of using mobile devices is the automation of business processes. Everyone is trying to get rid of routine work as much as possible, which requires a considerable amount of documents, time and effort. For example, you can take the company SIBUR [49], which is the largest petrochemical company in Russia. This company has made a special department that deals with projects for the automation of processes occurring in production. One of these projects was a mobile application that allows you to check using a smartphone, fix equipment defects, and discuss this with your colleagues. Also, the project did not forget about safety. The developers of the project used special sensors and a mobile device iS-afeMobile on the Android OS, the manufacturers of which guarantee the explosion safety of their products.
To develop an application for assessing industrial safety at oil and oil products warehouses, the authors of the article used the same approaches and solutions as in Sibur.
The mobile application contains a checklist consisting of questions on assessing the industrial safety of an oil storage warehouse.
At the design stage of a mobile application, you need to decide on its functionality. First of all, you need to decide how the list of questions will be displayed. It is proposed to divide a large number of questions into sections and subsections, which will reduce the time spent searching for a specific question and carry out the check in stages, and will also make it possible to arrange the order of questions along the route.
Having decided on the procedure for checking the protected object, the user of the mobile application will be provided with a list of questions in the sequence of the check. To indicate compliance with the requirements of regulatory documents in the field of industrial safety, a E3S Web of Conferences 320, 03006 (2021) ESEI 2021 https://doi.org/10.1051/e3sconf/202132003006 field will be displayed for affixing a "mark". If the requirements of regulatory legal acts have been complied with on a specific issue, a "tick" must be put in front of the question. Otherwise, leave the "check mark" field blank. The scan results are saved with the ability to filter marked and un-marked items, which will allow the specialist to pay attention to items in which the requirements are not met and take measures to correct them. The next check will be able to use the results of the old check or create a new checklist.
Additional functionality can be attributed to the presence of sending notifications about the results of the check and the implementation of measures to eliminate comments and shortcomings in a timely manner. In case of delay in the implementation of measures to eliminate comments and shortcomings, a letter is sent to the head of the protected object about the violation of the deadlines for the implementation of measures to eliminate comments and shortcomings.
It is necessary to provide a "hints" function, which will allow you to refer to the points of the document on which the question was drawn up for verification.
The functionality of the mobile application provides a "calendar" with the ability to schedule upcoming inspections by control authorities, which will allow the head to prepare in advance for the upcoming inspection. You will be notified by phone or email.
In the "calendar", you can add a period of "self-control", when the manager or specialist of the protected object sets the days of verification with the ability to mark additional explanations in the "note" section.
It is convenient to have access to various auxiliary portals, resources, links to regulatory documents, which will allow a specialist to quickly access the necessary information.
The next stage of developing a mobile application is the development of UX / UI design. UX design is designing a simple and clear interface that will be convenient for the user to work with. UI design is directly visualization of UX design.
For the development of the interface of the mobile application, the Figma online service was used [31]. With its help, a mobile application has been designed. To begin with, draft screens are drawn for an approximate presentation of the functionality on the screen of a mobile phone. These screens include a rough vision of the checklist implementation and dividing the complete checklist into blocks that are highlighted on the checklist. After that, a thorough work on the development of UX design begins.
Previously carried out checks are implemented in the form of a list, for the convenience of finding the required check, they were divided into blocks that correspond to the date of the checks. The performed check is displayed in the form of a list object, which indicates the object of the check, the date of the check, the number of questions. Those questions that were marked with a "tick" are summed up and displayed as a number highlighted in gray, and next to them through the "/" sign, the total number of questions on the selected object of verification is highlighted in black. To view the scan results, click on the list object. When you click on an object from the list, it is highlighted in gray. For convenience, a round button with a "+" sign has been added to this screen, which allows you to create a new check. When pressed, the next screen for creating a check for the selected object opens.
This screen displays buttons with sections into which objects of oil and oil products warehouses are divided. To indicate that these items can be expanded, an "arrow" icon has been added opposite the section name. When clicking on the area of a specific section, the list of objects expands, then the user has the ability to select a specific scanned object. The selected object is high-lighted in gray when pressed. After selecting an object, you go to a screen with a list of security questions related to the selected object.
The layout of the screen with a list of check questions allows you to mark the questions with a "tick", which means that the requirements specified in the "question" have been met. Questions that have a list of sub-items can be collapsed into the question itself, by clicking on the "arrow", the question is expanded. Numbers are displayed next to the question to indicate the number of ticked items. The first number indicates the number of items marked, the second, after the "/" sign, indicates the total number of items available in the question.
You can sort the questions by "marked" or "unmarked", which will reduce the time spent searching for "unchecked" questions. To do this, he needs to click the "vertical ellipsis" sign in the header of the screen, after which the sorting criteria will appear. Sorting is performed by clicking on the required criterion.
At the end of the check, at the end of the list of questions, a button is added with the inscription "End-end check", when you click on it, an animation appears with the words "Check saved". The test results are saved and the test is sent to the screen as a new item of the performed tests. At the same time, the user automatically goes to the page with completed checks, and the performed check appears at the top of the list.
In the header of the screen, the object to be verified is indicated, as well as a search button and a "humburger" menu button.
Let us take a closer look at the humburger menu implementation. When you click on the "humburger" menu button, a list of items "calendar" and "Normative documents" appears on the left. When you click on the "calendar", a calendar of inspections is displayed on a new screen, in which you can mark the inspection period for which the "self-inspection" is planned, and such inspections are marked with a circle above the date. To select the day of verification, you need to double-click on the date, after which a pop-up window will appear with a choice of name, type of verification and a field for comments. The date of the official inspection by the industrial safety supervisor is highlighted in red. The current day of the calendar is marked in green, if you select another day, the day is marked in gray. The item "Regulatory documents" displays a list of regulatory documents that can be used if necessary. When clicking on a document, the mobile application takes the user to the site that contains the document.
At this stage, the development of the design of a mobile application in Figma is over. The next stage in the development of a mobile application is the design of the project architecture, the selection of programming patterns that allow you to write code on a scalable basis. It was decided to write the code in the Kotlin programming language [38], [39], because this way the application will be compiled into native code, which optimizes the process of user interaction with it. In the process of writing the code, object-oriented programming was used, the principle of which is contained in the SOLID pattern [40], [41]. It was decided to use the MVVM (Model View ViewModel) architecture, which allows maintaining the cleanliness and efficiency of the code [42].
At the first stage of programming a mobile application, it is necessary to transform the entire developed design into code. In Android Studio, markup files that support xml format will serve for this. [43]. Thanks to this approach, the UI layer will adapt to all possible sizes of dis-plays on smartphones and tablets with Android OS.
After the markup files are ready, you need to write Kotlin code for each screen that will handle all user interactions (touches, piles, etc.). This step will close the View layer from the MVVM programming pattern.
All data models will be stored in the application. In order to bind data and design, you need to implement the ViewModels classes. Thanks to these classes, we support data caching, that is, if the user flips the screen or restarts the application, all his data will be saved.
After this step, you need to build the structure of the local database, which will be stored: information about all checks, all control questions, sections for which checks take place. Now you need to implement all CRUD operations that will be performed with the database, or rather: saving, reading, changing and deleting objects from the database [44]- [46].
To ensure the stability of the application, tools like Firebase Analytics and LeakCanary are used. Firebase Analytics allows you to collect all information about the operation of the application when it is already available to users and, if an error occurs while working with the application, it will be displayed on a special developer panel [47]. LeakCanary is a special library that finds all dangerous places in the application where memory leaks can occur. [48]. We will use it to test the application. The final stage for testing the performance of the application will be programming autotests [48]. Such tests will automatically test the business logic of the mobile application and check the correctness of the functionality.
The final stage before publishing the mobile application will be setting up the ProGuard tool, which protects the application from hacking, by changing the source code to a text incomprehensible to a person [49]. In other words, the code of a mobile application can only be read by its developer.

Conclusions
The developed mobile application will make it possible to conduct a "self-test" of the protected object on all issues of industrial safety, according to the checklist. Notification of upcoming inspections will provide an opportunity to prepare in advance for inspection by industrial safe-ty supervisors. Notification of the violated deadlines for eliminating the remarks and shortcomings identified during the check will allow the management of the facility to respond in a timely manner and thereby ensure reliable protection of the protected object. 1. The regulatory documents in force on the territory of Russia have been analyzed and a list of issues has been determined for which a "self-examination" of the oil and oil products storage warehouse will be carried out. 2. Questions for checking were grouped into blocks (corresponding to a building, structure or external technological installation of a warehouse), for the convenience of users by the software application.
3. An application with a user-friendly interface has been developed, which allows the user to easily understand a huge amount of information, which will simplify the process of checking industrial safety at oil and oil products warehouses. 4. The application code was written taking into account the simplicity of its maintenance and adding new functionality as needed. 5. The basic functionality of the application (MVP or minimum viable product) has been developed.
Often, in the process of project development, some new ideas come up that change the functionality of the product, in this case, research has been carried out in the field of building such mobile applications, which made it possible to correctly determine the steps of application development. As a result, a mobile application was obtained that exactly corresponds to all the tasks set.
The tasks for the further development of the software application are defined: 1. Iteratively add new functionality based on user feedback, using the Customer Development methodology [50]. 2. Include in the appendix questions on the rest of the components of the oil and oil products storage warehouse. At the moment, the appendix contains questions about the tank farm, pumping station, railway loading / unloading rack and pipelines between these sections. 3. Turn on the functionality that allows you to carry out "self-tests" for fire safety. 4. Add the function of using prompts in case of difficulty in understanding specific points of regulatory documents ("comments"). 5. Automate the generation of documentation for completed inspections. 6. Integrate the work of the mobile application with the sensors installed at the facility.