1 Introduction

In 2011, the total revenue of the whole chemical industry came to about 100 billion euros (CEFIC 2011). While the development of modern chemical plants has created high economic profits, the issues of reduced operability and increased risk are inevitably brought about due to complicated processes and large quantity and variety of treating chemicals. Chemical accidents result in productivity loss, equipment and environment damage, and fatalities which we can observe in several cases from the Bhopal toxic gas release accident in 1984 to the Texas BP refinery explosion in 2005. According to several studies dealing with main causes of the accidents, maloperation of plant equipment by human error is one of the most frequent causes (Antonovsky et al. 2014), and accidents occur mainly due to an inefficient structure of information sharing between each operator and insufficient education about past accident cases (Kletz 1998). Particularly, fast and accurate communication between physically separated operators in the large sites of chemical plants requires high competence.

Established operator training systems based on dynamic process simulation like UniSim® OTS (operator training simulator) by Honeywell (2005) and Aspen® OTS by AspenTech have played great roles in training of proficiency in operation procedures and control of risk factors in the chemical process for control room operators (CROPs). However, they have difficulty in enhancing training efficacy due to limited information delivery for field operators (FOPs). Generally, they are not equipped with systematic knowledge of the process simulation. As field operations are performed manually based on communication with the control room, FOPs are highly reliant on the control room orders and heuristics based on personal experience in the case of an accident. However, existing education for FOPs is limited to study of operation and emergency text manuals or the handling method of each item of equipment. Therefore, it is necessary to build a systematic FOP training system which can induce the series of processes from correct assessment of accidental situations to active management.

Cha et al. (2012) developed a fire suppression training program which generates a fire scenario in virtual reality, calculates the fire effect using 3D-computational fluid dynamics (CFD), and delivers the situation information to trainees so that they can actively suppress the fire using an avatar (Cha et al. 2012). Schneider Electric (2014) performed and evaluated this operator training with 30 operation scenarios (15 scenarios each for CROPs and FOPs, respectively) via the EYESIM® immersive training package in a virtual reality simulation of the plant. Even though the above two strands of research try to develop FOP customized training solutions by integration of accident simulation or process simulation with immersive virtual reality systems, respectively, they are not able to train the whole process of accident initiated from process upsets and terminated at emergency response as they do not link the process simulation to accident simulation directly. To solve this limitation, Manca et al. (2013) interlinked the process simulation with a self-developing accident simulator, AXIM by object linking and embedding (OLE) technology, and implemented this module into the immersive virtual reality. Through this combined model, they realized the pool formation and pool fire scenario by liquid release, and let the fire results affect the process simulation model so that trainees could experience the fault propagation realistically (Manca et al. 2013). Nazir et al. (2015) evaluated and validated the training efficacy by applying this model to FOPs directly. The AXIM simulator is based on parametric calculation with simple heat and material balances only for a liquid phase, so the accuracy of this model is not sufficient for vapor phase or two-phase jet release, dispersion, and fire and explosion calculation.

This study aims to develop an interactive plant simulation model in which the dynamic process simulator and self-developing discharge model are directly linked via Visual Basic, and especially for a gas dispersion scenario, pre-calculated offline 3D-CFD data are processed real time with respect to trainees’ emergency actions. Simulated results are delivered to trainees so that they can correctly understand the abnormal situation based on the information from the model and actively take proper actions in the programmed interface. Then, the actions affect the process and accident simulation simultaneously. As our model utilizes a commercial 3D-CFD simulator to calculate the effect of an accident, given that the proper modeling is assured, the model guarantees sufficient accuracy for a vapor phase jet release scenario and following gas dispersion calculation. A case study deals with a natural gas pressure-regulating station in South Korea and evaluates the applicability of our model to practical operator training by generating process upsets and accident scenarios, constructing dynamic process and accident simulation models, and developing a demonstration program.

2 Interactive plant simulation modeling

2.1 Model structure

