Dynamic Modeling and Heat Flow Study of a Thermal Power Plant Using OpenModelica

With the integration of intermittent energy sources in the power system, the main focus of thermal power plant design is to optimize the conventional system by improving efficiency and flexibility of power generation in the start-up and base-load procedures. This paper focuses on the behavior of thermal power generation with respect to load variations, fuel variations, weather conditions and internal dynamics of the system to aid in energy planning and the optimization of power system. Dynamic modeling and subsequent simulation is to make improvements. Therefore, to model the system, this research study has used a dynamic modeling and a simulation framework (OpenModelica based on modelica language) which is an object-oriented and equation-based language. This framework allows a non-causal modeling and a flexible reuse of the models since data-flow direction is not predefined like other state of the art simulating tools i.e. MATLAB. The proposed model analyses the trend of electrical power generation of KOT ADDU thermal power plant to predict the future demand of electrical power. The achieved results show more than 90% accuracy of the proposed model in the transient operation such as start-up and base load procedure.


I. INTRODUCTION
Modern world's electrical power system consists of different energy sources which includes Thermal energy, Nuclear energy, Hydro energy and Renewable energies. According to [1], the thermal generation is inevitably diminishing with the integration of variable electrical power generations like solar electrical power generation and wind electrical power generation in the electrical power system. According to [2], environmental concerns due to the emission of hazardous gas is also putting the thermal power generation under a severe pressure but still a large amount of electrical power generation of Pakistan relies on fossil fuels, accounting more than 60 percent of the total electrical power generation [3].
With the integration of renewable energies into the power system, significant energy fluctuations are being faced in the global energy markets. For the stability of the power system these fluctuations need to be considered and addressed. These The associate editor coordinating the review of this manuscript and approving it for publication was Yang Han . changes brought new challenges in the power system which can be solved with system simulations [4], [5]. System simulation aid in energy planning which plays an important part in the modern electrical system. Energy planning helps relevant authorities to make sure the best possible and optimal generation and consumption of electrical power [20]. Conventional electrical power system was somehow a predictable system due to its linearity but with the integration of intermittent energy sources, the modern electrical system has become very complex due to fluctuations. To avoid such complications and to meet the electricity's demand, the electrical power system needs to have a dynamic model which can foresee the future electricity's demand with respect to different variables like loads, weather conditions, fuels and internal dynamics of the system. A model is an important tool for monitoring, performance assessment, control design, fault detection and optimization of the system [6]. The challenge of modeling real-world complex systems can be explained with the following attributes of the complex system: [21] * A complex system is a combination of multiple sub-systems or units. * Combined effects produced by the units may either be desirable or undesirable and can not easily be foreseen.

A. MODELING AND SIMULATION OF THERMAL POWER PLANTS
This research work focuses on the modeling and simulation of Thermal power plant to optimize the operation of thermal electrical power system. Modern simulation programs allow a rapid assessment of [7]; * Operating behaviour of plant during transients. * Optimization of plant. * Maintenance of plant. * Control and design of new plant. Although gas turbine power system is a stable form of electrical energy but the problem comes with the efficiency of the system which is very low. Typical gas turbine efficiencies are between 20 to 25 percent and different hazardous gases like CO2 and NOx are exhausted into the atmosphere, so there has always been a focus on the improvement of the efficiencies of thermal systems [8]. This endeavor brought us to a new technology in the thermal system known as CCPP (combined cycle power plant) [9]. CCPP has a flexible layout, usually consists of one or two gas turbines that generate electricity through electrical generators and exhaust the hot gases into the HRSG (heat recovery steam generator) that converts the water coming from the water tanks into steam for a Rankine cycle system [9]. This highly pressurized and high temperature steam drives steam turbine and generates electricity through electrical generator. The thermal efficiency of the CCPP can be as high as 52 percent and that is the main reason for the popularity of the CCPP. Another reason for the popularity of the CCPP is that it can be built in less time than the typical thermal system of the same output.
A thermal electrical power system is a combination of multiple domains like Electrical, thermodynamics and mechanical domain. A mechanical domain includes pumps, valves and pipe elements while electrical domain includes generators, lines, circuit breakers and motor etc. A thermodynamic domain involves the compression of air in the compressor and expansion of hot flu gas in the turbine [9], [10]. A system is usually modeled focusing on one of these domains. In this research work we are focusing on the electrical domain of the system as well as thermodynamic domain [11]. This research work used KAPCO (KOT ADDU power company, muzaffargarh,Pakistan) 1 thermal power plant as case study for the validation of the proposed model. KAPCO Thermal Power Plant is the largest IPP (independent power producer) of Pakistan with the capacity of 1600MW. KAPCO is a Combined Cycle Power Plant including 10 multi-fuel Gas turbines and 5 steam turbines. In the proposed model we will only consider one combination of two gas turbines and a steam turbine as it is a multi-shift power plant [9]. Below described are the contributions of this research work in the field of Thermal Power System; 1. The proposed model assesses the operating behaviour of the thermal power plant by monitoring the power system and controlling with the help of dynamic modeling. The proposed dynamic model of the KAPCO thermal power plant focuses on the optimization of the system.

