## Abstract

This chapter presents dynamic modeling approaches suitable for organic Rankine cycle (ORC) power plants. Dynamic models are necessary for the better understanding of the plants’ behavior during transient operation, such as start-up, shutdown, and during rapid load changes. The estimation of plant operating parameters during transient operation is crucial for monitoring and control of the plant so that the system state variables do not exceed the pre-defined operating range. One example is the proportion of liquid and vapor phase in the condenser and evaporator that must be kept within acceptable ranges to avoid stalling or temperature shocks during transient conditions. Using dynamic models enables plant operators to predict changes in power output as a function of the plant’s boundary conditions such as temperature of the heat source and ambient conditions, so that they can respond to the expected heat and power demand accordingly. The aim of the chapter is to investigate and review the methodologies applicable for dynamic simulation of ORC power plants.

### Keywords

- dynamic modeling
- transient conditions
- simulation
- time constants
- ORC
- thermal power plant

## 1. Introduction

### 1.1. Basics of dynamic modeling

The mathematical modeling of the dynamic systems and analysis of their dynamic characteristics is essential for developing the control and monitoring systems. A dynamic model is able to trace the variation of the system operating parameters in all operating conditions and consequently detect the critical points and outranges. Generally, the dynamic behavior of a system including mechanical, electrical, fluid, thermal, and so on can be described by a set of transient differential equations (ODE or PDE) which originates from the governing physical principals and inherent physical characteristics.

The basic concepts that have to be known in dynamic modeling include system inertia, initial condition, input stimulus variable, and time constant.

The *inertia of a system* is defined by its tendency to remain unchanged or its resistivity against the variation. Obviously, the system’s dynamic response depends on its inherent inertia and also the input stimulus which causes the system to break through its initial steady-state condition. To simulate and predict a system’s dynamic response, all parameters and properties of the system which affect system inertia have to be known and considered. In mathematics and particularly in dynamic systems, an *initial condition* is the value of an evolving variable at some specific point in time (typically denoted as t = 0). Generally, initial conditions are needed in order to be able to trace the changes in the system’s variables in time. Initial conditions affect the value of dynamic variables (state variables) at any time in the future [1].

In dynamic modeling, it is assumed that the system’s initial state is disturbed due to an external excitation or load change which forces the system to respond dynamically. This input excitation pulse is called *input stimulus variable*. The input stimulus can be an impulse function, a step function, a linear function, a sinusoidal function or any other type of time-dependent function.