The interactive plant simulation model interlinks process and accident simulation models in an overall training scenario from process upsets to accident occurrence and propagation (Fig. 1). In this model, three simulations are linked based on a certain sequence of accident scenarios: dynamic process simulation, discharge calculation, and pre-calculated 3D-CFD simulation. As the scenarios are initiated with certain process upsets like equipment failure, dynamic process simulation firstly calculates the effect of the failure to the process each time. The real-time results are automatically conveyed to an integration domain like Microsoft Excel via the export port of the simulator. When the accidental release conditions are met at certain times as an error is accumulated, the discharge model built in the domain is activated to calculate the discharge at the leakage point in the equipment. The calculated discharge flowrate is transmitted back to the dynamic process simulator via the export port of the domain and affects the simulator to realize the leak through generating an additional stream. At the same time, pre-calculated 3D-CFD simulation results for dispersion and explosion of discharged fluid are selectively sent to the domain for each time via the export port of a CFD database according to the leakage conditions like pressure, temperature, and hole size. This whole sequence partly by OLE technology is visualized in the training system so that trainees can see the results and take actions in it.

Fig. 1
figure 1

Schematic design of the interactive simulation model

Through this simulation linking structure, the model leads trainees to actively analyze process variable trends based on the simulation results and take proper actions with their own decisions to stabilize the variables or minimize operational losses. When stabilization fails and an accident occurs, associated results like gas cloud concentration and explosion overpressure at each time and position are additionally provided to the trainees. Their actions like emergency shutdown can be inputted by clicking a mouse or a joystick control.

2.2 Dynamic process simulation engine

Dynamic process simulation gives trainees almost the same trend of process variables as that of a real plant. As a scenario is initiated, physical and thermodynamic calculations are conducted online and variable trends deviating from set points or being stabilized to those points can be analyzed. As errors are accumulated and the variables reach the pre-defined conditions of an accidental release scenario, values of the variables at that time are automatically inserted into the accident simulation model. When trainees’ actions like emergency shutdown by clicking a manual valve in the training environment are taken, the associated signal is transferred to the process simulation model so that the actions are reflected in the model.

2.3 Real-time accident simulation module

In order to separate the linking point with the process simulation model, the accident simulation model is divided into two sub-models: One is the ‘discharge model’ calculating the release conditions of a fluid from inside the equipment to the outside through an orifice. And the other is ‘3D-CFD model’ calculating indoor or outdoor dispersion and fire and explosion effects after the discharge.

The discharge model calculates the release mass flowrate Q [kg/h] from given process simulation results at the time when a fluid starts to release [Eq. (1)] and transfers the results to the 3D-CFD model. As this release should be simultaneously reflected in the process simulation model, we generate an additional stream and a valve at the release position right behind the main valve in the process model and automatically adjust the valve openings (Eq. (2): f(x) in Fig. 1) so that the fluid is to be released with the quantity calculated from the discharge model.

$$Q_{1} = C_{\text{disc}} A\sqrt {\gamma \cdot \rho_{\text{i}} \cdot P_{\text{i}} \cdot \left( {{2 \mathord{\left/ {\vphantom {2 {\gamma + 1}}} \right. \kern-0pt} {\gamma + 1}}} \right)^{{{{(\gamma + 1)} \mathord{\left/ {\vphantom {{(\gamma + 1)} {(\gamma - 1)}}} \right. \kern-0pt} {(\gamma - 1)}}}} }$$
(1)
$$Q_{2} = k\sqrt {V_{\text{open}} \cdot {\text{d}}P \cdot \rho }$$
(2)

where \(C_{\text{disc}}\) is the discharge coefficient; A is the hole area, m2; \(\gamma\) is the specific heat ratio, \(\gamma = C_{\text{p}} /C_{\text{v}}\); \(\rho_{\text{i}}\) is the inlet fluid density, kg/m3; \(P_{\text{i}}\) is the inlet pressure, kPa; k is the conductance, kg/h/(kPa kg/m3)0.5; \(V_{\text{open}}\) is the valve opening, %; dP is the friction delta pressure, kPa.