2.
A complete and an explicit model of gas turbine and water/steam cycle is presented using component-based approach. Components like air-compressor, combustion chamber, fuel consumption, feed water sources, water tanks, pipes, electrical Pumps and controls valves are modeled in detail taking into account the real data collected. A complete rankine cycle of both parallel heat recovery steam generators are modeled containing evaporators, economisers and superheaters. The proposed model covers 60 percent procedure of electrical power generation through steam system.
3. The proposed model simulates for the first 18.6 minutes of the start-up of thermal power plant. So, the presented model shows the simulation for the 100 percent of the electrical power generation of Gas power system as gas system reaches to 100 percent electrical power generation within 20 minutes. The achieved simulated results from gas turbine systems indicate accuracy of the model in the start-up and base-load procedures for gas turbine system. 4. The novelty of the proposed model is that it models the internal electrical power consumption of the electrical pumps, air compressor etc. For simplicity, electrical generator is modeled as a common electrical power generating machine for all the gas and stodola turbines to get a simulated result for an overall electrical power produced.

5.
Total heating surface area is distributed among boiler's components in the proposed model according to the real data collected from KAPCO thermal power plant. This heating surface can be changed in the proposed model to model any thermal plant with different heating surface area.
6. The simulated results are validated with the real data that indicates more than 90% accuracy of the proposed model which may help the energy planners to predict the future demand of the thermal power generation whether for the purpose of the flexible power system or for the base-load consumption.Various research works have been published that focus on the modeling and control design of Brayton cycle, Rankine cycle or CCPP using different techniques.
Some of these studies, their proposed techniques and model's features are explained and compared in table 1. From the table it can be observed that the proposed model is representing a modern thermal power plant as most of the research works either consider brayton or rankine thermal power systems but only few model CCPP. The proposed model covers almost all sub-components of combined cycle power plant including electric pumps, control valves, boiler and plant's internal power consumption in detail. In the pursuit of achieving more efficient thermal power system, CCPP is being preferred and adopted. Therefore, this research study may contribute its part in the work of optimizing the electric power industry.

