## 2 Materials and Methods
### Development of ANG Management Framework and Tool
#### 2.3.2 Development and Implementation  
Development Methodology  
The ANG routine gas flaring management tool prototype consists of a front-end for interfacing with the user and a hybrid backend which comprises a data manipulation and calculation engine and real-time simulations of gas flaring processes. The tool's main functions have been subdivided into three sub-tools. A procedural programming paradigm was employed when developing the ANG routine gas flaring management tool as each sub-tool relies on the execution of the previous sub-tool. They work together to produce a cohesive tool that directs, maintains, and shares data and user input, ultimately assisting the user in making decisions and comprehending the applications. Implementation  
The ANG routine gas flaring management tool has been implemented primarily using the MATLAB UI figure component, which allows for building and designing graphical user  
Figure 7: Plug flow reactor [27]. interfaces (GUI) using drag and drop controls on the frontend and a backend that allows functionality to be added using familiar MATLAB syntax and functions. The descriptions and functionality of each tool are outlined as follows. 1. Decision Phase Sub-tool  
This tool tests the amount of associated natural gas to be flared against the various regulatory criteria to justify as fit for utilisation or not. The average volume of gas produced (V\({}_{\rm P}\)) and flared (V\({}_{\rm F}\)) per year in the field are provided as independent variables, while allowable flare volume (A\({}_{\rm V}\)), carbon emission value of flared gas (CO\({}_{\rm 2(e)}\)V\({}_{\rm F}\)), and allowable flare volume (CO\({}_{\rm 2(e)}\) A\({}_{\rm V}\)) are provided as dependent variables (since they depend on V\({}_{\rm P}\) and V\({}_{\rm F}\) for their evaluation). Furthermore, these variables are employed to answer various regulatory questions that determine if utilisation or conservation of the ANG is required or not based on the conditions highlighted in Figure 8. The Nigerian government has not adopted a particular allowable flare volume to limit the degree of flaring activities carried out by the oil and gas industry [16]. However, the Nigerian Department of Petroleum Resources (DPR) reported in their 2018 annual oil and gas report that 10% of the ANG generated in 2018 was flared [14,16], which represents or assumes the current permissible flare volume rate for oil and gas operations. Here, A\({}_{\rm V}\) is set to 10 percent of V\({}_{\rm P}\) in this paper, and the CO\({}_{\rm 2(e)}\)V\({}_{\rm F}\) equals V\({}_{\rm F}\)\(\times\) 54.8 and CO\({}_{\rm 2(e)}\) A\({}_{\rm V}\) equals A\({}_{\rm V}\)\(\times\) 54.8 (1 million standard cubic feet of gas equal 54.8 tonnes of CO\({}_{\rm 2}\)[28]). Furthermore, to evaluate each condition, this phase solely analyses the CO\({}_{\rm 2}\) emissions (rather than the ANG compositions) linked with the presumed ANG volumes (assuming that the ANG is flared). This part of the routine ANG flaring management framework (RAFMF) is crucial because it explains why the volume of ANG flared must be utilised instead. The Decision Phase contains the majority of the regulatory aspects of the framework. If the volume of gas flared is deemed greater than the allowable volume, it signals a need for gas utilisation and moves on to the next stage. Figure 8 shows the decision stage flowchart. Decision Phase--How It Works  
The Decision Phase tool accepts two primary inputs, the gas production (V\({}_{\rm P}\)) and gas flared (V\({}_{\rm F}\)). These inputs are stored as global variables, which are then used to calculate a third variable, allowable volume (A\({}_{\rm V}\)). Using these variables, a series of conditions are evaluated, and their resulting outputs are translated to binary decisions for each condition and indicated with green or red colours using the lamp instrumentation control. All the conditions are then evaluated together to ultimately decide whether to reduce to target threshold or not.