PRES22_0231.docx DOI: 10.3303/CET2294168 Paper Received: 15 May 2022; Revised: 24 June 2022; Accepted: 26 June 2022 Please cite this article as: Jonach T., Jordan C., Haddadi B., Harasek M., 2022, Modeling and Simulation of 3-Phase Separators in the Oil and Gas Industry with Emphasis on Water Quality, Chemical Engineering Transactions, 94, 1009-1014 DOI:10.3303/CET2294168 CHEMICAL ENGINEERING TRANSACTIONS VOL. 94, 2022 A publication of The Italian Association of Chemical Engineering Online at www.cetjournal.it Guest Editors: Petar S. Varbanov, Yee Van Fan, Jiří J. Klemeš, Sandro Nižetić Copyright © 2022, AIDIC Servizi S.r.l. ISBN 978-88-95608-93-8; ISSN 2283-9216 Modelling and Simulation of 3-Phase Separators in the Oil and Gas Industry with Emphasis on Water Quality Thorsten Jonach*, Christian Jordan, Bahram Haddadi, Michael Harasek Thermal Processs Engineering – Computational Fluid Dynamics, Institute of Chemical, Environmental & Bioscience Engineering, TU Wien, Getreidemarkt 9, 1060 Vienna, Austria thorsten.jonach@tuwien.ac.at The operation and efficiency of 3-phase separators were investigated in this work using various simulation techniques. An overall model of a commercial 3-phase separation unit is established utilizing black-box modelling approaches and the open-source software DWSim. A gravity settling model based on the inlet conditions of the separator was created, which provides a general view of the water output quality of the separator in terms of oil residuals dispersed in the water outlet phase under dynamic conditions. Based on a test geometry of a typical separator in the oil and gas industry, this model was tested under specific working conditions that occur in oil production. The model shows a dynamic change of the oil residues at the water outlet of the separators at a start-up scenario in connection with the change in the water level. After reaching the optimum operating condition, the amount of oil in the water outlet settles at 14.21 kg/h. In the following simulation approach, a Computational Fluid Dynamics (CFD) simulation of the separator’s test geometry was created. The CFD model gives good results in the area of phase interaction between oil and water but needs further work to calculate the dispersion properties of the oil in water. 1. Introduction In oil and gas production, the incoming fluid from the underground reservoir is typically fed to a 3-phase separator in the first processing step to separate the bulk of the different phases (Arnold and Steward, 2008). These 3-phase separators are large settling tanks, which lead to a separation of the different phases due to their different compound densities. An example of a 3-phase separator using a weir to separate the oil phase from the water can be seen in Figure 1. Figure 1: Exemplary 3-phase separator The rating and sizing of 3-phase separators can be done by empirical methods (Monnerey and Svrcek, 1994) based on the vertical droplet velocity of a liquid droplet in a continuous phase. This vertical velocity can be calculated by Stoke's Law 𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣 = 2 9 𝑣𝑣 2𝑔𝑔(𝜌𝜌𝑜𝑜𝑜𝑜𝑜𝑜−𝜌𝜌𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤) 𝜂𝜂 (1) 1009 Where 𝜌𝜌𝑜𝑜𝑣𝑣𝑣𝑣 and 𝜌𝜌𝑤𝑤𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣 describe the density of the phases regarding an oil dispersion in a continuous water phase. To size a separator with empirical methods, a minimum stable droplet radius is often chosen (Monnerey and Svrcek, 1994). Based on the vertical settling velocity and the horizontal velocity inside the separator, the path of the droplet can be calculated. When various dynamic processes occur, such as a change in the composition of the mixture at the input or non-optimal operating conditions of the separator, the parameters of the oil separation processes change and, consequently, the oil residues at the output. One approach for the determination of separator efficiency, as shown by Sayda and Taylor (2007) is that the droplets in the different phases reach the already specified separated phase areas after a certain distance has been covered. Dispersion particles that do not fulfil this requirement are considered not separated and are then added to the water output phase as impurities. In real oil in water dispersions, however, there is not only one smallest possible droplet diameter, but a distribution of different droplet sizes which interact with each other. This leads to a small amount of oil residuals (300-3,000 ppm) which can still be found at the water outlet of 3-phase separators used in industry. To get a more detailed view of the oil droplets in the separator outlet, a description of the oil dispersion can be made using not only the smallest available oil droplet but instead diverse size groups of oil droplets in the water phase (Backi et al., 2018). In this approach, the distribution of dispersions in the different phases (oil-water and water-oil) is modelled by discretizing the geometry and introducing a population balance for the respective dispersed phase particles. Another method for accurately describing the operating characteristics in oil-water separators is the simulation of these systems using computational fluid dynamics (CFD). To simulate the multiphase fluid flow inside the separator, the Eulerian-Eulerian approach has become established (Acharya and Potter, 2021) and the modelling of the droplet interactions is achieved by using a population balance (Pouraria et al., 2021). The computational fluid dynamics approach, as well as the discretization of the geometry of the separators combined with a population balance for the oil residues in the water, provides high accuracy in describing this problem but requires a large amount of computational resources. The implementation of such discretization methods in most commercially available process simulation programs, which allow providing fast simulation results of large plants, is often difficult due to the required simulation time not being favourable in many industrial applications. The aim of this work is the creation of a black-box model, which is able to take into account the dispersion of oil in water by means of a distribution function of the oil droplets and at the same time provide information about the oil content in water under various dynamic conditions utilizing minimum computational effort. To enhance the black-box model, a more detailed investigation of the separator was carried out using computational fluid dynamics. 2. Methods In the black-box model, the Rosin-Rammler distribution is utilized to formulate the initial dispersion of oil in water and calculate separation efficiency by applying Eq. (1) to the different size groups. Utilizing this modelling method, statements can be made about the total efficiency of 3-phase separators. In order to model the dynamic effects on the oil residuals in a 3-phase separator, a custom model of a separator has been established with the open-source chemical process simulation software DWSim (DWSIM Version 7.5.1, Medeiros 2022). DWSim already features a large number of pre-build unit operations, but also allows the implementation of custom units via python scripts. A dynamic simulation routine was implemented via python using the already existing dynamic capabilities of DWSim. A test geometry of a separator was created, which fits the usual commercial separators used for the separation of oil, gas and water in mature oil reservoirs. The geometric properties, as well as the involved flow properties can be seen in Table 1. The Flowsheet model can be seen in Figure 2. Table 1: 3-phase Separator Test Geometry Property Value Unit Length 12 m Diameter 3.2 m Weir Position 8 m Weir Height 1.5 m Inlet Flow 205000 kg/h Water Fraction 0.89 Mass Frac. Oil Fraction 0.05 Mass Frac. Gas Fraction 0.06 Mass Frac. Density Water 1000 kg/m³ Density Oil 850 kg/m³ Density Gas 0,7 kg/m³ 1010 Figure 2: Flowsheet model The dynamic schedule of the custom script has been linked to the DWSIM's dynamic simulation routine in compliance with the separators' physical properties. During every time step, the current operational parameters of the separator are calculated and then stored in dynamic variables. In accordance with two PID controllers at the outlet valves and the parameters, which represent the conditions inside the separator, the outlet flow is then calculated. In the following time step, these dynamic variables are initialized to the models' parameters, and the subsequent calculation step is carried out. 2.1 Black-Box Model Calculation Routine As the first step in the calculation routine during each timestep, DWSim's implemented Vapor-Liquid-Liquid- equilibrium (VLLE) calculation is performed on the incoming stream. The properties of the resulting phases (oil, water, and gas) are then used to determine the operating conditions inside the separator. The physical properties of the different phases are modelled using the in-built Peng-Robinson method (Olugbenga et al., 2021). Based on the implemented python script, the current operational parameters of the separator, like vessel pressure and liquid volume, are then calculated. For the calculation of the oil phase in the water, a carry-over model, as well as a gravity settling model, was implemented. The carry-over model can be used to assign an amount of oil which is then directly transferred to the water output stream in accordance with the mass balances inside the separator. The gravity settling approach uses an initial Rossin-Rammler distribution for the oil droplets in the separator's water phase to determine the amount of oil in the separator's output phase. This distribution can be seen in Figure 3. Figure 3: Initial starting point for oil droplet distribution in the water phase at the inlet 1011 For each individual size group in the distribution, Eq.(1) was used to calculate the vertical velocity of separation. According to Sayda and Taylor (2007) the residence time of water in the separator can be calculated with Eq.(2), where 𝑉𝑉𝑊𝑊𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣 describes the current water volume inside the separator and 𝑄𝑄𝑊𝑊𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣 the current water output: 𝜏𝜏 = 𝑉𝑉𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤 𝑄𝑄𝑊𝑊𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑤𝑊𝑊𝑊𝑊𝑤𝑤 (2) Water Height and Vessel pressure are calculated in compliance with the work of Al-Hatmi and Tham (2006) and the separator's geometric properties. The horizontal velocity of an oil droplet can then be calculated using Eq. (3). 𝑣𝑣ℎ𝑜𝑜𝑣𝑣𝑣𝑣𝑜𝑜𝑜𝑜𝑜𝑜𝑣𝑣𝑣𝑣𝑣𝑣 = 𝐿𝐿 𝜏𝜏 (3) Since the exact dimensions of the separator are known, it can be estimated whether a droplet in the water phase reaches the set point (weir height) where it is considered to be separated after a certain distance travelled or not. This calculation process, in accordance with the dynamic schedule, provides a statement about the oil content at the water outlet of the separator. In order to simulate the dynamic effects of a 3-phase separator, the scenario of a start-up of the separator was chosen. The separator is filled slowly, and when the threshold values for water height and vessel pressure are reached, the corresponding valves at the outlets are opened. The phases are then transferred to the outlet streams. This scenario was chosen to simulate the effect on the separator effectiveness in a highly dynamic behaviour for a simulation time of 45 min. 2.2 Computational Fluid Dynamics Modelling Approach In real separation units, a variety of other effects, like droplet coalescence and breakup, occur, which are not accounted for by the black-box model. One way to give more accurate estimates of separation behaviour is the simulation of 3-phase separators using computational fluid dynamics. The volume of the fluid method was used in this approach to capture the different phase interfaces in the separator and to gain knowledge of phase interactions in the separator. In this volume of fluid method, the phase fraction in the discretized mesh is calculated using an additional variable α, which represents the current phase fractions inside a cell. A CFD simulation is more accurate and will be used to refine the faster and more resource-efficient black-box model. 3. Results and Discussion 3.1 Black-Box Model Based on the gravitational settling of oil in the water phase, the previously described procedure was applied to a complete start-up of the 3-phase separator. The dynamic response of the overall system can be seen in Figure 4. Figure 4: Dynamic states of the operational parameters of a 3-phase separator at start-up The water level increases continuously up to a point where the reaction of the PID controller at the outlet valves causes the water in the separator to be drained. The discharge rate reaches a high point due to the static pressure of the water phase and the gas pressure in the separator. According to Eqs. (2) and (3), the residence time decreases in this area of the time sequence, and more oil is discharged into the water phase. The dynamic values of the oil in the water phase can be seen in Figure 5. 1012 Figure 5: Dynamic state of oil residuals in water output at start-up The oil residuals show a good agreement with the values of the dynamic properties in Figure 4. The discrete distribution of the size groups can explain the stepwise resolution of the values in Figure 5. The total value of oil in water at the outlet after stabilization of the system is 14.21 kg/h. 3.1 Computational Fluid Dynamics Model A total geometry based on the data in Table 1 was created. A mesh of the geometry was created using snappyHexMesh, an implemented meshing utility in OpenFOAM. The solver used for this task is multiphaseInterFoam implemented in OpenFOAM 9. A detailed list of all boundary conditions can be seen in Table 2. Table 2: Boundary Conditions for CFD simulation of 3-phase separator Property Velocity Pressure Inlet fixedValue (1.4 m/s) fixedFluxPressure Gas Outlet inletOutlet (no backflow) totalPressure (1e5 Pa) Water Outlet inletOutlet (no backflow) totalPressure (1e5 Pa) Oil Outlet inletOutlet (no backflow) totalPressure (1e5 Pa) Walls noSlip fixedFluxPressure To gain a better resolution of the different phase boundaries, an adaptive mesh was used. The modification of the mesh at the phase boundaries during the simulation can be seen in Figure 6. This adaptive approach provides better resolution of the phase boundaries between oil-gas and water. In Figure 8, the simulation results can be seen. Figure 6: Adaptive mesh refinement at the phase boundaries of oil, water and gas This adaptive approach provides better resolution of the phase boundaries between oil-gas and water. In Figure 8, the simulation results can be seen. The interfaces between the phases can be well represented by this method, but it is not possible to simulate the oil dispersion in water due to the limitation of the mesh in terms of computational effort. One possibility, which will be addressed in future works, is the implementation of a population balance (Kharoua et al., 2013) in order to be able to make statements of separation efficiency in the water phase using computational fluid dynamics. 1013 a) b) Figure 8: 3D Model of the 3-phase separator (a) and vertical slice displaying oil layer in the separator (b) 4. Conclusion A model of a 3-phase separator was created, which is able to represent dynamic operational parameters during various operating conditions. The focus was on the modelling of the residual oil in the water output in order to create a predictive model to ensure the highest possible purity of the water. For this purpose, a gravity settling approach was chosen. By modelling the dispersion of oil in the separator’s water phase using a Rosin-Rammler distribution, the separation of this dispersion can be simulated in accordance with the geometric dimensions of the separator. This model was then tested using an exemplary geometry of a typical 3-phase separator used in the gas- and oil industry. To demonstrate the model capabilities for simulating the dynamic behaviour of the separator, a start-up of a separator was simulated until a steady-state operating point was reached. The results of this simulation were then presented in this paper. At the steady-state operating point, 14.21 kg/h of oil is delivered to the water phase. Depending on the operating condition, the model can give values and trends for the contamination of oil in the water phase. In order to provide more precise information on the dynamic behaviour of the separator, the process was subsequently simulated using computational fluid dynamics. The selected volume of fluid approach delivers good results in the area of the phase interfaces. However, further work in the area of modelling is necessary for the exact determination of the oil content in the water outlet using this simulation technique. References Acharya T., Potter T., 2021. A CFD study on hydrocarbon mean residence time in a horizontal oil–water separator. SN Appl. Sci., 3, 492. Al-Hatmi N., Tham M., 2006. Dynamic Modelling and Simulation of a Three-Phase Gravity Separator. Proceedings 5th MATHMOD, 81, Vienna, AUT, DOI: 10.11128/arep.29. Arnold K., Stewart M., 2008. Surface Production Operations, Editor(s): Ken Arnold, Maurice Stewart. Gulf Professional Publishing, Oxford, UK, 244-315, ISBN: 9780750678537. Backi C., Grimes B., Skogestad S., 2018. A Control- and Estimation-Oriented Gravity Separator Model for Oil and Gas Applications Based upon First-Principles. Industrial & Engineering Chemistry Research, 57, 7201- 7217, DOI: 10.1021/acs.iecr.7b04297. Kharoua N., Khezzar L., Saadawi H., 2013. CFD Modelling of a Horizontal Three-Phase Separator: A Population Balance Approach, American Journal of Fluid Dynamics, 3, 101-118. Medeiros D., 2022. DWSIM, , accessed 11.04.2022. Monnery W., Svrcek W., 1994. Successfully Specify Three-Phase Separators. Chemical Engineering Progress, 90, 29-40. Olugbenga A.G., Al-Mhanna N.M., Yahya M.D., Afolabi E.A., Ola M.K., 2021. Validation of the Molar Flow Rates of Oil and Gas in Three-Phase Separators Using Aspen Hysys. Processes, 9, 327. Pouraria H., Park K.-H., Seo Y., 2021. Numerical Modelling of Dispersed Water in Oil Flows Using Eulerian- Eulerian Approach and Population Balance Model. Processes, 9, 1345. Sayda A., Taylor J., 2007. Modeling and Control of Three-Phase Gravity Separators in Oil Production Facilities. Proceedings of the American Control Conference 2007, 4847 – 4853, DOI:10.1109/ACC.2007.4282265. 1014 PRES22_0345.pdf Modelling and Simulation of 3-Phase Separators in the Oil and Gas Industry with Emphasis on Water Quality