The 3D-CFD model utilizes commercial software (FLACS® by Gexcon) to guarantee the accuracy of the dispersion calculation. As the CFD calculation requires a heavy computational load unlike the discharge model, this study develops a method of real-time processing of offline CFD data for applying the CFD model to our training system in which the real-time data transfer between the simulation model and a training environment is essential. For this purpose, we construct a big database to save the CFD results with respect to each scenario, and provide them to trainees selectively as they take a certain action in the training interface.

2.4 Real-time 3D-CFD data processing method

Training with pre-defined operating scenarios and pre-calculated CFD data holds a low degree of freedom in which the trainees cannot do anything but certain actions designated by the system in advance. In order to overcome this limitation, this study suggests a real-time CFD data processing method (Fig. 2) and increases the training effectiveness of our model.

Fig. 2
figure 2

Real-time CFD data processing method

  1. 1.

    Trainee action list—generate trainee action list in a certain scenario and process. For the case of the pressure-regulating station, ‘manually close the emergency shutdown valve inside the station’ is a representative action in the case of a gas release.

  2. 2.

    Release duration—determine the range of release duration based on a field operator’s average site arriving time, 15 min for pressure-regulating station, and the mission fails if the training time exceeds the maximum time without a series of proper actions.

  3. 3.

    3D-CFD database—divide the range of release duration (15–30 min) into 1-min intervals, and save total 16 simulation results, labeling each gas concentration dataset \(C^{i} \left( {x,y,z,t} \right)\) as \(Dataset^{i} \left( {i = 15, 16, \ldots , 30} \right)\).

  4. 4.

    Data processing with respect to trainee action—as the release starts (\(t = t_{\text{rel}}\)), first the dataset of the maximum release duration \(Dataset^{30}\) is transferred to a trainee in the training environment in real time. When the trainee receives the message to move, an avatar in the program heads for the site instead by trainee’s manipulation. When the avatar closes the shutdown valve at certain time (\(t = t_{\text{act}}\)), the CFD data after that time are replaced by those in \(Dataset^{{\left( {t_{\text{act}} - t_{\text{rel}} } \right)}}\) not in \(Dataset^{30}\) (Eq. (3), Fig. 3). For instance, if a gas release occurs 10 min after the training starts (\(t_{\text{rel}} = 10\)) and a trainee closes the valve 20 min after the release (\(t_{\text{act}} = 30\)), concentration data of \(Dataset^{30} ( = C^{30} \left( {x,y,z,t} \right), 0 \le t \le 20)\) during the time between release and action (10 ≤ t ≤ 30) are transferred in real time, and after that time (\(30 <\, t\, \le\, t_{ \hbox{max} }\)) the data are replaced by those of \(Dataset^{20} ( = C^{20} \left( {x,y,z,t} \right), 20 \le\, t \,\le\, (t_{ \hbox{max} } - 10))\)

    $$C(x,\;y,\;z,\;t) = \left\{ {\begin{array}{*{20}l} 0 \hfill & {0\, \le t\, <\, t_{\text{rel}} } \hfill \\ {C^{30} C^{{(t_{\text{act}} - t_{\text{rel}} )}} (x,\;y,\;z,\;(t - t_{\text{rel}} )} \hfill & {t_{\text{rel}} \le\, t\, <\, t_{\text{act}} } \hfill \\ {C^{{(t_{\text{act}} - t_{\text{rel}} )}} (x,\;y,\;z,\;(t - t_{\text{rel}} )} \hfill & {t_{\text{act}} \,\le\, t\, \le\, t_{ \hbox{max} } } \hfill \\ \end{array} } \right..$$
    (3)
    Fig. 3
    figure 3

    Real-time CFD data of the gas concentration

3 Case study—pressure-regulating station

3.1 Pressure-regulating station

Natural gas in South Korea is supplied from the LNG receiving terminal to residences or offices through KOGAS (Korea Gas Corporation) supply management stations at 6.86 MPa and then two pressure-regulating stations operating at 0.8 or 0.6 MPa, respectively. Pressure-regulating stations reduce pressure of the high-pressure supplied gas toward the proper level of 2 kPag for safe distribution (Lee et al. 2010).

In this study, the pressure-regulating station near the residential area is chosen as the target process for implementing our model as it has a high risk of fire and explosion accident (Fig. 4). It consists of main (upper) and preliminary (lower) lines including main valves for reducing and controlling the gas pressure, gas heater for compensating lowered temperature due to abrupt expansion, gas filter for preventing inflow of other substance, slam shutoff valve (SSV) to automatically block the flow and relief valves in case of an emergency.

Fig. 4
figure 4

3D image of a pressure-regulating station

3.2 Process simulation modeling

A process model can be constructed (Fig. 5) based on controller set pressures of the pressure-regulating station (Table 1). The yellow region of the figure is one additional stream and valve in order to simulate the gas release right behind the main valve. When a gas releases, the opening percentage of the valve is set by discharge calculation in the discharge model; otherwise, it is set to be zero at the normal operation. Dynamic simulations of normal controller operations are tested in Fig. 6. As shown in the figure, the main valve controller tracks the setpoint change well and the SSV controller blocks the gas stream at the set pressure.

Fig. 5
figure 5

Process model of the pressure-regulating station

Table 1 Controller set pressure
Fig. 6
figure 6

Controller operation (top main valve and bottom SSV)

The model uses AspenHysys v.8.4 as a process simulator and PR-LK EOS as a thermodynamic model for simulating the natural gas (C 1:C 2:C 3:n-C 4:i-C 4 = 0.90:0.05:0.03:0.01:0.01). The main valve type is 1098-EGR, and the pressure–flow correlation at the choked flow is as the following equation (Emerson Process Management 2016).

$$Q_{\text{main}} = P_{\text{i}} \cdot C_{\text{g}} \cdot 1.29$$
(4)

where \(Q_{\text{main}}\) is the gas flowrate through the main valve, SCFH, and \(C_{\text{g}}\) is the regulator or wide-open gas sizing coefficient.

3.3 Scenario generation

Scenarios are generated based on the historical data of process upsets or accidents. As these cases are documented with real process data and event sequence, a scenario generation process is initiated at the case-based analysis of historical data. In this case study, data from a pressure regulator in South Korea are classified into three representative scenarios listed in Table 2.

Table 2 Three representative scenarios

In the mild case, when the second pressure reaches the SSV set pressure, the SSV is closed immediately and the main valve in the preliminary line opens to stabilize the gas flowrate and the second pressure. In the relief case, as the SSV fails to block the supply and the gas pressure reaches the relief valve set pressure, the valve vents pressurized gas outside the station as much as the quantity its size is capable of. For the worst case, gas is released at the high pressure due to a series of malfunction of all safety devices. In this study, the worst-case scenario is performed among three main scenarios in order to evaluate our model linking the process and accident simulation for operator training system in the pressure-regulating station.

3.4 Accident simulation modeling

After the onset of training, the instructor starts the second pressure rise scenario. The stepwise course of training is as follows. First, the value of the second pressure from the dynamic process simulation model is transmitted to the trainee in real time. Next, the second pressure reaches the release pressure which was set by the instructor (202.6 kPa—changeable depending on the scenario), which leads to the automatic discharge calculation based on the values of process variables like temperature and pressure at the leakage spot. At the same time, the corresponding 3D-CFD dispersion simulation results in the database whose input is from the discharge calculation are provided to the trainee. Finally, based on this process variables and accident data the trainee is induced to take appropriate actions.

Figure 7 indicates the accident simulation model of the pressure-regulating station in FLACS, and Fig. 8 indicates the gas concentration (red: 1.0, green: 0.5, blue: 0.0 m3/m3) from 10 to 600 s at the height of ventilation when a gas releases for 5 min near the pressure recorder due to the second pressure rise (202.6 kPa).

Fig. 7
figure 7

3D-CFD accident simulation model using FLACS

Fig. 8
figure 8

Gas concentration results at the height of ventilating hole in the station

3.5 Interactive plant simulation modeling

The demonstration version of the interactive simulation program in a natural gas governor station was designed as shown in Fig. 9. The training interface is as follows. In the center is a process flow diagram (PFD) of the pressure-regulating station, on the left are process upsets and accident scenarios, at the top are controllers and process variable information, on the right is a single variable chart, and at the bottom is the gas concentration of dispersed gas. The trainee can shut off gas supply by clicking the red circle above the emergency shutdown valve.

Fig. 9
figure 9

Prototype of the model. a Release starts. b Emergency shutdown

The message above the PFD indicates the status of controller alarms such as high or low when the second pressure goes beyond or below each limit. The process upsets and accidentt scenarios on the left list were set up to initiate the desired scenario by clicking the button. Each scenario is identical to the mild case, relief case, and the worst case in Sect. 3.3. On the top are several tables of dynamic integrator, regulator operation, discharge model, and main and preliminary controller. In the dynamic integrator table, the trainer can specify the simulation speed and display interval, and in the regulator operation table the opening % of supply and safety valves is displayed. In the discharge model table, the discharge calculation is done in real time, and in the main and preliminary table, the status of controllers (PV, OP, SP) is displayed. By clicking the right end cell of each table, trainee can monitor the trend of the univariate chart on the right corner. Dispersed gas concentration results at the bottom are only activated in the worst case among three scenarios, which shows the 3D geometry of the pressure-regulating station, gas concentration at the height of ventilation in the form of the univariate chart, and 2D and 3D image. Figure 9 displays the process of the scenario.

By clicking the play button on the left top corner, training starts from the initial state. When the trainer clicks the ‘Hole and release’ scenario button on the left, the second pressure starts to rise and the second pressure keeps rising beyond the high alarm limit. When it reaches the release pressure which was set up in advance, gas release begins through the valve named ‘Hole’. If release occurs, the release rate is calculated in the discharge model and the opening % of ‘Hole’ is adjusted automatically to meet the calculated release rate. In addition, the corresponding dispersion simulation result which accepts the release rate as an input is displayed at the bottom from the data bank (Fig. 9a). If the trainee clicks the EMV, the inlet supply is shutoff and only the gas released until that time would disperse outside (Fig. 9b).

3.6 Training evaluation

By using the data processing method in Sect. 2.4, a rating system was designed to evaluate the performance of the trainee. For instance, two dispersion cases with lead time of 20 and 30 min to take measures are simulated and the resulting dispersion outcome to surrounding area is compared as shown in Fig. 10. As it appears in the figure, a stark difference can be seen in the dispersion results. When this technique is applied to the operator training system, it could help trainees to make a correct and prompt decision and accordingly to minimize accident damage.

Fig. 10
figure 10

Magnitude of accident with respect to the lead time of trainees’ action (top 20 min and bottom 30 min)

4 Future works

The developed interactive simulation model in this study could provide a training interface between operators and a training instructor and guarantee the reality of the upset situation by process and accident simulations. For more detailed training evaluation, a quantitative risk assessment based on the calculated gas amounts from the model or additional calculations for fire and explosion effects is now in progress. Then, the training results of each trainee can be compared and the associated analysis would affect the emergency response manual in detail and the controller design in an emergency shutdown logic.

5 Conclusions

In this research, an interactive plant simulation model was developed and the performance was rated. It will be used as an internal engine of operator training targeting at pressure-regulating stations. The developed model was designed to take correct and prompt measures depending on the process upsets and accident scenarios via object linking and embedding (OLE). A representative scenario of ‘Hole & Release’ is studied as follows. When the instructor starts the scenario, the second pressure begins to rise due to a main valve malfunction. When it keeps rising with total failure of safety devices and reaches 202.6 kPa, gas release occurs near a pressure recorder via a hole of 10 mm diameter. The trainee who noticed this accident should shut off the emergency shutdown valve manually. When this procedure is properly done, the training scenario terminates and the simulation results with respect to the lead time to take actions are used to rate the performance of the trainee. The model could be applied to a more complex process such as a petrochemical plant in the future, and higher effectiveness of training is expected as the operating procedure becomes more complex.