## 3 Simulation Programme  
Dynamic simulation can be a useful tool for determining the design of a new power plant, as well as to aid selection of the best operating strategy. The investigation of the dynamic behaviour of thermal power plants needs a detailed description of the thermal processes. The large fluctuations that occur during the operation of solar power plants require the use of a large number of controllers. Therefore, the process of controlling a specific property is complex, and for the purpose of achieving long-term dynamic simulation of a power plant it requires sophisticated modelling programs that include numerical solutions as well as solving differential conservation correlations. Andasol II plant is modelled by APROS software. This programme consists of many components and different solutions which can be used for dynamic simulation. APROS implements the dynamic simulation based on homogenous and heterogeneous flow models. Different approaches for the modelling of two-phase flow in a thermal power plant can be found in the literature, such as mixture-flow and six-equation flow models. In the mixture-flow model, the three characteristic fluid variables are calculated, including local pressure, total mass flow, and temperature or enthalpy, which are represented by three conservation equations (mass, momentum and energy) of the mixture:  
Mass balance:  
\[\frac{\partial\rho}{\partial t}+\frac{\partial(\rho u)}{\partial z}=0 \tag{1}\]  
Momentum balance:  
\[\frac{\partial(\rho u)}{\partial t}+\frac{\partial(\rho u^{2})}{\partial z}+ \frac{\partial p}{\partial z}=F_{grav}+F_{w} \tag{2}\]  
Energy balance:  
\[\frac{\partial(\rho h)}{\partial t}+\frac{\partial(\rho u)}{\partial z}=\frac {\partial p}{\partial t}+Q_{w} \tag{3}\]  
Here, \(\rho\) denotes the density of the flow mixture, \(u\) represents the longitudinal velocity of fluid, \(p\) and \(h\) refer to the static pressure and overall enthalpy, respectively. The parameters \(Q_{w}\), \(F_{grav}\) and \(F_{w}\) represent the heat transfer across the walls, the gravitational force and the friction force, respectively. The six-equation model is more suitable for certain applications because it allows the inclusion of thermodynamic non-equilibrium states in the formulation. Here, two sets of conservation equations are formulated to determine the mass, momentum and energy balance for each phase:  
Mass balance:  
\[\frac{\partial(\chi_{k}\rho_{k})}{\partial t}+\frac{\partial(\chi_{k}\rho_{k} u_{k})}{\partial z}=\Gamma_{k} \tag{4}\]  
Momentum balance:  
\[\frac{\partial(\chi_{k}\rho_{k}u_{k})}{\partial t}+\frac{\partial(\chi_{k} \rho_{k}u_{k}^{2})}{\partial z}+\chi_{k}\frac{\partial p}{\partial z}=\Gamma_{ k}u_{ik}+\chi_{k}F_{grav,k}+F_{uk}+F_{ik}+F_{va}+F_{fl}+\Delta P_{pu} \tag{5}\]Energy balance:  
\[\frac{\partial(\chi_{k}\rho_{k}h_{k})}{\partial t}+\frac{\partial(\chi_{k}\rho_{ k}u_{k}h_{k})}{\partial z}=\chi_{k}\frac{\partial p}{\partial t}+\Gamma_{k}h_{ik}+Q_{wk}+Q_{ ik}+F_{ik}u_{ik} \tag{6}\]  
The symbol \(k\) is either \(l\) = liquid or \(g\) = gas, the indices \(i\) and \(w\) refer to the interface of two phases and the wall, respectively. The variable \(\Gamma\) denotes the mass transfer rate between the phases. The parameters \(F_{nu}\), \(F_{fl}\) and \(\Delta P_{pu}\) are valve friction, friction loss and head difference of pump, respectively. The coefficient \(h\) in Equation (6) is the overall enthalpy which includes the kinetic energy and \(Q_{kk}\) is the heat transfer at the interface. Several equations are required to model the process components of the power plant. The equations for modelling these process components can be found in a comprehensive review of dynamic simulation of thermal power plants published by [PERSON] et al. [18]. The solution method applied in APROS is the finite volume method. This is in turn used to find a solution for the one-dimensional partial differential correlations, which are discretised regarding time and space. In addition, the non-linear expression is linearised.