Moreover, *time constant* is defined as a time which represents the speed with which a particular system can respond to change, typically equal to the time taken for a specified parameter to vary conventionally by a factor of 1–1/*e* (approximately 0.6321). Actually, it is a criterion that enables us to evaluate the response speed and inertia of the system and also to compare the response time of different systems to each other. Physically, a smaller time constant means a quicker system response. For example, time constants are a feature of the lumped system analysis (lumped capacity analysis method) for thermal systems, used when objects cool or warm uniformly under the influence of convective cooling or heating [2]. This concept is also used in other dynamic systems including mechanical vibration and damping, electrical circuits, electronic systems, fluid and hydraulic systems, thermodynamic systems, chemical and electrochemical processes, and so on [3].

In this chapter, we are going to focus on thermal power plants’ dynamic behavior modeling and specialize it for ORC power plants.

### 1.2. Theory of thermal power systems and organic Rankine cycles’ dynamic operation

In the development of thermal power plants, a good estimation/prediction of the plant behavior under design and/or during operation is highly desired [4]. Thermal power systems and especially organic Rankine cycles (ORCs) have complex starting and shut-down mechanisms and normally undergo fluctuations in operating conditions during their service period. Therefore, their dynamic behavior has to be identified to ensure the secure and continuous operation of the system when facing fluctuations and perturbations. The dynamic plant performance is also the foundation for developing control systems during the early design stage of an ORC power plant. In an ORC dynamic operation analysis, the following factors are of interest to be investigated and identified [5].

the time response of the ORC components (including turbine, pump, heat exchangers, etc.) and identification of the slowest responding component to an input parameter change;

the total system response time, overshoots, and identification of limitations and outranges;

recognition of the start-up and shut-down operation mode;

an unexpected slow or sharp transient in response to change in one or multiple physical variables like thermal input, power output, and so on;

the part-load capability of the system.

### 1.3. State of the art (literature review)

Much of the recent research on ORC systems focused on finding the ideal working fluids and developing turbines and heat exchangers that can provide the highest efficiency for the given power plant layout and the nominal steady-state operational conditions. A wide range of literature is available dealing with the steady-state operation of ORC systems for geothermal power plants, while dynamic models and studies are not so common [6].

A thorough exposition on the dynamic modeling of ORCs is given in a two-part series by Paliano and Putten [7] and [8]. They give insight into the requirements for dynamic model development and validation of Rankine cycle systems and present a simulation of a 600 kWe biomass-fired steam power plant. They use a self-developed dynamic cycle analysis library using an object-oriented, general simulation software (

The dynamic modeling of the organic Rankine cycle (ORC) was also carried out by Wei et al. [9] targeting ORC system control and diagnostic. They tested two different modeling approaches for this purpose, focusing on computational time, simulation accuracy, and complexity. The first approach was based on the moving boundary numerical method and the second one was performed using the general discretization technique. The code was developed in Modelica and simulated by the Dymola module. After comparison and evaluation of the two approaches, they suggested the moving boundary approach as the most suitable ones for control design applications.

Sohel et al. [6] published their study on the dynamic modeling of a 5.4 MW binary cycle unit of a geothermal power plant. Pentane was used as the ORC motive fluid and it is powered by separated brine from the geothermal fluid. The results of simulation were compared to the plant performance data and the prediction capability of the model at steady and transient operational conditions was proved with reasonably good accuracy.

An ORC dynamic modeling package was presented by Casella et al. [10] for the system design and prediction of the off-design conditions. They validated their results with Triogen ORC system data [11]. The system standard module included Triogen turbo-generator, turbo pump, condenser, and recuperator, while the evaporator could be designed and customized for available energy sources. For evaporator heat exchanger modeling purpose, they used one-dimensional heat transfer equations and considered a standard geometry with some simplifying correlations.

Desideri et al. [12] developed a dynamic model of the ORC system, validated both in steady-state and transient conditions via experimental data using a 10 kWe waste heat recovery (WHR) ORC system with a screw expander. They used an open-source Modelica library, ThermoCycle, developed by the Energy Systems Research Unit at the University of Liege. The commercial program Dymola (Dynamic Modeling Laboratory) was used to perform all the simulations. They implemented a liquid receiver model after the condenser to incorporate the accumulated liquid in the tank based on the phase equilibrium assumption. Moreover, effects of the non-condensable gases were incorporated in their model using the gas mixture theory.

Eventually, they demonstrated that the ThermoCycle library can reliably be used for the modeling of such thermodynamic systems, allowing, for instance, the implementation and simulation of various control strategies.

Ziviani et al. [13] discussed the challenges involved in ORC modeling for low-grade thermal energy recovery. They studied and reviewed various software packages, to identify the most applicable and suitable ones for ORC system modeling. Their recommended package list included Matlab/Simulink, EES, Phyton, Modelica, AMESim, and Cycle-Tempo.

In another relevant study, Grelet et al. [14] presented a method to model heat exchangers used in waste heat recovery Rankine-based systems in heavy-duty trucks using the water ethanol mixture and recovering heat from the exhaust gas recirculation (EGR) system. The model predicted both the heat transfer and physical properties of the working fluid such as temperature and density after the heat exchange process. The authors claim that the model presents an advantage of being low in terms of computational needs and is suitable for control software integration. Grelet et al. [15] published also another paper investigating the transient performance of a waste heat recovery Rankine cycle-based system for a heavy-duty truck and compared it to the steady-state study. Simple thermodynamic simulations are carried out assuming certain conditions for the comparison of several working fluids. Fluid choice and concept optimization are conducted, taking into account integration constraints (heat rejection, packaging, etc.). The study exposes the importance of the modeling phase when designing Rankine cycle-based heat recovery systems (HRSs) and yields a better understanding when it comes to the integration of a Rankine cycle in a truck.

Marchionni et al. [16] presented a modeling approach to analyze and design waste heat to power conversion units based on an ORC. They implemented the model in the commercial software platform GT-SUITE. Sub-models were developed and calibrated for the components like plate heat exchangers and multistage centrifugal pumps using performance data of industrial map data at design and off-design conditions. The pump and turbine speed were optimized at different operating conditions of the evaporator to maximize the net power output. Furthermore, the effects of thermal inertial of the evaporator, in response to transient input heat load, were assessed using the dynamic model with reference to a sample heat load profile of the hot water source and at different timescales.

Furthermore, Xu et al. [17] developed a dynamic organic Rankine cycle waste heat recovery model (ORC-WHR) using Simulink and an engine model for heavy-duty diesel applications. Their physics-based ORC-WHR system model, constructed in GT-POWER software platform, included parallel evaporators, flow control valves, a turbine expander, a reservoir, pumps, compressible volumes, and junctions. Experimental data for the ORC-WHR component models were identified and collected over a wide range of steady-state and transient operational conditions. The data were collected from an ORC-WHR system on a 13 L heavy-duty diesel engine. The model was supposed to serve as a virtual plant for offline simulations to explore the potential of fuel savings and emission reduction for different driving cycles of the heavy-duty trucks and provide guidelines for the experimental studies.

The reviewed papers presented here illuminate different modeling methodologies and strategies with various levels of accuracy and computational time/cost (based on the system application and modeling purpose). In addition, it is expected that a comprehensive dynamic model enables a full-range analysis of a system’s transient response to variation of input parameters, that is, minimum (near-zero) to maximum possible input thermal load. The function, representing the input variations, should be flexible enough to enable the users to study the effects on the power output as the function of time.

It is also advantageous to be able to switch these inputs and outputs around for improved flexibility. In addition, adaptation of the model to closed loop control systems should be considered too.

In this chapter, a general framework is devised to provide a flexible dynamic modeling approach adaptable to different ORC system applications and different dynamic modeling purposes based on the reviewed modeling attempts and reported results. The modeling framework incorporates step-by-step dynamic modeling methodology for both component and system levels. Technical aspects as well as assumptions and required considerations for ORC dynamic modeling are described. Besides, component assembling approaches to build dynamic models of the whole ORC system are discussed and key aspects and related noticeable remarks are highlighted. Moreover, the potential applicable software tools as well as developed computer codes and data libraries customized for transient modeling of ORC power plants are reviewed, evaluated, and described.

## 2. Dynamic modeling of ORC at the component level

To build a comprehensive and meanwhile enough fast dynamic model of an ORC power system, the intelligent selection of component models with proper input/output parameters as well as appropriate simplifying assumptions is crucial. The ORC systems are generally utilized for the very vast range of heat recovery applications for each of which the specific type of components might be used with different operating characteristics and conditions. For example, various types and sizes of heat exchangers, expanders, pumps, valves, and so on are used for the ORCs depending on the scale of thermal power input, working fluid, secondary transfer fluid, and the specific operating conditions. Based on the ORC system application and its specific operating conditions, a proper model with reasonable simplifying assumptions has to be considered for component modeling. In this section, we will discuss modeling methodology and analogy of the ORC components, trying to clarify general aspects of the mathematic formulation and simulation details. In some cases, we need to specialize the models for a particular component or specific assumptions requiring further modeling details.

### 2.1. Heat exchanger (evaporator, condenser, etc.)

In the ORC waste heat recovery systems, the heat exchangers are generally used either as evaporators or as condensers. Evaporators absorb heat from the heat source and release it to the working fluid while the condensers reject heat from the working fluid to cooling water. Since the evaporators and condensers are crucial components when determining the overall dynamic behavior of the ORCs, the heat exchanger model should be characterized by sufficient flexibility to allow simple generalization of the design.

Different types of heat exchangers might be used in the ORC systems including plate/compact heat exchangers, tubular co-flow/counter-flow heat exchangers, shell and tube heat exchangers, and so on. The detailed heat and mass transfer equations are slightly different for different types of heat exchangers due to their configuration and geometry, but the principles are the same for all these heat exchanger types. Here, we will present the modeling methodology and general equations used.

For the modeling purpose, the heat exchangers are normally represented as a straight pipe, despite the fact that different and more complex designs are usually adopted in order to enhance the heat exchanged and to reduce the overall dimensions of the system (see a schematic sample configuration in Figure 1) [18]. The assumption of a straight pipe, however, simplifies the resulting dynamic problem to a great extent and is commonly adopted when the heat exchanger dynamic modeling is considered [9, 19].

Generally, the heat exchanger as a power plant component is simulated using one-dimensional heat and mass transfer equations because of the acceptable accuracy of one-dimensional models and limitation in computational time especially for the dynamic models and control applications. One-dimensional consideration leads to the following assumptions which normally are applied:

The pressure drop is considered in some models but omitted in others. It depends on the importance of the pressure loss in a specific modeling strategy.

Energy accumulation is considered in both metal pipe and the two working fluids.

Mass accumulation is considered for the fluids (even though it is neglected in some developed models for simplicity).

The heat exchanger could be assumed either with or without phase change depending on the actual case under study.

One-dimensional mass and energy equations are considered and the equations are solved numerically along the heat exchanger. For more simple modeling, lumped thermal capacitance can also be assumed for both the metal pipe and the fluids; hence, just one thermal node needs to be defined with such assumptions.

The external pipe is assumed to be ideally insulated from the environment; hence, heat losses are neglected.

The wall and fluid temperature in the radial direction is internally uniform.

Axial heat conduction in working fluid, wall, and exhaust gas is not considered (even though in some modeling attempts, it is taken into account).

Heat exchanger modeling tools are generally based on the finite difference method, applying the energy conservation and mass conservation equations in a differential form. The straight pipe in a typical heat exchanger design is split into

The system inputs are characterized by the parameters representing the two fluids at the heat exchanger inlet. Particularly their temperature, pressure, and mass flow rate must be known, and the fluid pressures are introduced since many properties depend also upon pressure. The output generated by the system can be any of the state variables but of particular interest; in the view of linking the heat exchanger to other components in a complex network, the state of the fluids leaving the exchanger must be provided, as the temperature of the two fluids. Due to the counter-flow design this temperature will be the one calculated at the node with index 1 for the fluid flowing in the annulus, as shown in Figure 3 [18].

Subscribes f_{1} and f_{2} refer to fluid 1 (in the inner pipe) and fluid 2 (in the annulus), respectively, and subscribe p relates to the pipe body. Once the system has been fully defined, the heat and mass transfer coefficients and correlations must be introduced to calculate the actual thermal fluxes.

An interesting study conducted on this topic is by García-Vallardes et al. [20], in which the thermal and fluid dynamic behavior of a tubular heat exchanger (could be applied as evaporator or condenser) are simulated numerically. Continuity, momentum and energy conservation equations were applied for the internal and annulus tubes to accurately predict the heat and mass transfer inside the heat exchanger. Energy conservation equations have in fact been applied to the external tube and insulation, hence dropping the hypothesis of the ideally insulated system. However, such detailed simulation of the heat exchanger is not useful for the modeling of dynamic ORC systems, since one needs to compromise between expected accuracy and computational time and cost.

### 2.2. Expander

The expander turbine is simulated generally as a component based upon steady-state characteristic curves. Inputs/outputs of the system are shown in Figure 4.

Here, the rotational speed and the pressure ratio are input variables, while mass flow rate and efficiency (from which power and torque can be derived) are outputs; however, the input/output variables could be changed or replaced depending on specific application requirements or design/optimization strategies [17]. The turbine can be integrated with an electric generator or it can also be mechanically connected to an engine crank shaft through a transmission, as in [21]. Due to the choked flow status at high expansion ratios 10–30, turbine expander mass flow rate can be written as a linear function of turbine inlet pressure as shown in Eq. (1) [17].

The outlet enthalpy is calculated by isentropic efficiency as follows:

The turbine efficiency map has to be provided by the turbine manufacturer. Outlet temperature,

Turbine boundary conditions are pressure and enthalpy at the inlet and pressure at outlet. In addition, the inlet and outlet are adiabatic. The heat transfer between turbine outer surface and ambient is considered based on the turbine isentropic efficiency map.

### 2.3. Pump

The pumps of the ORC system have to maintain both pressure and working fluid mass flow. The HP pump is considered here to be a positive displacement type, whereas the feed pump is an inline roller cell pump. Due to the dominance of the HP pump, only the HP pump model is formulated here. The pump mass flow rate is interpolated using the map (Eq. (8)) provided by the ORC system manufacturer [22]. Pump power consumption and outlet temperature are calculated by Eq. (9) and (10).

where

### 2.4. Reservoir

The reservoir in an ORC system works as a buffer storage for the working fluid in order to supply fluid or accumulate it as the ORC system experiences transients. When the ORC system starts, the working fluid level is low in the reservoir because the entire circuit is full of liquid. When the system warms up, part of the ORC system is occupied by vaporized working fluid and the working fluid level in the reservoir increases compared to the cold condition. To calculate the working fluid level as well as the mean temperature, both mass balance and energy balance are applied in the reservoir. The mass balance can be described by Eq. (11) and the energy balance is given typically by Eq. (12). The reservoir working fluid level can be obtained by Eq. (13) [17].

Here,

### 2.5. Valve

The proportional valves or distribution/control valves are commonly used in ORC heat recovery units to enhance the flexibility and controllability of the system. Depending on the fluid state when flowing over the valve, the flow might be either incompressible or compressible. The valve located after the pump operates normally with incompressible fluid flow, while the working fluid passes through a valve before the expander, is usually super-heated vapor and shows compressible behavior. Hence, the mathematical model defined for the valves is different based on the thermodynamic state of the fluid.

When the working fluid is in liquid state and thus incompressible, the outlet temperature is assumed to be equal to the inlet temperature due to the small temperature change across the incompressible valves. The necessary boundary condition for the incompressible flow valve is mass flow rate from the pump at the inlet. The valves are assumed adiabatic, that is, no heat loss to the environment. Therefore, a simple mass conservation equation, describing the relation between the valve opening ratio and the mass flow passing through the valve, can be used. Then the valve opening ratio has to be given as an input parameter. Besides, the valve’s pressure loss (if found to be considerable) can be calculated by the formulation provided by the manufacturer as a function of mass flow rate. The turbine inlet valve and turbine bypass valve both experience vapor phase flow. They can be modeled based on the compressible flow status: subsonic flow or supersonic flow depending on inlet/outlet pressure ratio [23]:

Here,

The boundary conditions necessary for these valves are pressure and enthalpy at the inlet and pressure at the outlet.

### 2.6. Pipes and junctions

#### 2.6.1. Pipes

The pressure and heat loss through the pipes containing the liquid state are normally negligible compared with other components. If in a certain case their contribution is found to be considerable, they could be mathematically modeled using the general fluid mechanics principles using pipe-flow pressure loss and heat transfer equations. However, the pipe flow after the evaporators and upstream of the turbine valves are considered as compressible volumes, which has to be taken into account, especially for their dynamic inertia applied to the system [24]. Three equations are utilized in this volume: mass balance, energy balance, and the ideal gas law [25]. Three parameters can be calculated by solving these three equations: working fluid’s mass inside the volume, working fluid’s mean temperature, and mean pressure inside the volume [8].

where u represents specific internal energy,

#### 2.6.2. Junctions

Pressure loss in the pipe junctions is negligible. Besides, the junctions are assumed to be adiabatic with no heat loss to the environment. Similar to the reservoir, junctions are modeled by mass balance and energy balance via Eq. (18) and (19), respectively [8].

The junction boundary conditions are mass flow rate and enthalpy at the inlet and the outlet which are considered to be adiabatic.

## 3. System-level dynamic modeling

### 3.1. Integration of the component dynamic models

Once dynamic models of every individual component are ready and evaluated with known input state variables and calculated outputs, the components are interconnected to build a thermodynamic model of the whole thermal power system. Before interconnecting the individual component models to each other, the following important issues have to be reviewed:

ensuring the validity and accuracy of the component models for both steady-state and transient conditions;

creating and fully parameterizing the ORC components, the boundary sources, and sinks. Besides, the operating range and limitations for all components have to specified and inserted in the simulation models;

defining appropriate known and unknown variables for the system, based on the design or optimization requirements and strategy. More detailed aspects of the system variable definition that need to be considered are presented in Section 3.3.

omitting the unnecessary fixed common variables of the individual component models or adding new fixed common state variables.

After above-listed considerations and the preparation of required data, the ORC components will be connected properly to establish the system model. Connecting the component models means uniting the common variables of a specific component to its neighboring components so that the set of components create a closed loop by linking them to each other.

### 3.2. Initialization of the system simulation model

Apparently, the initialization of closed-loop dynamic models is a difficult task which should be carefully approached and planned. To initialize the dynamic model, the initial conditions have to be defined appropriately. At some point during the initialization process, one must thoroughly plan the thermodynamic cycle as a steady-state problem to find appropriate states for the initialization of the problem [5]. Initial state points can be set as parameters calculated by a steady-state model in which the analysis is expected to begin in a time domain. Initialization problems require starting arrays for all components, which can also be stored as parameters in the test bench level. Diagnostic and summary variables should also be included in the initial condition list definition [9].

### 3.3. Input and output parameters and identification of the constraints

The ORC dynamic model developers must prepare an input/output variable list considering the aspects mentioned in Section 3.1, where all fixed model inputs based on the real-test condition are presented. The model outputs which are to be calculated as a result of the simulation need to be fixed too. Then the variation of the outputs as a function of the time step can be studied and investigated. Besides, different post-processing activities can be considered, using the simulation results.

It has to be kept in mind that the number of unknown variables of the whole system has to be equal to the number of equations so that the differential sets of equations are closed. Otherwise, the equations are not solved or won’t have unique results. When the component models are integrated to build the thermal power system, the number of unknown variables for each component will be different from the case when the component models were simulated individually. It is usually helpful if components are connected one by one and simulated step by step to ensure the correct connectivity and the number of input/output variables.

Moreover, the output variable trends are strongly dependent on the constraints forced to the simulation model. Obviously, the output trends will follow the real plant’s output when the system constraints imposed during simulation are the same as for the real plant [26].

### 3.4. Key aspects of ORC power systems to be considered for the analysis

#### 3.4.1. Working fluid

There are several aspects to be taken into account when using a working fluid for a specific application. The aspects that have to be considered include fluid deterioration, environmental aspects, as well as boiling, condensation, and freezing temperatures that decide the operating ranges. The above limitations have to be incorporated in the simulation tool.

#### 3.4.2. Heat sources

The heat sources have different grades of quality (temperature levels) and quantity (amount of thermal energy). The dynamic model has to take into account the possible range of operating temperatures and the amount of thermal energy of the heat sources. If the number of heat sources is larger than one, additional complexity and more challenges for the design of the system (fluid, expansion machine, control, etc.) will arise. Generally, variation in heat source parameters is a common input to the stimulation of the ORC systems, which leads to a dynamic response.

#### 3.4.3. Heat sink

For a specific ORC application, the heat sink available is usually an independent or commonly used cooling package including radiators containing a coolant, which is cooled by means of cooling fans or an air-cooling module. The integration of a heat recovery system model into the cooling module results in more conclusive and realistic results, which eventually limit the amount of heat that can be converted into useful work. In addition, thermal and mass inertia of the heat sink (cooling module) may affect dynamic behavior and time response of the whole system. Therefore, a complete system analysis including the cooling package is necessary to find the optimal way of recovering the heat from a heat source and to design a reliable control and monitoring system.

#### 3.4.4. Subsystem interaction

In ORC-based heat recovery systems, the operation of the plant that generates heat might be influenced by the integration of the ORC. For such systems, the impact on lateral subsystems has to be considered and incorporated in the simulation.

For example, in an ORC heat recovery system for a heavy-duty truck (experimented and simulated by Grelet et al. [15] and also Xu et al. [17]), the ORC system shares the cooling system of the vehicle and therefore the charge air cooling capacity can be lower, which has a negative impact on the engine performance. Another example is the use of exhaust gas recirculation (EGR) as the heat source in a heat recovery system designed for heavy-duty trucks. This leads to a trade-off between EGR cooling and ORC performance, which could impact negatively the engine emissions. Several other interactions such as the exhaust back pressure or the weight penalty could also be cited. In such heat recovery systems (HRSs), the performance, and thereby the fuel economy, will be dependent on all the aspects mentioned above. It is therefore critical to model the complete system and its surrounding environment in order to optimize the whole integrated setup. It helps to select the best design using simulation and thereby reduce the number of experimental tests needed to be carried out [15].

### 3.5. Survey of available codes for modeling power plant systems

After reviewing the modeling methodologies of ORC systems, an analysis has been conducted in this section, in order to determine available commercial software that might have been employed as tools for implementing the modeling processes. Other computer-based models within the field of the energy conversion system, available in the open literature, have also been surveyed. The analysis has brought to identify some software that may appear to be proper for the scope. Software that have been used for power cycle modeling purposes are Matlab/Simulink, AMESim, Trnsys, Modelica (OpenModelica, Dymola, Wolfram System Modeler, and MapleSim are all based on Modelica), GateCycle, EES, Phyton, Cycle-Tempo, and GT-SUITE. It should be noted that the analysis of commercial software reported here is neither complete nor exhaustive but is limited to those packages that have been found by the authors to be applicable for dynamic, thermodynamic, and energy modeling purposes. These software have been utilized in order to provide a deeper understanding of their characteristics and a brief description is presented here. Some of these software like GateCycle and Trnsys, while appropriate for some applications, turned out to be improper for the scope of the ORC dynamic analysis, and therefore will not be discussed here. Matlab/Simulink, AMESim, and Modelica feature some common characteristics that make them more suitable for the development of customized dynamic component models of energy systems, for both control purposes and optimization. Therefore, they will be further discussed briefly here [18].

#### 3.5.1. Matlab/Simulink

Matlab is a high-performance language for technical modeling and computation; the name Matlab stands for matrix laboratory. The Matlab language is a high-level matrix/array language with controls flow statements, functions, data structures, input/output, and object-oriented programming features. Matlab/Simulink is a general purpose software package suitable for dynamic systems, which is well known among the control community as it offers excellent performance qualities for designing regulation algorithms. It makes the tool an ideal candidate for process and control engineers, working with the same software package. The environment provided by Matlab software facilitates a general overview of all computations step by step, that can be used for a wide range of applications including simulation, data acquisition, data analysis, and visualization as well as scientific and engineering graphics.

For the dynamic modeling purpose, Simulink provides a graphical user interface (GUI) for building models as block diagrams, using click-and-drag mouse operations. Because Matlab and Simulink are integrated, one can simulate, analyze, and revise models in either environment at any point. Application of Matlab language code and its integration with the Simulink environment, in order to create the desired models of components considered in the analysis of energy systems, depend on the equations used, the methodology applied, and the input/output parameters, which will be discussed in the next sections [18].

#### 3.5.2. AMESim

AMESim is an advanced modeling environment for performing simulations of engineering systems. The main features and applications of this tool are:

performance evaluation of intelligent systems from the early stage of development until on-site application of the system;

the optimization of interactions between subsystems of a multi-mechanism system like electric/electronic, mechanical, hydraulic, pneumatic, and thermal systems;

overall product quality and performance improvement through exploration of critical functions and design update;

enhancing the product development process using novel design features and applying proper algorithms.

The software has the typical feature of an icon-based program and engineering systems can be built by adding symbols or icons to a drawing area. AMESim therefore enables the users to build complex multi-domain system models through an interactive graphical interface. The resulting sketch is easy to understand and offers a logical representation of the system model under investigation. When the sketch is complete, simulation of the system proceeds in the following stages:

Graphical representation of the components is associated with the mathematical models.

The component parameters are defined.

The system is simulated.

Graphical representation of the results is prepared and post-processing is performed to customize the results’ visualization.

The system modeling is carried out in four steps [18]:

Sketch mode: The stage in which different components are linked.

Sub-model mode: The stage in which the physical sub-model associated with each component is chosen.

Parameter mode: The stage in which the parameters for each sub-model are chosen.

Run mode: The stage in which the simulation is executed.

#### 3.5.3. Modelica

Modelica language is designed basically for the modeling of multi-component systems to provide an environment in which a virtual system can be built, similar to what is implemented by engineers in real system development. As an example, standard components like compressor, turbine, and heat exchanger can be selected based on the manufacturers’ catalogs with related technical interfaces and specifications [27]. For this purpose, some manufacturer’s catalogs are proposed to be used with Modelica standard libraries. If a particular subsystem or component doesn’t exist in the software library, it can be built by the user based on software standardized interfaces.

Mathematical component models are generally described by differential, algebraic, and discrete equations in Modelica. Hence, the solution method of the describing equations doesn’t need to be specified by the users. The software decides the algorithm, the computational methodology, or strategy to be used to solve the equations of a particular system and its components.

In [28], the results of development of a Modelica library for CO_{2} refrigeration systems based on the free Modelica library ThermoFluid are presented. The library development is carried out in an Airbus Deutschland research project and is focused on obtaining a library for detailed numerical investigation of refrigeration systems with carbon dioxide (CO_{2}) as the refrigerant. Using the developed component library a CO_{2} refrigeration cycle has been analyzed (Figure 5). The developed model can be used for optimization of specific heat exchangers and evaluation of optimum system configuration as well as for optimization of system control layout.

#### 3.5.4. Customized tools for simulation of energy systems

The literature survey concerning non-commercial models of inter-connectable components of energy system networks resulted in very few examples, which has led to the conclusion that this field still lacks a complete and exhaustive review work. The models proposed are mainly developed for specific applications and often are limited concerning scalability, flexibility, or generality. Examples of custom libraries of components for dynamic modeling and analysis of complex energy systems can be found in [29, 30, 31].

In [29, 30] a modular code for dynamic simulation of a single-shaft gas turbine is presented. The code, called CAMEL, is a modular object-oriented process simulator, for energy conversion system (with specific reference to micro-turbines), and the modeling method is a black-box approach. Each component of the system under analysis can be assembled in an engineering process scheme where the connections between two elements represent either mechanical power coupling or a working fluid stream. The code is devoted to energy system design and is based on C++. For each separate component, a proper set of first-order (linear/non-linear) algebraic or differential equations are cast and all the block equations pertaining to the different blocks are assembled together and solved in matrix form, once assigned proper boundary conditions and parameters. Equations are integrated in time according to a fourth-order Runge-Kutta method. The code is used for both steady-state off-design and dynamic operating conditions.

In another original code [31] called TRANSEO, transient and dynamic simulation of micro-gas turbine-based systems is presented. The code is a model-based software developed in the Simulink platform The library features some advanced components such as heat exchangers, which are modeled according to finite volume approach. Many of the blocks have been validated with reference to a commercial recuperated micro-turbine. From the models realized, some advance-cycle configurations have been proposed and analyzed: for example, externally fired micro-turbine cycles, closed Brayton cycles for space applications, and hybrid micro-turbine fuel cell systems. The library indeed provides some advanced components, and significant modeling techniques are applied in order to generate components applicable to any kind of micro-turbine-based energy conversion system.

## 4. Conclusion

Dynamic models are necessary for the better understanding of the ORC plants’ behavior during transient operation, such as start-up, shutdown, and during rapid load changes. The estimation of plant operating parameters during transient operation is crucial for monitoring and control of the plant so that the system state variables do not exceed the pre-defined operating ranges. Using dynamic models enables plant operators to predict changes in power output as a function of the plant’s boundary conditions such as temperature of the heat source and ambient conditions, so that they can respond to the expected heat and power demand accordingly.

Key elements of an ORC dynamic model are firstly the proper transient configuration of the component’s sub-models and secondly the assembly of individual sub-models to build the whole system model. Thermal and mass inertia of the components (component body and containing fluid) are two decisive factors for the system’s response time.

Arrangement of the input/output variables and the system constraints play an important role in receiving reliable results. The fixed input state variables and constraints of the model have to be coincident with the real plant fixed and controlled variables.

For the dynamic modeling of an ORC system the initial conditions have to be defined and applied appropriately to the model for simulation initialization. All system variables have to be pre-defined as an array at the starting time based on the assumed initial state conditions. Obviously, the initial conditions have to be set up based on the purpose of the dynamic analysis: start-up, shut-down, system response to an input, or any other operating modes. For many cases, the initial conditions can be generated as a result of a steady-state simulation with the initial operating condition setup of the system.

For transient modeling of ORC plants, one can either use suitable commercial software or open source codes for formulation and parameter selection flexibility. Some ready-made data libraries for system components as well as material properties have been developed and customized for the transient modeling of thermal power systems.

In sum, the following general steps are defined and proposed based on ORC power plants’ dynamic modeling framework:

specifying the modeling assumptions for every single component as well as the whole system according to the purpose of the analysis and application;

validation of the component models, to guarantee validity and accuracy for both steady-state and transient conditions;

parameterizing the ORC components and the boundary sources and sinks;

defining the operating ranges and limitations for all components and introducing them to individual component models;

defining appropriate known and unknown (input/output) variables for the system, based on the design and analysis requirements and strategies. This may lead to omitting unnecessary fixed variables of the individual component models or adding new fixed common state variables;

interconnecting the ORC components properly to build the whole system model;

compiling, executing and diagnosis of the system model, first for steady-state conditions;

initial condition definition and data preparation;

running the transient model, diagnosis and validation;

customizing the dynamic model for a particular purpose or application.