## 2 Steady-State Modeling of the Electricity-Gas-Heat IES
### Natural Gas Network  
A natural gas network usually consists of gas sources, pipelines, compressors and gas loads. The steady-state model of the natural gas network is described by the gas pipeline flow equations, compressor power equations and nodal gas flow balance equations [6].  
Pipeline modeling is determined by its pressure rating. The pipeline equations applied to low pressure networks (0-75 mbar), medium pressure networks (0.75-7.0 bar) and high pressure networks (above 7.0 bar) are respectively expressed by [7]  
\[F_{\text{P},ij}=\left\{\begin{array}{l}5.72\times 10^{-4}\sqrt{\frac{(p_{i}-p_{ j})D^{5}}{fLS_{\text{G}}}}\\ 7.57\times 10^{-4}\frac{T_{n}}{p_{n}}\sqrt{\frac{(p_{i}^{2}-p_{j}^{2})D^{5}}{f LTS_{\text{G}}}}\\ 7.57\times 10^{-4}\frac{T_{n}}{p_{n}}\sqrt{\frac{(p_{i}^{2}-p_{j}^{2})D^{5}}{f LTS_{\text{G}}}}\end{array}\right. \tag{3}\]  
where \(F_{\text{P},ij}\) is the gas flowing from node \(i\) to node \(j\) within pipeline p (m\({}^{3}\)/h); \(p_{i}\) and \(p_{j}\) are the pressures of node \(i\) and node \(j\) (mbar); \(T_{n}\) and \(p_{n}\) are respectively the temperature and pressure under standard conditions; \(f\) is the friction factor; \(L\) and \(D\) are the length and diameter, respectively, of pipeline \(p\) (m); \(T\) is the temperature of gas (\({}^{\circ}\)C); \(Z\) is the compressibility factor of gas; \(S_{\text{G}}\) is the specific gravity of gas.  
Compressors are facilities installed in the natural gas network to compensate the pressure losses during gas transmission and thus to meet the pressure requirements of gas loads. Compressors can be driven by gas turbines or electricity turbines [23]. In the case of being driven by gas turbine, a compressor can be modeled as  
\[\left\{\begin{array}{l}H_{\text{c, }ij}=B_{\text{c}}F_{\text{c, }ij}\bigg{(}\frac{(p_{i})}{P_{i}}\bigg{)}^{Z_{\text{c}}}-1\bigg{)}\\ \tau_{\text{c, }ij}=\alpha_{\text{c}}+\beta_{\text{c}}H_{\text{c, }ij}+\gamma_{\text{c}}H_{\text{c, }ij}^{2}\end{array}\right. \tag{4}\]where \(H_{cij}\) is the power consumed by the compressor connected to node \(i\) and \(j\) (horse power); \(F_{cij}\) is the gas flowing through the compressor (m\({}^{3}\)/h); \(B_{\rm c}\) is the parameter of the compressor relating to compressor efficiency, specific heat ratio of gas, gas compressibility and compressor temperature; \(Z_{\rm c}\) is the parameter of the compressor relating to specific heat ratio of gas; \(\tau_{cij}\) is the amount of gas consumed by the compressor (m\({}^{3}\)/h); \(\alpha_{\rm c}\), \(\beta_{\rm c}\) and \(\gamma_{\rm c}\) are consumption coefficients of the compressor.  
As for the electricity-driven compressor, the relation between the power consumed and supplied is [20]  
\[\left\{\begin{array}{l}H_{\rm c,\ ij}=B_{\rm c}F_{\rm c,\ ij}\bigg{(}\left( \frac{p_{i}}{p_{i}}\right)^{Z_{\rm c}}-1\bigg{)}\\ P_{\rm c,\ ij}=\frac{0.7457}{1000}H_{\rm c,\ ij}\end{array}\right. \tag{5}\]  
where \(P_{cij}\) is the electrical power supplied by the electricity network to the compressor (MW).  
The gas flow balance equations at node \(i\) can be expressed by  
\[F_{i}=\sum_{j\in i}F_{\rm p,\ ij}+\sum_{j\in i}s_{\rm c,\ ij}F_{\rm c,\ ij}+ \sum_{j\in i}\tau_{\rm c,\ ij} \tag{6}\]  
where \(F_{i}\) is the injected gas flow at node \(i\); \(j\in i\) is the set of nodes connected to node \(i\); \(s_{\rm c,\ ij}=1\) if the inlet of the compressor is at node \(i\); otherwise, \(s_{\rm c,\ ij}=-1\).