Modelica Programming A New Approach in Modeling of CHP: Bahman Zohuri
Modelica Programming A New Approach in Modeling of CHP: Bahman Zohuri
net/publication/300857304
CITATIONS READS
0 419
1 author:
Bahman Zohuri
University of New Mexico
387 PUBLICATIONS 622 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
I am working on cloud computation and mathematical modeling of Fuzzy logic in cloud data warehousing and datamining View project
Business Resilience System (BRS): Driven Through Boolean, Fuzzy Logics and Cloud Computation: Real and Near Real Time Analysis and Decision Making System View
project
All content following this page was uploaded by Bahman Zohuri on 22 July 2019.
The goal of this chapter is to provide the reader on how to design a structure and to
implement using Modelica Programming known as Modelica. A version of a model
library as well as to develop basic models for the transient simulation of Combined
Heat and Power plants (CHP). As the CHP plant consists of many different com-
ponents, modular approach and top-down design has been implemented in the
model library development. Solid base for the project is defined which are including
project rules for modeling the components (e.g. robustness and reusability), default
library structure arrangement and model documentation. Later development is
obliged to strictly follow the rules and concepts introduced during this stage in
order to minimize the mistakes in modeling, easier understanding of the project and
models as well as to provide an organized environment for CHP plant modeling. By
taking advantage of the modular design of this CHP library, planning and analysis
of CHP plant can be simulated easily by using drag-and-drop method while
parameters in models should be defined according to the target CHP plant.
11.1 Introduction
In recent stages of computers both at level of macro and mini and computing power
that they present, a different world of simulation and modeling are opened to end
users of such computing platforms.
Initially, modelers were obligated to convert their models into systems of
Ordinary Differential Equations (ODEs) and Partial Differential Equations (PDEs)
and then writing codes to integrate a solver to integrate those differential equations
in order to run simulation and for complex problems one had to create pre and post-
processors in order as preparation of proper input and then out-put files in order to
deal with nature of such complexity. These types computer languages are called
Equation Oriented Languages and they were base on original approach of block
diagram programming. Then most difficult aspect of these types problems were
coming to deal with when the problem was taking from steady-state to transient
stage, where time was playing as a part of state equations and as result mass and
energy conservation equations from thermal hydraulics point of view are now
function of this variable (i.e. time).
Therefore modeler were always in quest of better simulation and modeling
language and eventually, a wide range of integrators were developed as indepen-
dent software units and modelers were able to focus on the formulation of differ-
ential and partial-differential equations and use “off-the-shell” integrators for
simulation. This trend of thoughts, allowed modelers to focus more on the
behavioral description of their problems and less on the solution methods has
continued since then [1].
Many tools were developed in past three decades were developed to address
above issues and some these multi-purposed tools that can be named are ACSL,1
Easy5,2 SystemBuild,3 and Simulink4 are among them. One of the recent engi-
neering tools that has been developed and are attracted by nuclear engineers to
handle the combined cycle simulation for new generation of nuclear power plants is
the object-oriented physical modeling known as Modelica by Modelica Association
which is a European based company. These types of simulation were just in time for
demand on dynamical system integration rather than static mode.
1
ACSL is a trademark of the Aegis Technologies Group, Inc.
2
Easy5 is a trademark of the Boeing Company.
3
SystemBuild is a trademark of Wind River Systems, Inc.
4
Simulink is a trademark of The MathWorks, Inc.
5
Home Page of the Modelica Association.
11.2 What Is Modelica 215
modeling, simulation, and object oriented language that is built from classes, that is
also called models where from a class definition, it is possible to create any number
of objects that are known as instances of that class.
6
For more information on how local governments can demonstrate leadership by selling or
purchasing renewable energy certificates and other forms of green power, see EPA’s On-site
Renewable Energy Generation and Green Power Procurement guides in the Local Government
Climate and Energy Strategy Series.
218 11 Modelica Programming a New Approach in Modeling of CHP
generators for visual inspection [7]. The potential of Modelica as a means to effi-
ciently describe thermodynamic models has been recognized for quite a while [8, 9]
and lead to the initiative of developing a library for power plant modeling within the
ITEA 2 EUROSYSLIB project.
The most common form of energy recycling system is Combined Heat and
Power (CHP) plants. Combined Heat and Power plant (CHP) or also known as
cogeneration plant generates electricity (and/or mechanical energy) and thermal
energy by accessing the respective energy flows from a prime mover. One main
objective of cogeneration is to maximize the fuel utilization of the system and to
save primary energy in comparison to separated generation of secondary energy. To
achieve this, a good plant topology with suitable components must be designed
which require a thorough evaluation of the demand structure and location of the
plant among others. For this purpose, quite a number of CHP plant variations can be
seen nowadays as a result from the intensive applied research activities in the field
of CHP.
The CHP plant is a complex system and still under intensive development by
many researchers. The system needs to be developed in quick and efficient manners
with low resources based on modeling and simulation method. With the develop-
ment of CHP library in open source Modelica language, it could be used as a base
for further advancement of CHP technology. The aim of this work is to design a
structure of initial version of a model library for the dynamic simulation of Com-
bined Heat and Power plants (CHP). Modular approach and top-down design is
going to be implemented in the model library development. A solid base for this
work is defined which includes rules in modeling the components (e.g. robustness
and reusability), default library structure arrangement and model documentation.
By strictly follow the rules and concepts introduced in this work, the mistakes in
modeling is minimized. The designed library in Modelica language will provide an
organized environment in modeling a CHP plant.
As part of energy conversion effort in recent years by experts in the field,
researches are looking at combined-cycle systems utilizing the Brayton Cycle gas
turbine and the Rankine Cycle steam system with air and water as working fluids
achieve efficient, reliable, and economic power generation. Flexibility provided by
these systems satisfies both utility-power generation and industrial-cogeneration
applications.
Current commercially available power-generation combined-cycle plants
achieve net plant thermal efficiency typically in the 50–55 % LHV (Lower Heating
Volume) range. Further development of gas turbine, high-temperature materials and
hot gas path, metal surface cooling technology show promise for near-term future
power generation combined- cycle systems capable of reaching 60 % or greater
plant thermal efficiency. Additional gas turbine technological development, as well
as increases in steam-cycle pressure and temperature and steam-turbine stage-
design enhancement, is expected to achieve further combined-cycle efficiency
improvement.
220 11 Modelica Programming a New Approach in Modeling of CHP
First we are showing very top level schematic view of reactor in respect to a
Combined Cycle Power Plan (CCPP) using Brayton (Gas or Air) and Rankine
(Steam) Cycle and Recuperated Brayton System as follows. See Fig. 11.3.
Secondly a schematic view of a Combined Cycle Power Plan (CCPP) using
Brayton (Gas or Air) and Rankine (Steam) Cycle is presented here as follows (see
Figs. 11.4 and 11.5).
The General principles of the library at first will be featuring on first physical
principles: mass, energy, and momentum conservation equations, up-to-date pres-
sure losses and heat exchange correlations, and validated fluid properties functions.
The correlations account for the non-linear behavior of the phenomena of
interest. They cover all water/steam phases and all flue gas compositions. Some
components such as the multifunctional heater contains correlations that were
obtained from experimental results or Computational Fluid Dynamics (CFD) codes
that also will be developed by UNM team on this proposal.
A Modelica implementation of the standard will be used for the computation of
the properties of water and steam. The level of modeling detail may be freely
chosen. Default correlations are given corresponding to the most frequent use-cases,
but they can be freely modified by the user.
This includes the choice of the pressure drop or heat transfer correlations.
Special attention is given to the handling of two-phase flow, as two-phase flow is a
common phenomenon in power plants. The physics of two-phase flow is complex
Fig. 11.3 Schematic of combined cycle system using four turbines combination
11.4 Application of Modelica in Combined Cycle Power Plant (CCPP) 221
Fig. 11.4 Schematic of Brayton cycle with recuperator using three turbines combination
Fig. 11.5 Schematic view modeling for the proposed library in Modelica
because of the mass and energy transfer between the two phases and the different
flow regimes (bubbles churn or stratified flow…) [10].
We propose two models to be used: one to simulate the power generator step
reduction load, the other to simulate the full GT (Gas Turbine) trip. In the model
used to simulate the GT trip, the gas turbine is replaced by a boundary condition.
The model contains two main parts: the water/steam cycle and the flue gases
subsystem. Only one train is modeled, so identical behavior is assumed for each
HRSG (Heat Recovery Steam Generator) and for each gas turbine.
222 11 Modelica Programming a New Approach in Modeling of CHP
From the model developer’s point of view the following issues were taken under
considerations:
• The library should be easy to read, understand, extend, modify and validate.
• The library should be sharable at the INL level, and more.
• The library should be truly tool independent.
• The library should be stable across language and tools versions.
• The library should be validated against significant real applications.
• The library should be fully documented. In particular, all modeling choices
should be clearly justified.
The library is subdivided into application domains. Each application domain
corresponds to a connector type. Each application domain is divided into packages
corresponding to broad component types: boundary conditions, connectors, heat
exchangers, machines, pressure losses, sensors, volumes, etc. Components may be
written in plain Modelica text, or constructed by connecting other components from
the library, as shown in Fig. 11.6.
The components will separated into multi-groups components for static mod-
eling only, and dynamic modeling. All components are compatible with each other,
but many components do not withstand zero flows, so they cannot be used to model
transients that involve flow reversal for instance. The components group is com-
posed of singular pressure losses in the approximation of zero-volume, so that the
coefficients of the derivative terms of the balance equations are equal to zero.
Hence, one should only use assigned group of components for static modeling only.
The library components are written in such a way that there are no hidden or
unphysical equations, that components are independent from each other and to
ensure as much as possible upward and downward compatibility across tools and
library versions. This is particularly important in order to control the impact of
component, library or tool modifications on the existing models. To that end, only
the strictly needed constructs of the Modelica language will be used.
The structure of the fluid connectors is of particular importance as it reflects the
overall structure of the library. The fluid connectors do not bear any physical
meaning. They are only considered as a way to pass information between com-
ponents, and should therefore be eliminated from the physical equations system
after compilation of the model.
However, as connectors are sensitive to the components graph orientation rules,
they define the convention for the sign of the flows, or in other words, which
direction in the graph is assigned for positive flows, and which direction is assigned
for negative flows.
References