II. METHODOLOGY
CCPP is a complex and a dynamic electrical system. To model this system this research work proposed a dynamic modeling framework named as OpenModelica software (https://build.openmodelica.org/omc/builds/windows/ releases/1.14/1/). This is an open source software available on openmodelica's website for free of cost. This is an objectoriented, equations-based modeling tool containing more than a hundred inbuilt libraries and a well number of external libraries that can be downloaded from github website [8]. This tool combines a graphical user interface with the model and is useful in modeling complex physical systems with mechanical, electrical and control sub-components [7].
The proposed model used an in-built library ThermoSyspro which represents thermal systems and contains all the basic components of thermal systems [15]. This library contains components like dynamics and static water tanks, different water pumps, dynamic and static heat ex-changers, gas turbine, steam turbine, air-compressor, combustor and other important thermal system's components. This research work proposed a components-based model of CCPP that includes dynamic in-built models of all its components from the Ther-moSyspro library. A complete water/steam cycle is presented and modeled along with the gas turbine cycle. Design parameters for every component in the proposed model are selected considering the behavior and output of the related component on hit and trial basis. Models for brayton cycle, rankine cycle and combined cycle are proposed in this research work. The overall proposed model contains three components on the basis of their colour. Yellow components are representing static modeling, green components show both static and dynamic modeling while blue components are used for dynamic modeling only.

III. SYSTEM MODEL
A components-based model was developed and simulated with Openmodelica which automatically generates equations of the developed model on the background. The proposed model is a combination of three sub-models such as brayton cycle, rankine cycle and a combined cycle model.

A. MATHEMATICAL MODEL
For the power plant's proposal stage, dynamic simulation is useful and preferred. Complex differential equations and other numerical methods have made dynamic simulation very sophisticated and user friendly. However, mathematical models play an important role for increasing flexibility and efficiency of power plants by providing a better understanding of the process and their capabilities [7]. According to [9], The difference between the compressor internal power consumption and gas turbine power is actually the output power of gas turbine which can be computed using eq.(1), where; W is the air flow in p.u and KWo is the base net output in p.u. Where; W 0 = Air flow in p.u initially T f 0 = Turbine inlet temperature at initial in p.u c P = Average specific heat at a constant pressure T f = Gas turbine inlet temperature T i = Compressor inlet temperature in p.u η c = Compressor efficiency η T = Turbine efficiency X = Gas turbine inlet pressure to ambient pressure and is computed by eq.(3), where; where; c P = Average specific heat at a constant pressure c V = Average specific heat at a constant volume While; where; P M G = Mechanical power of the turbine Gas turbine inlet temperature can be computed using eq.(6), where; Now putting the value of W from eq.(1) into eq. (6) to find T f , we have where, K 2 is the design combustor temperature rise in p.u that is represented with eq.(8), where; To = Temperature change in an ideal compressor cycle The exhaust temperature of the Gas turbine can also be computed with the eq.(9), The exhaust mass flow W and and the exhaust temperature T E from the Gas turbine actually decide the value of heat transfer to the heat recovery steam generator of steam system.
In an ideal compressor, the temperature change is (T 0 2 -T 1 0 ) while in real cycle the temperature change is (T 0 2 -T 0 1 ). The efficiency of the compressor can be be computed with the eq.(10), where; C P = Mean heat capacity of the gas T 0 = Real temperature T 0 = Ideal temperature mean Heat capacity (C P ) is a product of specific heat (c P ) and the mass (m) of a substance.
eq.(10) can be written into, eq.(11) can be further developed into As we know that the change in pressure ratio of the cycle is proportional to the change in temperature ratio of the cycle so, we can write it as; where; P 0 2 = Compressor outlet pressure P 0 1 = Compressor inlet pressure As we know that X is the ratio of gas turbine inlet pressure to ambient pressure and if we assume that the compressor is ideal, so, there would not be any pressure loss and then the compressor outlet pressure will be the same as the gas turbine inlet pressure. So, we can replace the pressure ratio from eq.(13) with X from eq. (3), Using eq. (14), we can compute the compressor output temperature. According to [9], the active power of the high pressure steam turbine and low pressure steam turbine may be computed with the eq.(15), where; E HP = HP steam turbine actual energy E LP = LP steam turbine actual energy m HP = Steam flow through HP steam turbine m LP = Steam flow through LP steam turbine Now to compute m HP and m LP we can use the following equations, where; K T = Throttle value flow coefficient K = Admission point flow coefficient P HP = HP steam turbine pressure P LP = LP steam turbine pressure With eq.(16) and eq. (17), the flow rate of steam through the HP steam turbine and LP steam turbine can be calculated.

B. BRAYTON CYCLE
The air is drawn into the compressor, increasing the pressure up to 11 bars and temperature may be as high as 350 degC and that compressed air is used in the combustor where combustion takes place. Hot flue gases are produced in the combustion process and these hot flue gases are used to drive gas turbines by giving the thermal energy to the steam turbine's blades. Thus, converting the thermal energy of hot gases into mechanical energy in the process of expanding the gases in the turbine section. The exhausted hot gases at the output of the gas turbine have temperature around 550 degC and are exhausted into the atmosphere.This process is called as Brayton Cycle and can be represented on a temperature-enthalpy diagram. Brayton Cycle is illustrated in the Fig.2 and the proposed Modelica's model for the brayton cycle is shown in Fig.3. The area under the curve is the amount of heat required to make a gas thermal process to occur. The line A-B represents the first process of compression of the air in the compressor. In compression, the air stores the energy in the form of temperature and pressure. This process is known as isentropic compression [9]. The line B-C represents the burning of fuel in the combustion chamber and an additional heat is added to the cycle at a constant pressure. This process is called as constant pressure heat addition [9]. The line C-D represents the expansion of hot gas while passing through the gas turbine and the energy of the hot pressurized gas is utilized to move the blades of the gas turbine. This process is called as isentropics expansion [9]. The line D-A is the final process of brayton cycle in which the hot gas is exhausted to the atmosphere and decreases its temperature. This process is called as constant pressure heat rejection [9]. The area under the line D-A represents the heat that is wasted while the area between the line B-C and D-A is the heat that is converted to useful mechanical energy which is approximately 20 percent of the total heat required to make Brayton process work. The proposed model for the brayton cycle is shown in Fig.3 which includes the air compressor, combustion chamber and the gas turbine.
In Fig.3 we can see that after the expansion of hot gas in gas turbine, the gas is not used further and is being exhausted into the air. In this process the gas with a useful thermal energy is being wasted into the air, due to which the efficiency of this system is about 20 to 25 percent. The speed of gas turbine or load variations can be controlled by flow rate of fuel and air intake. For a peak load the quantity of fuel and air intake is increased and is decreased for the base load. Variations in fuel type also makes a notable impact on the efficiency of thermal power system. The efficiency of thermal power system is 32 percent on gas, 31 percent on HSD and 30 percent on oil. A humidity factor is added with the modelica sub-model of air source. This humidity factor varies with the weather condition as it involves the parameters of H20 density, mass fraction of O2, air density and vapor saturation pressure in the atmosphere. Atmospheric pressure and temperature also affect the power plant's performance that are considered in the proposed model.

C. RANKINE CYCLE
A Rankine Cycle includes a boiler which consists of heat ex-changers to convert the water coming from the feed pumps into the steam and a steam turbine is connected at the end of the boiler [9]. The steam coming out of steam generator drives the blades of the steam turbine by expanding and cooling of steam as it passes through the turbine, thus converting the momentum(kinetic energy) into mechanical energy [10].The Rankine Cycle is represented in a temperature-enthalpy diagram in Fig.4. The line A-B represents the heat that is added when the feed water pumps increase the pressure of water as well as slightly increase in the enthalpy before entering into the boiler. The line B-C shows the heat that is added to the water entering the boiler. The water is converted into steam at a constant pressure within the boiler.
The line C-D shows the further addition of heat into the steam while it passes through the super-heater of the boiler. The line D-E and E-A are representing the heat lost during the expansion and cooling of steam as it passes through the turbine and in the process of steam condensation. Fig.5 represents a proposed model for a Rankine Cycle. A constant amount of water is fed to the main water tank. Two water pumps are connected at the output of the main water tank to increase the pressure of the water. Low pressure water tank is connected with the low pressure evaporator to circulate the water to maintain a specific temperature in the tank. While the High pressure water tank is connected with the high pressure evaporator after the economiser. Super-heater at the end of the boiler used as a steam dryer and to further increase the steam temperature.It is important to keep the temperature of the HRSG within a limit otherwise it may cause deformation and material cracks [17]. This high pressure and high temperature steam drives the blades of the turbine and generates electricity. The mechanical energy of the steam turbine can be controlled with the steam flow rate through it and the exhausted hot gas from gas turbine [10].

D. COMBINED CYCLE POWER PLANT
KAPCO's Combined Cycle power plant is a combinatin of two gas turbines and one steam turbine. The hot flu gas that was being exhausted to the air before, will now be utilized for the generation of steam in the boiler. CCPP has improved the VOLUME 8, 2020 efficiency of the thermal system by approximately two times because most of the added heat will now be used for the CCPP process to work.
To explain it in more details the temperature-enthalpy diagram can be used for the purpose. Fig.6 is representing the useful heat and the wasted heat of the CCPP. The upper area is representing the Brayton Cycle while the lower useful area is representing the Rankine Cycle. We can see that the area enclosed by the rankine cycle is within the area of the heat rejected from the Brayton Cycle. Therefore, in CCPP the Rankine Cycle is actually utilizing the heat energy from the Brayton Cycle that would other-wise be exhausted to the atmosphere. This technology has improved the efficiency of the thermal power system as a large amount of heat is added in CCPP as compare to Brayton or Rankine cycle. CCPP does not only improve the efficiency of the thermal power system but also helps in reducing the industrial pollution by reducing the emission of different hazardous gases as well. CCPP is more stable and has better reliability than the conventional Rankine and Brayton Cycle. A proposed dynamic model for the Combined Cycle Power plant of KAPCO is shown is Fig.7. In dynamic modeling the current output of the model depends on the previous value of the output of the same model [18], [19]. The proposed model contains many components that contribute in the flow of water/steam in the rankine cycle and flow of hot gas in the brayton cycle. The contributions of these components in the flow of model are explained as follows; 1-Air-compressor that takes in the air from surroundings and increases the air pressure from 1 bar to 13 bars and temperature up-to 400 degC. 2-Combustion section uses fuel from the fuel source and compressed air from the air-compressor for the combustion process and produces hot gases with temperature upto 1100 degC. The mass flow rate through air-compressor is 445kg/s. 3-Fuel source provides fuel for the combustion process following a ramp signal up-to 9.3kg/s. 4-Gas turbine's blades are driven by the hot gases from combustions section converting the thermal energy of hot gas into mechanical energy. The exhausted gas from gas turbine has temperature around 560 degC and enters super-heater of HRSG. 5-Electrical generator is coupled with the gas turbine and generates electrical power. 6-Water source provides water with flow rate of 76kg/s without interruption to the main water tank. 7-Main water tank stores water for the water/steam cycle. 8-Pipe assures a stable amount of water or steam flow. 9-LP-electrical pump increases the pressure of water from 3.6 bars to 7.1 bars before water enters the LP water tank. 10-LP-water tank circulates the water back to main water tank to maintain a specific temperature of main water tank using LP-evaporator of HRSG. 11-LP-evaporator increases the temperature of circulating water in the LP-water tank. 12-Control valve controls the flow rate of water and steam. 13-HP-electrical pump Increases the pressure of water to 60 bars before water enters HP-economiser. 14-HP-economiser has two stages and increases the temperature of high pressurized water to more than 200 degC before HP-water tank. 15-HP-water tank circulates high pressurized and high temperature water to increase temperature with HPevaporator to convert water into saturated form. 16-HP-evaporator has three stages that give more enthalpy to the circulating saturated water up-to 2000kj/kgdegC. 17-Super-heater contains two stages that converts the saturated steam into super-heated steam and also works as steam dryer. The number of tubes in each heat exchanger of the proposed model is divided according to the heating area of case study. 18-Steam mixer is used to mix both steams from two parallel HRSGs without losing pressure and temperature. 19-HP-steam turbine's blades are driven by superheated steam by converting the kinetic energy into mechanical energy. 20-LP-steam turbine uses a low pressurized steam to move its blades. Both steam turbines are coupled with the electrical generator to generate electrical power.

IV. CASE STUDY
To validate the proposed model, KAPCO (Kot Addu Power Company) thermal power plant, muzafargarh, Punjab, Pakistan is used as case study. KAPCO thermal power plant contributes 6 percent in the total Pakistan's electricity generation. It is the largest combined cycle power plant of Pakistan containing 10 multi-fuel gas turbines and 5 steam turbines.
In KAPCO, two gas turbines generate electricity and then exhaust their hot gases to two parallel HRSGs. Steam is produced within HRSGs and then this high pressurized and high temperature steam from both HRSGs drives a single steam turbine to generate more electrical power. Gas, furnace oil and HSD are used as fuels for the combustion process of the gas turbine system. Total heating surface area for HRSG of KAPCO is 84000 square metres which is divided into 11 percent area for LP-Evaporator, 40 percent for HP-Economiser, 42 percent for HP-Evaporator and 7 percent for HP Super-heater. Every turbine is coupled with a separate electrical generator but for the purpose of developing a model to be generic in nature, the proposed model simplified the generator's model by considering and modeling only a single generator. Some important and relevant data of KAPCO thermal power plant are shown in the table 2 and table 3.

A. GAS TURBINE-1
The gas turbine-1 system of KAPCO starts generating electrical power in 2 to 3 minutes after air compressor and the combustion chamber start working, but for generalization of the model we simulated the electricity generation at the same time as air compressor and combustion chamber start working because our main objective is to develop a general thermal power plant model while KAPCO plant is used as case study for the purpose.
In Fig.8, the real data curve line and simulated curve line for the electrical power generation of Gas turbine are shown and compared. If we consider Fig.8 and Fig.9, the desired generation of electrical power can be computed with varying the temperature and pressure of the gas at its inlet and outlet. Other factors that are involved in the electrical power generation's behaviour are the internal parameters of the aircompressor, combustion section and gas turbine. To explain the start-up behavior of thermal power plant in more detail, the time period is considered in seconds because small time unit will provide more accurate results. These results are for the first 1118 seconds of the plant's starting as the proposed model could only simulate for 18 minutes. In Fig.9 we can see that the simulated temperature value is initially a little higher. Many factors like humidity in the air, fuel quality or the variations in the fuel sources may cause this difference in the temperature value. In the first 3 minutes, the simulated  curve is somehow constant than the real data value of the temperature. This difference is due to the simplification that we have used by simulating the electrical power generation of Gas Turbine-1 from the start instead of simulating it after 3 minutes. After 2 to 3 minutes the results were satisfactory and followed the same trend as the real data value of the temperature for the rest of the time.
The temperature started increasing after 360 seconds because at this point the fuel is provided following a ramp signal. Initially fuel is provided with the flowarte of 4.3kg/s which kept increasing following a ramp signal until it reached to the highest value of fuel flowrate 9.35 kg/s. In the proposed model the temperature of the gas turbine can be controlled with the fuel feed and air intake from the air compressor. A detailed comparison of important parameters between real

B. GAS TURBINE-2
Gas Turbine-2 has the same parameters with the same characteristics as Gas turbine-1.
The electrical power generation, Temperature and pressure values are the same as Gas turbine-1. The Fig.10 shows the real data line curve and simulated line curve for electrical power generation.A comparison graph between simulated temperature line curve and real temperature data line curve of Gas turbine-2 is shown in Fig.11. The Gas turbine-2 has the same values for parameters as Gas Turbine-1 as described in table 4.

C. COMBINED CYCLE POWER PLANT
The overall proposed Modelica model for KAPCO simulates for the first 18.63 minutes (1118 seconds) which covers  100 percent electrical energy generation of the Gas turbine-1 and covers the same amount of electrical energy generation for the Gas turbine-2. Both Gas turbines generate 246 MW while the single steam system generates almost 145MW. As the steam system reaches to its full electrical energy generation in around 30 minutes (1800 seconds) in the Combined Cycle Power Plant of KAPCO, therefore the proposed model covers more than 60 percent of the total time required for the 100 percent steam electrical energy generation as our proposed model can only be simulated for the first 1118 seconds of the start-up of thermal Power plant.
But the achieved simulation results for the steam system are very satisfactory. The steam electrical power generation very much depends on the exhaust temperature of the gas turbine. The more the temperature of the gas turbine the more enthalpy will be attained by the steam. The initial temperature and pressure of the water from the main water tank are also of the same importance in the generation of the electrical power from the steam turbine. If we compare Fig.9 and Fig.11 with Fig.12, it can be observed that the electrical power generation VOLUME 8, 2020  from the steam turbine is directly proportional to the exhaust temperature of both gas turbines.
Heating surface area of the boiler has the same significance in the CCPP. This part of the steam system decides the efficiency of the CCPP because low heating surface area will not be able to convert enough heat energy of the hot gas into kinetic energy for the steam to produce electrical energy. The proposed model divided the heating surface area according to the KAPCO thermal plant, but heating surface area can be changed by selecting the number of tubes and lengths of heat ex-changers in the proposed model for any thermal power plant. Other factors involved in the generation of electrical energy are steam flow rate and the pressure of the steam. These variables can be controlled with the control valves and the water pumps. So, selecting proper parameters for control valves and water pumps may give us the desired values for the pressure and steam flow rate. Fig.13 presents a comparison between simulated result and real data of steam flow rate through the steam turbine. There is a notable difference between the simulated and real data line curves especially at the start that reduces with the passage of time. This difference is probably because of the low simulated pressure of water through the HP water pump compare to the real value of pressure as is described in table 5. According to the energy balance of liquid pump the pressure and mass flow rate are directly proportional to each other. Therefore, the simulated flow rate of steam is lower than the real data of steam.
In Fig.14, the electrical energy generation line curves for both gases reached to their 100 percent generation within 18 minutes of the start-up and got stable for the remaining time. On the other hand, the steam turbines could not reach to its 100 percent electrical energy generation because electrical energy generation from steam turbine takes 30 minutes to reach to its 100 percent generation in KAPCO thermal plant. So, this proposed model covers more than 60 percent rankine cycle while 100 percent brayton cycle. Table 6 shows a comparison of the pressures, temperatures and mass flow rates of the real data values and the simulated values from the proposed modelica model. The inlets and outlets of main components of the rankine cycle are compared in table 5. According to [20], to match the achieved  simulated results with the actual data for the purpose of validating the proposed model, results of root mean square error (RMSE), coefficient of variance of RMSE, mean absolute deviation (MAD) and mean absolute percentage error (MAPE%) are calculated with eq.(18), eq.(19), eq.(21) and eq. (20).
where; X t = Simulated value X t = Real data

VI. CONCLUSION
For the optimized generation of electrical power from power plant by monitoring the electrical power generation behavior with respect to load, system simulation is preferred. Therefore, the proposed study used Openmodelica to model the thermal power plant. Openmodelica is a multi-domains software which can properly represent a thermal power system. In the proposed model, all the basic components of gas turbine system and steam turbine system are modeled in detail. The internal power consumption of the thermal power plant was also modeled in the proposed model. The proposed model for the CCPP simulates for the first 18 minutes of the start-up of plant. During this period both Gas turbine systems reach to their 100 percent electricity generation as shown in the Fig.8 and Fig.10. The achieved simulation results cover more than 60 percent of the total time required to reach 100 percent steam electrical power generation as it takes more time to generate 100 percent electrical power. The results for steam turbine are satisfactory and can be seen in the Fig.12 and Fig.13. The simulation results were validated with the real data collected from the KAPCO thermal power plant. The achieved results show the accuracy of the model in the start-up and the base-load conditions. The proposed model completely covers both Gas turbine systems, but it simulates for 18 minutes which is not enough to cover the complete steam cycle. So, simulation time of the model could be increased to cover the whole steam cycle. Different control valves and water pumps could further be modeled in more detail. For example, the motor for the water pump and the servo motor for the control valves could be modeled further. We recommend a further research on modeling a whole electrical power system including thermal power generation integrated with the renewable energies for a better understanding and for an optimized operation of the overall power system.