## 4 Methodology
### Integrated Simulation Framework for Security of Supply Analysis  
The modeling framework carried out within SAInt considers the integrated gas and electricity transmission network under cascading outage contingency analysis. The cascading outages are investigated when the gas or electricity system has just experienced a disruption, like a shortage in supply or transmission capacity. The framework comprises of  
1. a simulator (MATPOWER) for solving an AC-OPF for the power system,
2. a transient hydraulic gas simulator (SAInt) for the gas system which includes sub-models of all relevant pipe and non-pipe facilities
3. and an interface (SAInt) which handles the communication and data exchange between the two isolated simulators. SAInt is composed of two separate modules, namely, SAInt-API (Application Programming Interface) and SAInt-GUI (Graphical User Interface). The API, is the main library of the software and contains the solvers, routines and classes for instantiating the different objects included in gas and electric systems. In order to perform power flow calculations and to extend the functionality of the software, the API has been linked to MATLAB using the Matlab COM Automation Server. This link has been used to establish a communication between the Matlab-based open source power flow library MATPOWER [51] and SAInt-API. This allows the execution of AC-Power Flow and AC-OPF with MATPOWER and the evaluation and visualization of the obtained results using SAInt-GUI [52]. For more information on SAInt we refer to previous publications [52; 54]. The proposed simulation framework is illustrated in the flow diagram depicted in Figure 3, which is explained further below. The power model proposed in this paper is designed to provide a realistic representation of the behavior of an actual power system when subjected to contingencies. Cascading effects of contingencies in the power grid are very complex phenomenona, and identifying the typical mechanisms of cascading failures and understanding how these mechanisms interact during blackouts is an important research area [58; 59; 60; 61; 62; 63]. Potential mechanisms that might be modeled include overloaded line tripping by impedance relays due to the low voltage and high current operating conditions, line tripping due to loss of synchronism, the undesirable generator tripping events by overexcitation protection, generator tripping due to abnormal voltage and frequency system condition, and under-frequency or under-voltage load shedding. For each additional mechanism of cascading failure included in a model, assumptions must be made about how the system will react to these rarely observed operating conditions. Figure 3: Flow chart of the proposed Simulation Framework SAInt, showing the implemented algorithm. This paper introduces a steady state AC-flow model which is adapted to reflect a set of corrective actions performed by TSOs when trying to return the system to a stable operating condition after a contingency. While the initial contingency can usually be considered as being a random event, an interaction of cascading failure mechanisms exists in the subsequent events. For example, the loss of critical components such as tripping of transmission lines creates load redistribution to other components, which might become overloaded. The overall network is then weakened due to the stress on remaining elements, possibly leading to an instability. If corrective action plans are not applied quickly further failures might be created as a consequence leading to a blackout.