- Modeling, Assessment, and Optimization of Energy Systems [1, 1 ed.] 9780128166567

Modelling, Assessment, and Optimization of Energy Systems provides comprehensive methodologies for the thermal modelling

490 65 40MB

English Pages 543 [558] Year 2021

Report DMCA / Copyright

DOWNLOAD FILE

Polecaj historie

- 
Modeling, Assessment, and Optimization of Energy Systems [1, 1 ed.]
 9780128166567

Table of contents :
Front Cover
Modeling, Assessment, and Optimization of Energy Systems
Copyright
Dedication
Contents
Preface
Acknowledgment
Chapter 1: Introduction
1.1. Preface
1.2. Outline
1.3. Classification of models for energy systems
1.4. Problem formulation
1.4.1. The mathematical form of the problem
1.4.2. Classification of the problem:
1.4.3. Degree of freedom in the optimization problem
1.4.4. Simplification of the model
1.4.5. Examples of problem formulation
1.5. Required steps for correct modeling and optimization
1.6. Summary
1.7. Exercise
References
Chapter 2: Thermal modeling and analysis
2.1. Introduction
2.2. Chapter's outline
2.3. Review of thermodynamic principles
2.3.1. The first law of thermodynamics
2.3.1.1. First-law thermodynamic analysis of reactive systems and definition of formation enthalpy
2.3.2. The second law of thermodynamics
2.3.2.1. The second law of thermodynamics for closed thermodynamic systems
2.3.2.2. The second law of thermodynamics for open thermodynamic systems
2.3.3. Gibbs functions and chemical potential
2.4. Fundamental of exergetic analysis
2.4.1. Definitions
2.4.1.1. Quality of the energy and definition of the ordered energy and disordered energy
2.4.1.2. Definition of the exergy
2.4.1.3. Environment and different types of equilibrium with the environment
2.4.2. Different types of exergy for analysis of the open systems (control volumes)
2.4.2.1. Exergy transfer due to the work transfer
2.4.2.2. Exergy transfer due to the heat transfer
2.4.2.3. Flow exergy
2.4.2.4. Balance of the exergy in a control volume
2.4.3. Nonflow exergy for analysis of closed systems (control masses)
2.5. Thermal assessment of energy system based on the exergy concepts
2.5.1. Exergy destruction vs. exergy loss
2.5.2. Exergetic efficiency
2.5.2.1. Overall exergetic efficiency of sample energy systems
2.5.2.2. Examples of the exergetic efficiency at the component level
2.5.2.3. Exergetic efficiency for assessment and optimization of energy systems
2.5.2.4. Exergetic balance equation based on the definition of fuel and product's exergies
2.5.2.5. Exergetic efficiency for assessment and optimization of energy systems
2.5.3. Efficiency defect and relative irreversibility
2.5.3.1. Efficiency defect
2.5.3.2. Relative irreversibility
2.5.4. Suggested approaches to enhance the thermal performance of energy systems
2.5.5. Graphical presentation of the exergetic analysis
2.6. Precise exergetic evaluation
2.6.1. Separation of exergy destruction into avoidable and unavoidable terms
2.6.2. Separation of exergy destruction into endogenous and exogenous terms
2.6.2.1. First method
2.6.2.2. Second method
2.6.3. Remarks on the concepts of the precise exergetic analysis
2.7. Case study
2.8. Summary
2.9. Exercises
References
Chapter 3: Advanced thermal models
3.1. Introduction
3.2. Chapter's outline
3.3. Finite-time thermodynamics
3.3.1. Limitation on the thermal efficiency of heat engines driven by the heat transfer
3.3.2. Limitation on the thermal efficiency of heat engines due to the mechanical friction
3.3.3. Limitation on the thermal efficiency of heat engines due to the mechanical friction and heat transfer resistance
3.3.4. Limitation on the thermal efficiency of heat engine driven by chemical reactions
3.3.5. Finite-time exergetic analysis of heat engines
3.3.5.1. Thermal exergy associated with the heat transfer based on the FTT
3.3.5.2. Nonflow exergy prediction based on the FTT
3.3.5.3. Exergetic efficiency of endoreversible heat engines based on the FTT
3.3.6. Other aspects of the finite-time thermodynamics
3.3.6.1. The optimal time and optimal path of the thermal process
3.3.7. Case studies of heat engines analyzed by the FTT model
3.3.7.1. Otto cycle
(i) Otto cycle in the classical thermodynamics:
(ii) Otto cycle in the finite-time thermodynamics:
3.3.7.2. Stirling cycle
(i) Stirling cycle in the classical thermodynamics:
(ii) Stirling cycle in the finite-time thermodynamics
3.4. Finite-speed thermodynamics
3.4.1. Case studies in the FST
3.5. Combined finite-time/finite-speed models
3.5.1. Combined finite-time/finite-speed model for the Otto cycle
3.5.2. Evaluation of thermal energy of the exhaust gases from Otto engines
3.5.3. Case study
3.6. Quasi-steady models (case study: Stirling engines)
3.6.1. Schmidt model
3.6.2. Adiabatic model
3.6.3. Simple model
3.6.3.1. Nonideal heat transfer
3.6.3.2. Pumping loss effects
3.7. Comprehensive combined thermal models (case study: Stirling engines)
3.7.1. CAFS thermal model
3.7.2. Simple-II thermal model
3.7.3. Polytropic thermal model
3.7.3.1. PSVL model
3.7.3.2. Modified PSVL and CPMS models
(i) Temperature distribution in the Stirling engine's heat exchangers
(ii) The real value of polytropic indexes in Stirling engines
(iii) Solution procedure of the modified PSVL and CPMS models
3.7.4. Rotational speed's effect
3.7.4.1. Inertial effect
3.7.4.2. Effect of engine's speed on the gas temperature in heat exchangers
3.7.4.3. Sophisticated mechanical friction model
3.7.4.4. Solution method and results of the modified thermal model
3.7.5. Comparison of all thermal models of Stirling engines
3.7.6. Generalizing of models
3.8. Summary
3.9. Exercises
References
Chapter 4: Combined thermal, economic, and environmental models
4.1. Introduction
4.2. Chapter's outline
4.3. Exergoeconomic modeling
4.3.1. Economic analysis
4.3.1.1. Basic economic principle
4.3.1.2. Time value of money
4.3.1.3. Compounding frequency
4.3.1.4. Annuities and capital recovery factor
4.3.1.5. Inflation, escalation, and levelization
4.3.1.6. Economic models used in exergoeconomic analysis
4.3.1.7. Simple economic model
4.3.1.8. Total revenue requirement, TRR, model
4.3.1.9. TRR model for usage in exergoeconomics
4.3.1.10. Remarks regarding the selection of different economic model
4.3.2. Exergoeconomic analysis
4.3.3. Exergoeconomic assessment
4.4. Exergoenvironmental modeling
4.4.1. Life cycle analysis, LCA
4.4.1.1. Inventory process
4.4.1.2. Damage modeling
4.4.1.3. Weighting process
4.4.1.4. Uncertainties
4.4.1.5. LCA software
4.4.2. Exergoenvironmental analysis
4.4.3. Exergoenvironmental assessment
4.5. Exergoenvironomic modeling
4.5.1. Exergoenvironmental analysis
4.5.2. Exergoenvironmental assessment
4.6. Case studies
4.6.1. Case study (I): A gas turbine-based cogeneration plant
4.6.1.1. Exergoeconomic model of the case study (I)
4.6.1.2. Exergoenvironmental model of the case study (I)
4.6.2. Case study (II): A nuclear power plant with pressurized water reactor, PWR
4.6.2.1. Exergoeconomic model of the proposed PWR nuclear power plant
4.6.3. Remark on case studies
4.7. Summary
4.8. Exercises
References
Chapter 5: Soft computing and statistical tools for developing analytical models
5.1. Preface
5.2. Outline
5.3. Artificial neural network (ANN)
5.4. Group method of data handling (GMDH) type neural network
5.5. Genetic programming (GP)
5.6. Stepwise regression method (SRM)
5.7. Multiple linear regression (MLR)
5.8. Using computer codes and toolboxes to develop statistical models
5.8.1. Neural fitting toolbox (nftool)
5.8.2. Jacobsons's toolbox for GMDH
5.8.3. GPLAB
5.8.4. The ``LinearModel.Stepwise´´ and ``LinearModel.Fit´´ commands
5.9. Case studies
5.9.1. Case study (I): Cellulose direct evaporative cooler (DEC)
5.9.2. Case study (II): Dew-point (M-cycle) indirect evaporative cooler
5.9.2.1. Modeling a cross-flow dew-point cooler by GMDH
5.9.2.2. Modeling counter and perforated counter dew-point coolers
5.9.2.3. Modeling a counter-flow dew-point evaporative cooler by SRM
5.9.3. Case study (III): Desiccant-enhanced indirect evaporative (DEVap) cooler
5.9.4. Case study (IV): A heat pump
5.9.5. Case study (V): A polymer electrolyte membrane fuel cell (PEMFC)
5.9.6. Case study (VI): A Stirling engine
5.10. Summary
5.11. Exercises
Acknowledgment
References
Chapter 6: Optimization basics
6.1. Preface
6.2. Outline
6.3. General definition
6.3.1. Unimodality and multimodality
6.3.2. Local and global optimums
6.3.3. Theory of convexity (and concavity)
6.4. Theory of optimization
6.4.1. Theory of unconstraint optimization
6.4.2. Theory of constraint optimization
6.5. Mathematical optimization
6.5.1. Unconstraint optimization
6.5.1.1. Direct optimization methods
6.5.1.2. Indirect optimization methods
6.5.1.3. Remarks on direct and indirect optimization methods
6.5.2. Constraint optimization
6.5.2.1. Linear programming (optimization)
6.5.2.2. Nonlinear programming (optimization)
6.5.2.3. IP and MINLP problems
6.6. Metaheuristic optimization approaches
6.6.1. Genetic algorithm
6.6.1.1. Tuning parameters
6.6.1.2. Encoding data to chromosome forms
6.6.1.3. Generating new population via genetic operators
6.6.1.4. Decoding the final population to reach the value of the optimal solution
6.6.1.5. General remarks regarding GA
6.6.1.6. The implication of GA for energy systems
6.6.2. Other metaheuristic optimization methods
6.6.2.1. Particle swarm optimization, PSO
6.6.2.2. Simulated annealing, SA
6.7. Hybrid optimization approaches
6.8. Multiobjective optimization
6.8.1. Mathematical multiobjective optimization
6.8.1.1. Weighted sum method
6.8.1.2. Weighted metric method
6.8.1.3. -Constraint method
6.8.2. Metaheuristic multiobjective optimization
6.9. Optimization toolbox of the MATLAB software
6.10. Dynamic optimization of energy systems
6.11. Optimization of large energy systems
6.12. Case studies
6.12.1. Case study (I): A gas turbine-based cogeneration plant
6.12.2. Case study (II): A nuclear power plant with pressurized water reactor, PWR
6.12.3. Case study (III): GPU-3 Stirling engine
6.13. Results
6.14. Summary
6.15. Exercises
References
Chapter 7: Decision-making in optimization and assessment of energy systems
7.1. Preface
7.2. Outline
7.3. LINMAP method
7.4. TOPSIS method
7.5. Fuzzy Bellman-Zadeh method
7.6. AHP and fuzzy-AHP methods
7.6.1. Conventional AHP method
7.6.2. Fuzzy-AHP method
7.7. Decision-making software
7.8. Case studies
7.8.1. Case study (I): Recuperative gas cycle
7.8.2. Case study (II): The best air conditioning system at different weathers
7.9. Summary
7.10. Exercises
References
Chapter 8: Real-time optimization of energy systems using the soft-computing approaches
8.1. Introduction
8.2. Outline of this chapter
8.3. Iterative exergoeconomic optimization
8.4. Fuzzy inference system, FIS, for real-time optimization
8.4.1. The concept of the fuzzy inference system, FIS
8.4.2. The FIS method for real-time optimization of energy systems
8.5. Case studies for real-time optimization using the FIS
8.5.1. Case study (I)-The CGAM problem
8.5.2. Case study (II)-A steam power plant
8.6. Assessment of the FIS for real-time optimization of energy systems
8.7. Adaptive neuro-fuzzy inference system, ANFIS, for real-time optimization
8.7.1. The concept of the adaptive neuro-fuzzy inference system, ANFIS
8.7.2. The ANFIS method for real-time optimization of energy systems
8.8. Case studies for real-time optimization using the ANFIS
8.8.1. Case study (I)-The CGAM problem
8.8.2. Case study (II)-A steam power plant
8.9. Assessment of the ANFIS for real-time optimization of energy systems
8.10. Comparing FIS, ANFIS, and conventional optimization methods
8.11. Summary
8.12. Exercise
References
Chapter 9: Conclusion
Appendix
Index
Back Cover

Citation preview

MODELING, ASSESSMENT, AND OPTIMIZATION OF ENERGY SYSTEMS

This page intentionally left blank

MODELING, ASSESSMENT, AND OPTIMIZATION OF ENERGY SYSTEMS HOSEYN SAYYAADI

Faculty of Mechanical Engineering-Energy Division, K.N. Toosi University of Technology, Tehran, IRAN

Academic Press is an imprint of Elsevier 125 London Wall, London EC2Y 5AS, United Kingdom 525 B Street, Suite 1650, San Diego, CA 92101, United States 50 Hampshire Street, 5th Floor, Cambridge, MA 02139, United States The Boulevard, Langford Lane, Kidlington, Oxford OX5 1GB, United Kingdom © 2021 Elsevier Inc. All rights reserved. No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or any information storage and retrieval system, without permission in writing from the publisher. Details on how to seek permission, further information about the Publisher’s permissions policies and our arrangements with organizations such as the Copyright Clearance Center and the Copyright Licensing Agency, can be found at our website: www.elsevier.com/permissions. This book and the individual contributions contained in it are protected under copyright by the Publisher (other than as may be noted herein). Notices Knowledge and best practice in this field are constantly changing. As new research and experience broaden our understanding, changes in research methods, professional practices, or medical treatment may become necessary. Practitioners and researchers must always rely on their own experience and knowledge in evaluating and using any information, methods, compounds, or experiments described herein. In using such information or methods they should be mindful of their own safety and the safety of others, including parties for whom they have a professional responsibility. To the fullest extent of the law, neither the Publisher nor the authors, contributors, or editors, assume any liability for any injury and/or damage to persons or property as a matter of products liability, negligence or otherwise, or from any use or operation of any methods, products, instructions, or ideas contained in the material herein. Library of Congress Cataloging-in-Publication Data A catalog record for this book is available from the Library of Congress British Library Cataloguing-in-Publication Data A catalogue record for this book is available from the British Library ISBN 978-0-12-816656-7 For information on all Academic Press publications visit our website at https://www.elsevier.com/books-and-journals

Publisher: Jae Hayton Acquisitions Editor: Lisa Reading Editorial Project Manager: Ali Afzal-Khan Production Project Manager: Sojan P. Pazhayattil Cover Designer: Mark Rogers Typeset by SPi Global, India

Dedication

To my family: Najmeh, Sina, and Kimiya

This page intentionally left blank

Contents

Preface ix Acknowledgment

3.8 Summary 180 3.9 Exercises 180 References 181

xi

4. Combined thermal, economic, and environmental models

1. Introduction 1.1 1.2 1.3 1.4 1.5

Preface 1 Outline 1 Classification of models for energy systems 3 Problem formulation 6 Required steps for correct modeling and optimization 16 1.6 Summary 17 1.7 Exercise 17 References 19

4.1 Introduction 185 4.2 Chapter’s outline 186 4.3 Exergoeconomic modeling 186 4.4 Exergoenvironmental modeling 207 4.5 Exergoenvironomic modeling 219 4.6 Case studies 223 4.7 Summary 243 4.8 Exercises 244 References 245

2. Thermal modeling and analysis

5. Soft computing and statistical tools for developing analytical models

2.1 2.2 2.3 2.4 2.5

Introduction 21 Chapter’s outline 22 Review of thermodynamic principles 22 Fundamental of exergetic analysis 38 Thermal assessment of energy system based on the exergy concepts 60 2.6 Precise exergetic evaluation 85 2.7 Case study 90 2.8 Summary 98 2.9 Exercises 98 References 100

5.1 5.2 5.3 5.4

Preface 247 Outline 249 Artificial neural network (ANN) 249 Group method of data handling (GMDH) type neural network 252 5.5 Genetic programming (GP) 253 5.6 Stepwise regression method (SRM) 256 5.7 Multiple linear regression (MLR) 257 5.8 Using computer codes and toolboxes to develop statistical models 257 5.9 Case studies 266 5.10 Summary 318 5.11 Exercises 319 Acknowledgment 323 References 323

3. Advanced thermal models 3.1 3.2 3.3 3.4 3.5 3.6

Introduction 101 Chapter’s outline 102 Finite-time thermodynamics 102 Finite-speed thermodynamics 129 Combined finite-time/finite-speed models 135 Quasi-steady models (case study: Stirling engines) 138 3.7 Comprehensive combined thermal models (case study: Stirling engines) 151

6. Optimization basics 6.1 Preface 327 6.2 Outline 327 6.3 General definition 328

vii

viii

Contents

6.4 6.5 6.6 6.7 6.8 6.9

Theory of optimization 335 Mathematical optimization 342 Metaheuristic optimization approaches 378 Hybrid optimization approaches 400 Multiobjective optimization 400 Optimization toolbox of the MATLAB software 408 6.10 Dynamic optimization of energy systems 412 6.11 Optimization of large energy systems 414 6.12 Case studies 417 6.13 Results 426 6.14 Summary 427 6.15 Exercises 428 References 429

7. Decision-making in optimization and assessment of energy systems 7.1 Preface 431 7.2 Outline 432 7.3 LINMAP method 432 7.4 TOPSIS method 436 7.5 Fuzzy Bellman-Zadeh method 439 7.6 AHP and fuzzy-AHP methods 442 7.7 Decision-making software 459 7.8 Case studies 465 7.9 Summary 473 7.10 Exercises 475 References 476

8. Real-time optimization of energy systems using the soft-computing approaches 8.1 8.2 8.3 8.4

Introduction 479 Outline of this chapter 480 Iterative exergoeconomic optimization 480 Fuzzy inference system, FIS, for real-time optimization 484 8.5 Case studies for real-time optimization using the FIS 490 8.6 Assessment of the FIS for real-time optimization of energy systems 510 8.7 Adaptive neuro-fuzzy inference system, ANFIS, for real-time optimization 511 8.8 Case studies for real-time optimization using the ANFIS 517 8.9 Assessment of the ANFIS for real-time optimization of energy systems 524 8.10 Comparing FIS, ANFIS, and conventional optimization methods 524 8.11 Summary 526 8.12 Exercise 526 References 527

9. Conclusion Appendix 531 Index 533

Preface This book is aimed to provide a comprehensive discussion on modeling, assessment, and optimization of energy systems. This book is prepared to be used by students, engineers, and researchers in the field of energy systems. A part of the presented materials also can be used by undergraduate students of mechanical, chemical, and energy engineering. The entire content can be used by graduate students of energy, mechanical, and chemical engineering in MSc and Ph.D. levels not only in their courses such as exergy, thermal modeling, optimization, and similar courses but also in their graduate research thesis. Other researchers can also benefit from concepts and tools that are presented extensively in this book in their researches in the fields of energy and thermal systems. Besides, engineers can benefit from the contents of the book for the optimal design of plants and energy systems such as power plants, refineries, desalination systems, refrigeration, and air conditioning systems as installations, renewable energy plants, cogeneration plants, power generation systems and engines, and so on. For these aims, details about thermal models, exergy analysis, finite-time thermodynamics (FTT), finite speed (FST) model, combined FTT-FST models, quasisteady models, economic and environmental models, exergoeconomics (thermoeconomics), exergoenvironmental (thermoenvironmental) models, exergoenvironomic (thermoenvironomic) model are discussed. Soft computing and statistical tools called SCST as a branch of machine learning are also introduced. This approach is presented to provide semianalytical

models of energy systems based on either experimental or numerical data. Since optimization tools desire an analytical model for the proposed system that is optimized, SCST approaches are essential to convert scattered data into a semianalytical expression. In addition to SCST concepts, MATLAB toolbox that can be employed for SCST modeling of energy systems is also introduced. Details about mathematical and metaheuristic optimizations are discussed, and MATLAB optimization toolbox is presented as well. Some approaches that can be employed for optimization of large-scale energy systems that encounter numerous decision variables and constraints are also pointed out. Decision-making methods as an essential step in multiobjective optimization and decision problems of energy systems are discussed, too. Finally, soft computing tools, including a fuzzy inference system (FIS) and adaptive neurofuzzy inference system (ANFIS), are introduced as new optimization tools for fast computing as well as real-time optimization of energy systems. Several examples and case studies are given to support all concepts discussed in this book. At the end of each chapter, exercises and suggested research topics are also given. Accordingly, this book is outlined as follows: In the first chapter, the general mathematical form of the optimization problem, essential elements of an optimization problem, classification of optimization problems, and problem formulation of the energy system are given. Thermal models, including exergy analysis and advance exergy analysis, are discussed in Chapter 2. In this chapter, the

ix

x

Preface

assessment criteria for the evaluation of the energy system are also introduced. Advance thermal models, including FTT, FST, FTTFST, quasisteady models, combined models, are given in Chapter 3. In this chapter, sophisticated thermal models for precise simulation of engines, including internal combustion (IC) engines and Stirling engines, are also provided. This chapter could be regarded by ones who are interested in the field of thermal models of Stirling and IC engines independent of other chapters. Economic, environmental, exergoeconomic, exergoenvironmental, and exergoenvironomic models are discussed in Chapter 4. Assessment criteria for exergoeconomic, exergoenvironmental, and exergoenvironomic evaluation of energy systems are also presented in Chapter 4. Chapter 5 is dedicated to a class of machine learning, i.e., soft computing and statistical tools, also known as SCST methods for achieving semianalytical models of energy systems. In this chapter, techniques such as the artificial neural network (ANN), group method of data handling (GMDH), genetic programming (GP), stepwise regression method (SRM), and multiple linear regression

(MLR) are discussed. Besides, MATLAB toolbox related to each method is introduced. Optimization basics, including mathematical and metaheuristic optimization methods, constraint and unconstraint optimization, single-objective and multiobjective optimizations, are given in Chapter 6. The optimization toolbox of MATLAB is also introduced in this chapter. Besides, some suggested methods that might be useful for simplification of the optimization of largescale energy systems are presented in Chapter 6. Chapter 7 is provided to give basic concepts of various decision-making methods for usage along with multiobjective optimization of energy systems as well as decision problems. Soft computing optimization methods, including FIS and ANFIS methodologies, are given in Chapter 8 for fast optimization as well as real-time optimization of energy systems in Chapter 8. Finally, a conclusion about discussions of this book is provided in Chapter 9. This book includes an appendix that contains properties of chemical compounds. Hoseyn Sayyaadi

Acknowledgment Special thanks to Mr. Ali Sohani for his effective coauthorship to provide materials of Chapter 5 and providing data for use in the

Appendix, and also, for his assistance in providing some examples and artworks.

xi

This page intentionally left blank

C H A P T E R

1 Introduction 1.1 Preface Improvement and optimization of energy systems are the concern of scientists and engineers for decades. The first step for this goal is providing a model that describes the system’s behaviors. Then, using the employed model(s), the performance of the system is assessed, and if it is necessary, the system is either improved or optimized with the required tools. Therefore, the critical step for any improvement or optimization task is developing a model to describe the energy system from concerning aspects. In this regard, different types of models are usually developed, including thermal model, economic model, thermoeconomic model, environmental model, thermoenvironmental model, and empirical model. The goal of this book is to provide fundamentals of modeling, assessment, and optimization of energy systems. The contents of this book can be used by graduate students, engineers, and researchers in the field of energy and thermal systems.

1.2 Outline This chapter provides the goal, scope, audience, and the outline of this book. Moreover, in this chapter, a brief review of the various classifications of models for energy systems as well as problem formulation is given too. In Chapter 2, the fundamentals of thermal modeling based on thermodynamic models will be presented. Since the exergy is the rational thermodynamic parameter to express the energetic transaction of any energy system, after a brief review of thermodynamic concepts, fundamental to exergetic analysis will be provided in Chapter 2. Advanced thermal models, including concepts of the finite-time thermodynamics (FTT), finite-speed thermodynamics (FST), combined FTT-FST models, quasi-steady models, and comprehensive thermal models are given in Chapter 3. In addition, in this chapter, basics regarding numerical and dynamic models are pointed out; however, detail regarding this numerical modeling is out of the scope of this chapter.

Modeling, Assessment, and Optimization of Energy Systems https://doi.org/10.1016/B978-0-12-816656-7.00001-4

1

# 2021 Elsevier Inc. All rights reserved.

2

1. Introduction

Combined thermal, economic, and environmental models are described in Chapter 4. Since exergy analysis is not able to consider the associated cost of energy streams, a more sophisticated tool is required for this purpose; therefore, exergoeconomic (thermoeconomic) modeling and analysis of energy systems is discussed in Chapter 4. In a similar analogy to exergoeconomics, the exergoenvironmental models have been introduced in Chapter 4 too. Moreover, in this chapter, a brief review of the combined exergoeconomic and exergoenvironmental models known as the exergoenvironomic (thermoenvironomic) model is given too. Sometimes, for energy systems, it is difficult to have an analytical model that is developed based on effective parameters, implicitly. Such models are favorite models for use in optimization tools. Therefore, it is required to convert discontinued and scattered data into analytical expressions that are expressed based on implicit functions of effective parameters. In this regard, soft computing and statistical tools (SCST) are used. The application of soft computing and statistical tools for developing semianalytical models for energy systems based on data sets (experimental, analytical, or numerical data) is given in Chapter 5. In this regard, SCST models, including multilinear regression (MLR), stepwise regression method (SRM), group method of data handling (GMDH), genetic programming (GP), and artificial neural network (ANN) models, are described. These models are used to convert experimental or numerical data into analytical models that are required to be used by optimization algorithms. The viewpoint in Chapter 5 regarding various SCST models is presenting them as modeling tools instead of providing details about fundamental concepts regarding each model since such details require separate books. Nevertheless, it is tried to present some basics regarding each SCST model in Chapter 5, briefly. Required tools for optimization of energy system using the developed models of Chapters 2–5 described in Chapter 6. In this chapter, some basics regarding optimization are given. The viewpoint of this chapter is to give optimization as a tool rather than its fundamental concepts; however, some basics regarding the fundamental of optimization are presented to give the necessary background to readers. In addition to single-objective optimization, multiobjective optimization is also described in Chapter 6. Models for complex energy system associated with numerous effective parameters that makes it difficult and very computational time consuming if it is going to be optimized. In Chapter 6, methods for reducing the size of the problem are also described. These methods are used to classify effective parameters based on their order of importance; so, it is possible to put aside fewer effective parameters, and hence, the size of the problem is reduced, and it makes it easier for optimization tools to optimize the energy system. Accordingly, two methodologies based on the Taguchi approach, as well as exergoeconomic improvement integrated with a simulator (EIS method), are described in this chapter, too. In many instances, in analyzing energy systems, it is required to have a decision among available alternatives. Decision-making is also required in multiobjective optimization of energy systems where instead of a single optimal solution, there is a set of optimal solutions; therefore, it is required to select one final solution among potential optimal solutions. For the aforementioned purpose, decision-making methods are appropriate tools that enable us to select a system or solution systematically. Therefore, in Chapter 7 of this book, various decision tools are presented. Once more, in this chapter, the viewpoint is presenting decisionmaking methods as a tool instead of providing detailed fundamentals and concepts; however, some basics regarding these tools are given.

1.3 Classification of models for energy systems

3

Chapter 8 is dedicated to advance optimization approaches for optimal design and retrofit of an energy system via soft computing methods, including the fuzzy inference system (FIS) and artificial neuro-fuzzy inference system (ANFIS). In this regard, some basics regarding these approaches are given, and then the methodology of FIS and ANFIS for optimization and retrofit of the energy system are discussed with presenting two examples first for the design of an energy system and the second for retrofit of another energy system. Chapter 9 is provided to present a conclusion for the material discussed in this chapter and Chapters 2–8.

1.3 Classification of models for energy systems First of all, the model must be defined. In this book, the model means any tools that are used for predicting the system’s behaviors as functions of effective parameters. Therefore, each model has input/output variables. Inputs are effective parameters that affect the performance of the systems, and outputs are those parameters that represent the response of the systems as functions of effective variables (inputs). Since in complex energy systems, there are complicated interactions between the system and its environment as well as its subsystems, generally, it is challenging to consider such complex interaction. Instead, in developing the model for the system, some simplifications are also used, for example, processes are considered to be steady state, gases are assumed to be ideal, or heat loss to the environment might be ignored. Fig. 1.1 schematically shows a model for the energy system. As mentioned before, for the optimization of an energy system, a model is required to be used by the optimization algorithm. Such models may come from an analytical source or numerical calculation or experimental data. Accordingly, one classification of models is based on the source of data used in developing the models. In this regard, we have three categories of models: (1) Analytical models, (2) Numerical models, (3) Experimental (empirical) models. However, this book is focused on analytical models, methods for conversion of numerical and experimental models into semi-analytical forms that are suitable for optimization algorithms are also described. Such methods are classified under soft computing and statistical tools (SCSTs). Another classification of the model is based on consideration of time in prediction of the response of the system to inputs. Those models that do not consider the time response of the system and are based on steady-state-steady flow (SSSF) behavior of the energy systems are called as static models. On the other hand, dynamic models that consider the time as an essential factor for predicting the system’s behavior in response to variation of effective parameters are used for modeling the transient operation of energy systems. Dynamic models are more complicated and complex for use in the optimization process. Models can be classified based on outcomes of them. In this regard, there are: (1) (2) (3) (4) (5) (6)

Thermal models Economic models Thermoeconomic models Environmental models Thermoenvironmental models Thermoenvironomic models

4

1. Introduction

Subsof system

Subsystem sof

t #1

t #2 Subsystem

Interacons

Outputs

#3

Simplified

Hypothecal energy system based on simplified assumpons

Model for the Proposed Energy

Real energy system

Outputs

Interacons

(A) Inputs (Effecve parameters)

Outputs (Predicted parameters)

(B) FIG. 1.1 (A) A real energy system and the relevant model; (B) Schematic of a model for an energy system.

The first models are based on thermodynamic laws, and usually, in these models, the goal is maximizing the thermal efficiency (either first law or second law efficiency). Economic models are those models that are developed based on economic factors only, and they do not consider costs of energy interactions as well as the cost of inefficiencies. Therefore, those are inadequate for modeling and optimization of energy systems. Hence, thermoeconomic (exergoeconomic) models that consider either economic parameters or energy/exergy interactions are the most appropriate tools for dealing with energy systems. Environmental models are those models that evaluate the environmental impacts of energy systems, and

5

1.3 Classification of models for energy systems

usually, the goal is minimizing their associated environmental issues. Thermoenvironmental (exergoenvironmental) model was developed based on an analogy with thermoeconomics (exergoeconomics). It combines environmental analysis comes from the life cycle assessment of the system and the exergetic analysis. It is similar to the thermoeconomics that combine the economic model into the exergetic analysis. Thermoenvironomic (exergoenvironomic) model is a more general model that combines economic analysis, life cycle assessment (LCA), and exergetic analysis. It should be noted that the classifications mentioned above (based on the type of data, time dependency of process, outcomes) overlap together. For example, a model can be analytical, dynamic, and thermoeconomic types at the same time. Fig. 1.2 summarizes the classification of different models of energy systems.

Analytical models Based on source of data

Numerical models Experimental models

Static models Classification of models for energy systems

Based on time dependency of processes

(SSSF processes)

Dynamic models (Transient P)

Thermal models Economic models Thermoeconomic models Based on outputs Environmental Models Thermoenviroment al models Thermoenvironomic models

FIG. 1.2 Schematic of models’ classification.

6

1. Introduction

1.4 Problem formulation In modeling an energy system, the problem is formulated in the form of a standard optimization problem. The standard form of optimization problem consists of three main components. They are: 1. Objective functions 2. Decision (design) variables and parameters 3. Constraints • Objective functions are the mathematical form of the goal of the optimization. In expressing an optimization problem, the goals of optimizations are formulated in mathematical forms. The mathematical expression of objectives is an implicit or explicit function of decision variables. The required mathematical expression of objective functions is obtained using modeling that will be described in this book extensively in the following chapters. However, some simple forms of mathematical models are presented in this chapter as examples. The first step is formulating the problem, and then the formulated problem will be solved (optimized) using optimization tools. The optimization tools will be discussed in the last chapters of this book after those chapters dedicated to the modeling. In an optimization problem, the objective function might be unique or multiple. If there is only one objective function, the problem is called single-objective optimization (SOO), while those problems that have more than one objective function are referred to as multiobjective optimization (MOO). The solution for MOO is more complicated than SOO. Examples of objective functions for the energy system are thermal efficiency, exergetic efficiency, cost of products, environmental issues, and the magnitude of the products of the system. The mathematical expressions of these objectives are objective functions of optimization that must be maximized or minimized. • Decision variables are those mathematical parameters that are a trade-off in the optimization process to achieve optimal values of objective functions. These parameters that also referred to as design variables are selected by designers among those parameters that can be controlled in the design process to achieve the highest potential of the energy system. For example, in energy systems, temperatures, pressures, flow rates, number of equipment, geometric specifications, operating parameters, and similar variables may be chosen by designer as decision (design) variables. The goal of optimization is specifying the amount of these parameters so that objective functions are maximized or minimized. Hence, the output of any optimization is specifying the optimal values of decision variables. Decision variables are selected among effective independent parameters by the judgment of the designer of the energy system. The selection of decision variables must be such that they independently govern objective functions. For example, when temperature and pressure in the system are dependent (in the case of two-phase flow), only one of them must be selected as the decision variable. Instead, Parameters are those variables in the mathematical formulation that are fixed and prespecified; hence, it cannot be altered in optimization. Examples of parameters in the formulation of energy systems are physical properties, fuel cost, the heating value of fuels, friction factor, ambient temperature, atmospheric pressure, the interest rate of money, and various coefficients in governing equations.

1.4 Problem formulation

7

• Constraints are the third element in an optimization problem. Those represent limitations on the trade-off process of decision variables. In the most optimization problem, decision variables are not free to be traded off over the entire space of real variables. Their optimized value should not violate some limitations. Limitations usually come from physical limitations or imposed limitations from engineering and governing rules. For example, the values of decision variables in optimization cannot have those values that may lead to a violation of thermodynamic laws. Other limitations may be exposed by some engineering constraints or local and governing codes. For example, the temperature and pressure of an energy system have some limited values due to engineering limitations or environmental impact of the energy system that may be limited to local codes. Sometimes, the trade-off of decision variables is limited by lower bounds and/or upper bounds. The mathematical expression of constraints appears in the formulation of the problem in the form of mathematical equalities and inequalities. Usually, those limitations imposed by governing physical equation appear in the mathematical formulation of the problem in the form of equalities. Constraints that come from engineering limitations are usually expressed in the form of inequalities. An optimization problem could have constraints or it may have no constraints. Those problems that do not have any limitations are called unconstraint optimization problems. Optimization problems with constraints are referred to as constrained optimization problems. The most sophisticated engineering problem, especially in the optimization of energy systems, is difficult to be assumed as an unconstraint problem. The solution of constraint optimization is somewhat tricky than the unconstraint problem from the viewpoint of optimization tools.

1.4.1 The mathematical form of the problem General forms of an unconstraint and constraint optimization problem are expressed by Eqs. (1.1) and (1.2), respectively [1]. Optimizefi ðXÞ for i ¼ 1,2, :…,l where X ¼ ½x1 x2 …xn T Optimizefi ðXÞ for i ¼ 1, 2,:…, l   s:t: subject to : ( hj ð X Þ ¼ 0 for j ¼ 1,2, …, m gk ðXÞ  0

for k ¼ 1, 2,…, p

(1.1)

(1.2)

where X ¼ ½x1 , x2 …xn T In Eqs. (1.1), (1.2), fi represents objective functions. In a single-objective optimization, there is only one objective function; therefore, i¼ 1. Moreover, X is the vector of decision variables with n the element, i.e., n is the number of decision variables. In the formulation of the constrained optimization problem (Eq. 1.2), hj and gk denote m the number of equality and p number of inequality constraints, respectively.

8

1. Introduction

The exact form of mathematical functions (fi(X), hj(X), and gk(X)) must be specified by the developed model for the proposed energy system and is subject to the next chapters. It should be noted that in the formulation, most optimization problems of energy systems, aforementioned mathematical functions (fi(X), hj(X), and gk(X)) are not expressed as implicit functions of decision vector (X); instead, these functions are dependent on X, explicitly. In Chapter 5 of this book, it will be discussed that the explicit form of the problem may be converted into implicit forms based on soft computing and statistical tools (SCSTs).

1.4.2 Classification of the problem: The optimization problem can be classified based on different aspects. Such classification is necessary for selecting the foremost optimization tool. The problem would be classified based on the number of objective functions, type of decision variable, type of mathematical function, constraints, time dependency of objectives, and decision variables. Details of these classifications are: 1. Classification based on the number of objective function: In this regard, the problem is classified into single-objective optimization (SOO) problem, which has only one objective function, and multi-objective optimization (MOO) problem, with multiple objective functions. The optimization tools of MOO are more complicated than SOO. 2. Classification based on the type of decision variables: Decision variables might be real variables or discrete variables, including integer numbers and binary numbers. The optimization tools that deal with discrete variables are rather complicated than the real variables. Discrete variables might be integer variables or binary variables. Binary decision variables in optimization are used when it is to decide whether something is used or not used. For example, for a decision about using particular equipment within the energy system or eliminating it, a binary decision variable is dedicated to such a decision and depends upon the magnitude of the proposed decision variable obtained in optimization; the optimal decision regarding the usage of that equipment is made. In this regard, if the decision variable obtained 1, the equipment is used, and if the corresponding decision variable is 0, the equipment is eliminated. 3. Classification based on the type of mathematical function: In this classification, the problem is classified into linear programming (LP) and nonlinear programming (NLP). In linear programming or LP optimization, all mathematical expressions of the optimization problem (Eqs. 1.1, 1.2) are the linear equation. Even if one equation among all is nonlinear, the problem is converted to NLP. Optimization of NLP is more complicated than an LP problem. 4. Classification based on the time dependency of decision variables: According to this category, problems are classified as static and dynamic optimization. In static optimization, a fixed optimal value is obtained for each decision variable. In dynamic optimization, optimal values of decision variables are not fixed and depend on another parameter, usually the time. Such kind of optimization is also called parametric optimization. Based on the classifications mentioned above, different optimization problems are defined. In this regard, LP, IP, NLP, and MINLP problems are defined. LP (linear programming)

1.4 Problem formulation

9

problems are those optimization problems with real decision variable and linear equations. IP (integer programming) are those problems with linear equations but integer decision variables. Even if one variable among numbers of the decision variable is an integer one, the problem changes from LP into IP. IP optimization is somewhat tricky than an LP problem. Nonlinear programming or NLP problem refers to an optimization problem with nonlinear governing equations (including objective functions and constraints). Even though only one mathematical equation among all governing equations of optimization (Eqs. 1.1, 1.2) is nonlinear, the problem cannot be treated as LP. The solution of NLP problems in optimization is more complicated than LP problems. The most complex optimization problem is the mixedinteger nonlinear programming called the MINLP problem. In this type of problem, there are both integer decision variables and nonlinear equations that make the problem more complex than others.

1.4.3 Degree of freedom in the optimization problem The degree of freedom in any optimization problem denoted by DOF is defined as the number of decision variables minus the number of equality constraints. For an optimization problem, it is described as follows: DOF ¼ n  m

(1.3)

where n is the number of decision variables and m is the number of equality constraints. Consider a nonconstraint optimization problem of Eq. (1.1). It has n independent decision variables that have to specify in the optimization process. If one equality constraint in the form of h(X)¼0 is added to the same problem, the number of independent decision variables is reduced to n 1; because when n  1 variables are specified in the optimization process, the remaining variables (one variable in this case) are obtained by the constraint equation (h(X)¼0). Therefore, the degree of freedom of the problem is reduced from n into n  1. Similarly, when the number of equality constraints is m, the number of independent decision variables is n  m, i.e., DOF ¼ n  m. Accordingly, it can be said that DOF is an indicator of the reduction of the number of independent decision variables. For optimization, it is necessary to have at least 1 degree of freedom. Problem with DOF ¼ 0, cannot be optimized, and those problems have prespecified values for decision variables. Problem with DOF < 0 is called over-specified problem that has neither optimal solution nor prespecified values for decision variables. Therefore, for an optimization problem, we must have: DOF > 1

(1.4)

In the formulation of the problem for optimization of the energy system, the problem must be defined and formulated in such a way that it satisfies Eq. (1.4).

1.4.4 Simplification of the model It is well known that in optimization, a more sophisticated form of the problem is associated with the requirement for more sophisticated optimization algorithms as well as a vast amount of computational costs. On the other hand, as it will be discussed later in

10

1. Introduction

Chapter 7, nonlinearity in problem may cause the existence of local optimums instead, and it is very hard in those problems (that are called as multimodal problems) to find the global optimum. Another difficulty may arise from the discontinuity of decision variables. As discussed previously in Section 1.4.2, MINLP problems are the most challenging problems. On the other hand, imposing constraints causes complexity in the optimization process, and as it was mentioned in Section 1.4.3, the constraints may reduce the degree of freedom of the problem. Sometimes, the implication of a large number of constraints may reduce the degree of freedom to less than 1; it makes it impossible to perform any optimization in such cases. One step in the formulation of the problem is the simplification of the model to overcome the aforementioned difficulties. It is important to note that there is no standard method for such simplification, and it is mostly performed based on the experience of the designer of the system. Nevertheless, some guidance may be recommended as follows: 1. Linearizing equations: As discussed earlier, the nonlinearity of the equation causes complication in the solution of the optimization problem and sometimes leads to multimodality of the problem. As mentioned, in the formulation of the problem, existing of even one nonlinear equation among numerous equations makes to the problem. In such a case, it is desirable to convert nonlinear equations into linear types by some assumptions. For example, nonlinear equations could be approximated in intervals by linear functions. Unfortunately, there is no standard method for such simplification, and sometimes having nonlinear equations is unavoidable. Some examples of linearizing of the nonlinear problem were given in Chapter 2 of Ref. [2]. 2. Reducing the number of constraints: Imposing constraints reduces the degree of freedom and increases the complexity of the solution and also computational costs. Therefore, it is desirable to simplify the model by ignoring fewer effective constraints. 3. Reducing the number of decision variables: A large number of decision variables have the advantage to obtain a higher potential of optimization of objective functions and also a higher degree of freedom in optimization; however, it has a diverse effect of increasing the computational time, especially in case of NLP and MINLP problems. Therefore, in some instances, it is necessary to ignore fewer effective decision variables in order to increase the computational time. It is essential in the optimization of complex energy systems that encounter enormous parameters and very complicated models. Reducing the number of decision variables must also be done based on the experience of the system’s experts. Nevertheless, in Chapter 9, some methodologies that might be useful for this purpose will be discussed. 4. Converting integer variables into real variables: Discontinuous variables lead to complexity in the optimization process. Therefore, the optimization of IP problems is rather complicated than LP problems. Similarly, MINLP problems are more difficult in optimization compared to NLP problems. Sometimes, by some simplifications and assumptions, integer variables are assumed to be real; hence, the IP or MINLP problems are simplified into LP and NLP, respectively. By this assumption, it is necessary to round up/down the obtained values of such variables after the optimization process into the nearest integer variable. However, care must be taken to assure the accuracy of results by such an assumption. Sometimes, such an assumption affects the accuracy of optimization; hence, dealing with IP or MINLP problems is unavoidable.

11

1.4 Problem formulation

5. Static optimization instead of dynamic one: Dynamic optimization problem is somewhat complex and time-consuming compared to a static one. In the optimization of energy systems, the dependency of parameters on time changes the problem into the dynamic optimization. Sometimes, it is possible by substituting average values of a parameter over a period of time (e.g., 1 year) instead of the time depending parameters, simplify the problem from dynamic optimization into static optimization.

1.4.5 Examples of problem formulation However, in a real case of problem formulation for optimization of the energy system, it is necessary to develop models, and it is subject to following chapters, in some simple cases of energy systems; typical problem formulations for simple energy systems are given in this chapter. Therefore, two examples of formulations are given here. It is required to mention that optimizing these examples is not subject to this chapter, and if it is required, the obtained formulations of examples can be performed by readers according to principles that will be given in Chapter 7 as exercises. Example 1.1 In a refinery, two types of crude oil are used, and four types of products, including gasoline, kerosene, fuel oil, and residual, are obtained using these two crudes. The schematic of the process is given in Fig. 1.3. The goal is to maximize the profit of the refinery through the sale of products. Data regarding crudes and products are given in Tables 1.1 and 1.2, respectively. It is required to formulate this problem as an optimization problem for maximizing the profit of the refinery. □ Solution It is required to decide about the optimal magnitude of daily feeds for each crude so that the products of refinery yield a maximum profit through the sale of products. Therefore, decision variables as the first element of the problem are: x1: Daily amount of the crude oil #1 fed into the refinery x2: Daily amount of the crude oil #2 fed into the refinery

Gasoline Crude oil #1

Kerosen

Refinery

Fuel Crude oil #2

Residual

FIG. 1.3 Schematic of inputs/outputs of the proposed refinery. TABLE 1.1 Data for crudes used in the proposed refinery. Crude oil type

Purchased price ($ per bbl)

Refining cost ($ per bbl)

#1

24

0.5

#2

15

1.0

12

1. Introduction

TABLE 1.2 Data for products of the refinery. Volumetric contribution percentage Product

Crude oil #1

Crude oil #2

Sold Price ($ per bbl)

Maximum production (bbl per day)

Gasoline

80

44

36

24,000

Kerosene

5

10

24

2000

Fuel oil

10

36

21

6000

Residual

5

10

10



The profit is the difference between incomes and expenses. As a result: Net profit ¼ Incomes  Expences

(1.5)

The incomes are the summation of money obtained from selling the products. Hence, we have: Incomes ¼ ð0:80x1 + 0:44x2 Þ  36 + ð0:05x1 + 0:10x2 Þ  24 + ð0:10x1 + 0:36x2 Þ  21 + ð0:05x1 + 0:10x2 Þ  10

(1.6)

The expenses are also imposed from both refinery operating cost and purchased price of each type of crude: Expenses ¼ 24x1 + 15x2 + 0:5x1 + x2

(1.7)

Therefore: Net profit ¼ð0:80x1 + 0:44x2 Þ  36 + ð0:05x1 + 0:10x2 Þ  24 + ð0:10x1 + 0:36x2 Þ  21 + ð0:05x1 + 0:10x2 Þ  10  ð24x1 + 15x2 + 0:5x1 + x2 Þ

(1.8)

¼ 8:1x1 + 10:8x2 Therefore, Eq. (1.8) is the objective function that must be maximized. The third element of the optimization problem is the limitations or constraints. According to data that are given in the last column of Table 1.2, the following limitation must be imposed on this optimization problem: 0:80x1 + 0:44x2  24000 0:05x1 + 0:10x2  2000 0:10x1 + 0:36x2  6000

(1.9)

Moreover, the magnitude of crudes that are fed into the refinery (decision variables) cannot be negative values; hence: x 1 , x2  0

(1.10)

13

1.4 Problem formulation

Now, the basic elements of an optimization problem were obtained, and the problem can be formulated as follows: Maximize f ðx1 , x2 Þ ¼ 8:1x1 + 10:8x2 s:t: : 0:80x1 + 0:44x2  24,000 0:05x1 + 0:10x2  2000

(1.11)

0:10x1 + 0:36x2  6000 x1 ,x2  0 The obtained formulation of this example gives a linear programming optimization problem (LP) with two decision variables, three inequality constraints, zero equality constraints, and two feasibility conditions (x1, x2 0). The DOF of this problem is equal to 2 (DOF ¼ 2  0 ¼ 2). Therefore, it can be optimized. Providing a solution to this problem is not the subject of this chapter and can be performed by methodologies of Chapter 7. □ Example 1.2 In a gas-turbine cycle that operates based on the Brayton cycle, the objective is maximizing the net generated power. By selecting proper decision variables, this problem is aimed to be formulated as a standard optimization problem. The simple schematic of the cycle is illustrated in Fig. 1.4. □ Solution Based on the first law of thermodynamics, the net power of the Brayton cycle that must be maximized in this problem is given as follows [3]:   _ t W _ c¼ m _ net ¼ W _ air + m _ fuel ðh4  h5 Þ  m _ air ðh2  h1 Þ (1.12) W If the working fluid is assumed to be an ideal gas and specific heat of the gas is constant, Eq. (1.12) can be rewritten as follows:   _ net ¼ m _ air + m _ fuel cp ðT4  T5 Þ  m _ air cp ðT2  T1 Þ (1.13) W Eq. (1.13) is the objective function of this problem that should be maximized. Other thermodynamic correlations for compression and expansion processes are [3]: T 2 ¼ T1 +

ðT2s  T1 Þ ηs,c

Turbine

Compressor

1

(1.14a)

2 3

4 Combuson chamber

FIG. 1.4 Schematic of the Brayton gas cycle.

5 To stack

14

1. Introduction

 γ1  γ1 P2 γ T2s ¼ T1 ¼ T1 rp, c γ P1

(1.14b)

T5 ¼ T4  ηs,t ðT5s  T4 Þ

(1.14c)

 γ1  γ1 P5 γ T5s ¼ T4 ¼ T4 rp, t γ P4

(1.14d)

where ηs,c, ηs,t, rp,c,rp,t, and γ are isentropic efficiency of the air compressor, isentropic efficiency of the turbine, the pressure ratio of the compressor, the pressure ratio of the turbine, and the specific heat ratio of the air. Substituting Eqs. (1.14a)–(1.14d) into Eq. (1.13) leads to: 0  γ  1 1  2  31 0 γ1 Br γ    1C p, c C 6 7C γ _ net ¼ m _ air cp B _ air + m _ fuel cp B  15A  T1 m (1.15) W B C @T4 ηs, t 4rp, t @ A ηs, c Isentropic efficiencies of compressor and turbine were obtained from empirical correlations as follows [4]:   rp, c  1 (1.16a) ηs, c ¼ 0:91  300   rp, t  1 (1.16b) ηs, t ¼ 0:90  250 Substituting (1.16a) and (1.16b) into (1.15) gives the final expression of the objective function:  0 31 2  γ1      rp, t  1 6 7C γ _ net ¼ m _ air + m _ fuel cp B  15A W @T4 0:90  4rp, t 250   0 1 γ1 B C γ B rp, c 1 C C     _ air cp B  T1 m (1.17) B C @ 0:91  rp, c  1 A 300 In Eq. (1.17), cp and γ properties of the air (working fluid) cannot be controlled by the designer. Therefore, those are fixed parameters and cannot be selected as decision variables. Moreover, T1 is equal to the ambient air and cannot be a decision variable. If the volumetric flow rate of _ air is also be the air compressor is assumed to be fixed due to engineering limitation, then m _ fuel , T4, rp, t, and rp, c are assumed fixed. Therefore, at the instance, four parameters, including m as candidates of decision variables. The flow rate of the fuel must be satisfied in the energy balance equation of the combustion chamber. Considering LHV to be the lower heating value of the fuel and neglecting any heat loss (the combustion efficiency of 100 %), we obtain:

1.4 Problem formulation



15



_ fuel LHV ¼ m _ air + m _ fuel h4  m _ air h2 ! m _ fuel ¼ m

_ air ðh4  h2 Þ m _ air cP ðT4  T2 Þ m ¼ ðLHV  h4 Þ ðLHV  h4 Þ

In Eq. (1.18), if is substituted from Eqs. (1.14a), (1.14b), we have:   0 31 2 γ 1 B 7C 6 γ C B 6 rp, c 1 7 7C 6   _ air cP B m T  T 1 + 16 B 4 7 rp, c  1 5C A @ 4 0:91  300 _ fuel ¼ m ðLHV  h4 Þ

(1.18)

(1.19)

Eq. (1.19) is an equality constraint imposed on this problem. About T4, rp, t, and rp, c, there are the following engineering limitations: rp, min  rp, c  rp, max

(1.20a)

rp, min  rp, t  rp, max

(1.20b)

T4  Tmax

(1.20c)

The compression ratios of the air-compressor and turbine must be within engineering lower bound (e.g., example 5.0) and upper bound (e.g., example 24) as described by Eqs. (1.20a), (1.20b). Eq. (1.20c) indicates that the maximum temperature of the cycle is limited by the metallurgical limitation of the turbine’s blades (e.g., example 1400 K). In summary, the objective function of Eq. (1.17) and constraints of Eqs. (1.19), (1.20a)–(1.20c) _ fuel , T4, rp, t, and rp, c) make the following standard form of as well as four decision variables (m the optimization problem for the proposed Brayton cycle of this example:  2  31 0 γ 1    rp, t  1 6 7C γ _ net ¼ m _ air + m _ fuel cp B  15A Maximize W @T4 0:90  4rp, t 250 

 1 γ 1 B C γ B rp, c 1 C B C     _ T1 m air cp B C @ 0:91  rp, c  1 A 300 0

s:t: :

_ fuel ¼ m

 31 γ 1 B 6 7C γ B 6 C 1 7 61 + rp, c 7C  cP B T  T 4 1 B 6 7 C r  1 p, c 4 5A @ 0:91  300 0

_ air m



2



ðLHV  h4 Þ rp, min  rp, c  rp, max rp, min  rp, t  rp, max T4  Tmax

_ fuel > 0 rp, c > 0, rp, t > 0, T4 > 0, m

(1.21)

16

1. Introduction

The problem of Eq. (1.21) is an NLP problem (since equations are nonlinear functions of decision variables) with four decision variables and only one equality constraint. Since all decision variables are real variables, not an integer, this problem is NLP, not MINLP. Therefore, the degree of freedom for this problem is DOF ¼ 4  1 ¼ 3 > 0; hence, this problem can be optimized. □

1.5 Required steps for correct modeling and optimization In order to achieve a desirable result from the modeling and optimization of an energy system, the following steps must be performed correctly: 1. Correct recognition of the problem: It is essential to distinguish the problem and its affective parameters, limitations, resources, interactions between parameters, subsystems, the interaction between the system and its environment, and objectives. Before any attempt for the modeling, the system (next step), recognition of fixed parameters, and their uncertainties must be evaluated. Moreover, a complete controllable list of independent parameters that have the potential to be a decision variable must be provided. 2. Proper modeling of the system: When the problem is genuinely recognized in step #1, it is required to provide a model that predicts objective functions and constraints as functions of decision variables and parameters in the form of a standard optimization problem (Eqs. 1.1, 1.2). A complete list of independent variables that have the potential to be obtained by trading-off in the optimization process, along with proper constraints functions, must be collected. Expert judgment is required to assess the effect of any possible simplification of the model (Section 1.4.4) on the accuracy of the problem. The proper modeling of the energy system will be discussed in Chapters 2–6 of this book. 3. Checking the degree of freedom: If DOF  0, reconsideration on decision variables and equality constraints must be done so that DOF 1. 4. Selection of the proper optimization tools: Depend on the type of problem formulated in previous steps, considering classifications mentioned in Fig. 1.2, a proper optimization tool must be selected and implemented on the mode. In case of multiobjective optimization, decision-making tools must be used to select a final optimal solution among the set of optimal solution (It will be discussed later that in multiobjective optimization, instead of a single optimal solution that is obtained in single-objective optimization, a set of optimal solutions containing numerous optimal points is obtained). This step will be discussed in Chapter 6. 5. Evaluation and assessment of results: It is required to assure the correctness of obtained results according to experiences of experts and trial and error in checking data and results. Moreover, in a nonlinear problem, it should be assured that the obtained solution is the global optimum, not a local optimum. 6. Sensitivity analysis of the problem: The sensitivity of the problem and its objective functions on the variation of parameters that were assumed to be fixed in previous steps must be assessed. For example, in the optimization of an energy system, the fuel cost as a fixed parameter is assumed in steps #1 to #5. However, in the real world, there is uncertainty in

1.7 Exercise

17

the evaluation of this parameter, and it should be studied if this parameter changes in a range, how it may affect results and objective functions. It is desired to have low sensitivities of results on variations of parameters. 7. The implication of results on the real system: In this step, the obtained results are implicated in the real system, and its feedback is used to correct previous steps or be used as experiences for future projects.

1.6 Summary In this chapter, after a brief review of chapters of this book, classifications of various models, as well as various optimization problems applicable to energy systems, were discussed. As the primary step for the optimization of energy systems, problem formulation was discussed thoroughly. However, the precise formulation of an energy system is the subject of future chapters; for two simple examples, typical formulations in the form of a standard optimization problem were presented. Finally, the required steps for any modeling and optimization of an energy system were discussed briefly.

1.7 Exercise Consider a counter-flow hairpin heat exchanger (a type of double-pipe heat exchanger with multiple inner tubes; see, for example, Refs. [5–7]). The cross section of the heat exchanger is depicted in Fig. 1.5. However, Fig. 1.5 is depicted with three inner tubes only as a schematic; however, numbers of inner tubes, along with other decision variables, must be specified through an optimization process. The effective parameters of this heat exchanger are given in Table 1.3. Convective heat transfer coefficient of fluids is calculated by Dittus–Boelter correlation as follows [8]: NU ¼ 0:23 Re0:8 Pr0:33

FIG. 1.5 The cross section of a typical hairpin heat exchanger with three inner tubes.

(1.22a)

18

1. Introduction

TABLE 1.3 Effective parameters of the hairpin heat exchanger. Parameter

Description

_h m

The mass flow rate of the hot fluid flows outside the inner tube (kg s1)

_c m

The mass flow rate of the hot fluid flows outside the inner tube (kg s1)

Thi

The inlet temperature of the hot flow (K)

Tho

The outlet temperature of the hot flow (K)

Tci

The inlet temperature of the cold flow (K)

Tco

The outlet temperature of the cold flow (K)

D

Inside diameter of the outer pipe (m)

di

Inside diameter of inner tubes (m)

do

The outside diameter of the inner tubes (m)

tw

Wall thickness of inner tubes (m)

Pt

Tube pitch (center to center distance of inner tubes, see Fig. 1.5) (m)

N

Number of the inner tubes

L

Length of heat exchanger (m)

Ao

Heat transfer area based on the outside diameter of inner tubes (m2)

Uo

Overall heat transfer coefficient (W m2 K1)

hi

Convective heat transfer coefficient inside tubes (W m2 K1)

ho

Convective heat transfer coefficient outside tubes (W m2 K1)

_ Q

Heat duty of the heat exchanger (W)

vi, vo

Fluid velocity inside tubes and outer pipe (m s1)

vimax, vomax

Maximum allowable fluid velocity inside tubes and outer pipe (m s1)

vimin, vomin

Minimum allowable fluid velocity inside tubes and outer pipe (m s1)

ΔPi, ΔPo

Pressure drops of inside tubes and outer pipe (kPa)

ΔPimax, ΔPomax

Maximum allowable pressure drops of inside tubes and outer pipe (kPa)

LMTD

Log mean temperature difference (K)

ΔTm ¼ F. LMTD

Mean temperature difference (K)

where NU, Re, and Pr are Nusselt number, Reynolds number, and Prandtl number, respectively. For the definition of these nondimensional numbers, refer to Ref. [7]. Pressure drop is calculated from the Darcy-Weisbach equation as follows [9]: ΔP ¼ f

L ρv2 D 2

(1.22b)

References

19

where is the friction factor that must be obtained from the Moody chart. For the definition of Reynolds number outside the tubes (inside the outer pipe), the hydraulic diameter can be used. Dh ¼

4Ac 4  cross section area of the flow ¼ PW wetprimeter

(1.23)

The objective is minimizing the heat-transfer area of this heat exchanger. By selecting proper decision variables (geometrical parameters of heat exchangers as well as operating parameters), (a) formulate this problem into a MINLP optimization problem. (b) Obtain the degree of freedom for the problem formulated in part (a).

References [1] [2] [3] [4]

[5] [6]

[7] [8] [9]

Rao SS. Engineering optimization: theory and practice. New York: John Wiley & Sons; 2009. Taha HA. Operations research: an introduction. Pearson/Prentice Hall; 2011. Sonntag RE, Borgnakke C, Van Wylen GJ, Van Wyk S. Fundamentals of thermodynamics. New York: Wiley; 1998. Korakianitis T, Wilson DG. Models for predicting the performance of Brayton-cycle engines, In: ASME 1992 international gas turbine and aeroengine congress and expositionAmerican Society of Mechanical Engineers; 1992. p. V002T02A20-VT02A20. Saunders E. Heat exchangers: selection. Design and construction. Great Britain: Longman Scientific and Technical; 1988. Bell KJ, Chisholm D, Cooper A, Guy A, Mueller A, Paikert P, et al. HEDH (Heat exchanger design handbook)volume 3: thermal and hydraulic design of heat exchangers-Part 2: 3.13 Through 3.17. Washington, DC: Hemisphere Publishing Corporation; 1983. Kakac¸ S, Liu H, Pramuanjaroenkij A. Heat exchangers: selection, rating, and thermal design. Boca Raton, FL: CRC Press; 2002. Incropera FP, Lavine AS, Bergman TL, DP DW. Fundamentals of heat and mass transfer. New York: Wiley; 2007. Pritchard PJ, Mitchell JW. Fox and McDonald’s introduction to fluid mechanics, binder ready version. USA: John Wiley & Sons; 2016.

This page intentionally left blank

C H A P T E R

2 Thermal modeling and analysis 2.1 Introduction One popular model for analysis and optimization of energy systems is the thermal model. Thermal models are divided into zero-dimensional models and multidimensional models. The former models are usually developed based on thermodynamic principles while multidimensional ones (one-dimensional and higher number of dimension) are numerical models that are developed based on the simultaneous solution of continuity, momentum, energy, mass transfer, chemical reaction, and other specific equations by the computational fluid dynamic (CFD) approaches. Multidimensional numerical models are more accurate than zero-dimensional thermal models; however, they are rather complicated and computational time-consuming. Besides, CFD models lack generality because they are developed for a specific system, and when they developed for a system with specific geometry and dimensions, it cannot be employed on other similar systems with different geometry or dimension. Due to a lack of generality for modeling of all types of energy systems as well as their CPU time-consuming attribute, it is tough to use CFD models for optimization of energy systems. On the other side, zero-dimensional thermal models that are developed based on thermodynamic principles are simple and general models that can be easily applied on every type of energy systems and due to the low computational time, they are very suitable models for optimization algorithms that encounter with numerous trial-and-error calculations. Nevertheless, they suffer from low accuracy in simulating real energy systems. Nevertheless, there are some approaches that are employed to augment the accuracy of these types of models. In optimization of energy systems, thermal models are used to give required objective functions of optimization in the form of thermal efficiency, exergetic efficiency, and generated power that are intended to be maximized or thermodynamic losses and inefficiencies (irreversibilities, heat losses, etc.) or environmental issues that must be minimized. This chapter is dedicated to the zero-dimensional thermal model that is developed based on thermodynamic principles and exergetic analysis. In addition, thermodynamic criteria, including exergetic efficiency, efficiency defect, and relative irreversibility, are presented for assessment of energy systems.

Modeling, Assessment, and Optimization of Energy Systems https://doi.org/10.1016/B978-0-12-816656-7.00002-6

21

# 2021 Elsevier Inc. All rights reserved.

22

2. Thermal modeling and analysis

2.2 Chapter’s outline In Section 2.3 of this chapter, a review of thermodynamic principles is given. In Section 2.4, the basic concept of the exergetic analysis is provided. Assessment criteria for the evaluation of the thermal performance of energy systems are given in Section 2.5. Section 2.6 is dedicated to a case study. Finally, in Section 2.7, presents the conclusion of this chapter, and some exercises are considered in Section 2.8.

2.3 Review of thermodynamic principles All transfers and conversion of energy within energy systems are governed by thermodynamic principles. Thermodynamics is known by its famous laws, including zeroth law, first law, second law, and the third law of thermodynamics. Among them, first and second laws are mostly used for analysis and modeling of energy systems while zeroth and third laws have a descriptive basis instead of analytical form that observed in the first and second laws. Therefore, zeroth and third laws of thermodynamics are not usually used for modeling and assessment of energy systems. Zeroth law of thermodynamic reveals that when two systems are in an equilibrium state with a third system, these two systems are in thermodynamic equilibrium with each other. This law is a basis for the development and usage of temperature measurement devices. The third law of thermodynamics describes the inaccessibility of the temperature of any system to the absolute zero (0 K). According to this law, it is impossible to reach the temperature of a system to 0 K by consuming the finite value of power. In other words, if a heat pump intends to bring the temperature of the cold space to 0 K, it needs to consume infinite magnitude of mechanical power. Since providing an infinite value of mechanical power is impossible, no system can be reached to absolute zero temperature. Since zeroth and third laws have no analytic basis that is required for modeling, analysis, and assessment of energy systems, this section is dedicated only to the first and second laws of thermodynamics. Thermodynamics is not only the science of the first and second laws. Other aspects like thermodynamic properties and their interrelationships, states equations, analysis of mixtures and solutions, chemical reactions, psychrometrics, phase changes, and phase equilibriums are studied in thermodynamics; however, they are out of the scope of this book and are discussed in textbooks of thermodynamics, for example, Refs. [1–3].

2.3.1 The first law of thermodynamics The first law of thermodynamic starts with a descriptive expression that has the basis on the human experience. Based on the first law of thermodynamics, for any thermodynamic cycle of any system, the cyclic work and cyclic heat transfers are equivalent. This conclusion is based on empirical observations, and its contravention has not been observed yet. For a thermodynamic cycle of an energy system, the following expression is defined for the first law of thermodynamics: þ þ δW ¼ δQ (2.1)

2.3 Review of thermodynamic principles

Þ

23

Þ

where δW and δQ are work and heat that are exchanged with the environment within a complete thermodynamic cycle. Eq. (2.1) that is given for thermodynamic cycles can be extended to the noncyclic thermodynamic process. This extension leads to the necessity for defining a thermodynamic property that is known as the internal energy. This extension can be easily performed as given in classical thermodynamic textbooks, for example, Refs. [1, 2]. Accordingly, the following expression for the first law of thermodynamic of the noncyclic process of a closed thermodynamic system between states 1 and 2 is obtained: ð2

ð2 δQ  δW ¼ Q12  W12 ¼ ðU2  U1 Þ + ðKE2  KE1 Þ + ðPE2  PE1 Þ

1

1

(2.2a)  1  ¼ ðU2  U1 Þ + m v22  v21 + mgðz2  z1 Þ 2

The second and third terms at the right-hand side of Eq. (2.2) are related to the kinetic and potential energies that are neglected in many cases. Hence, Eq. (2.2) is simplified as follows: Q12  W12 ¼ ðU2  U1 Þ

(2.2b)

where U stands for internal energy within the system at each state (state 1 or 2). In timedifferential form, the expression of the first law of thermodynamics for a closed system is: _ W _ ¼ dU Q dt

(2.2c)

The specific internal energy is the internal energy per each unit mass of the system that is denoted by u. The unit of the specific internal energy in the SI unit is kJ kg1 K1. Similarly, the molar specific energy is the internal energy per each mole of the matter, which is denoted by u, and its unit is kJ kmol1 K1. In the first law equation, heat transfer into the system is supposed to have a positive sign, while heat transfer from the system is considered with a negative sign. The sign of work transfer is different, that is, work done by the system is positive, and work done on the system is negative. The first law of thermodynamics is also known as the energy conservation law. The energy conservation law says that energy is not produced or destroyed in the universe. It only transforms from one type to another type (except in nuclear reaction that mass is transformed into the energy). It can be easily proved that the expressions of energy conservation and the first law of thermodynamics are equivalent. In this regard, for an energy system, based on the first law of thermodynamics in differential form, we have:   δQsys  δWsys ¼ dEsys ¼ d Usys + KEsys + dPEsys where E denotes the total energy within the system. KE and PE are kinetic and potential energies of the system. If everything out of the system is called the environment, for that as another system, we have: δQenv  δWenv ¼ dEenv ¼ dðUenv + KEenv + dPEenv Þ For the universe as the summation of the system and environment, we have: dEuniv ¼ dEsys + dEenv ¼ δQsys  δWsys + δQenv  δWenv

24

2. Thermal modeling and analysis

The direction of work and heat transfer between the system and environment is reverse. It means that heat and work transfer from the system is equivalent to heat and work transfer into the environment, that is, δQsys ¼  δQenv and δQsys ¼  δQenv; therefore, the right-hand side of the above equation is zero. dEuniv ¼ 0 ) Euniv ¼ cte

(2.3)

Eq. (2.3) reveals that the total energy of the universe is constant, and it is the expression for conservation energy law. It was observed that the first law of thermodynamics leads to this expression; hence, the first law of thermodynamics and energy conservation law is equivalent. In many cases, the system is thermodynamically an open system in which mass flows pass through the system boundary. It means that there is a control volume instead of a control mass in analyzing the system. Conservation equations (mass, momentum, energy, entropy, etc.) can be extended from control mass viewpoint into control volume analysis by the Reynolds transfer equation that is given in fluid mechanics, for example, see Ref. [4]. A similar approach has been used in classical thermodynamics to extend Eq. (2.2) into control volumes [1, 2]. The general expression of the first law of thermodynamics for a control volume is:   dEcv dðUcv + KEcv + PEcv Þ  _ _ s+W _ cs ¼ ¼ Q cv  W dt dt  X   X  v2i v2e _ i hi + + gzi  _ e he + + gze + m m 2 2 IN OUT

(2.4)

_ s and W _ cs are the shaft work and the work of the control surface on the enIn Eq. (2.4), W _ and h are the vironment due to moving of the system’s boundary, respectively. Moreover, m mass flow rate (kg s1) and specific enthalpy (kJ kg1 K1) of each material stream. Specific enthalpy is a thermodynamic property that is defined as: h ¼ u + Pν (where P is the pressure (kPa) and ν is the specific volume (m3 kg1)). In Eq. (2.4), subscripts i and e are used for intake and exhaust streams, respectively. The energy balance or the first law equation (Eq. 2.4) is usually solved in parallel with the mass conservation equation (also known as the continuity equation). This equation is: X dmcv X _ i _e m m ¼ dt IN OUT

(2.5)

Most energy systems are modeled at the steady-state condition. In steady-state steady-flow (SSSF) conditions, all properties remain constant during the time; therefore, all dtd in Eqs. (2.4) and (2.5) become zero. Since the volume of the control volume at the SSSF condition does not change with time (dVdtcv ¼ 0), no work is performed on the environment by the boundary of the system (the boundary of the system does not move in the SSSF condition). Therefore, at SSSF _ cs is zero. The mass conservation and the first law equations at SSSF condition are condition, W in the following forms: X X _ i _ e ¼0 m m (2.6) IN

OUT

2.3 Review of thermodynamic principles

  X     X v2i v2e _ s + _ W _ _ m m + gz + gz  h + h + Q e e i i cv i e ¼0 2 2 IN OUT

25 (2.7)

If the kinetic and potential energies of the material streams are neglected, Eq. (2.7) at SSSF condition is more simplified as follows: X   X _ s + _ W _ i hi  _ e he ¼ 0 m m (2.8) Q cv IN

OUT

For a system with one inlet-one-outlet stream, Eq. (2.8) is: qcv  ws ¼ he  hi

(2.9)

where qcv and ws are heat transfer and shaft work per each unit of the material stream _ =m _ _ Eq. (2.9) is the simplest form of the first law of thermodynamics (qcv ¼ Q cv _ and wcs ¼ W s =m). for an open system. 2.3.1.1 First-law thermodynamic analysis of reactive systems and definition of formation enthalpy Specific enthalpy of material is given in property’s tables relative to an arbitrary datum that these properties are considered to be zero. Since in many energy systems there is no chemical reaction, the difference between inlet/outlet properties appears in analyzes, and this arbitrary datum is canceled out in calculation. In some instances, in analyzing the energy system, it is intended to apply the first law of thermodynamics on combustion systems or chemical reactors. In such a case, since reactants vanish and new materials called products are formed in the reaction, such cancellation of the datum does not take place, and enthalpy must be evaluated with special care. For the reactive system, the zero datum of enthalpy is allocated to chemical elements at the reference temperature of 298.15 K and the reference pressure of 1 bar (100 kPa) or 1 atm depending on the source of data. For example, H2O is comprised of two elements, including H and O. In this approach, enthalpy of H and O at Tref and Pref is considered to be zero. For molecules like O2, H2 and H2O, formation enthalpy is defined. Formation enthalpy of any molecules is the energy that is released or absorbed by a reaction that a molecule is formed from its essential element while the reaction takes place at Tref and Pref. The 0 enthalpy of formation, which is denoted in molar form by hf , is usually evaluated either by measurement of the heat transfer in the sample formation reaction or by spectroscopic data in statistical thermodynamic analyzes. Formation enthalpy of different materials is reported in thermochemical properties tables; see for example, appendix of Smith [3]. At other condition except Tref and Pref, the molar enthalpy of materials is obtained from the following equations: 0

hðT, PÞ ¼ hf + Δh

(2.10)

where Δh is the associated change of enthalpy of the change of state at constant composition. Δh at any temperature and pressure except than Tref and Pref is obtained from thermodynamic properties tables or thermodynamic state equations such as the equation of ideal gases. The enthalpy of materials that are obtained by Eq. (2.10) usually has a negative value. For a reactive system, another parameter, which is called enthalpy of reaction and in molar form denoted by hRP , is defined. Enthalpy of reaction for fuel is defined as the difference

26

2. Thermal modeling and analysis

between the enthalpy of reactants and enthalpy of products for a reaction that one mole of the fuel undergoes reaction. For fuels, hRP has a negative value since the enthalpy of products is lower than the enthalpy of reactants, and the combustion process is an exothermic process that releases heat. For fuels, other parameters called molar higher heating value, HHV, and lower heating value, LHV , are also defined, which are positive values equal with hRP (¼hPR ). Higher heating value is evaluated assuming that H2O in combustion product is in the form of liquid while in the evaluation of the lower heating value, H2O in products is assumed to be in the vapor state. Therefore, the higher heating value of a fuel is greater than the lower heating value of that fuel, and the difference is equal to the latent heat of vaporization of the water. Both HHVand LHV are positive values and for various fuels are reported in tables of thermochemical properties of fuels. The stoichiometric reaction is the reaction of one mole of the fuel with air so that the complete reaction occurs. It means that in the combustion product, there is no unburned fuel or carbon monoxide and additional oxygen. As an example, suppose that fuel with a general formula of CaHb is reacted with the air and the composition of the air is 77.48% N2, 20.59% O2, 1.90% H2O, and 0.03% CO2In this case, the stoichiometric combustion reaction of CaHb is: Ca Hb + na ½3:763N2 + O2 + 0:092CO2 + 0:001H2 O ! yN2 N2 + yCO2 CO2 + yH2 O H2 O

(2.11a)

where na is the mole number of the air and y is the molar ratio of each species. From the balance of elements at both sides of the reaction, we have: yN2 ¼ 3:763na yCO2 ¼ 0:092na + a   b yH2 O ¼ 0:001na +   2 b a+ 2 na ¼ ¼ 0:524a + 0:262b 1:907

(2.11b)

Therefore, Eq. (2.11a) becomes Ca Hb + ð0:524a + 0:262bÞ½3:763N2 + O2 + 0:092CO2 + 0:001H2 O ! ð1:972a + 0:986bÞN2 + ð1:048a + 0:024bÞCO2 + ð0:000524a + 0:5000262bÞH2 O

(2.11c)

The consumed air in the stoichiometric combustion reaction of the fuel is called the theoretical air. In many reactions to ensure a complete reaction and prevent unburned fuel and carbon monoxide in combustion products, excess air is utilized. For energy analysis of a reactive system, first, the chemical reaction equation for combustion reaction must be written. As an example, once more suppose that fuel with a general formula of CaHb is reacted with the air (the composition of the air is 77.48% N2, 20.59% O2, 1.90% H2O, and 0.03% CO2), while the molar ratio of the fuel to air is λ. In this case, the chemical reaction equation of CaHb and the air is: h i λCa Hb + yN2 , a N2 + yO2 , a O2 + yCO2 , a CO2 + yH2 O, a H2 O ! i (2.12a)  h 1 + λ yN2 , g N2 + yO2 , g O2 + yCO2 , g CO2 + yH2 O, g H2 O

2.3 Review of thermodynamic principles

27

where y are the molar composition of each species and indices “a” and “g” refer to the atmospheric air and flue gases. From the balance of elements at both sides of this reaction (Eq. 2.12a), we have: yN 2 , g ¼

yN 2 , a

1+λ yCO2 , a + aλ yCO2 , g ¼ 1+λ   b yH2 O, a + λ 2 yH2 O , g ¼ 1+λ   b 2yO2 , a  yH2 O, a  2a + λ 2 yO2 , g ¼ 1+λ

(2.12b)

For thermal analysis of a combustion system similar to the example given by Eq. (2.12), the equation of the first law of thermodynamics in SSSF condition is: _ cv + n_ f hf + n_ a ha  n_ P hP ¼ 0 Q

(2.13)

where subscripts “f,” “a,” and “p” correspond to fuel, air, and products of the combustion, respectively. In Eq. (2.13), n_ is the molar flow rate (kmol s1), and h for each material must be evaluated _ cv in Eq. (2.13) is the heat loss from the combustion chamber into the envifrom Eq. (2.10). Q _ cv ¼ 0; however, in some practical applications, it is ronment. In the adiabatic combustion, Q _ ¼ 0:02n_ f :LHV f . assumed that about 2% of the fuel LHV is lost to the environment, that is Q cv In addition, since the molar ratio of fuel to air is assumed as λ, n_ a ¼ n_ f =λ. Finally, Eq. (2.13) is transformed as follows:   (2.14) 0:02λLHV f + λhf + ha  1 + λ hP ¼ 0 If the reaction is assumed to be adiabatic, the following correlation is replaced for Eq. (2.14) for the first law of thermodynamics.   (2.15) Adiabatic combustion : λhf + ha  1 + λ hP ¼ 0 In Eqs. (2.4) and (2.15), we have: 0

hf ¼ hCa Hb ðT, PÞ ¼ hf , Ca Hb + ΔhCa Hb

h i ha ¼ ha ðT, PÞ ¼ yN2 , a hN2 + yO2 , a hO2 + yCO2 , a hCO2 + yH2 O, a hH2 O T, P h i 0 0 0 0 ¼ yN2 , a h f , N2 + yO2 , a h f , O2 + yCO2 , a h f , CO2 + yH2 O, a h f , H2 O h i + yN2 , a ΔhN2 + yO2 , a ΔhO2 + yCO2 , a ΔhCO2 + yH2 O, a ΔhH2 O

(2.16a)

(2.16b)

28

2. Thermal modeling and analysis

h i hP ¼ hP ðT, PÞ ¼ yN2 , g hN2 + yO2 , g hO2 + yCO2 , g hCO2 + yH2 O,g hH2 O T, P h i 0 0 0 0 ¼ yN2 , g h f , N2 + yO2 , g h f , O2 + yCO2 , g h f , CO2 + yH2 O,g h f , H2 O h i + yN2 , g ΔhN2 + yO2 , g ΔhO2 + yCO2 , g ΔhCO2 + yH2 O,g ΔhH2 O

(2.16c)

For the analysis of the reaction, the temperature of products must be given to evaluate hP ¼ hP ðT, PÞ; however, it might be unknown in most analysis of the combustion process. In such cases, the calculation is performed in a trial-and-error estimation so that temperature for the combustion product is estimated, and the estimated value will be corrected in a trialand-error calculation so that Eq. (2.13) is satisfied. A similar analysis can be performed for other fuels. If the reaction is a stoichiometric one and the combustion chamber is an adiabatic chamber, the temperature of the products is called “adiabatic flame temperature.” The aforementioned analysis was performed for CaHb; however, in the case of other fuels with probably different shapes of molecular formula, a similar approach must be performed. For a combustion system, the fuel-air ratio, FAR, and air-fuel ratio, AFR in the mass base and is also defined as follows:   _ f n_ f Mf m Mf (2.17a) ¼ ¼λ FAR ¼ _ a n_ a Ma m Ma   _ a 1 Ma m 1 (2.17b) ¼ ¼ AFR ¼ _ f λ Mf FAR m where M is the molecular mass of the material (kg kmol1).

2.3.2 The second law of thermodynamics For the analysis of the thermodynamic system, the first law encounters some shortcomings. One of these shortcomings is that it cannot describe why some thermodynamic processes undergo in a specified direction and cannot be performed in the reverse direction. For example, consider the chemical reaction of Eq. (2.11a). According to empirical observation, it was found that such a process is conducted from left to the right direction, and the reverse process in the right to left direction cannot take place. Another shortcoming comes from the fact that the first law of thermodynamics does not distinguish between the qualities of different forms of energy. In this regard, as was observed in Eq. (2.1), work and heat transfer are equivalent from the energy balance viewpoint of the first law of thermodynamics. In practice, it is known that the work has a higher quality in practical applications compared to the heat transfer. Work is the useful form of the energy, while the heat in order to change to useful form must undergo some thermodynamic process, for example, it must be given to a thermal engine that converts a part of this energy into the useful work. The second law of thermodynamics has been defined to cover the shortcomings of the first law. It was used to predict the direction of a thermodynamic process. Moreover, using the exergy concept that is one of the outcomes of the second law of thermodynamics, a reference for comparing various energy with different qualities is given.

2.3 Review of thermodynamic principles

29

In thermodynamics, those processes that can be performed in both directions, that is, 1 ! 2 and 2 ! 1 automatically without providing any further energy from the environment, are called reversible processes. On the other hand, those processes that only progress in one direction and cannot be reversed without providing additional energy are called irreversible processes. The direction of the thermodynamic process is governed by irreversibilities. In real processes, there are various sources of irreversibilities, including finite temperature difference, friction, the difference in chemical potential, dissipative processes, sudden expansion, hysteresis, and nonelastic expansion of materials. Before any analytical approach for implementing the second law of thermodynamics on energy systems, there are several expressions that are a basis for further analysis. These expressions are: • Kelvin-Planck statement: It is impossible to make a thermal engine that works in a thermodynamic cycle and generates power while it has a heat exchange only with one thermal reservoir. In other words, heat engines must exchange heat with two thermal reservoirs, including a heat source and a heat sink. Hence, all heat additions to heat engines cannot be converted into useful work, and a part of thermal energy must be rejected into the thermal sink. • Clausius statement: It is impossible to transfer heat from the low-temperature heat sources to a media with a higher temperature without providing the additional energy from an external source. In other words, the transfer of the heat from the low-temperature heat medium to a high-temperature media needs a heat pump that consumes external energy, usually in the form of mechanical power. This statement reveals that, however, heat is usually transferred from high-temperature media to the low-temperature one automatically, the reverse process cannot be performed, spontaneously. Therefore, the heat transfer is an irreversible process that only occurs in one direction. The Kelvin-Planck statement is the statement of the second law of thermodynamics for heat engines, while the Clausius statement is the statement of the refrigerators and heat pumps. These two statements are equivalent since it can be shown that if one statement is violated, the other one is also violated and vice versa [1]. In addition to Kelvin-Planck and Clausius statements, two other statements known as Carnot statements are defined: • Carnot statement #1: Thermal efficiency of all reversible heat engine that operate between two thermal reservoirs are equivalent, respite to the type of the cycle that each engine undergoes. In other words, the thermal efficiency of the reversible heat engine only depends on the temperatures of the heat source and heat sink, that is, TH and TL. Therefore, we have:   _ net _ TL W Q L (2.18a) ηth, int:rev: ¼ ¼1 ¼1 _ _ TH QH QH • Carnot statement #2: Thermal efficiency of all reversible heat engines that operate between two thermal reservoirs with the specific temperatures of TH and TL have a higher thermal efficiency than irreversible heat engines that operate between the same

30

2. Thermal modeling and analysis

temperatures TH and TL). If the same amount of heat is given to both reversible and _ _ _ irreversible heat engine (Q H, rev ¼ Q H, irrev ¼ Q H ), then we have: ( _ _ _ net,irrev _ net, rev > W _ net, rev W _ net,irrev Q Q W W L, rev L, irrev ηth,rev: > ηth, irrev: ) > ) 1 >1 ) (2.18b) _ _ _ _ _ _ Q L, rev < Q L, irrev Q Q Q Q H H H H • Clausius inequality: Analytical analysis of the second law is performed based on what is called as Clausius inequality. For a thermodynamic cycle, it implies that: 8   Þ δQ > > > ¼ 0 for reversible cycle þ  < T δQ  b 0) Þ δQ > T b > > < 0 for irreversible cycle : T b

(2.19)

where subscript b denotes the system boundary. This inequality can be easily proven using the Carnot cycle (for reversible cycle) and also the second statement of the Carnot as given in Ref. [1]. 2.3.2.1 The second law of thermodynamics for closed thermodynamic systems Clausius inequality was given for a thermodynamic cycle. It can be extended into the noncyclic process of a closed thermodynamic system. In the case of the first law of thermodynamics, when it was extended from the cyclic process into noncyclic one, a thermodynamic property known as internal energy, U, was defined. In a similar manner, when Clausius inequality is extended from the cyclic process into noncyclic one, another thermodynamic property called the entropy, S, must be defined. The complete methodology for this extension is given in Ref. [1]; accordingly, the following equation is presented as the expression of the second law of thermodynamics or entropy balance equation for closed systems that undergo a thermodynamic process from state 1 to state 2(1 ! 2): 22 3   ð  δQ δQ 5 + Sgen + δSgen ) S2  S1 ¼ mðs2  s1 Þ ¼ 4 (2.20) dS ¼ T b T b 1

1

where S and s are entropy (kJ K ) and specific entropy (kJ kg1 K1) of the system and Sgen is the entropy generation due to irreversibilities within the process. In Eq. (2.19), however, S is a thermodynamic property that is not dependent on the path of the process, Sgen is dependent on the path of the process, and it is not a thermodynamic property, that is, its value depends on the magnitude of irreversibility along the path of a thermodynamic process. Hence, Sgen has incomplete differential (δ) in Eq. (2.19). For entropy generation, we have:  Sgen ¼ 0 for reversible process (2.21) Sgen  0 ) Sgen > 0 for irreversible process The entropy balance (the expression of the second law of thermodynamics) for a closed thermodynamic system in time rate form is as follows: 2 3 ð _ dS 4 Q 5 + S_ gen (2.22) ¼ dt Tb A

2.3 Review of thermodynamic principles

31

Based on the expression of the second law of thermodynamics (Eqs. 2.19 and 2.22), it is found that the entropy of a system is increased either by heat transfer to the system (in this case the sign of Q is positive) or by effects of irreversibilities within the system (Sgen  0). However, the entropy of a system is reduced only by heat rejection from the system in which the sign of Q in Eqs. (2.19) and (2.22) is negative (Sgen is always positive). This is the thermodynamic reason that condenser must be utilized in any power or refrigeration cycle. For example, in a power plant during processes, the entropy of the working fluid is increased either by heat transfer to that or by effect of irreversibilities; the condenser is a unique place in the cycle that due to the heat rejection to the environment, the entropy of the working fluid is reduced to its initial value. Since the working fluid must undergoes a thermodynamic cycle (in which all properties must be returned to initial values after completing a cycle), the condenser must be used to return the increased value of entropy to the initial value at the end of the cycle. • Principle of the increase of entropy and direction of thermodynamic processes: Based on this principle, the entropy of the universe increases, and there is no condition in which the entropy of the universe can be reduced. Since a system and its environment constitute the universe, this principle can be proved using Eq. (2.19) as follows:   δQ + δSgen, sys dSsys ¼ T b, sys   δQ dSenv ¼ + δSgen,env T b,env On the other hand, since the heat transfer from the system is corresponding to the same value of heat transfer into the environment and vice versa; therefore, δQsys ¼  δQenv. Then we have:     δQ δQ ¼ T b, sys T b,env Then:

    δQ δQ + δSgen, sys + + δSgen,env T b, sys T b,env     δQ δQ ¼ + δSgen, sys  + δSgen,env T b, sys T b,sys

dSuniv ¼ dSsys + dSenv ¼

¼ δSgen, sys + δSgen,env Since δSgen,

sys

 0 and δSgen, sys  0: dSuniv ¼ dSsys + dSenv  0 ) ΔSuniv  0

(2.23)

It was proved that the change in the entropy of the universe is always positive, and only when the processes are reversible, the entropy of the universe remains constant. Hence, in no circumstances, the entropy of the universe decreases.

32

2. Thermal modeling and analysis

Based on the principle of increase of the entropy of the universe, it can be explained why some thermodynamic processes progress only in one direction and cannot be reversed. Based on this principle, processes progress in a direction that associate with ΔSuniv 0, and no process can be conducted in a direction that is corresponding to ΔSuniv < 0. For example, the chemical reaction of (2.11a) is ongoing spontaneously from left to the right direction. The reverse chemical reaction cannot be performed spontaneously since it corresponds to ΔSuniv < 0. Accordingly, using the principle of increase of the entropy of the universe, the direction of thermodynamics can be predicted. It was not possible using the first law of thermodynamics. 2.3.2.2 The second law of thermodynamics for open thermodynamic systems The entropy balance equation (Eq. 2.19 or 2.22) can be extended from the closed system into the open system using the Reynolds transfer equation or similar approach that was given in the classical thermodynamics [1, 2]. Therefore, the general expression of the second law of thermodynamics (entropy balance equation) for a control volume is: 0 1 ð _! X X dS Q cv A0) _ e se  _ i si  m m + S_ gen ¼@ dt T IN OUT b

b

0

ð _ X X Q @dScv + _ e se  _ i si  m m dt T IN OUT b

For SSSF processes

!1 A  S_ gen ¼ 0

(2.24a)

b

¼ 0, therefore we have: 0 1 ð _! X X Q A _ e se  _ i si  m m 0) S_ gen ¼@ T IN OUT b b 0 !1 ð X X _ Q @ A  S_ gen ¼ 0 _ e se  _ i si  m m T IN OUT dScv dt

b

(2.24b)

b

_ ¼ 0) and reversible If the process is SSSF and isentropic, it means that it is adiabatic (Q cv (S_ gen ¼ 0), simultaneously; therefore, we have: X X _ i si ¼ _ e se m m (2.24c) IN

OUT

If the SSSF isentropic process has only one inlet and one outlet, the entropy balance equation is: (2.24d) s i ¼ se • Second law thermodynamic analysis of reactive systems and definition of absolute entropy: In a similar manner that was discussed for the definition of formation enthalpy, a similar term known as standard entropy must be defined for a reactive system in order to have a datum for zero entropy of materials. The zero datum for the entropy is based on the third law of

33

2.3 Review of thermodynamic principles

thermodynamics that implies in 0 K, the entropy of the pure crystalline material with is zero. Therefore, the entropy that is measured compared to this datum is called absolute entropy. Absolute entropy of material relative to this datum at a given temperature is measured based on either statistical thermodynamics or measurement of energy transfer and specific heat data [5]. Furthermore, at an arbitrary pressure, the absolute entropy is determined based on the absolute entropy at T and the reference pressure, Pref, from the following expression [5]:      sðT, PÞ ¼ s T, Pref + sðT, PÞ  s T, Pref (2.25a) For an ideal gas, we have [5]: 

sðT, PÞ ¼ s T, Pref





P  R ln Pref



For each component of the mixture of ideal gases, we have [5]:     yk P sðT, PÞ ¼ s T, Pref  R ln Pref

(2.25b)

(2.25c)

where yk is the mole fraction of the kth component in the mixture and R is the universal gas constant equal 8.3145 kJ kmol1 K1.

2.3.3 Gibbs functions and chemical potential Gibbs function is a thermodynamic property that is defined based on three thermodynamic properties, enthalpy (H), entropy (S), and temperature (T), as follows: G ¼ H  TS

(2.26)

Since enthalpy (H), entropy (S), and temperature (T) are thermodynamic properties, any combination of them, including G, is a thermodynamic property. Gibbs function, as defined by Eq. (2.24), is a thermodynamic property that is widely used in thermodynamic analysis of chemical reaction. The specific Gibbs function ( g) is Gibbs function per unit mass (kJ kg1 K1). The molar specific Gibbs function (g) is called chemical potential, which is shown by μ. The unit of chemical potential is kJ kmol1 K1. Due to the wide application of molar Gibbs function in the analysis of chemical reaction, a specific name called chemical potential (μ) is dedicated to this property. μ ¼ g ¼ h  Ts

(2.27)

On the other hand, for a mixture of n component, if an arbitrary property of the mixture is denoted by X, this property is evaluated based on the properties of its components as follows: X¼

n  X

ni xi



(2.28)

i¼1

where ni is the mole number of the ith component in the mixture and x is the specific molar property of the ith component.

34

2. Thermal modeling and analysis

Since Eq. (2.28) is a general correlation and is applicable for all type of property, for Gibbs function is also applicable; therefore, we have: G¼

n  X

n   X  ni gi ¼ ni μi

i¼1

(2.29a)

i¼1

where ∂G μ i ¼ gi ¼ ∂nk

 (2.29b)

T, P,nk6¼i ¼const

The index T, P, nk6¼i ¼ const on the right-hand side of Eq. (2.29b) means that in the mixture, temperature, pressure, and the number of moles of all species except component i are constant. The chemical potential of materials at any temperature and pressure is calculated based on the chemical potential at reference condition as follows [5]:    (2.30a) μ ¼ μ0f + μðT, PÞ  μ Tref , Pref ¼ μ0f + Δμ       Δμ ¼ hðT, PÞ  h Tref , Pref  T:sðT, PÞ  T:s Tref , Pref

(2.30b)

Formation chemical potentials of various chemicals (μ0f ) are reported in thermochemical property tables, see, for example, Ref. [3]. Combining Eqs. (2.26) and (2.29), we have: G ¼ H  TS ¼

n  X

n  X   ni μi ) H ¼ TS + ni μi

i¼1

i¼1

Since H ¼ U + PV, we have: U ¼ TS  PV +

n  X

ni μi



(2.31)

i¼1

In differential format, Eq. (2.30a) is changed to following the form: dU ¼ TdS  PdV +

n  X

μi :dni



(2.32a)

i¼1

Since H ¼ U + PV ) dH ¼ dU + PdV + VdP, if Eq. (2.32a) is substituted in this expression, we have: dH ¼ TdS + VdP +

n  X

μi :dni



(2.32b)

i¼1

Moreover, G ¼ H  TS ) dG ¼ dH  TdS  SdT. Considering this expression and Eq. (2.32b), we have: dG ¼ VdP  SdT +

n  X i¼1

μi :dni



(2.32c)

35

2.3 Review of thermodynamic principles

Eqs. (2.32a), (2.32b), and (2.32c) are called as Gibbs relations that express correlations between different properties. Gibbs correlations are usually expressed based on specific properties as follows: n  X  μi :dni du ¼ Tds  Pdv + i¼1

du ¼ Tds  Pdv +

n  X

μi :dni

(2.33a)



i¼1

dh ¼ Tds + vdP +

n  X  μi :dni i¼1

(2.33b)

n  X  dh ¼ Tds + vdP + μi :dni i¼1

dg ¼ vdP  sdT +

n  X i¼1

dμ ¼ dg ¼ vdP  sdT +

μi :dni n  X



μi :dni



(2.33c)

i¼1

Eqs. (2.32a–c) are the general form of Gibbs relations that govern interrelationships between various thermodynamic properties and are widely used in thermodynamics. When n   P there is no chemical reaction, the term μi :dni ¼ 0 on the right-hand side of Gibbs relation i¼1

and simplified form of Gibbs relations are obtained as follows: du ¼ Tds  Pdv du ¼ Tds  Pdv dh ¼ Tds + vdP dh ¼ Tds + vdP dg ¼ vdP  sdT dμ ¼ dg ¼ vdP  sdT

(2.34a)

(2.34b)

(2.34c)

Based on the Gibbs relation that was given by Eq. (2.32a), it can be concluded that:  ∂U T¼ (2.35a) ∂S V, ni ¼const  ∂U (2.35b) P¼ ∂V S, ni ¼const   ∂G ∂U ¼ (2.35c) μ i ¼ gi ¼ ∂nk T, P, nk6¼i ¼const ∂nk T, P,nk6¼i ¼const

36

2. Thermal modeling and analysis

• The direction of thermodynamic processes based on Gibbs relation: According to Eqs. (2.35a), (2.35b), and (2.35c), the internal energy of any thermodynamic system can be changed due to temperature difference (effect of heat transfer), work (effect of expansion due to the pressure difference), and chemical reaction (effect of the difference in chemical potential). For any cases, the direction of the spontaneous process is in the direction of reduction in potential, that is, spontaneous heat transfer is from the high temperature to low temperature, spontaneous expansion is performed from high pressure into low-pressure potential, and chemical reaction is in the direction of high chemical potential toward low chemical potential. Therefore, in an irreversible chemical reaction, Gibbs function of products is lower than the Gibbs function of reactant. The reverse processes cannot be performed without providing additional energy. • Maximum theoretical work of a chemical reaction: Maximum work in any thermodynamic system is obtained in the reversible process since irreversibilities reduce the useful work (it is according to Carnot’s second statement, see Section 2.3.2). Therefore, for chemical reaction, the condition of reversibility must exist in order to exploit maximum useful work. Consider that in a chemical reactor, as shown in Fig. 2.1, reactants enter with standard temperature and pressure (T0 and P0) and products leave the reactor with T0 and P0, too. This reactor, in general form, may exchange heat with the environment T0. If formation enthalpy and absolute entropy of reactants and products are denoted by H0R, 0 SR, H0P, and S0P, respectively, from the first law of thermodynamics, we have: Q  Wmax ¼ HP0  HR0

(2.36a)

From the entropy balance equation (second law of thermodynamics for this reversible process), we have:   (2.36b) Q ¼ T 0 S0P  S0R Substituting Eq. (2.36b) into (2.36a) leads to:     Wmax ¼ HR0  T0 S0R  HP0  T0 S0P ¼ G0R  G0P ¼ ΔG0RP ¼ ΔG0PR

(2.37)

In Eq. (2.37), ΔG0RP is the change in the standard Gibbs function of the reaction. Therefore, for any chemical reaction, the maximum extractable work is equal to the change in the

Reactants

Q

Products

A typical chemical reactor

H R0 , S R0 , T 0

H P0 , S P0 , T 0

Wmax FIG. 2.1 A typical reversible chemical reaction in a chemical reactor with constant reaction temperature at T0.

2.3 Review of thermodynamic principles

37

standard Gibbs function of the reaction. For example, for a chemical reaction like to what given for reaction of CaHb by Eq. (2.11c), we have: Wmax ¼ ΔG0RP ¼ G0R  G0P

(2.38a)

where G0R ¼ð1:972a + 0:986bÞμN2 + ð0:524a + 0:262bÞμO2 + ð0:5048a + 0:024bÞμCO2 + ð0:000524a + 0:000262bÞμH2 O G0P ¼ð1:972a + 0:986bÞμN2 + ð1:048a + 0:024bÞμCO2 + ð0:000524a + 0:5000262bÞμH2 O

(2.38b)

(2.38c)

Therefore, we have: Wmax ¼ΔG0RP ¼ G0R  G0P   ¼ ð0:524a + 0:262bÞμO2  0:5432μCO2  0:5000262bμH2 O

(2.38d)

Therefore, the maximum extractable work of the stoichiometric combustion of one mole of fuel with the chemical formula of CaHb is obtained based on the chemical potential of oxygen, carbon dioxide, and water that are given in thermochemical property tables of materials. Since Eq. (2.37d) is for the stoichiometric reaction of one mole of CaHb, if the fuel flow rate _ Ca Hb , then maximum power that can be obtained from the stoichiometric comof the fuel is m bustion of CaHb is:    _ Ca Hb  m _ ð0:524a + 0:262bÞμO2  0:5432μCO2  0:5000262bμH2 O (2.39) W max ¼ ð12a + bÞ where (12a + b) is the molecular mass of the proposed fuel (MCaHb). • The direction of the chemical reaction based on the equilibrium constant of the reaction: Considering a chemical reaction with following general form, a parameter called as equilibrium constant denoted by K is also defined [5]. νA A + νB B>νC C + νD D

(2.40)

where A and B are any arbitrary reactants while C and D are represented for arbitrary products. Moreover, νi in Eq.(2.40), is the stoichiometric coefficient of ith material in the chemical reaction. Accordingly, the equilibrium constant of the reaction that indicated by Eq. (2.40) is defined as follows: PνC :PνD (2.41) K ¼ CνA DνB PA :PB where Pi is the partial pressure of ith species in the mixture of A,B,C, and D (Pi ¼ yi. Pmix, where yi is the molar fraction of the ith species). The equilibrium constant of a reaction can be used to show the direction of the chemical reaction ongoing. When it has a large number, for example K > 1000, it means that the concentration of products in the mixture is much higher than the reactant. It means that the

38

2. Thermal modeling and analysis

reaction of Eq. (2.40) progresses from the left side to the right side. A low value of the equilibrium constant, for example, K < 0.001 means that the chemical reaction of Eq. (2.40) progresses from right to left, since the concentration of reactants is much higher than the concentration of products in the mixture. Moderate values of equilibrium constant, for example, 0.001 < K < 1000 imply that there is some kind of equilibrium between concentration of reactants and products, that is, the chemical reaction takes place on both sides, and therefore, it can be considered as a reversible chemical reaction. The equilibrium constant of a reaction depends on the temperature and pressure of the reactor, that is K ¼ K(T, P); hence, in designing chemical reactors, engineers can control the direction of the reaction by adjusting proper values of the temperature and pressure in the reactor. For a chemical reaction, it can be shown that equilibrium constant, K is also defined and it can be shown that its correlation with ΔG0RP as follows [6]: lnðKÞ ¼ 

ΔG0PR ΔG0RP ¼ RT RT

(2.42)

where R is the universal gas constant equal 8.3145 (kJ kmol1 K1) and T is the reaction temperature.

2.4 Fundamental of exergetic analysis Most sophisticated thermal models for analysis and optimization of energy systems are performed based on the concepts of exergetic analysis. The exergy method for analysis of energy systems is an extension of the second law of thermodynamics. As previously mentioned, one shortcoming of the analyses that are developed based on the first law of thermodynamics is that in these analyses, the difference between the quality of different types of energy is not taken into account. Therefore, for example, work and heat transfer are considered to be equivalent; however, it is known that the quality of the energy of the work transfer is higher than the heat transfer is a practical application. On the other hand, a part thermodynamic effectiveness of energy systems is destroyed in the process due to irreversibilities that generate entropy. The exergy method of energy system’s analysis is a concept that is based on considering the quality of different forms of energy and irreversibilities in thermal modeling of energy systems. Therefore, exergetic models are a more rational basis for analysis and optimization of energy systems than energy models come from the first law of thermodynamics. Moreover, for the definition of the efficiency of energy systems, exergetic efficiency is a more rational basis than energy efficiency (thermal efficiency) for any assessment and optimization of energy systems. Therefore, exergetic efficiency is also called as the rational efficiency and sometimes the second-law efficiency in literature. In most case studies of thermal optimization of energy systems, the exergetic efficiency is used as an objective function that must be maximized by optimization tools, or sometimes, the irreversibilities (exergy destruction) within the energy system is minimized. Exergetic analysis is discussed in this section to give a powerful tool for modeling, assessment, and optimization of energy systems.

2.4 Fundamental of exergetic analysis

39

2.4.1 Definitions Before any discussion on the exergetic analysis of energy systems, some basic terminologies used in exergetic analysis must be defined. In this part, definitions are given for ordered and disordered energy, exergy, environment, different types of equilibrium in exergy analysis are given. 2.4.1.1 Quality of the energy and definition of the ordered energy and disordered energy Energy from the quality viewpoint is classified into two categories, that is, ordered energy and disordered energy. Ordered energies are those kinds of energies that have the potential to transform into useful work in theory, entirely. On the contrary, disordered energy cannot be transformed into useful work completely, even in theory. In other words, there is a limitation on the transformation of these kinds of energy into useful work. These limitations on the transformation of disordered energy into useful work are imposed by the second law of thermodynamics. Electricity, kinetic, and potential energies in macro-scale, and mechanical power are examples of ordered energy. Examples of disordered energies include molecular kinetic and potential energies (in micro-scale), thermal energy, the internal energy of materials, the chemical energy of fuels, nuclear energy (fission and fusion), and turbulent energy of flows. For example, the maximum potential of transformation of the thermal energy into the mechanical power is limited by the conversion efficiency of a hypothetical Carnot power cycle that receives the same amount of the thermal energy. Suppose that an amount of heat transfer (thermal energy) from a system at T is denoted by Q, the maximum theoretical part of this energy that can be transformed into the mechanical power (the useful form of energy) is equivalent to the output work of a Carnot power cycle that operates between the system with temperature T and the environment with temperature T0 as the heat source and sink of the cycle. Therefore, ifT > T0, we have:   T0 Q ) Wmax < Q (2.43) Wmax ¼ WCarnot ¼ ηCarnot :Q ¼ 1  T However, the Carnot cycle is a reversible power cycle; it is found from Eq. (2.43) that even, in theory, it is impossible to convert all thermal energy (Q) into a useful form of energy (mechanical power). In comparison, however, transformation of an ordered energy like electricity into mechanical power may be encountered with some losses in real cases (for example, conversion of electricity into work in an electric motor may face with some losses); nevertheless, in theory, when there are no irreversibilities, it can be assumed to be converted to the mechanical power completely. For disordered energies, such complete conversion cannot be assumed even in theory when there is no irreversibility. One explanation of different behaviors of ordered and disordered energies in transformation into the useful energy can be presented by a microscopic view of the system particle. As we know, the dynamic definition of!work is an internal product of force vector ! ! ! (F ) into displacement vector (d ), that is, W ¼F : d . For ordered energies, force and displacement vectors of all system particle are in the same direction (e.g., imagine flow of electrons in a wire or flow of a water jet that impacts to a turbine’s blade) and therefore, in generating work all particles have synergy with each other and therefore maximum

40

2. Thermal modeling and analysis

amount of work can be generated by the system. For disordered energy, particles in the system in the microscopic view have random movements (like internal energy of a system’s particles); therefore, they do not synchronize together for work generation. Therefore, these kinds of energies associated with disordering in the particle’s movement cannot be transformed into work entirely due to the unsynchronized behaviors of the system’s particles. • Specification of ordered energy: 1. Ordered energy can be transferred 100% into useful work in theory when there is no irreversibility. 2. Transformation of ordered energy from a system to another system or environment at the boundary of the system is observed in the form of a work transfer, not heat transfer (work transfer and heat transfer are those kinds of energies that only be observed at system’s boundary [1]). 3. Transformation of order energy into other forms of ordered energy can be analyzed by only the first law of thermodynamics without a need for the second law of thermodynamics. • Specification of disordered energy: 1. Disordered energy cannot be transferred 100% into useful work even in theory and even in the absence of irreversibilities. 2. Transformation of disordered energy from a system to another system or environment at the boundary of the system is observed in the form of heat transfer. 3. Transformation of disorder energy must be analyzed by both the first and the second laws of thermodynamics. If in an energy system among different kinds of energy transfers, only one transferred and transformed energy is a disordered one; that energy system must be analyzed by the second law of thermodynamics too (exergy analysis is necessary). 2.4.1.2 Definition of the exergy The “Exergy” as a word comes from the combination of two Greek words “Ex” and “Ergos” in which the former word means “external” and later means “work.” It is comparable with “Energy” as a similar term that is composed of Greek words of “En” and “Ergos” that the “En” means “internal.” Therefore, by the word definition, exergy is equivalent to “external work,” and “energy” implies the “internal work.” A simple scientific definition of “Energy” in physics is: The energy is the capability of doing work. Based on this lexical words for “Energy” and “Exergy,” it can be said that the energy is the capability of doing work, which is in the systems, latently while the exergy is the work capability of an amount of energy or a thermodynamic system that can be exploited, actually. Exergy is also called the availability, in some thermodynamic literature. In thermodynamics “exergy” that is sometimes called also as “availability” is defined as: “Exergy is the maximum theoretical shaft work that can be extracted from an amount of energy or a system when the system comes to the equilibrium with the environment in a reversible thermodynamic process.”

2.4 Fundamental of exergetic analysis

41

Based on this definition, in general, the energy is composed of two parts: exergy and anergy. The latter term is that part of the energy that cannot be transformed into useful energy in the form of shaft work. E ¼ Ex + A

(2.44)

where E, Ex, and A are energy, exergy, and anergy. It is clear that for order energies, we have: Eoe ¼ Exoe and Aoe ¼ 0(where subscript “oe” stands for the ordered energy). Based on the explanation given above, it can be said that exergy is an indication that is used to weigh different kinds of energy. Therefore, exergy is a reference standard for defining the quality of energy. If exergy and energy are compared, the following differences between these concepts can be pointed out [5]: 1. Conservation law is indefeasible for the energy; but the exergy has no conservation law, and it is destroyed in thermodynamic processes due to the generation of entropy caused by irreversibilities. 2. Energy of a system or material is dependent on the state of the system, while the exergy is a function of both states of the system and its environment. 3. The reference datum for dedicating zero value for energy (e.g., internal energy or enthalpy of substances) is a specific state of that substance in a reference condition. For exergy, the reference datum is the environment, not the system of substance. 4. Energy of systems or substances (e.g., internal energy or enthalpy of substances) reduces while the temperature is reduced. In the case of exergy, the exergy of the system or substances is reduced when the temperature is reduced to the environmental temperature. Then it starts to increase again when the temperature is further reduced to the temperature level that is below the temperature of the environment. 5. In classical thermodynamics, it was discussed that the internal energy and enthalpy of ideal gases are only dependent on the temperature and are not a function of the pressure [1]. Exergy of materials, including ideal gases, is always dependent on the pressure too. 6. Energy of the absolute vacuum is zero while the absolute vacuum has positive exergy. 2.4.1.3 Environment and different types of equilibrium with the environment In thermodynamics, the environment is a system that can exchange an unlimited amount of energy with any system without changing its thermodynamic state. Therefore, when the environment exchanges energy, its temperature, pressure, chemical potential, and other thermodynamics properties must remain unchanged. Since exergy is the capability of a system to do work, in exergetic analysis, the environment is defined as a system or medium that has no potential to do work. Therefore, between elements of the environment, there is no gradient, including temperature gradient, pressure gradient, and chemical potential gradient; hence, the environment cannot generate any kind of work. In other words, the work generation potential of the environment is zero. It is clear that a perfect thermodynamic environment may not exist in the real world; however, in many practical applications, atmosphere, oceans, and earth cluster can be considered as a thermodynamic environment with reasonable accuracy [5].

42

2. Thermal modeling and analysis

Another element that was used in the definition of the environment in Section 2.4.1.2 was the system equilibrium with the environment. Therefore, equilibrium must be defined before any analysis. In exergetic studies, two kinds of equilibrium are defined and used in the analysis: • Limited equilibrium or restricted dead state (environmental state): In this type of equilibrium when a system comes into the equilibrium with the environment, all gradients between the system and its environment including temperature and pressure gradient) except gradient in chemical potential (the difference between chemical potential of the system and environment) become zero. Therefore, in this kind of equilibrium, when the system reaches equilibrium, there is still a difference between the chemical potential of the system and the environment. • Complete equilibrium or dead state: In this case, after equilibrium between the system and the environment, there is no kind of gradient between the system and its environment, including the gradient of chemical potential. Therefore, the difference between the chemical potential of the system and environment reaches zero after equilibrium. Depending on the kind of equilibrium used for the analysis of any energy system, different values for exergy are estimated for that system.

2.4.2 Different types of exergy for analysis of the open systems (control volumes) Open thermodynamic systems (control volumes) exchange exergy with their environment or other systems in the following three known ways: 1. Work transfer: When work is transferred from the system boundary, exergy is also transferred to or from the control volume. 2. Heat transfer: Heat transfer through the system boundary causes a transfer of the exergy to or from the control volume as well. 3. Mass flow: In an open system, mass flow crosses the boundary of the control volume. Since, in general, the mass flow is not in dead state equilibrium with the environment, these streams exchange exergy to or from the system. In a similar manner that in thermodynamics balance equations for mass, energy, and entropy were developed for control volumes, it is required to quantify exchanged value of exergy to/from the control region through aforementioned three effects (work, heat transfer, and mass flow). In Section 2.4.1.2, it was mentioned than exergy has no conservation law, and it is destructed in processes due to irreversibilities; nevertheless, by considering a term that is called exergy destruction, it is possible to write a balance equation similar to energy balance equation. In a similar manner, for entropy, by considering a term known as the entropy generation, the entropy balance equation was developed in the classical thermodynamics (see Eq. 2.24a, b). 2.4.2.1 Exergy transfer due to the work transfer As mentioned before, when work is transferred to/from the control volume, exergy is transferred to/from the system as well. On the other hand, mechanical work is the ordered

43

2.4 Fundamental of exergetic analysis

energy, and its exergy is complete, that is, it has no anergy. If the work transfer is denoted by W and the transferred exergy by the work is denoted by ExW, we have: ExW ¼ W

(2.45a)

_ _ W ¼W Ex

(2.45b)

In time rate form:

2.4.2.2 Exergy transfer due to the heat transfer Thermal energy is not ordered energy; therefore, when the heat is transferred, the corresponding transferred exergy is not equivalent to thermal energy. Therefore, this case is quite different from the work transfer. The magnitude of transferred exergy is estimated by the assumption that the thermal energy is transferred to a Carnot cycle, which operates between the system and environment as two thermal storage systems. The net output work of the hypothetical Carnot power cycle is assumed to be equal to the thermal exergy of the transferred heat. This is schematically depicted in Fig. 2.2. When the system is at a higher temperature than the environment (Fig. 2.2A), the thermal exergy of the heat transfer obtained as follows:   T0 Q Q WhenT > T0 :Ex ¼ WRHE ¼ 1  T   (2.44a) _ RHE ¼ 1  T0 Q _ _ Q ¼W Ex T If the temperature of the system is less than the temperature of the environment, and heat transfer from/to the system, the equivalent thermal exergy is calculated by the assumption that the heat engine is work with the environment as the heat source and the system as the heat sink as per Fig. 2.2B. In this case, we also have:

Environment at T0, P0 System at T>T0

Q0 Q RHE

RHE

WREH

WREH

Q

Q0

System at T T0; (B) T < T0.

44

2. Thermal modeling and analysis

  9   T = T Q0 WRHE ¼ 1  ) W ¼ 1  ðWRHE + QÞ RHE T0 ; T0 Q0 ¼ WRHE + Q     T T T0 1 Q ) WRHE  WRHE + WRHE ¼ 1  Q ) WRHE ¼ T T0 T0 Therefore,

  T0 Q WhenT < T0 :ExQ ¼ WRHE ¼  1  T   _ _ RHE ¼  1  T0 Q _ Q¼W Ex T

(2.44b)

It is required to notice that the sign of the thermal exergy of the heat transfer is always positive since in both cases of T > T0 and T < T0, the hypothetical reversible heat engine (Carnot cycle) generates positive work. Hence, the sign of ExQ is positive. Only when T ! T0 ) ExQ ! 0. The sign of Eqs. (2.44a) and (2.44b) shows the direction of thermal exergy into the system, only. Based on Eq. (2.44a), it is observed that when heat transfer is toward the system at T > T0, that is, Q is positive, thermal exergy, ExQ, flowing into the system. When the heat is absorbed from a system at, T > T0, that is, Q has a negative sign, thermal exergy, ExQ, is reduced from the system. For the system at T < T0, when the heat is transferred to the system (Q is positive), thermal exergy (ExQ) exits from the system, and if heat absorbed from the system at T < T0, thermal exergy (ExQ) enters the system. When the temperature at the system’s boundary is not constant, the thermal exergy of the heat transfer of the system is obtained by integration over the system boundary as follows:  ð T0 _ExQ ¼ qðAÞdA (2.45) 1 TðAÞ A

where q(A) is the heat flux over the control region. For the integration of Eq. (2.45), it is required to have the distribution of temperature and heat flux over the control region. In most cases, it is difficult to have q(A) and T(A). In such a case, the definition of the thermodynamic average temperature might be useful [5]. • Thermodynamic average temperature: This is a hypothetical constant temperature, T, that is substituted to the real variable temperature of the system, T(A), and results in the same value of thermal exergy (ExQ) that is obtained by Eq. (2.45); therefore, we have:    ð T0 _ ¼ _ExQ ¼ 1  T0 Q qðAÞdA 1 (2.46) T ðA Þ T A

For the case of a stream that transfers heat along its path, is shown in Fig. 2.3.

45

2.4 Fundamental of exergetic analysis

From the second law of thermodynamics, we have: ðe q ¼ Tds i

If T is the thermodynamic average temperature, we must have: ðe ðe Tds q ¼ T ðse  si Þ ¼ Tds ) T ¼ i ðse  si Þ i On the other hand, from the Gibbs relations for nonreactive systems (Eq. 2.34b), we have: ðe ðe dh ¼ Tds + vdP ) Tds ¼ ðhe  hi Þ  vdP i

i

Therefore: T¼

ðhe  hi Þ 

ðe vdP i

(2.47a)

ðse  si Þ

Ðe In Eq. (2.47), i vdP is the related term to the pressure loss along the flow path. If the flow is a liquid and incompressible, we have: T¼

ΔP ρ ðs e  si Þ

ð h e  hi Þ 

(2.47b)

where ΔP and ρ are pressure drop and density of the flow. If the pressure drop of the flow is ignored, we have: T’

ð h e  hi Þ ðse  si Þ

(2.47c)

Therefore, in this case, the thermal exergy that is transferred from the flow is:     T0 T0 _ Q _ExQ ¼ m:ex _ Þ¼ 1 _ ðm:q ¼ 1 Q T T

1 kg s-1,

,

,

,

,

Q FIG. 2.3 A heat transfer along a hot stream and definition of the thermodynamic average temperature.

(2.48)

46

2. Thermal modeling and analysis

2.4.2.3 Flow exergy The mass flow rate into or from a control volume carries four elements of exergy to/from the control volume. These elements are kinetic exergy, potential exergy, physical exergy, and _ chemical exergy. If the flow exergy is denoted by Ex,and its specific value based on the unit mass flow rate is ex, we have: _ ¼ m:ex _ Ex

(2.49a)

ex ¼ exK + exP + exPH + exCH

(2.49b) -1

The unit of the specific exergy in the SI system of the unit is kJ. kg . Sometimes, the summation of physical exergy and chemical exergy is called thermal exergy of the flow, that is: exTH ¼ exPH + exCH

(2.49c)

Since kinetic and potential energies are ordered one, their exergy is entirely equivalent to the kinetic and potential energies; hence, if the gravity is the only the relevant potential field, we have: exP ¼ gz

(2.50a)

v2 2

(2.50b)

exK ¼

Physical and chemical exergies of the flow are of the disordered type of energy, and hence, their exergy must be evaluated. These exergies come from temperature, pressure, and chemical-potential gradients of the flow and environment. (i) Physical exergy: By definition, physical exergy of a flow is the maximum shaft work that is extractable from that flow when it is brought to a restricted dead state (limited equilibrium with the environment) in a physical reversible process that only transfers heat with the environment. Fig. 2.4 depicts a schematic for a physical process that extracts the physical exergy of flow at T and P, while the temperature and pressure of the steam at the outlet of the system in the restricted dead state are T0 and P0. A typical process that extracts the physical exergy of the Wrev=exPH

1 kg s–1 ,T, P

Reversible physical process

T0, P0

q0

Environment at T0, P0

FIG. 2.4 Schematic of a reversible physical process for extraction of the physical exergy of a flow.

2.4 Fundamental of exergetic analysis

47

stream (Fig. 2.4) is a two-stage thermodynamic process which its first stage is an isentropic expansion process from the P to an intermediate pressure Pi where P0 < Pi < P followed by the second stage, which is an isothermal reversible expansion process from Pi to P0 [6]. From the first law of thermodynamics for the given process, we have: q0  wrev ¼ h0  h On the other hand, based on the second law of the thermodynamics for a reversible process of the environment, we have: q 0 ¼ T0 ð h 0  h Þ By combining these two equations and eliminating q0, we have: exPH ¼ wrev ¼ ðh  h0 Þ  T0 ðs  s0 Þ ¼ ðh  T0 sÞ  ðh0  T0 s0 Þ ¼ β  β0

(2.51)

In Eq.(2.51), β (¼ h  T0s) is called as the specific physical exergy function. In some cases, in analyzing energy systems, there are inlet/outlet streams. For such steams, we need the difference between the physical exergy in the balanced equation instead of the absolute value of that. Therefore, the difference in physical exergy between states # and #2 can be written as follows: PH exPH 2  ex1 ¼ ðh2  h1 Þ  T0 ðs2  s1 Þ

(2.52)

• Component of the physical exergy: Physical exergy of flow is composed of two elements, including temperature term, exΔT, and pressure term, exΔP, that is: exPH ¼ exΔT + exΔP

(2.53)

Temperature exergy: By definition, temperature exergy is the maximum theoretical extracted work that can be extracted from a flow when its temperature is reached to the environmental temperature (T0) in a physical reversible process that only exchanges heat within the environment. The sign of temperature exergy is always positive since whether T > T0 or T < T0 a hypothetical Carnot cycle that works between T and T0 generates positive work (see Fig. 2.5). exΔT  0

(2.54a)

Pressure exergy: Pressure exergy is the maximum theoretical work that can be obtained in an isothermal reversible expansion process when the pressure is expanded from P to P0. The sign of pressure exergy depends on that P > P0 is positive (isothermal reversible expansion process) or if P < P0 is a negative (reversible isothermal compression) process. 

IFP > P0 ) exΔP > 0 IFP < P0 ) exΔP < 0

(2.54b)

48

2. Thermal modeling and analysis

Constant pressure heat transfer T>T0 and P=const.

,

Isothermal expansion/compression process at T=T0 ,

Q RHE

wREH=exΔT IF P>P0: wexp=exΔP

Q0

IF PP0: wexp=exΔP IF P P0 ) ex + ex > 0  ¼ ex IF exΔP < exΔT ) exPH ¼ exΔT + exΔP > 0 (2.54c) : IFP < P0 ) IF exΔP > exΔT ) exPH ¼ exΔT + exΔP < 0

2.4 Fundamental of exergetic analysis

49

It can be shown that if the initial state of the stream of Fig. 2.5 is at T and P, and intermediate state in Fig. 2.5 is denoted by i is at Ti ¼ T0 and Pi ¼ P, The temperature and pressure exergies of the flow are obtained from the following expressions [6]:

ð T0   T  T0 ΔT :dh ex ¼  (2.55a) T T P¼const exΔP ¼ T0 ðs0  si Þ  ðh0  hi Þ

(2.55b)

where hi and si are specific enthalpy and entropy of the flow at the intermediate condition of Fig. 2.5 at Ti ¼ T0 and Pi ¼ P. Eqs. (2.54) and (2.55) could be proved using Fig. 2.5 and principles of the classical thermodynamics (see Ref. [6]). For the ideal gas since enthalpy is only dependent on the temperature, not pressure, that is, h0 ¼ hi, exΔP ¼ T0(s0  si), it can be shown that [6]:   T (2.56a) exΔT ¼ cP ðT  T0 Þ  T0 cP ln T0   P ΔP (2.56b) ex ¼ RT 0 ln P0

    T P PH  R ln (2.56c) ex ¼ cP ðT  T0 Þ  T0 cP ln T0 P0 For a practice, prove the validity of Eqs. (2.56a)-(2.56c) for the ideal gas. (ii) Chemical exergy: By definition, chemical exergy of a flow is the maximum shaft work that can be exploited from that flow when it is brought from a restricted dead state (limited equilibrium with the environment) into dead state (complete equilibrium with the environment) in a reversible chemical process that only transfers heat and material with the environment. Since the process is a reversible, chemical exergy can also be defined as the minimum required work for the synthesis of material from the environmental material in such a way that synthesized materials are delivered at the restricted dead state. In the case of physical exergy, the zero datum was the restricted state of the environment at T0 and P0. For chemical exergy, the zero datum must also be dedicated to the environment. For this purpose, chemical potentials of substances that are present in the environment at dead state are considered as a datum for evaluation of the chemical exergy of material at other conditions. For example, it was assumed that the atmosphere as a reference environment is composed of the following substances [5]: N2 , O2 ,H2 O, D2 O, CO2 , Ar, He, Ne,Kr, Xe Chemical exergies of other materials are evaluated in comparison to these materials. In this case, we face two cases: 1. The chemical exergy of a material that is among the reference materials is to be evaluated. 2. The chemical exergy of a material that is not among the reference materials must be evaluated.

50

2. Thermal modeling and analysis

• Chemical exergy of reference materials: Suppose that it is intended to determine the chemical exergy of materials in pure condition at the restricted dead state. In such cases, the condition of the proposed material must be compared to the condition that that material has in the environment. For example, suppose that chemical exergy of CO2 must be determined. Therefore, the chemical exergy of the pure CO2 at T0 and P0.is calculated by the assumption that this carbon dioxide is brought to the condition that it has in the environment, that is, the partial pressure of carbon dioxide in the atmosphere, P0, CO2. For this purpose, it is assumed that the material is expanded in a reversible isothermal expansion that expands it from T0 and P0 (restricted dead state) into T0 and P0, CO2(dead state). The typical process for expansion of a reference material denoted by i is depicted in Fig. 2.6. If one mole of ith reference material is expanded from T0 and P0 (restricted dead state) into T0 and P0, i(dead state), we have: The first law of thermodynamics: q0  w ¼ h0, i  h0 , T ¼ T0 ¼ const: ) h0, i ¼ h0 ) w ¼ q0 From the second law of thermodynamics for a reversible process: 9   q0 ¼ T0 ðs0  s0,i Þ    = P0 T0 P0 ) q0 ¼ R ln  R ln ðs0  s0,i Þ ¼ cP ln ; P0,i T0, i P0, i Considering w ¼ q0 and w ¼ exCH i , we have:     P0 1 ¼ exCH ¼ R ln R ln i P0, i yi

(2.57)

FIG. 2.6 A hypothetical reversible isothermal expansion process for evaluation of the chemical exergy of a reference material.

2.4 Fundamental of exergetic analysis

51

where yi is the molar fraction of the ith environmental material and R is the universal gas constant (R ¼ 8:3145 kJ kmol1 K1 ). Eq. (2.57) is used for all environmental materials, and molar-specific chemical exergies of those materials are calculated and tabulated in chemical exergy property tables of substances. Example Molar fractions of CO2 and O2 in the atmosphere are 0.0003 and 0.2040, respectively. Calculate the specific molar chemical exergies of these substances. Solution 



 1 ¼ 8:3145 ln ¼¼ R ln ¼ 20108kJ kmol1 yCO2 0:0003     1 1 CH ¼ 8:3145 ln ¼ 3941kJ kmol1 exO2 ¼¼ R ln yO 2 0:2040

exCH CO2

1



• Chemical exergy of nonreference materials: In most cases, it is required to determine the chemical exergy of materials such as fuels that are not an environmental substance. In such cases, the chemical exergy is obtained by considering a hypothetical reversible chemical reaction in which one mole of the considered substance reacts with an environmental substance in a reaction that its products are environmental materials too. The unknown chemical exergy of the chemical is obtained by the first and second law analyses of the reactor. For example, we once more assume that it is required to calculate the molar chemical exergy of fuel with a general molecular formula of CaHb. The sample chemical reaction is:   b b (2.58) Ca Hb + a + O2 >aCO2 + H2 O 4 2 It is clear that CaHb is reacted with O2 as an environmental material and generated CO2 and H2O, which both are also environmental substances. Therefore, Eq. (2.58) is the required hypothetical reaction that is required to give the molar chemical reaction of CaHb. The sample chemical reactor is illustrated in Fig. 2.7. In Fig. 2.7, the oxygen as environmental substances is separated by a semipermeable membrane at the dead state and passed through an isothermal reversible compressor and fed into the reactor at restricted dead state condition. The products of combustion, that is, CO2 and H2O first at restricted dead state, are separated by semipermeable membranes and directed into isothermal reversible turbines. Then they expanded and returned to the environment at the dead state conditions. The maximum theoretical work of this reaction (wmax ) is the summation of the work of reactor (wcv ) and the net output work of the imaginary turbine-compressor system (wtc ). This is equal to the molar specific chemical exergy of CaHb. In Fig. 2.7, semipermeable membranes are theoretical devices that only permit the transmission of one substance and prevent the passage of other materials. For example, it permits to pass only oxygen so it can be used to separate oxygen from the environment.

52

2. Thermal modeling and analysis

FIG. 2.7 Schematic of a sample chemical reactor for calculation of the molar chemical exergy of CaHb.

exCH wcv + wtc Ca Hb ¼ wmax ¼     b b wtc ¼ awt,CO2 + wt,H2 O  a + wc,O2 2 4 CH CH wt,CO2 ¼ exCH CO2 , wt,H2 O ¼ exH2 O , wc, O2 ¼ exO2 Therefore, we have: CH exCH Ca Hb ¼ wcv + aexCO2 +

    b b exCH  a + exCH H2 O O2 2 4

(2.59)

For the reactor (control volume), expressions of the energy and entropy balances are:   b b wcv ¼ qcv + hCa Hb + a + hO2  ahCO2  hH2 O (2.60a) 4 4   qcv b b + sCa Hb + a + sO2  asCO2  sH2 O + Sgen ¼ 0 0 (2.60b) 4 4 T Reversible process : Sgen ¼ 0

2.4 Fundamental of exergetic analysis

By eliminating qcv between Eqs. (2.60a) and (2.60b), we have:

  b b wcv ¼ hCa Hb + a + hO2  ahCO2  hH2 O 4

 4 b b 0  T s Ca H b + a + sO2  asCO2  sH2 O 4 4

53

(2.61)

On the other hand, we have:

  b b h Ca H b + a + hO2  ahCO2  hH2 O ¼ hRP ¼ HHV Ca Hb 4 4 Therefore,

  b b wcv ¼ HHV Ca Hb + T0 sCa Hb + a + sO2  asCO2  sH2 O 4 4

(2.62a)

Eq. (2.61) can be expressed in another form considering that μ ¼ g ¼ h  Ts (T ¼ T0); therefore, we have:

  b b wcv ¼ μCa Hb + a + (2.62b) μ  aμCO2  μH2 O ¼ ΔG0RP 4 O2 4 Substituting Eq. (2.62a) or Eq. (2.62b) into Eq. (2.59) leads to two expressions for the specific molar chemical exergy of CaHb as follows:

  b b 0 exCH ¼ HHV + T s + a + s  as  s Ca Hb Ca Hb O2 CO2 H O Ca Hb 4 2    4 (2.63a) b b CH CH + aexCH + ex  a + ex CO2 H2 O O2 2 4

  b b CH exCa Hb ¼ μCa Hb + a + μO2  aμCO2  μH2 O  4  4 b b + aexCH exCH exCH (2.63b) CO2 + H2 O  a + O2 2 4     b b ¼ ΔG0RP + aexCH exCH exCH CO2 + H2 O  a + O2 2 4 CH CH In Eqs. (2.63a) and (2.63b), exCH CO2 , exH2 O , and exO2 are molar chemical exergies of three environmental substance that are known and could be determined using Eq. (2.57). However, Eq. (2.63a) is a special form of the equation that was obtained only for calculation of the specific molar chemical exergy of CaHb, Eq. (2.63b) is a more useful form of the equation that can be extended for any nonenvironmental substance as following the form: " # X X CH 0 CH CH exi ¼ ΔGRP + vP exP  vR exR (2.64) P

R6¼i

where P and R stand for products and reactants of the sample chemical reaction, and v is the stoichiometric coefficient of each chemical in the reaction. In Eq. (2.64), If it is intended to

54

2. Thermal modeling and analysis

determine molar-specific chemical exergy of material i, in the left-hand side of the equation, all reactants except the material i must be considered (R 6¼ i). This procedure that was presented for the calculation of the specific molar chemical exergy of CaHb can be repeated and extended for other materials (based on Eq. 2.64). It was performed by others, and results were published in tabulated data of chemical exergy of substances. A typical table of the specific molar chemical exergy for different substances is provided in the appendix of this book. Example Calculate specific molar chemical exergy of NH3 and compare it with the tabulated value indicated in Table A.1. Solution The sample chemical reaction of the NH3 with O2 as an environmental material is: 3 1 3 NH3 + O2 > N2 + H2 O 4 2 2 As it is clear, the products of the chemical reaction are environmental materials too. From Eq. (2.64), we have:

1 CH 3 CH 3 CH CH 0 exNH3 ¼ ΔGRP + exN2 + exH2 O  exO2 2 2 4

3 1 3 1 3 CH 3 CH ¼ μNH3 + μO2  μN2  μH2 O + exCH + ex  ex 4 2 2 2 N2 2 H2 O 4 O2 The molar chemical exergies of environmental materials including O2, N2, and H2O can be determined by Eq. (2.57) based on their molar fraction or partial pressure in the atmosphere. Therefore, we have: 1 1 1 CH CH exCH N2 ¼ 639kJ kmol , exH2 O ¼ 45 kJ kmol , exO2 ¼ 3951kJ kmol

For chemical potentials of material based on data given in chemical properties tables, for example, Table C-1 of [5], we have: μNH3 ¼ 103491kJ kmol1 ,μO2 ¼ 61164kJ kmol1 μN2 ¼ 57128kJ kmol1 , μH2 O ¼ 306685kJ kmol1 Substituting values in the equation of chemical exergy of NH3 leads to:

3 1 3  ð 61164 Þ   ð 57128 Þ   ð 306685 Þ exCH ¼ 103491 + NH3 4 2 2

1 3 3 +  639 +  45   3951 ¼ 336650kJ kmol1 2 2 4 1 In Table A.1, it was reported to be exCH NH3 ¼ 336684kJ kmol , which is quite close to the calculated value.

• Chemical exergy of mixtures: In many cases, the chemical exergy of the mixture must be calculated based on the chemical exergy of its components. By definition, the reduction of the chemical exergy of a mixture due

55

2.4 Fundamental of exergetic analysis

to the mixing process (which is an irreversible thermodynamic process) is a minimum required work for separation of the mixture to its subcomponents so that each species is delivered in restricted dead state. The chemical exergy of a mixture of an ideal gas was determined in Ref. [6] using a hypothetical system illustrated in Fig. 2.8. In this system, one mole of a mixture of n component are separated by numbers of semipermeable membrane (n) at each species partial pressure (P0, i) and the environmental temperature (T0); then, each component is pressurized into the atmospheric pressure (P0) by isothermal reversible compressors in series and delivered at restricted state (T0 and P0). The change of the chemical exergy due to the mixing process is equivalent to the total consumed compression work of n the reversible compressor. Therefore, we have: Wtot ¼

n X

yi wi, rev ¼ RT0

n X

i¼1

ðyi ln ðyi ÞÞ

i¼1

For the entire system given in Fig. 2.8 by the balance of exergy, we know that: exCH M ¼

n X

yi exCH i + Δexmixing ¼

i¼1

n X

yi exCH i +

i¼1

n X

yi wCi

i¼1

substituting RT0 lnðyi Þ instead of wCi , in the above equation, we obtain: exCH M ¼

n X i¼1

yi exCH i + RT0

n X

yi ln ðyi Þ

i¼1

FIG. 2.8 A typical system for separation of one mole of a gaseous mixture composed of n components.

(2.65)

56

2. Thermal modeling and analysis

Since yi < 1, the second term in the right-hand side of Eq. (2.65) (RT0

n P i¼1

yi lnðyi Þ) has a neg-

ative value; therefore, through mixing, the chemical exergy of the mixture is less than what is n P predicted by the summation of the chemical exergy of its subcomponent ( yi exCH i ). The difi¼1

ference is precisely equivalent to exergy destruction due to the irreversibility of the mixing process. Therefore, we have: n X exCH < yi exCH (2.66) M i i¼1

In general, when the mixture is not a mixture of ideal gases, Eq. (2.65) has the following general form [6]: n n X X CH exCH ¼ y ex + RT yi ln ðγ i yi Þ (2.67) i 0 M i i¼1

i¼1

where γ i is the activity coefficient of the ith species in the mixture. For more detail regarding the activity coefficient, refer to Ref. [3]. 2.4.2.4 Balance of the exergy in a control volume As discussed, exergy is transferred into a control volume in three ways: work transfer, heat transfer, and mass flow. In Sections 2.4.2.1, 2.4.2.2, and 2.4.2.3, these three components and their subcomponents were formulated in detail. However, there is no conservation of exergy in systems; by considering a term called exergy destruction (ExD), a similar balance equation to the balance of energy can be written for exergy too. The exergy destruction, which sometimes is called irreversibility (I) in some literature ([6]), is the exergy that is destroyed in the system due to the effect of irreversibilities that generate entropy (Sgen). Therefore, ExD ≡ I. The relation between exergy destruction and entropy generation in systems is described by the Gouy-Stodola equation as follows: ExD ¼ I ¼ T0 :Sgen (2.68) _ D ¼ I_ ¼ T0 :S_ gen Ex In Ref. [6], the Gouy-Stodola theorem was examined on three irreversible thermodynamic processes such as a heat transfer process, a sudden expansion process, and a dissipative process and it was shown that the irreversibilities (exergy destruction) and entropy generations of these process are related by Eq. (2.68), and this equation can be extended to any irreversible thermodynamic process. In Eq. (2.68), the entropy generation of a system can be evaluated by entropy balance equations that previously given for close and open systems by Eqs. (2.22) and (2.23a, b), respectively. Therefore, we have: 0

X

_ D ¼ T0 @dScv + _ e se  m Ex dt OUT

X IN

ð _ i si  m b

_ Q T

!1 A b

(2.69a)

2.4 Fundamental of exergetic analysis

0

1 ð _! X X Q _ D ¼ T0 @ A _ e se  _ i si  m m SSSF : Ex T IN OUT b

57 (2.69b)

b

Consider that the control volume is a schematic that is depicted in Fig. 2.9. For this control volume, the exergy balance equation can be expressed as follows: dExcv ¼ dt

  X  ð X T0 _ _ s  P0 dV cv + _ D _ i :exi Þ  _ e :exe Þ  Ex 1 ðm ðm Q W Tb dt e i

(2.70a)

A

_ s and Tb are shaft power and temperature on the boundary of the control volume where W (Tb ¼ Tb(A)). In Eq. (2.70), P0 dVdtcv is related to work done by the system to the environment or vice versa due to change in the volume of the control volume (movement of the system boundary). Moreover, ex is the specific flow exergy that is obtained by Eq. (2.49b). In Eq. (2.70), Excv is the related term of the exergy of the contents of the control volume, which is called nonflow exergy, and it will be evaluated in Section 2.4.3 (Excv ¼ mcv. exnf where exnf is the specific non-flow exergy). For SSSF process, all time derivatives of Eq. (2.70a) are eliminated (d =dt ¼ 0). Therefore, it is not required to evaluate the nonflow exergy of the control volume’s contents and Eq. (2.70a) is simplified as follows: ð 1 A

 X X T0 _ _ + _ D¼0 _ i :exi Þ  _ e :exe Þ  Ex ðm ðm Q W Tb e i

(2.70b)

Exergy destruction of a system could be calculated either by the exergy balance equation or by the Gouy-Stodola correlation, and the results of the two equations should not be different. Sometimes, in exergy balance equation, there is an unknown more than the exergy destruction (two unknowns, for example, the outlet exergy of one stream plus the exergy destruction); in such cases, the exergy destruction and Gouy-Stodola correlation must be used together to form a system of two equations and two variables. If the case is not so, one equation is enough.

Exhaust streams

Inlet streams

Control region

FIG. 2.9 Schematic of exergy transfers of an open system (control volume).

58

2. Thermal modeling and analysis

2.4.3 Nonflow exergy for analysis of closed systems (control masses) In some instances, the energy system can be approximated by closed thermodynamic systems. For example, different types of internal combustion engines, Stirling engines, and calorimeters are those energy systems that can be analyzed with this assumption. The first and second law analyses of closed systems were given in Sections 2.3.1 and 2.3.2. However, the exergetic analysis of this type of thermodynamic cycle is given in this section. In comparison to an open system, exergy is transferred in a closed system only by work and heat transfers. The quantities of transferred exergy through the work and heat transfers are determined in a similar manner to the case of open systems that were already presented in Sections 2.4.2.1 and 2.4.2.2. However, in the balance of exergy, a term related to the content of the system appears. Since the content material of the system is not in equilibrium with the environment, this material contains a type of exergy that is effective in the balance of the system’s exergy. This is called nonflow exergy and denoted by Exnf. For nonflow exergy, we have: Exnf ¼ msys :exnf

(2.71)

where exnf is the specific nonflow exergy (kJ kg1) and msys is the mass of the system. The nonflow exergy is also to the flow exergy is composed of the four components, including potential, kinetic, chemical, and physical exergies. The potential, kinetic, and chemical exergies are quite the same as what already obtained for these components of flow exergy in previous sections. However, nonflow physical exergy is different from the physical exergy of the flow. PH exnf ¼ exKnf + exPnf + exCH nf + exnf 2 v CH exKnf ¼ exK ¼ , exPnf ¼ exP ¼ gz, exCH nf ¼ ex 2 PH exPH nf 6¼ ex

(2.72)

The physical nonflow exergy in a closed system is determined by considering a hypothetical system of a cylinder and a frictionless piston that a unit mass of matter is entered to the cylinder by a valve, and after entering this unit mass, the valve is closed, and the piston is moved [6]. This process is assumed to be reversible since there is no friction between cylinder and piston, and the mass is entered to the cylinder very slowly in a manner that no turbulent dissipation occurs. If the movement of the piston is denoted by d and the pressure in the cylinder is P, and the pressure outside of the cylinder (environmental pressure) is P0, the work conducted by the piston is: w ¼ F:d ¼ ðP  P0 ÞAp :d ) w ¼ ðP  P0 ÞV AP :d ¼ V where V is the volume of the cylinder after the movement of the piston to its final position. Since a unit mass of the material is entered into the cylinder (1 kg s1), V ¼ v, where is the specific volume of the material (m3 kg1). Hence, the conducted work by the piston movement is: w ¼ ðP  P0 Þv

2.4 Fundamental of exergetic analysis

59

The mass entered to the cylinder (a unit mass) had the flow exergy of ex ¼ exK + exP + exPH + exCH. From this amount, the work of the piston movement is reduced; therefore, the difference remains in the content of the cylinder as nonflow exergy as follows:  PH  PH K P CH exnf ¼ ex  w ¼ 8ex + ex + ex 2 + ex  ðP  P0 Þv ex  ðP  P0 ÞV v < K CH exnf ¼ exK ¼ , exPnf ¼ exP ¼ gz, exCH nf ¼ ex ) 2 : exPH ¼ exPH  ðP  P Þv 0

nf

On the other hand, by substituting the value of the physical exergy of the flow from Eq. (2.51), we obtain: 9 exPH = nf ¼ ðh  h0 Þ  T0 ðs  s0 Þ  ðP  P0 Þv ¼ ðu + Pv  u0  P0 v0 Þ  T0 ðs  s0 Þ  ðPv  P0 vÞ ) ; (2.73) ¼ ðu + Pv  u0  P0 v0  Pv + P0 vÞ  T0 ðs  s0 Þ exPH nf ¼ ðu  u0 Þ  P0 ðv  v0 Þ  T0 ðs  s0 Þ In Eq. (2.73), (u  P0v  T0s) is called specific nonflow physical exergy function: βnf ¼ u  P0 v  T0 s

(2.74)

For specific physical exergy of the flow, we had: β ¼ h  T0 s ¼ u + Pv  T0 s

(2.75)

Comparing βnf and β indicates that, however, physical exergy of flow depends only on the temperature of the environment, nonflow physical exergy depends on both T0 and P0 of the environment. • Balance of exergy in closed systems: The balance of exergy for a closed system, which undergoes process between state 1 and 2 (1 ! 2), is given as follows [5]:  ð2  T0 δQ  ½Ws  P0 ðV2  V1 Þ  ExD Exnf ,2  Exnf , 2 ¼ 1 Tb 1 (2.76) where

 K P CH PH Exnf ¼ m exnf + exnf + exnf + exnf In Eq. (2.76), Ws is the shaft work during process 1 ! 2 and ExD is the exergy destruction or irreversibly (I), which can also be calculated from Gouy-Stodola correlation in a closed system as follows: 0 22 31 ð  δQ 5A (2.77) ExD ¼ T0 Sgen ¼ T0 @mðs2  s1 Þ  4 T b 1

The exergy balance equation in time rate for a closed system is:

60

2. Thermal modeling and analysis

dExnf , sys ¼ dt where

ð A



dV sys T0 _ _ _ D 1 ðV2  V1 Þ  Ex Q  W s  P0 Tb dt

1 ð _ dS _ D ¼ T0 S_ gen ¼ T0 @ sys  Q A Ex dt Tb

(2.78)

0

(2.79)

A

If the process is SSSF, that is,

d dt ¼ 0,

the balance of exergy for the closed system becomes:  ð T0 _ _ s _ D¼ 1 Ex Q W Tb A ð _ (2.80) _ExD ¼ T0 S_ gen ¼ T0 Q Tb A

2.5 Thermal assessment of energy system based on the exergy concepts Exergetic analysis is performed to assess the thermodynamic performance of energy systems. In this regard, different parameters are defined and used. Based on these parameters, the energy system may improve or optimized by a thermodynamic viewpoint. Different terms are used and defined for thermal assessment of the energy system, including exergy destruction, exergy loss, exergetic efficiency, efficiency defect, and relative irreversibility.

2.5.1 Exergy destruction vs. exergy loss In the exergetic analysis of energy systems, we face two terms, that is, exergy destruction and exergy loss. However, two terms are similar in verbal lexically in the technical aspect of analyzing energy systems that are quite different. • Exergy destruction or internal irreversibility: _ D , is the exergy that is destroyed within Exergy destruction, which is denoted by ExD or Ex the system boundary due to the effects of irreversibilities that generate the entropy. Therefore, it is proportional to the entropy generation, as previously explained in Sections 2.4.2 and 2.4.3, by introducing the Gouy-Stodola equation. In some reference, exergy destruction may be called the irreversibility or, in a more exact term, the internal irreversibility and denoted _ In some references, it is also called the lost work. by I or I. • Exergy loss or external irreversibility: _ L , is the exergy that becomes unavailable Exergy loss, which is denoted by ExL or Ex through leaving the energy system and is exhausted to the environment. There are two main ways that exergy is lost to the environment, that is, the heat loss to the environment through

2.5 Thermal assessment of energy system based on the exergy concepts

61

the boundary of the energy system, which is at different temperatures to the environment’s temperature, and through the exhaust of material, which contains exergy to the environment. Since exhaust material contains physical, chemical, kinetic, and potential exergies, this causes the loss of exergy to the environment. Exergy loss is sometimes called as external irreversibility since, in this case, also irreversibility effect that exists outside of the system boundary leads to the leakage of the system’s exergy to the environment. In the case of heat loss, the finite temperature difference between the system boundary and the environment, which is the irreversibility that exists outside of the system’s boundary, leads to heat loss and, therefore, exergy loss. When a material is exhausted to the environment due to the in temperature, pressure, and chemical-potential gradients, which are all sources of irreversibility (that are exist outside the system’s boundary), exergy is lost to the environment. Therefore, since the source of the exergy loss of the energy system is irreversible outside the system boundary, this term is also called the external irreversibility. For exergy loss of an energy system, we have:  8ð  T _ > < 1 0 Q Through the heat loss to surrounding 0 Tb _ L¼ Ex >  :A  K _ ex ex + exP + exPH + exCH ex Through the material’s exhuast to surrounding m (2.81) Exergy destruction and loss are defined for all components of an energy system. If an energy system is composed of n components or subsystems, the total exergy destruction and loss of the entire energy system are: _ D ¼ Ex tot

n X

_ D Ex k

(2.82a)

_ L Ex k

(2.82b)

k¼1

_ L ¼ Ex tot

n X k¼1

_ D and Ex _ L are exergy destruction and loss of the kth component (subsystem), where Ex k k respectively. • Effect of the system’s boundary: As discussed, exergy destruction and exergy loss are caused by internal and external irreversibilities, respectively. Since external and internal irreversibilities depend on the boundary of the system and the boundary of the system, in thermodynamics, the boundary of the system is selected by the preference of researchers and engineers. Therefore, for an energy system, different boundaries may be defined. Since by the variation of the system’s boundary, _ D and Ex _ L for a external and internal irreversibilities may interchange, absolute values of Ex k k system are changed when the system’s boundary is changed. Therefore, absolute values of _ D and Ex _ L are dependent on the system’s boundary; but, by changing the system’s boundEx k k _ D + Ex _ L are unchanged and are not dependent on the system’s ary, the absolute values of Ex k k boundary. Therefore, for a given energy system, we have:   _ D + Ex _ L ¼ Const: Irrespective to the system’s boundary Ex (2.83) k k

62

2. Thermal modeling and analysis

• Exergy destruction is sample process: Exergy is destructed in energy systems due to various sources of irreversibilities. Among them, heat transfer due to finite temperature difference and friction is more common in designing energy systems including heat exchange devices (heat exchangers, boilers, heat convectors, heating, and cooling chambers, cooling towers and condenser, vaporizer, and so on) and piping networks. In this part, expressions for exergy destructions in heat transfer and friction loss processes are presented. These expressions give essential conclusions for the design of energy systems to achieve higher thermal performance. (i) Heat transfer process: Consider a heat exchanger that consists of hot fluid and a cold stream separated from each other by a solid wall (e.g., a tube’s wall), as illustrated in Fig. 2.10. The lower part of Fig. 2.10 shows the temperature profiles of the hot and cold streams along with the heat exchanger. From the heat balance equation, it is known that: _ ) mc _ ¼Q _ h¼Q _ p,h ðThi  The Þ ¼ mc _ p,c ðTce  Tci Þ Q c where subscripts h, c, i, and e are given for hot and cold streams, inlet, and exit (outlet), respectively. The heat balance equation given above shows that the thermal load that is entered into the _ ) is equivalent to the thermal load that leaves the solid wall at its upper side (hot side)(Q h _ ) that enters to the cold stream. For thermal lower boundary of the solid wall (cold side)(Q c exergy flows to the upper boundary and from the lower boundary of the solid wall, there is no

FIG. 2.10 A schematic of the heat transfer process in a heat exchanger (Th : Thermodynamic average temperature of the hot stream; Tc : Thermodynamic average temperature of the cold stream).

2.5 Thermal assessment of energy system based on the exergy concepts

63

_ Q 6¼ Ex _ Q , the difference is equivalent to exergy destrucbalance of thermal exergy, that is, Ex c h tion due to the heat transfer, therefore: _ Q  Ex _ Q _ D ¼ Ex Ex c  ΔT h   _ 1  T0 _ 1  T0 ¼ Q _ExQ ¼ Q h h Twh Twh   _ 1  T0 _ c 1  T0 ¼ Q _ExQ ¼ Q c Twc Twc where Twh and Twc are the wall’s temperatures at the hot and cold sides, respectively. These temperatures can be approximated by thermodynamic average temperatures of the hot and cold streams, therefore:   8 T0 Q > _ _ > ¼ Q 1  Ex < h T h  Twh ’ Th ,Twc ’ T c ) > > _ 1  T0 _ Q¼Q : Ex c Tc Therefore, we have:

    _ 1  T0 _ 1  T0  Q _ D ¼ Ex _ Q  Ex _ Q¼ Q Ex ΔT c h Th Tc

Finally, following expression for exergy destruction due to the heat transfer process is obtained:   _ 0 Th  Tc _ExD ¼ QT (2.84) ΔT T h :Tc   _ T h  Tc , we have: Since Q∝   _ D ∝ Th  Tc 2 Ex ΔT

(2.85)

Based on this analysis, it can be concluded that: 1. Exergy destruction due to the heat transfer is proportional to the thermal load that is _ transferred, Q. 2. Exergy destruction due to heat transfer is proportional to the square of the temperature difference between two sources, see Eq. (2.85). 3. When the temperature level of two sources is reduced, the exergy destruction due to the _ D ∝ 1=T h :Tc . Therefore, exergy heat transfer is increased and vice versa, that is Ex ΔT destruction in low temperature operating heat exchangers is more severe than similar exchangers that operate at higher temperatures. (ii) Friction loss process: The flow of a stream in a path with the friction effect is illustrated in Fig. 2.11. In general, this flow can transfer heat to the environment or other sources (like the case of flow through a heat exchanger), so the inlet temperature of the flow is, Ti and outlet

64

FIG. 2.11

2. Thermal modeling and analysis

A schematic of a flow with friction loss along a path (pipe or heat exchanger).

temperature (exhaust temperature) is Te; accordingly, the thermodynamic average temperature of the stream is denoted by T. The SSSF exergy balance equation for the given system (Eq. 2.70b) is:   _ +m _ExD ¼  1  T0 Q _ ðexi  exe Þ 0 f T   T0 _ _ ½ðhi  he Þ  T0 ðsi  se Þ ¼ 1 Q0 + m T   T0 _ ð hi  he Þ + m _ ½ðhi  he Þ  T0 ðsi  se Þ ¼ 1 m T

ð h i  he Þ _ 0  ðsi  se Þ ¼ mT T If the expression for the thermodynamic average temperature for incompressible flow (Eq. 2.47b) is substituted in the above equation, we have: 2 3 6ðh  he Þðse  si Þ 7 _ D _ 6 i  ð si  s e Þ 7 Ex f , incomp:flow ¼ mT0 4 5 ΔP ð he  hi Þ  ρ

3 2 ΔP ðh  he Þðse  si Þ  ðsi  se Þ ðhe  hi Þ  6 i ρ 7 7 _ 06 ¼ mT 4 5 ΔP ð he  hi Þ  ρ

3 2 ΔP ðsi  se Þ 6 7 ρ 7 _ 06 ¼ mT 4 ΔP 5 ðhe  hi Þ  ρ

2.5 Thermal assessment of energy system based on the exergy concepts

65

By further simplification, we have:       T  T0 ΔP T0 0 _ ΔP _ D _ ¼ m ΔP ¼ Ex V W ¼ f , incomp:flow ρ (2.86a) T T T _ W ΔP ¼V ΔP  3 1  _ ΔP is the required _ where V is the volumetric flow rate of the flow (V ¼ m=ρ m s ) and W pumping power to overcome the pressure loss. The actual pumping power is: _ ΔP =η _ pump ¼ W W pump where ηpump is the efficiency of the pump; therefore, we have:    T0 _ pump _ D Ex ηpump W ¼ (2.86b) f , incomp:flow T 







In Eq. (2.86a), ΔP is the pressure drop that can be estimated by the Darcy-Weisbach equation that was given in the mechanics of fluid [4]; hence, we have:  2       f ð L =D Þ v =2 T T0 L e v2 e h 0 D _ _ (2.87) f ¼V ¼ m Ex f , incomp:flow Dh 2 ρ T T 

where Le and Dh are the equivalent length of flow’s path and the hydraulic diameter, respectively. The equivalent length of the flow’s path contains the real length plus equivalent length of minor pressure losses [4]. Moreover, v is the average speed of the flow. The hydraulic diameter of a flow path is calculated based on the cross-section area of the flow (Ac) and the wet perimeter of the pipe (Pw) as follows [4]: Dh ¼

4Ac Pw

(2.88)

It is clear that for a circular pipe, the hydraulic diameter of the pipe is equivalent to the geometrical diameter, that is, Dh ¼ D. For the average speed of the flow, we have: 

_ m V ¼ v¼ ρAc Ac

(2.89)

Substituting Eqs. (2.88) and (2.89) into Eq. (2.87) leads to the final expression for exergy destruction due to the flow’s friction:    Pw Le 3 T0 _ExD (2.90) f , incomp:flow ¼ fV 8A2c T 

For a circular pipe or tube, Eq. (2.90) is simplified as follows:    Le 3 T0 _ D ¼ fV ForaCircular Pipe : Ex f ,incomp:flow D T 

(2.91)

In Eqs. (2.87), (2.90), and (2.91), f is the friction factor that is obtained from Moody chart [4] as a function of the Reynolds number of the flow (Re) and the relative roughness of the tube (ε/Dh). f ¼ f ð Re, ε=Dh Þ ρvDh where : Re ¼ μ

(2.92)

66

2. Thermal modeling and analysis

In Eq. (2.92), ε is the roughness of the pipe or tube and μ is the average viscosity of the fluid (Pa. s). For a compressible flow, the general expression for exergy destruction due to the friction is:   ðe T0 _ D _ Ex ¼ m vdP (2.93) f , comp:flow T i Based on obtained equations for exergy destruction due to the effect of the friction, it can be concluded that: 1. The exergy loss due to the friction effect is proportional to the cubic power of the flow rate _ D∝ m _ 3 ); therefore, the main pipelines of an energy system that carry a large amount of (Ex f flow are associated with the most considerable part of exergy destruction due to the friction within the plant. Therefore, special care must be given for the design and sizing of main pipelines. Considering this fact, the main pipeline must be designed with a lower flow velocity than branches. 2. Since the exergy loss due to the friction has a reverse correlation with the flow temperature _ D ∝ 1=T), in similar conditions, the exergy destruction of cold flows is more severe to hot (Ex f flows. Therefore, special care must be provided in the design and sizing of piping systems that carry cold flow like to the case of refrigerant piping in refrigeration and cryogenic systems. In designing inlet blade of multistage compressors and outlet blades of multistage turbines where the flow is colder than other stages, blades must be very smooth and compatible with steam flow in order to reduce the exergy destruction due to the friction, that is, to increase isentropic efficiency of the stage and the overall system as well. 3. Based on Eq. (2.86a), when the flow in the pipeline is colder than the atmosphere we have:  _ ΔP . It means that the exergy loss due to the friction is more _ D>W T < T0 ) T0 =T > 1 ) Ex f   _ ΔP ). Once more, _ D T0 ) T0 =T < 1 ) Ex f it indicates why the pressure drop in low-temperature systems is more crucial than high-temperature systems. _ D ∝ Le =Dh . For a piping system Le is fixed and 4. Based on Eq. (2.87), it can be found that Ex f _ D ∝1=Dh . It means that if dependent on the geometry and layout of the plant; therefore, Ex f the size of the pipe is increased, the exergy destruction due to the effect of pressure drop is reduced and vice versa. On the other hand, increasing the pipe diameter leads to an increase in the capital cost of the piping. Therefore, in practice, a trade-off between the capital cost of the piping and the cost of exergy destruction due to the pressure drop (pumping cost) must be performed to obtain an optimal size of pipes, that is, Dopt. For low-temperature systems, the optimal size of the pipe must be higher than the similar piping that works with the hotter flow (if other conditions are the same).

2.5.2 Exergetic efficiency The efficiency of a system in any system by any field of study (thermodynamics, engineering, economic, social science, etc.) is defined as the ratio of the outcome of the system to resources that consumes in that system to obtain that outcomes. This rule is applicable in energy and exergy analyses too. Therefore, from the energy point of view, as indicated in the classical thermodynamics, the energy efficiency (thermal energy) of a power plant (ηth) is defined as

2.5 Thermal assessment of energy system based on the exergy concepts

67

_ net ) to the thermal resources that spend on the power plant the net generated power (W _ f :HHV f or ¼ m _ f :LHV f ). For a refrigeration system, the energy efficiency, which is known (¼ m _ ) as the outcome of the system as the coefficient of performance (COP), is the cooling load (Q c to the energy resources that are spent in compressor (vapor-compression systems) or generator (absorption system). Sometimes, for systems, the efficiency is defined as the ratio of the outcomes of the actual operation of the system to the ideal theoretical outcomes of that system. For example, in a heat exchanger, the thermal efficiency is defined by the ratio of the exchanged thermal load to maximum theoretical thermal load that can be transferred in a heat exchanger. Similar systems like humidifiers, dehumidifiers, and isentropic efficiencies are classified in this category. In the exergy analysis, the exergetic efficiency is defined by the above rule, while both outcomes and consumed resources are quantified by the exergy viewpoint. In this regard, two terminologies are defined: product exergy and fuel exergy. • Product exergy: The product of any energy system is defined based on the aim that is behind the acquisition and utilization of that system. If this product is rated by the exergy that it _ P . For example, the aim carries, the term is called as the product exergy and denoted by Ex of the usage of a pump is providing the head to the flow. From an exergetic viewpoint, this can be weighed by the physical exergy (or in more accurate expression, pressure exergy) _ P ¼ ΔEx _ PH ¼ that pump imposed on the flow. Hence, the product exergy of that pump is Ex  PH    _ ΔP or in a more accurate evaluation, Ex _ ΔP ¼ Ex _ ΔP  Ex _ ΔP . _ _ P ¼ ΔEx Ex 2  Ex1 2 1 • Fuel exergy: Fuel exergy is the exergetic value of resources that are dedicated to the energy system to produce the products of the system. It is not necessarily equivalent to the terminology of the fuel that is used in other areas like natural gas and gasoline. The fuel _ F . For example, for a pump, the fuel exergy is the mechanical power exergy is denoted by Ex that is consumed by the pump to provide the hydraulic head for the flow, that is, _ pump . _ F¼W Ex The exergetic efficiency of a system is defined as the ratio of the product’s exergy to the fuel’s exergy. ε¼

_ P Ex _ F Ex

(2.94)

Exergetic efficiency is defined for both the energy system and its subcomponents. For example, for a power plant, the exergetic efficiency is defined while for its subcomponents, for example, boiler, turbine, pumps, and heat exchangers, the exergetic efficiency can also be defined item by item. 2.5.2.1 Overall exergetic efficiency of sample energy systems Some examples of the definition for overall exergetic efficiency of various energy systems are given as follows: • The exergetic efficiency of a power plant is: εpower plant ¼

_ net W _ f :exCH m f

(2.95)

68

2. Thermal modeling and analysis

_ f and exCH where m are the mass flow rate of fuel and the specific chemical exergy of the fuel, f respectively. • For a vapor compression refrigeration system, the exergetic efficiency is:

εref

  _ 1  T0 Q c Tc ¼ _ W comp

(2.96a)

_ and Tc are the cooling load and the average thermodynamic temperature of the where Q c cooling medium, respectively. For a heat pump, in heating mode, Eq. (2.60a) is:   T0 _ Qh 1  Th (2.96b) εhp ¼ _ comp W

• For an absorption refrigeration system in cooling and heating modes, we have:

εabs, cooling ¼ "

  T0 _ Qc 1  Tc _ pump + Q _g W

T0 1 Tg

!# , εabs, heating ¼ "

  T0 _ Qh 1  Th _ pump + Q _g W

T0 1 Tg

!#

(2.96c)

_ g and Tg are the heat loads of the regenerator and the average thermodynamic temwhere Q perature within the generator, respectively. • For a desalination plant for the production of the freshwater from the saltwater, the exergetic efficiency is: _ CH  Ex _ CH _ CH Ex ΔEx sw fw w  ¼

  εdes ¼

(2.97) T T0 0 _ _ _ _ W elec + Q 1  W elec + Q 1  T T

 T0 _ _ where W elec + Q 1  T is the fuel exergy, including electric power and thermal exergy of resources that are delivered to the desalination for the saltwater treatment. The product exergy of the desalination system is the difference in chemical exergy of the fresh outlet water and _ CH ). _ P ¼ ΔEx intake saltwater (Ex w des 2.5.2.2 Examples of the exergetic efficiency at the component level As discussed, the exergetic efficiency can also be defined at the component level of an energy system. Some example, for different equipment, is given in this section as a guideline.

2.5 Thermal assessment of energy system based on the exergy concepts

69

(i) Exergetic efficiency of turbomachines that consume power (compressors, pumps, fans, and blower):  9 PH _ PH  Ex _ PH Ex _ PH m _ exPH ΔEx = 2  ex1 c 2 1 exPH  exPH ¼ ¼ εc ¼ 1 _ c _ c _ c ) εc ¼ 2 W W W ; h  h 2 1 _ c¼m _ ð h2  h1 Þ For an adiabatic system : W

(2.97a)

where the product’s exergy is defined as the difference between the physical exergy of the  PH _ P¼m _ exPH ), and fuel outlet stream and the inlet stream of these turbomachines (Ex 2  ex1 _ c ). Since the aim in _ F¼W exergy consumes the power of the compression process (Ex employing this kind of turbomachines is the change in the head of the working fluid, in a more sophisticated analysis, the product’s exergy of these equipment to  can beΔPconsidered  _ P¼m _ exΔP , the change be the difference in the pressure exergy of the stream, that is, Ex 2  ex1 in temperature exergy of the stream and be assumed to be an exergy loss   ΔT _ L¼m _ exΔT ) if this exergy is not used at the downstream. In such a case, the (Ex 2  ex1 exergetic efficiency is: εc ¼

ΔP exΔP 2  ex1 h 2  h1

(2.97b)

In cases, it is assumed that the thermal exergy of the stream can be used at downstream, Eq. (2.97a) is more rational than Eq. (2.97b). Both expressions (Eqs. 2.97a and 2.97b) are correct and are used with different logic based on the judgment of engineers. For compressors and pumps, in the classical thermodynamics, isentropic efficiency is defined, which is denoted by ηsc and defined as: ηsc ¼ wc, isent/wc, act ¼ (h2s  h1)/(h2  h1). It can be shown that the isentropic efficiency and exergetic efficiency of a compressor correlate each other as follows [6]:

  i ð1  ηsc Þ (2.97c) εc ¼ 1  r where i is the specific irreversibility (which is equal with the specific exergy destruction (exD c ) and r is called frictional reheat, which is defined as the difference between actual outlet enthalpy and isentropic outlet enthalpy, that is, r ¼ h2  h2s. Frictional reheat implies that the outlet stream of the actual compression process is warmer than the corresponding outlet stream at isentropic condition; therefore, the actual outlet stream contains a higher value of the physical exergy compared to the physical exergy of the isentropic outlet flow. It is a possibility to recover this additional physical exergy of the real outlet stream in the actual compression process in downstream equipment. It was shown in Ref. [6], that only a part equivalent to r  i of this additional physical exergy could be recovered in downstream equipment, theoretically. Through the graphical representation of the actual and isentropic compression processes on the temperature-entropy diagram, it can be shown that [6]: 9   T2  T2s = r T ðs2  s1 Þ ¼ T2 ðs2  s1 Þ r’ 2 ) ’ ¼ T2∗ (2.97d) 2 ; i T0 i ¼ T0 ðs2  s1 Þ

70

2. Thermal modeling and analysis

where T∗2 is called the dimensionless mean exhaust temperature. If Eq. (2.97d) is substituted in Eq. (2.97c), we have:

  1 1  η ð Þ (2.97e) εc ¼ 1  sc T2∗ Eq. (2.97e) implies that when the dimensionless mean exhaust temperature is low, the exergetic efficiency is drastically reduced, and in order to have a higher value of exergetic efficiency as much as possible, isentropic efficiency must be kept at its highest possible value. It implies that why at the inlet stages of multistage compressors (where the flow is colder than subsequent stages), blades must be more smooth and compatible with stream flows in order to have the highest isentropic efficiency for these stages. εc was plotted graphically against T∗2 for different values of ηsc in Ref. [6]. The aforementioned conclusion can be observed on the graph, too. In addition, from Eq. (2.97e), it can be found that when ηsc ¼ 1.0 (100%), we also have εc ¼ 1.0 (100%). Moreover, when r=i ¼ T2∗ ¼ 1 ) T2 ¼ T0 , we have: εc ¼ ηsc. In most cases, the ideal thermodynamic process for the compression process is considered to be an isothermal process, not isentropic one. This is due to the fact that in the isothermal process, the work of compression is the minimum even lower than the consumed compression’s work of the isentropic compression process [6]. The reason is obvious since, in this proÐ2 cess, the specific work of the compression, which is wc ¼ vdP become minimal since if the temperature is not changed, the average specific volume v1 between states #1 and # 2 is minimal (v is increased when the temperature is increased). Based on exergy terminologies, when the compression process is an isothermal one, there is no change in thermal exergies of inlet/ outlet streams and all part of fuel exergy (compression’s work) is consumed for increasing the pressure term of exergy for the outlet stream compared to the inlet stream. Therefore, the ideal compression process is the isothermal process, not isentropic one. Nevertheless, for the case that the compression is under the atmospheric temperature (T 2 < T0 ), the ideal process for the compression is isentropic one since the isothermal process requires to transfer heat to the environment during the compression. When T2 < T0 , the transfer of heat to the environment is possible only if a heat pump is used because the heat must be transferred from the low heat source (the fluid which is compressed) into the environment as the high heat source. This makes the isothermal compression process under these circumstances to be impractical (T 2 < T0 ). Cases associated with T2 < T0 happen in the compressors of refrigeration systems, especially cryogenic cycles. When the compression process is above atmospheric level (T2 > T0 ), the ideal process is the isothermal one, and in such cases, the isothermal efficiency is defined as ηisoT ¼ wc, isoth/wc, act where for ideal gas become:   P2 RT 1 ln P1 ηisoT ¼ (2.97f) wc, act It can be shown that for the compression of an ideal gas, the following correlation persists between the exergetic efficiency and the isothermal one:   T0 η (2.97g) εc ¼ T1 isoT

2.5 Thermal assessment of energy system based on the exergy concepts

71

When the intake temperature of the compression process is at atmospheric condition, from Eq. (2.97g), it can be found that εc ¼ ηisoT. ηst   εt ¼   (2.97h) 1 1 + η 1  st T2∗ T2∗ (ii) Exergetic efficiency of turbomachines that generate power (turbines): 9 _ t _ t _ t > W W W = εt ¼ ¼ PH ¼  PH h 1  h2 PH PH PH _ _ _ _ ex1  ex2 m ) εt ¼ PH ΔExexp Ex1  Ex2 PH > ex ; 1  ex2 _ t¼m _ ð h1  h2 Þ For an adiabatic system : W

(2.98a)

This equation indicates that the fuel’s exergy of a turbine is assumed be as the difference  PH _ F¼m _ exPH while the  ex tween physical exergies of the inlet and outlet streams, that is, Ex 1 2 _ t ). _ P¼W product’s exergy is the generated power by these devices (Ex In some cases, the structure of turbines is not composed of one intake and one outlet. For example, in fossil-fueled steam power plants, turbines have the number of steam extractions that their extracted steams are used in open and closed feed-water heaters. For example, suppose an adiabatic turbine with two extracted lines as schematically depicted in Fig. 2.12. For the turbine, given in Fig. 2.12, the exergetic efficiency is defined as follows: εt ¼

_ t _ 1 ð h 1  h2 Þ + ð m _ 1 m _ 2 Þ ð h 2  h3 Þ + ð m _ m _ 2 m _ 3 Þðh3  h4 Þ ½m W   PH  1   (2.98b) ¼   PH PH PH PH _ExF _ _ _ 3 Þ exPH _ _ _ m 1 ex1  ex2 + ðm 1  m 2 Þ ex2  ex3 + ðm 1  m 2  m 3  ex4

_ 1 is the flow rate of the mainstream at the intake of the turbine. Moreover,m _ 2 and m _3 where m are flow rates of two extracted steam at the sates #2 and #3 of the turbine as per Fig. 2.12. For a turbine, in the classical thermodynamics, the isentropic efficiency is defined, which is denoted by ηst and defined as: ηst ¼ wt, act/wt, isent. ¼ (h1  h2)/(h1  h2s).

FIG. 2.12 A schematic of a turbine with two extracted lines.

72

2. Thermal modeling and analysis

In a similar manner to the compression process, it can be shown that the isentropic efficiency and exergetic efficiency of a turbine correlate each other as follows [6]: ηst (2.98c) εt ¼ ði=rÞ + ηst ð1  i=rÞ where i is the specific irreversibility (which is equal to the specific exergy destruction (exD t ) and r is the frictional reheat, that is r ¼ h2  h2s. In a similar manner to the compression process, it can be shown that we have also following correlation [6]: ηst     εt ¼  (2.98d) ∗ 1=T2 + ηst 1  1=T2∗ where T∗2 is the dimensionless mean exhaust temperature. Eq. (2.98d) implies that when the dimensionless mean exhaust temperature is low, the exergetic efficiency is drastically reduced, and in order to have a higher value of exergetic efficiency as much as possible, isentropic efficiency must be kept at its highest possible value. It implies that why at the outlet stages of multistage turbines (where the flow is colder than previous stages), blades must be more smooth and compatible with stream flows in order to have the highest isentropic efficiency for these stages. εt was plotted graphically against T∗2 for different values of ηst in Ref. [6]. The aforementioned conclusion can be observed on the graph, too. In addition, from Eq. (2.98d), it can be found that when ηst ¼ 1.0 (100%), we also have εt ¼ 1.0 (100%). Moreover, when r=i ¼ T2∗ ¼ 1 ) T 2 ¼ T0 , we have: εt ¼ ηst. (iii) Exergetic efficiency of a fossil-fueled steam generator (boiler): Steam generators are devices that are used in power plants to generate superheated steam. However, boilers have other applications such as usage in residential and industrial heating applications, which has a similar working principle to steam generators of power plants. A steam generator with two reheat lines is illustrated schematically in Fig. 2.13. For this steam generator, the exergetic efficiency is defined as follows:    PH   PH  PH _ P m _ s exPH + ex4  exPH + ex6  exPH Ex 2  ex1 3 5 ¼ εb ¼ _ F _ f exCH m Ex f

(2.99)

_ f and exCH are the mass flow rate of the fuel and the specific chemical exergy of the where m f _ s is the steam flow rate. Since the inlet air is provided from fuel, respectively. In Eq. (2.99), m the atmosphere and its exergy is zero, the air was not considered as a fuel in the denominator of Eq. (2.99). (iv) Exergetic efficiency of Heat exchangers: In the case of heat exchangers, engineers encounter three cases. In one case, a process stream transfers heat to another process stream. It is called as the process heat exchanger. In another case, heat exchangers are used for cooling or heating of spaces or chambers. In the third case, the heat exchanger rejects thermal energy into the environment. Depending on the case, different expressions for exergetic efficiency may be defined as follows:

2.5 Thermal assessment of energy system based on the exergy concepts

73

FIG. 2.13 A schematic of a steam generator with two reheat lines.

Case A: Process heat exchangers A process heat exchanger is used to transfer heat between two process streams in energy systems (see Fig. 2.10). In this case, one stream received exergy, and the other one lost its exergy. The stream that gains exergy is considered as the product and the other one as the fuel of the heat exchanger. If the average thermodynamic temperatures of the hot and cold streams are Th and Tc , respectively. Accordingly, three cases are possible: 1. Th > T0 and Tc > T0 : It means that the operating temperature of the heat exchanger is above the environmental temperature. In such a condition, the hot stream loses its exergy since it is cooled from Thi to The where Thi > The. Therefore, the physical exergy difference of the hot stream between the inlet/outlet is the fuel’s exergy. The cold stream is warmed using the heat transferred from the hot stream from Tci to Tce where Tce > Tci. Therefore, the cold stream gain exergy, and hence, the difference in physical exergy of this stream between outlet and inlet is the product’s exergy of the heat exchanger. Accordingly, the expression of exergetic efficiency of this type of heat exchanger is given as follows:

εhx ¼

_ P ΔEx _ PH exPH  exPH Ex c ci ¼ ¼ ce PH _ F ΔEx _ PH exPH  ex Ex hi he h

(2.100a)

74

2. Thermal modeling and analysis

2. T h < T0 and Tc < T0 : In this case, the cold stream that is warmed lost its exergy because, at the outlet in which the temperature is higher than the inlet, it is closer to environmental condition compared to the inlet state. The hot fluid becomes cold and therefore gains exergy. Accordingly, the definition of exergetic efficiency is the reverse of the first case. Therefore, we have:

εhx ¼

_ PH exPH  exPH _ P ΔEx Ex h hi ¼ ¼ he PH _ F ΔEx _ PH exPH  ex Ex ce ci

(2.100b)

c

3. T h > T0 and T c < T0 : In this case, the hot stream operates above the environmental temperature and the cold one below the environmental temperature. Therefore, both fluids lose their exergies, and no one gains the exergy. Therefore, no product is defined for this kind of heat exchanger, and it is not possible to define the exergetic efficiency for that. Indeed, such kind of heat exchanger is not recommended to be used, and if it is implemented, it is a fault in the design of the plant. By terminology of the Pinch technology [7], it is said that this exchanger crossed the pinch point, which is prohibited by engineering concepts in designing the heat exchanges’ network. A sophisticated approach for the definition of the exergetic efficiency of a process heat exchanger: In a more sophisticated approach compared to Eqs. (2.99a) and (2.99b), instead of the difference in physical exergy of the inlet/outlet stream, it is more rational to consider the difference in thermal inlet/outlet’s exergy as the product’s exergies because the difference is the pressure part of the exergy is of exergy destruction type that was discussed previously and presented by Eq. (2.90) or (2.93). The exergy destructions of two fluids due to the pressure loss must be compensated by the pumping power, which could be considered as additional fuel’s exergy. In this regard, Eqs. (2.100a) and (2.100b) become: If Th > T0 and T c > T0 :  ΔT  _ P _ ΔT exce  exΔT Ex ΔEx ci c   ΔP  ¼  PH εhx ¼ ¼ ΔP _ F ΔEx _ ΔT + ΔEx _ ΔP + ΔEx _ ΔP exhi  exPH Ex he + exci  exce c h h

(2.100c)

If T h < T0 and T c < T0 :

 ΔT  _ ΔT _ P exhe  exΔT ΔEx Ex hi h   ΔP  ¼  PH ¼ εhx ¼ _ ΔP _ F ΔEx _ ΔT + ΔEx _ ΔP + ΔEx exci  exPH + ex  exΔP Ex ce c

c

h

hi

(2.100d)

he

In another approach, it can be assumed that the pressure exergy term of the product flow is reduced from the product’s exergy of the heat exchanger. By this assumption, exergetic efficiency of a process heat exchanger is defined as follows: If T h > T0 and T c > T0 :    ΔP  ΔT _ ΔT  ΔEx _ ΔP _ P ΔEx exΔT  exci  exΔP Ex c c ce  exci ce   ¼ εhx ¼ ¼ (2.100e) PH _ ΔT + ΔEx _ F ΔEx _ ΔP exPH Ex hi  exhe h h

2.5 Thermal assessment of energy system based on the exergy concepts

75

If Th < T0 and T c < T0 :

   ΔP  ΔP _ ΔT  ΔEx _ ΔP _ P ΔEx exΔT exΔT Ex h h he   hi  exhi   exhe ¼ εhx ¼ ¼ PH _ ΔT + ΔEx _ ΔP _ F ΔEx exPH Ex ci  exce c c

(2.100f)

All expressions given for the exergetic efficiency of a process heat exchanger (Eqs. 2.100a–f ) are correct and can be used by a different approach based on the judgment of the analyzer. However, exergetic efficiency is a positive parameter in most cases (0  ε  1), in the usage of Eqs. (2.100e) and (2.100f ) in the rare instance that the pressure drop of the product stream is severe, it is possible to have a negative value for the exergetic efficiency (ε < 0). The physical meaning of such a condition is that resources that are dedicated to the pumping of the product stream are much greater than thermal exergy that this process gains through the heat exchanger. This condition may happen when a large flow of gas in the product stream of a heat exchanger while its temperature changes along the heat exchanger are low. Since in most cases, it is challenging to separate thermal and pressure terms of the physical exergy, Eqs. (2.100a) and (2.100b) are employed with approximation. Case B: Heat exchanger used for heating and cooling spaces: These kinds of heat exchangers are used to transfer or absorb thermal energy to/from space. Evaporators, heaters, air conditioners, fan coils, radiators, and similar systems are examples of this type of heat exchangers. If the transferred/absorbed thermal power is _ and the average thermodynamic temperature of the heat exchanger’s surface denoted by Q _ Q . If the thermal loads of the heat exchanger is T, the product’s exergy of these systems is Ex are provided by a working fluid (e.g., a refrigerant, hot or chilled water, and so on), the fuel’s exergy is the difference between the physical exergies of this fluid between inlet and outlet of these devices. Therefore, we have:   _ 1  T0 Q _ P _ Q Ex Ex T εhx ¼ (2.101a) ¼ ¼ _ PH Ex _ExF ΔEx PH  Ex PH _ _ wf ,i wf wf ,e where subscript wf stands for the working fluid. Sometimes, the heat load of these exchangers is not provided by working fluids. For example, in a heater, the thermal load would be provided by the burning of fossil fuel (natural gas, Kerosene, etc.) or by the electric current in an element. In this case, we have:

εhx ¼

  8 T0 > _ > Q 1  > _ Q > Ex > T > ¼ For fueled heaters > > _ CH < Ex _ :exCH m

_ P f f Ex f ¼   _ExF > > > _ 1  T0 > Q > > _ Q Ex > T > : ¼ For electric heaters _ _ W elec W elec

(2.101b)

76

2. Thermal modeling and analysis

Case C: Heat rejection exchangers The third class of industrial heat exchangers is those exchangers that reject thermal energy to the environment based on different technical reasons beyond the scope of the exergy. The condenser of power plants and refrigeration systems, cooling towers, and intercooler and aftercooler of multi-stage compressor stations. These devices are employed due to other technical reasons, and their usage is not justified by only exergetic viewpoints. For example, the condenser is a power plant that is used to reduce entropy since in all other locations of a power plant, the entropy of the working fluid increases due to either effect of heat transfer to the fluid or irreversibilities or both. From the thermodynamic, it is known that the only way for the reduction of entropy is the heat rejection. On the other hand, since the working fluid must be operated in a thermodynamic cycle, its increased value of the entropy must be reduced to the original value if the cycle must be closed. The unique equipment in the power plant that provides this necessity is the condenser in which, by reduction of the heat to the environment, reduces the entropy of the working fluid and causes the cycle to be closed. Therefore, the condenser is the sink of entropy in a power plant or a refrigeration system. This is the thermodynamic reason that condenser is employed in these cycles. In a multistage compressor station, intercooler increases the isothermal efficiency of the subsequent stages and reduces their consumed power. For these types of heat exchanger, a product from an exergetic viewpoint is not defined, and accordingly, the exergetic efficiency is not defined or considered to be zero. In some references, the thermal exergy of the rejected heat is considered as the product’s exergy of these devices. It is a mistake and must be avoided since it is an exergy loss, not a product.   8 T0

= ð 1 + AFR Þex  ex wf , e wf , i ¼ ¼ εcom ¼ _ F _ CH ) εcom ¼ _ f :exCH m Ex Ex CH f f > exf ; _ wf ,e ¼ m _ wf ,i + m _f m

(2.102a)

_ f ¼m _ a =m _ f is the air-fuel ratio in mass base (not molar base). _ wf , i =m where AFR ¼ m In a more sophisticated approach that thermal and pressure terms of the physical exergy are separated and considering a pressure drop in the combustion chamber, we may have two different expressions for the exergetic efficiency of the combustion chamber as follows:

2.5 Thermal assessment of energy system based on the exergy concepts

h i 8 ΔT ΔT > ð 1 + AFR Þex  ex > wf ,e wf ,i > > h i > > < exCH + ð1 + AFRÞexΔP  exΔP wf ,e εcom ¼ h f i hwf ,i i > ΔT ΔT ΔP ΔP > ð 1 + AFR Þex  ex  ex  ð 1 + AFR Þex > wf wf wf wf ,e ,i ,e ,i > > > : exCH f

77

If pumping power is provided by the upsteam compressor If pumping power is provided by the downsteam turbine (2.102b)

(vi) Distillation tower and chemical reactors: Distillation towers are used in refineries to produce petroleum products from a crude feed. These towers employ the thermal energy that is provided by reboilers (a type of heat exchanger) to vaporize species of crude with different vapor pressures. The fuel exergy of this equipment could be considered equivalent to the thermal exergy of the provided heat by the reboilers plus the pumping powers of pumps if they are used to circulate fluids. The product is the difference in chemical exergies of products and inlet feed. Accordingly, the exergetic efficiency of the distillation tower is: ! ! X X n n CH CH CH CH _ _ _ _ Ex Ex  Ex  Ex crude crude i¼1 i i¼1 i _ExP Ex _ P  ¼h  i εdis ¼ ¼ ¼  _ F Ex _ Qrb T0 PH  exPH + W _ pump Ex _ m ex _ _ rb Q rb 1  + W pump rb,i rb, e Trb

(2.103)

_ , T rb , and m _ rb are heat duty, the thermodynamic average temperature of heating where Q rb stream, and flow rate of the heating stream of the reboilers, respectively. Similar expressions might be developed for the exergetic efficiency of chemical reactors. (vii) Throttling devices: Throttling devices are used in industries for two purposes. The first usage is the breaking of the pressure for safety or other technical reasons. Similar applications of this type of throttling device are in the natural gas distribution system where the pressure of the gas must be reduced or in a steam power plant at the outlet of the closed feed-water heater where the condensate heating steam must be depressurized to inject to upstream devices. This type of throttling device has no production from the exergetic point of view, and these devices only destruct physical exergy of the flow without producing a product’s exergy. Therefore, for this type of throttling device, the exergetic efficiency cannot be defined. The second category of throttling devices is the type that is used in refrigeration systems to provide the refrigeration effect. Expansion valves of refrigeration systems are famous throttling devices of this type that work based on the Joule-Thomson effect. The process of throttling is a constant enthalpy process, which leads to decreasing the temperature of the working fluid when its pressure is broken (for fluids with a negative Joule-Thomson coefficient like

78

2. Thermal modeling and analysis

different types of refrigerants [8]). From the exergetic viewpoint, it can be said that the exergetic efficiency of these devices is defined as follows:  ΔT  _ P ΔEx _ ΔT ex2  exΔT Ex 1  ¼ ¼  ΔP (2.104a) ε exp :valve ¼ _ F ΔEx _ ΔP ex1  exΔP Ex 2 It means that the product’s exergy of these devices is the increase in the thermal exergy of the working fluid by the reduction of its temperature (the temperature of the working fluid is below the environmental temperature; hence, its thermal exergy at the outlet is higher than  ΔT  _ ΔT ¼ Ex _ _ ΔT . _ P ¼ ΔEx the inlet when its temperature is dropped); therefore, we have Ex 1  Ex2 The fuel’s exergy in expansion valves of refrigeration systems is the reduction in pressure exergy of the working fluid at the outlet of these devices compared to the inlet condition  F  ΔP  _ ¼ ΔEx _ ΔP ; ¼ Ex _ _ ΔP . Ex 2  Ex1 For expansion processes used to generate a refrigeration effect, the ideal process is a constant physical exergy process [6]. In such a process, reduction of the pressure exergy due to expansion is equal with increasing the thermal exergy, that is, minimum temperature (maximum refrigeration effect) is achieved (consider that when T < T0, thermal exergy is increased when the temperature is reduced, why?). Hence, we have:  PH     ΔP   ΔT  _ _ ΔP ¼ ΔEx _ ΔT ) Ex _ ΔP ¼ Ex _ ΔT _ _ Ex ¼ cte ) ΔEx (2.104b) 1  Ex2 2  Ex1

2.5.2.3 Exergetic efficiency for assessment and optimization of energy systems In the previous Sections 2.5.2.1 and 2.5.2.2, examples of expressions for the exergetic efficiency of different energy systems and equipment were given. As it was found, it is required to have a true definition of product and fuel’s exergies that must be defined based on the judgments of designers and experts. However, some guidelines can be presented to hint designers and engineers to perform this task more sophisticatedly. 1. The definition of exergetic efficiency needs to define the product of the system truly, and this must be done considering both thermal and economic criteria since the aim of the usage of the system defines its product, and this aim is affected by both thermal and economic factors. 2. Considering the sum of inlet’s exergies as the fuel’s exergy and outlet’s exergies as the product’s exergy may be misleading in most cases. For example, consider the case of process heat exchangers. As it was discussed, the differences in streams exergies between inlets and outlets of these devices were considered as the fuel’s exergy or product’s exergies. If the inlet exergies of hot and cold streams are treated as the fuel’s exergy, and outlet exergies of hot and cold fluid are assumed as the product’s exergies, the results would be quite a mistake and meaningless. 3. In connection to point #2, it can be said that when in a control volume a steam crosses the boundary of the system twice without any change in its chemical composition (like hot and cold streams in heat exchangers), in such cases, the difference in physical exergies (or its thermal or pressure terms) would be considered as the fuel’s exergy or product’s exergies depending on the role of that steam.

2.5 Thermal assessment of energy system based on the exergy concepts

79

4. For equipment that had steam that takes apart in a chemical reaction like the steam generator, combustion chamber, and fossil-fueled heater as it was seen, the absolute inlet exergy of these streams (usually the chemical exergy) is considered as the fuel’s exergy. 5. In devices such as distillation towers, chemical reactors, and desalination, however, the chemical compositions of inlet/outlet steams are changed; nevertheless, the difference between chemical exergies of the outlet and inlet flows is considered as the product’s exergy. For example, in the case of the distillation tower, the difference between chemical exergies of distillation products (gasoline, kerosene, diesel fuel, and so on) and the inlet crudes  was considered as the product’s exergy in Eq. (2.103), that is,  n n P _ CH . In this case, P Ex _ CH  Ex _ CH was not considered as the product’s _ P¼ Ex Ex i i crude i¼1

i¼1

exergy since its value for distillation product is quite large compared to the fuel’s exergy of

h  i n T0 _ _ pump , that is P Ex _ F¼ Q _ CH ≫Ex _ F ; therefore, if we the distillation tower Ex 1  + W rb i T rb

i¼1

did so, the exergetic efficiency of the tower would be determined, mistakenly. Definition of fuel and products’ exergies and accordingly the associated expressions of exergetic efficiency for different industrial equipment used in energy plants were given by Tsatsaronis and Cziesla in Ref. [9]. 2.5.2.4 Exergetic balance equation based on the definition of fuel and product’s exergies Exergetic balance equations for open and closed systems based on inlet and outlet exergies were given previously in Sections 2.4.2 and 2.4.3, respectively. A more straightforward form of the exergy balance equation can be defined alternatively based on the definition of fuel and product’s exergies as follows: _ P + Ex _ D + Ex _ L _ F ¼ Ex Ex

(2.105)

_ D and Ex _ L are exergy destruction and loss, respectively. where Ex This expression seems to be simpler than previous forms; but the usage of this form (Eq. 2.105) requires an accurate and exact definition of fuel and product’s exergies. Based on this new exergy balance equation, the exergetic efficiency of an energy system could be written as follows: !  D  _ F  Ex _ + Ex _ L _ P Ex _ D + Ex _ L Ex Ex ¼ ¼1 (2.106) ε¼ _ F _ F _ F Ex Ex Ex 2.5.2.5 Exergetic efficiency for assessment and optimization of energy systems Exergetic efficiency is the most crucial parameter for the thermal assessment of energy systems. As discussed, this parameter is defined for both an energy system and its subcomponents. However, for assessment and comparison, the exergetic efficiency must be compared with similar systems, not different systems. For example, the exergetic efficiency of a turbine must be compared with a similar turbine in the market to conclude whether the system is suitable or not form the thermal viewpoint. It means that in an energy system, for example,

80

2. Thermal modeling and analysis

a power plant, the exergetic efficiency of different components, for example, turbine and boiler should not be compared together to conclude which part is more efficient. This is due to different technology and thermal process of different systems that make it impossible to compare their exergetic efficiencies. This rule is valid for both equipment (at the component level of an energy system) and the entire energy system. It means that the exergetic efficiency of power plants must be compared with a similar power plant not to compare, for example, with the exergetic efficiency of a desalination plant. For optimization of energy systems by the thermal criteria, the exergetic efficiency is the most popular objective function of the optimization that is maximized by the algorithm. However, the optimization of energy systems must be performed with a comprehensive approach since exergetic optimization alone may destroy the economic justification of the usage of the proposed energy system. In a comprehensive optimization, thermal, economic, environmental, reliability, and other criteria are required to be considered, simultaneously.

2.5.3 Efficiency defect and relative irreversibility Exergetic efficiency was defined and presented in Section 2.5.2 as the most critical and rational parameter for the thermal assessment of energy systems. Thermal criteria for exergetic assessment of energy systems are not only limited to the exergetic efficiency. There are two other parameters for the thermal assessment of energy systems, including the efficiency defect and relative irreversibility. These two parameters are defined at the component level, not for an entire system, and unlike the exergetic efficiency, these parameters are used to compare different subsystems of an energy system. 2.5.3.1 Efficiency defect Efficiency defect is the terminology that was used in Ref. [6]. For the kth component of an energy system is defined with modification from [6] as follows: δD k ¼

_ D Ex k _ F Ex

_ L Ex k _ F Ex  D  _ + Ex _ L Ex k k L δk ¼ ¼ δD k + δk _ F Ex δLk ¼

(2.106a) (2.106b) (2.106c)

This parameter indicates the fraction of the fuel’s exergy of the plant that is destructed or lost in the kth component that sometimes is given in percentage. Accordingly, δD k is the fraction of the fuel’s exergy of the plant that is destructed in the kth component while δLk shows the contribution of the kth component to loss the fuel’s exergy of the plant. In Eq. (2.106c), L δk ¼ δD k + δk is given to reflect the effect of both destruction and loss of the fuel’s exergy of the plant in the kth component. When within a plant, this parameter is large; it indicates that that components need to be modified thermally to enhance the overall behavior of the entire energy systems. From Eq. (2.106), for a plant of energy, we have:

81

2.5 Thermal assessment of energy system based on the exergy concepts

_ L _ D + Ex Ex tot tot εtot ¼ 1  _ F Ex

!

0X n B B ¼ 1  B k¼1 @

1 _ L Ex kC C k¼1 C ¼1 _ F A Ex

_ D+ Ex k

n X

Therefore, we have: εtot ¼ 1 

n X k¼1

δD k

+

n X

! δLk

¼1

k¼1

n _ D X Ex k _ F Ex k¼1

n X

δk

!

n _ L X Ex k + _ F Ex

!!

k¼1

(2.107)

k¼1

Therefore, the total exergetic efficiency of an energy plant can be obtained by efficiency defects of its subcomponents. 2.5.3.2 Relative irreversibility Relative irreversibility is another parameter to assess and compare different subcomponents of an energy system; therefore, it is defined at the component level, too. For the kth component of an energy system, relative irreversibility is defined as: θD k ¼

_ D _ D Ex Ex k k ¼ n _ D X Ex tot _ D Ex

(2.108a)

k

k¼1

θLk ¼

_ L _ L Ex Ex k k ¼ n X _ L Ex tot _ L Ex

(2.108b)

k

k¼1



  D  _ L _ L _ D + Ex _ + Ex Ex Ex k k k k L θk ¼  D ¼ θD ¼ n k + θk X _ L _  + Ex Ex D L tot tot _ _ + Ex Ex k k

(2.108c)

k¼1

Relative irreversibilities show the fraction of exergy destruction, loss, or both of the kth component respect to the total exergy destruction, loss, or both of the entire plant. It shows the contribution of irreversibility (internal, external, or both) of the kth components on the overall irreversibilities of the entire energy system. This factor is also used to assess and compare different components of an energy system together.

2.5.4 Suggested approaches to enhance the thermal performance of energy systems The design of any energy system must be performed so that the highest thermal performance should be achieved. However, as discussed before, in the design of the system, a comprehensive approach considers thermal, economic, environmental, and reliability aspects simultaneously. Since the subject of this chapter is only thermal analysis and modeling, some

82

2. Thermal modeling and analysis

suggestions for designing thermal systems with the highest exergetic performance as given as follows: 1. To reduce the exergy loss of the system, the usage of cogeneration systems that produce by-products from the lost energy is recommended. 2. One of the significant sources of exergy destruction in the energy system is the combustion process. It is recommended to have minimal usage of this process in the plant. However, the usage of this process is unavoidable in many cases. The most part of the exergy destruction of the combustion process is unavoidable and cannot be eliminated due to the theoretical reason [5]. By the way, if the avoidable part of the exergy destruction is reduced, its effect on the entire plant is still reasonable. If such a process is used, to improve the combustion efficiency and reduce the avoidable part of exergy destruction, it is recommended to have: (i) Preheating of combustion reactant, especially the inlet air by the flue gases at the exhaust of the combustion chamber (It not only increases the combustion efficiency but also reduces the exergy loss of the combustor.) (ii) Reduction of the excess air of the combustion [5] 3. In modifying an energy system, besides exergy destruction, that must be reduced, it is crucial to consider the associated cost of the modification to have an economic justification for the improved system. This will be done by the concept of thermoeconomics in the following chapters. 4. The exergy destruction imposes the cost to the system. In the modification of the system, besides the magnitude of exergy destruction, the magnitude of the cost of exergy destruction is essential. Some kinds of exergy destructions waste low-cost resources; however, other kinds may destruct valuable resources. For example, exergy destruction in a pump wastes electricity, while in another system, for example, a heater, thermal energy is wasted by the exergy destruction. We know that electricity is more expensive than thermal energy. Hence, the cost of exergy destruction is sometimes more critical to the magnitude of exergy destruction itself. Once more, it implies the importance of thermoeconomics in the design of energy systems. 5. After combustion and instantaneous chemical reactions, the higher source of the exergy destruction in energy systems is associated with the heat transfer process. It previously analyzed in this chapter by Eq. (2.84) or (2.85). Based on these equations, we observed that the exergy destruction is proportional to the square power of the temperature difference between sources and has a reverse proportion with the temperature level of two sources. (i) Therefore, at very high temperatures and also low temperatures, the insulation of pipelines must be better performed to reduce losses. (ii) For low-temperature levels such as cryogenic systems, the temperature difference between streams must be lower than the similar systems that operate at higher temperatures. Accordingly, in low-temperature heat exchangers, the minimum temperature difference between hot and cold streams must be taken lower than the corresponding minimum temperature difference of high-temperature heat exchanger. Reduction of the minimum temperature difference reduces the cost of exergy destruction; however, the heat transfer area is increased, and vice versa. Therefore, there is an optimum value for the minimum temperature difference. The

2.5 Thermal assessment of energy system based on the exergy concepts

6.

7.

8.

9.

83

minimum temperature difference in heat exchanger must be selected in an optimization process that considers both the cost of the heat transfer area and the cost of exergy destruction. This temperature difference for heat exchangers with high operating temperature is about 5°C; however, in cryogenic heat exchanger due to the importance of exergy destruction, the minimum temperature difference is about 2°C (actual optimal values must be obtained by the optimization). (iii) The usage of intermediate heat transfer fluid must be minimized or eliminated if it is possible. (iv) In designing the heat exchanger network, those streams that operate in a similar temperature range must be directed to transfer heat with each other, and it must avoid exchanging heat between streams with significant temperature differences. (v) If two streams that must exchange heat have a vast difference between their heat _ p . It is recommended to exchange the capacities, for example, C_ 1 ≫C_ 2 where C_ ¼ m:c heat between a branch of the steam with high heat capacity and the other one. Therefore, stream with a high heat capacity must branch out. This leads to a lower temperature difference between two streams along with the heat exchanger (why?). (vi) For the design of the heat exchangers’ networks, the pinch technology must be employed [7]. Another source of exergy destruction in plants is the friction that is analyzed previously by Eq. (2.90) or (2.93). It was wholly discussed previously in the relevant section (see exergy destruction due to friction in Section 2.5.1) that which provision must be considered for the design of energy systems to reduce this type of exergy destruction. The provisions were regarding the sizing of pipelines that carry low-temperature fluids, the design of inlet blades of multistage compressors and outlet blades of multistage turbines, and the design of the main pipelines, which carry high flow rates. To reduce exergy destruction in the expansion process, the usage of the throttling valve for pressure broken must be eliminated, and turbo-expander must be used instead of that. However, the economics of the usage of turbo-expander instead of the throttling valve must be justified. For turbines, devices with higher isentropic efficiency (with lower irreversibilities) must be used; however, economic criteria must also be considered (turbines with higher isentropic efficiency are usually more expensive than similar turbines, which have lower isentropic efficiencies). Since the irreversibility of the mixing process is proportional with gradients of mixing streams, the mixing of streams with a large gradient (temperature, pressure, chemical potential) must be avoided.

2.5.5 Graphical presentation of the exergetic analysis Graphical tools are used to illustrate the results of the exergetic analysis of energy systems in order to transfer a notion regarding the flow of exergy streams within the system. Graphical representation of the results of the exergy analysis is more interpretable than the raw data that are given in tables. One of the most useful graphical tools for this purpose is the Grossman flow diagram, which visualizes the streams of the exergy flow through the energy system. In this diagram, the flow of exergy is shown by arrows in which the direction of the arrow shows

84

2. Thermal modeling and analysis

the direction of the exergy flow, and the width of the arrow is selected proportional to the amount of exergy transfer. For example, each centimeter of the arrow’s thickness represents, for example, 100 kW of the exergy flow. Therefore, if there is an arrow with 5-cm thickness, it implies that 500 kW of exergy flows in the direction shown by the arrow. For each component of the energy system, inlet/outlet exergies are illustrated on the graphical shape of the control volume by aforementioned arrows, and for the entire system that is composed of several components, arrows of all components are drawn and interconnect to for the Grossman diagram of the entire plant. For example, for a steam generator depicted in Fig. 2.13, the Grossman diagram of the exergy flow is illustrated in Fig. 2.14, schematically. A similar diagram can be drawn for other components, for example, a power plant that includes turbines, condensers, pumps, and feed-water heaters. Since these components are connected with exergy streams, that is, the outlet of one component is the inlet of downstream components, the Grossman diagrams of components are interconnected together to form the global Grossman diagram of the primary energy system. The typical Grossman diagram for the steam power plant will be given in Section 2.6 as a case study. A similar diagram that represents the energy flow instead of exergy flow is also be used and so-called as the Sankey diagram.

FIG. 2.14

Grossman diagram for exergy flux in the steam generator depicted in Fig. 2.13.

2.6 Precise exergetic evaluation

85

Other graphical tools such as Pie diagram are used to illustrate the results of an exergetic analysis. For more detail, refer to Ref. [6].

2.6 Precise exergetic evaluation One outcome of exergetic analysis is the evaluation of exergy destruction within an energy system and its subcomponents. In a more precise viewpoint, the exergy destruction might be divided into some components that specify the type and source of exergy destructions within the subcomponent of an energy system. Accordingly, exergy destruction of the kth component of an energy system is divided into two types, that is, avoidable and unavoidable exergy destructions, and the following expression is defined [10, 11]: _ D, AV + Ex _ D, UN _ D ¼ Ex Ex k k k

(2.109)

_ D, AV ) (Ex k

is a part of exergy destruction that can be Avoidable part of exergy destruction eliminated theoretically through the modification processes on the system. In contrast, there is another part of exergy destruction that comes from the theory of thermodynamics and is inherently within the system and cannot be reduced even in theory. This kind of exergy de_ D, UN . For example, in struction is called unavoidable exergy destruction that is denoted by Ex k a heat exchanger, there is exergy destruction due to the temperature difference between the hot and cold flows. On the other hand, when the temperature profiles of the hot and cold streams are drawn, there is a minimum temperature difference between flow, that is, ΔTmin as it can be observed in Fig. 2.10. In theory, if the heat transfer area of the heat exchanger leads to an infinite value, that is A ! ∞, consequently, the minimum temperature difference approaches zero (ΔTmin ! 0); nevertheless, there is still a temperature difference on the other side of the temperature profile, that is ΔTmax ! a Non Zero Value. Therefore, in this case, also there is exergy destruction since the mean temperature is not zero (ΔTm ¼ F. LMTD 6¼ 0). The value of exergy destruction at this condition (ΔTmin ! 0) is the unavoidable exergy destruc_ D that is obtained _ D, UN . If the total value of exergy destruction (Ex tion of the process, that is Ex k k in the exergy analysis) is subtracted by the obtained unavoidable exergy destruction, the _ D  Ex _ D, UN ). In Fig. 2.10, in a particular case, the _ D, AV ¼ Ex avoidable part is determined (Ex k k k temperature profiles of hot and cold flows are parallel (this happened when we have: _ p ), if ΔTmin ! 0, we have: ΔTmax ! 0 and hence C_ h ¼ C_ c , where C_ ¼ m:c ΔTm ¼ F. LMTD ! 0. In such a special case, the exergy destruction of the heat exchanger _ D, AV and Ex _ D, UN ¼ 0. _ D ¼ Ex is only avoidable, that is, Ex k k k If exergy destruction within a component of an energy system is intended to be classified based on the source of exergy destruction, it comprised of two components, that is, endogenous and exogenous exergy destructions; therefore, for the kth component of an energy system, we have [12]: _ D, EN + Ex _ D, EX _ D ¼ Ex Ex k k k

(2.110)

_ D, EN ) is a kind of exergy destruction Endogenous exergy destruction of a component (Ex k that its source is thermal defects of that component itself. Since components of an energy system are in material and energy exchanges with each other, there is another kind of exergy

86

2. Thermal modeling and analysis

destruction that is observed in a component; but its source is the inefficiency of other related imposed by other related components. This kind of exergy destruction is called exogenous _ D, EX . exergy destruction, Ex k Classifications are given by Eqs. (2.109) and (2.110) that can be combined together to give a general classification for the exergy destruction of the kth component as follows [13]: _ D, EN,AV + Ex _ D, EX, AV + Ex _ D, EN, UN + Ex _ D, EX, UN _ D ¼ Ex Ex k k k k k

(2.111)

This classification can be used in theory for recognition about the source of exergy destruction to concentrate possible modification on real sources of defects (endogenous or exogenous) and also to evaluate which kind of irreversibility can be reduced in practice (avoidable exergy destruction) through the modification of the system.

2.6.1 Separation of exergy destruction into avoidable and unavoidable terms A methodology for separating the exergy destruction into avoidable and unavoidable terms was given in detail in Refs. [10, 11]. Accordingly, the unavoidable exergy destruction of the kth component is obtained from the following expression in Refs. [10, 11]: !UN _ D _ P Ex _ExD, UN ¼ Ex (2.112) k k _ P Ex k  D  _ P is the product’s exergy of the kth component and Ex _ =Ex _ P UN is the ratio of unwhere Ex k k avoidable exergy destruction to unavoidable product’s exergy of the kth component that must be found by analysis. When the total exergy destruction of a component approaches to a minimum possible value, it means that the remained exergy destruction of that component is unavoidable, that _ D, UN and Ex _ D ! Ex _ D, UN . In such a case, the component reaches its highest value _ D ! Ex is, Ex k k k k of exergetic efficiency. From thermoeconomics’ principles (it will be discussed in Chapter 3), it is known that in such a case, the purchased cost of the component becomes infinite, that is PECk ! ∞. Such a case was already discussed previously for a heat exchanger that _ D ! Ex _ D, UN was corresponding to ΔTmin ! 0 and A ! ∞; it implies that the cost of heat Ex k k exchanger becomes infinite. In thermoeconomics, as it will be discussed in Chapter 3, for each component, a cost function for PECk is defined. To find unavoidabmnle exergy destruction, it is required to find the condition in which PECk ! ∞. It gives the corresponding parameters of  D  _ P UN . _ =Ex that component under these circumstances that lead to the calculation of Ex k

• Example: A multistage axial-flow air compressor The purchased equipment cost of a multistage axial-flow air compressor was given in [5]:

_a 71:1m (2.113) PECac ¼ rP ln ðrP Þ 0:90  ηsc _ a , and ηsc are compression ratio of the compressor (P2/P1), the mass flow rate of the where rP, m air, which is compressed by the air-compressor, and the isentropic efficiency of the

87

2.6 Precise exergetic evaluation

compressor. It is clear that if PECac ! ∞, it is corresponding to ηac ! 0.90. For a hypothetical _ a equal to the actual compressor, but, with ηac ¼ 0.90, similar compressor with rP and m _ D exergetic analysis is performed and values of exergy destruction (Ex ac, hypo ) and product’s P _ exergy (Exac,hypo ) are obtained. By dividing two values, we have:  D UN P D P _ =Ex _ _ _ Ex ¼ Ex ac, hypo =Exac, hypo . On the other hand, the product’s exergy of the real air comac pressor is known, which is equal to the difference in physical exergy of the outlet/inlet  PH  _ P ¼ Ex _ _ PH . steams, that is Ex ac, act 2  Ex2 Therefore, destruction of is calculated from

the unavoidable exergy

 the real air compressor  D   _ D, UN ¼ Ex _ P ;  Ex _ D _ P _ =Ex _ P UN . _ P ;  Ex Eq. (2.112) Ex =Ex ;¼ Ex ac

ac, act

ac, hypo

ac, act

ac, hypo

ac

Accordingly, the avoidable exergy destruction of that air compressor is also found as _ D  Ex _ D, UN . _ExD,AV ¼ Ex ac ac, act ac By definition of avoidable and unavoidable exergy destruction of a component, a modified formulation for the exergetic efficiency of the kth component can be defined. In a similar manner, modified formulas for efficiency defect and internal-relative irreversibility for the kth component are also defined. These modified formulae were given in Ref. [11] as follows: ! _ D, AV _ P Ex Ex k k ∗ ¼1 (2.114) εk ¼ F _  Ex _ F  Ex _ D, UN _ D, UN Ex Ex k k k k _ D, AV Ex k _ F Ex

(2.115)

_ D, AV Ex _ D, AV Ex k k ¼ n X _ D Ex tot _ D Ex k

(2.116)

δ∗k

,D

¼

k

θ∗k

,D

¼

k¼1

2.6.2 Separation of exergy destruction into endogenous and exogenous terms The endogenous part of exergy destruction can be determined by two methods. In one method, two exergetic analyses are performed for the system. 2.6.2.1 First method In one analysis, the real energy system is analyzed, and exergy destructions of all subcomponents are determined. In another analysis, a similar system in which its all subcomponents except the kth component are thermodynamically ideal, that is, εi6¼k ¼ 1.0 (100%) is analyzed. In the hypothetical energy system, since all components except the kth component are reversible systems, the only cause of the thermodynamics’ defect in the kth component is its internal irreversibility; hence, the calculated exergy destruction of the kth component is its endoge_ D, EN . Now, the exogenous exergy destruction is obtained by nous exergy destruction, Ex k D, EN _ from calculated exergy destruction of the kth component of the real subtracting the Exk _ D, EX ¼ Ex _ D  Ex _ D, EN . This method has two difficulties. First, for an energy system, that is Ex k k k

88

2. Thermal modeling and analysis

energy system with n subcomponents, it requires to perform exergy analysis for no hypothetical similar energy systems to calculate endogenous exergy destructions of all components. Therefore, there is a vast amount of calculation for a given energy system. The second problem is that sometimes it is difficult or impossible to define an ideal reversible thermodynamic system for some components. For example, components like the combustion chamber and boilers are associated with the combustion process with high irreversibility. Therefore, in practice, it is difficult or impossible to find ideal reversible equipment that can be substituted for the real combustion chamber or boiler. Therefore, a second method for evaluation of endogenous exergy destruction of a component is suggested in Ref. [12]. 2.6.2.2 Second method In a practical method that is given by Kelly et al. [12], the endogenous exergy destruction of a component of an energy system is calculated based on a graphical representation of the results of a sensitivity analysis that is conducted on the overall energy system. In this method, first, an ideal energy system with the same product of the real system is assumed, and the exergy balance equation (based on the definition of fuel and product’s exergies) is used for this ideal system as follows [12]: _ F  Ex _ L _ P ¼ Ex Ex ideal ideal ideal

(2.117)

If the irreversibility of the only kth component is considered, Eq. (2.117) will be corrected based on this change as follows [12]:  F   L  _ _ F  Ex _ L  Ex _ _ D, EN _ P ¼ Ex + Ex + Ex Ex ideal ideal k ideal k  P    k L  (2.118) _ _ D, EN ¼ Ex _ F  Ex _ L _ F + Ex _ ) Ex + Ex ideal ideal k ideal + Exk k If the irreversibilities of other components are also considered, the energy system becomes the real system and Eq. (2.118) is converted to the following form [12]: ! ! n n X X  P  D D F F L L _ _ _ _ _ + Ex _ _ Ex Ex Ex ¼ Ex + Ex + +  Ex (2.119) ideal

k

other

ideal

i

i¼1

ideal

i

i¼1

_ D is the summation of exergy destruction of other components except the kth comwhere Ex other n  P_ D _ D D _ D ! 0, Eq. (2.119) ap_ ponent, that is Exother ¼ Exi  Exk . In Eq. (2.114c), when Ex other i¼1

_ D ! Ex _ D, EN . proaches to Eq. (2.118) and Ex Therefore, graphically, if k k

    n n P P _ L + Ex _ P is plotted against Ex _ D at constant kth com_ F + Ex _ F  Ex _ L + Ex Ex i i ideal ideal other i¼1

i¼1

ponent exergetic efficiency (εk), the intersection of the graph with the vertical axes, where _ D ! 0, gives the value of Ex _ D, EN (since the endogenous exergy destruction of the kth comEx other k ponent is the function of εk, in the plot, we must have: εk ¼ cte). Kelly et al. proved that if this _ D, EN . plot is driven, it is a linear equation in the form of y ¼ bx + c where c ¼ Ex k This graph is schematically depicted in Fig. 2.15.

89

2.6 Precise exergetic evaluation

FIG. 2.15 Schematic of graphical approach for determination of endogenous exergy destruction of the kth component.

In practice, in order to plot the graph, it is of  requirednto change  operatingnparameters  the P P F F L L P _ _ _ _ _ plant over a range and obtain the values of Ex  Ex + Ex and Ex Ex i i ideal + ideal + i¼1

i¼1

_ D , while these parameters are varied. Then by having different values of Ex

other    n n _ L + P Ex _ P and Ex _ D , the plot is drawn, and a graph sim_ExF + P Ex _ F  Ex _ L + Ex i i ideal ideal other i¼1

i¼1

_ D,EN ilar to Fig. 2.15 is obtained. If the intersection of the graph and vertical axes is found, Ex k  D  D,EX D, EN _ _  Ex _ and hence, Ex ¼ Ex are found. For plotting the graph, the following guidek k k lines were recommended by Kelly et al. [12]: 1. Pressure drops in all components except the kth component are set to zero. _ D ! 0, the exergy destructions of all components except 2. It must be checked that when Ex other the kth component are zero. _ D in the sensitivity analysis, the concentration must be performed with a 3. For reducing Ex other component of the energy system, which has the highest value of exergy destruction rate.

2.6.3 Remarks on the concepts of the precise exergetic analysis In Sections 2.6.1 and 2.6.2, methodologies for splitting exergy destructions of components of an energy system into avoidable-unavoidable, and endogenous-exogenous components were given, respectively. By combining two methodologies, it is possible to split the exergy

90

2. Thermal modeling and analysis

_ D ) into four elements (Ex _ D, EN, AV , destruction of a component of an energy system (Ex k k D, EX, AV D, EN, UN D, EX, UN _ _ _ Ex , Ex , and Ex ) as per Eq. (2.111). k k k The precise exergetic evaluation called as the advanced exergy analysis by Tsatsaronis and coworkers [11–13] is a theoretical approach given for precise analysis and assessment of energy systems that give insight regarding cause, source, and type of thermodynamic inefficiencies within an energy system in order to concentrate improving task to real source of defects for any retrofit or optimization of the overall energy system. Based on the opinion of the author and his experiences, if in the optimization of an energy system, comprehensive, effective parameters are considered as decision variables for optimization, it automatically reduces avoidable without the necessity to separate avoidable and unavoidable terms of exergy destruction. In other words, it is evident that when the system reaches its optimal condition, unavoidable exergy destructions have not been enhanced, and what are improved are avoidable exergy destructions; therefore, it is not required to concentrate on the separation of avoidable and unavoidable terms. On the other hand, if a perfect optimization model is designed for the energy system, when it leads to optimal solution for the system, it is evident that all source of exergy destructions either endogenous or exogenous of all components may lead to their minimum possible values exergy destructions of components to their minimum possible values; hence, it is not required to separate exergy destructions into endogenous and exogenous terms, too. Therefore, for the optimization of energy systems with thermalobjective functions (maximum exergetic efficiency or minimum total exergy destruction), the ordinary exergy analysis given in Section 2.5 is enough. Precise exergetic evaluation and analysis might have an advantage on theoretical studies that it is intended to distinguish types and source of irreversibility, or in empirical retrofit and optimization of the energy system using hand calculation methods or trial-and-error tasks on modification of effective parameters based on the experience of experts.

2.7 Case study The flow diagram of a fossil-fueled steam power plant with 250 MW nominal capacity is depicted schematically in Fig. 2.16. In this figure, DA, DFP, BFP, and CFWH stand for deaerator, deaerator’s feed pump, boiler’s feed pump, and closed feed-water heater, respectively. For simplicity, it is assumed that this power plant consists of one open feed-water heater (deaerator) and one closed feedwater heater (in real power plant, there are five to eight closed feed-water heaters or even more). Other required information on the operating condition of the power plant is given in Fig. 2.16. If the isentropic efficiencies of all turbines and pumps are assumed to be 90%, provide an exergy analysis of the power plant to calculate the exergetic efficiency of the entire power plant and all subcomponents, exergy destruction and loss of each component, efficiency defects, and relative irreversibilities of each component. In this power plant, as observed, the generated steam by the steam generator goes to the high-pressure (HP) turbine. Then, it is reheated in the reheater, and conducted into the intermediate pressure (IP) turbine. After that, two parts are extracted for the purposes indicated further, and the rest of the steam enters

91

2.7 Case study

18 MPa, 550 C

6

1

HP

IP

150 MW

G

~

LP

x y Steam generator

2

1 MPa

7

5 Re-heater

7.5KPa

6 MPa, 550°C

3

14

3 MPa

Cooling water inlet

4 12

11

CFWH

10

9

Condenser

Cooling water outlet

DA BFP

13

8 DFP

FIG. 2.16 Flow diagram of a sample 250 MW fossil-fueled steam power plant.

low-pressure (LP) turbine. Having left the LP turbine, the steam dissipates heat into the ambient in the condenser. Then, the stream is pumped into a closed feed-water heater in which one part of the extracted steam from the IP turbine is employed. Next, it goes to a deaerator, which works by another extracted fraction of the steam, and in the end, the stream enters the steam generator, which makes the cycle complete. If the net generated power of turbines is 150 MW, calculate the values of physical exergy for all the streams as well as the exergetic efficiency and exergy destruction and loss ratios for the components. For all the pumps and turbines, the isentropic efficiency is 0.90. In addition, find the fraction of steams (x and y) extracted from IP turbine for DA and CFWH, respectively. The ambient temperature and pressure are 25 ˚C and 100 kPa, respectively, and water leaves the closed feed-water heater at 176.9 ˚C. Solution Step 1: Initially, the state of the streams is determined: State 1:  T1 ¼ 550o C h1 ¼ 3418:2 kJ kg1 ! P1 ¼ 18MPa s1 ¼ 6:4084 kJ kg1 K1 State 2: First, state “2 s” (HP turbine outlet in the isentropic process) is obtained:  P2s ¼ 6MPa T2s ¼ 366:49o C ! 1 1 s2s ¼ s1 ¼ 6:4084 kJ kg K h2s ¼ 3089:8 kJ kg1

92

2. Thermal modeling and analysis

Then, considering the definition of isentropic efficiency, we have: ηis,turbine ¼

wact,turbine h1  h2 ! ηis,HP ¼ ! h2 ¼ h1  ηis,HP ðh1  h2s Þ wideal,turbine h1  h2s

h2 ¼ h1  ηis,HP ðh1  h2s Þ ¼ 3418:2  0:90ð3418:2  3089:8Þ ¼ 3122:6 kJ kg1 Therefore: P2 ¼ 6MPa h2 ¼ 3122:6 kJ kg1 State 3: T3 ¼ 550o C P3 ¼ 6MPa





 !

 !

T2 ¼ 378:67o C s2 ¼ 6:4592 kJ kg1 K1

h3 ¼ 3541:3 kJ kg1 s3 ¼ 7:0307 kJ kg1 K1

State 6 (IP turbine output): Following the same fashion with the HP turbine:  P6s ¼ 100kPa T6s ¼ 99:61o C ! 1 1 s6s ¼ s3 ¼ 7:0307 kJ kg K h6s ¼ 2552:6 kJ kg1 h6 ¼ h3  ηis,IP ðh3  h6s Þ ¼ 3541:3  0:90ð3541:3  2552:6Þ ¼ 2651:5 kJ kg1  P6 ¼ 100kPa T6 ¼ 99:61o C ) 1 h6 ¼ 2651:5 kJ kg s6 ¼ 7:2959 kJ kg1 K1 States 4 and 5 are determined similar to state 6:  P4s ¼ 3MPa T4s ¼ 432:60o C ! 1 1 s4s ¼ s3 ¼ 7:0307 kJ kg K h4s ¼ 3305:6 kJ kg1 h4 ¼ h3  ηis,IP ðh3  h4s Þ ¼ 3541:3  0:90ð3541:3  3305:6Þ ¼ 3329:2 kJ kg1  P4 ¼ 3 MPa T4 ¼ 443:23o C ! 1 h4 ¼ 3329:2 kJ kg s4 ¼ 7:0644 kJ kg1 K1 State 5: P4s ¼ 1MPa s5s ¼ s3 ¼ 7:0307 kJ kg1 K1



 !

T4s ¼ 275:54o C h4s ¼ 2999:0 kJ kg1

h5 ¼ h3  ηis,IP ðh3  h5s Þ ¼ 3541:3  0:90ð3541:3  2999:0Þ ¼ 3053:2 kJ kg1  P5 ¼ 1 MPa T5 ¼ 300:73o C ! 1 h5 ¼ 3053:2 kJ kg s5 ¼ 7:1274 kJ kg1 K1 State 7 (LP turbine output): Similar to the way to obtain the states “2” and “6”:

93

2.7 Case study

P7 ¼ 7:5 kPa s7s ¼ s6 ¼ 7:2158 kJ kg1 K1



 !

T6s ¼ 40:29o C h6s ¼ 2249:8 kJ kg1

h7 ¼ h6  ηis,LP ðh6  h7s Þ ¼ 2820:9  0:90ð2820:9  2249:8Þ ¼ 2306:9 kJ kg1  P7 ¼ 7:5 kPa T7 ¼ 40:3o C ! 1 h7 ¼ 2306:9 kJ kg s7 ¼ 7:3978 kJ kg1 K1 State 11: P11 ¼ 3MPa x11 ¼ 0:0 ðsaturated liquidÞ



8 > >
> : 11 s11 ¼ 2:6456 kJ kg1 K1

State 12: Initially, state “2 s” is obtained: Writing the energy balance equation (the first law) for a pump in the isentropic condition: ð P12 h12s ¼ h11 + vdP ’ h11 + v11 ðP12  P11 Þ ! h12s ¼ 1008:3 + 0:001217ð18  3Þ  103 P11

¼ 1026:6 kJ kg1 It should be noted that since the unit for specific volume and pressure is m3.kg-1 and MPa, respectively, therefore, those should be multiplied by 103 to make the outcome’s unit kJ.kg1. From the definition, we have: wideal,pump h12s  h11 h12s  h11 1026:6  1008:3 ! ηis,BFP ¼ ! h12 ¼ h11 + ! h12 ¼ 1008:3 + 0:90 wact, pump h12  h11 ηis,BFP 1 ¼ 1028:6 kJ kg

ηis,pump ¼

P12 ¼ 18MPa h12 ¼ 1028:6 kJ kg1



 !

State 13: P13 ¼ 1MPa x13 ¼ 0:0 ðsaturated liquidÞ



T12 ¼ 237:59o C s12 ¼ 2:6497 kJ kg1 K1 8
>
> : 8 v8 ¼ 0:001008 m3 kg1

State 9: Using the same way as BFP for DFP, we have: ð P12 h9s ¼ h11 + vdP ’ h8 + v8 ðP9  P8 Þ ! h9s ¼ 168:7 + 0:001008ð3000  7:5Þ ¼ 171:7 kJ kg1 P11

wideal,pump h9s  h8 h9s  h8 171:7  168:7 ! ηis,BFP ¼ ! h9 ¼ h8 + ! h9 ¼ 168:7 + 0:90 wact,pump h 9  h8 ηis,DFP 1 ¼ 172:0 kJ kg  P9 ¼ 3MPa T9 ¼ 40:44o C ! 1 h9 ¼ 172:0 kJ kg s9 ¼ 0:5770 kJ kg1 K1

ηis,pump ¼

Step 2: Having known the state of all streams, the mass flow rates can be obtained: First, the extraction ratios from the IP turbine (x, y) should be calculated using the first law for DA and closed feed-water heater, respectively. They are both considered adiabatic. The first law for DA: The first law for DA: xh4 + ð1  xÞh10 ¼ h11 ! x ¼

h11  h10 1008:3  750:4 ¼ 0:100 ¼ h4  h10 3329:8  750:4

The first law for closed feed-water heater: ð1  xÞðh10  h9 Þ ¼ yðh5  h13 Þ ! y ¼

ð1  xÞðh10  h9 Þ ð0:9Þð750:4  172:0Þ ¼ 0:227 ¼ ð3053:2  762:5Þ ðh5  h13 Þ

The new power of turbines is the summation of HP, IP, and LP turbines. Therefore: _ net ¼ m _ ðfh1  h2 g + fh3  h4 g + ð1  xÞfh4  h5 g + ð1  x  yÞfh5  h6 g + ð1  x  yÞfh6  h7 gÞ W _ net, tur W _ ¼ )m fh1  h2 g + fh3  h4 g + ð1  xÞfh4  h5 g + ð1  x  yÞfh5  h6 g + ð1  x  yÞfh6  h7 g ¼

150  103 f3418:2  3122:6g + f3541:3  3329:2g + ð1  0:1Þf3329:2  3053:2g + ð1  0:1  0:227Þf3053:2  2651:5g + ð1  0:1  0:227Þf2651:5  2306:9g _ ¼ 119:2 kg s1 ;m

95

2.7 Case study

Now, we can find the physical energy for all the streams, which are indicated in Table 2.1. Step 3: Having determined the exergy values, the exergetic efficiency, the exergy loss, and destruction ratios can be computed for each component: HP turbine: εHP ¼

_ HP _ P _ 1 ðh1  h2 Þ 119:2ð3418:2  3122:6Þ  103 m Ex W ¼ 0:952 ¼ ¼ ¼ _ F Ex _ 1  Ex _ 2 Ex _ 2 _ 1  Ex 179:7  142:7 Ex

It should be noted that the coefficient 103 was multiplied in the nominator to convert “kW” to “MW.” δLHP ¼

_ loss Ex 0 ¼ ¼0 _Exfuel Ex _ 2 _ 1  Ex

L δD HP ¼ 1  εHP  δHP ¼ 1  0:952  0 ¼ 0:048

IP turbine: Here, first, the exergy destruction is calculated via Gouy-Stodola relation: I_ ¼ T0 S_ gen

TABLE 2.1 Temperature, pressure, enthalpy, entropy, mass flow rate as well as physical exergy for the streams of the investigated power plant.

T (°C)

P (MPa)

h (kJ kg21)

s (kJ kg21 K21)

Specific physical exergy (kJ kg21)

Mass flow rate (kg s21)

Physical exergy (MW)

1

550

18

3418.2

6.4084

1507.5

119.2

179.7

2

378.7

6

3122.6

6.4592

1196.8

119.2

142.7

3

550

6

3541.3

7.0307

1445.1

119.2

172.3

4

443.23

3

3329.2

7.0644

1222.9

11.9

14.6

5

300.73

1

3053.2

7.1274

928.2

27.1

25.1

6

99.61

0.1

2651.5

7.2959

476.2

80.2

38.2

7

40.29

0.0075

2306.9

7.3978

101.2

80.2

8.1

8

40.29

0.0075

168.8

0.5763

3.0

107.3

0.3

9

40.44

3

172

0.577

0.0

107.3

0.0

10

176.89

3

750.4

2.1063

122.4

107.3

13.1

11

233.85

3

1008.3

2.6456

219.5

119.2

26.2

12

237.59

18

1028.6

2.6497

238.6

119.2

28.4

13

179.88

1

762.5

2.1381

125.0

27.1

3.4

14

40.29

0.0075

769.5

2.4706

32.9

43.4

1.4

Stream number

96

2. Thermal modeling and analysis

_ 4 s4 + m _ 5 s5 + m _ 6 s6  m _ 3 s3 ¼ 11:9  7:0644 + 27:1  7:1274 + 80:2  7:2959  119:2  7:0307 S_ gen ¼ m ¼ 24:3 kW K1 Therefore: _ D T0 S_ gen Ex ¼ _ExF m _ 3 fðex3  ex4 Þ + ð1  xÞðex4  ex5 Þ + ð1  x  yÞðex5  ex6 Þg 298:15  24:3 ¼ ¼ 0:077 119:2fð1445:1  1222:9Þ + ð1  0:1Þð1222:9  928:2Þ + ð1  0:1  0:227Þð928:2  476:2Þg

δD IP ¼

All the turbines, including IP, are adiabatic, so: δLIP ¼ 0 And: εIP ¼ 1  δLIP  δD IP ¼ 1  0  0:077 ¼ 0:923 LP turbine: The way to obtain efficiency and two other ratios for the LP turbine is precisely the same as the HP turbine: εLP ¼

_ LP _ P _ 6 ðh6  h7 Þ 80:2ð2651:5  2306:9Þ  103 m Ex W ¼ 0:918 ¼ ¼ ¼ _ 7 Ex _ 7 _ F Ex _ 6  Ex _ 6  Ex 38:2  8:1 Ex δLLP ¼ 0 L δD LP ¼ 1  εLP  δLP ¼ 1  0:918  0 ¼ 0:082

Condenser: As discussed, the exergetic efficiency is not defined for the condenser. However, two other ratios can be defined. Obtaining the dissipated heat from the first law, we have: _ _ 8 h8  m _ 14 h14  m _ 7 h7 ¼ 107:3  168:8  43:4  769:5  80:2  2306:9 ¼ 200297:4 kW Q cond ¼ m Calculating exergy destruction from Gouy-Stodola relation: I_ ¼ T0 S_ gen _ Q _ 8 s8  m _ 14 s14  m _ 7 s7  cond ¼ 107:3  0:5763  43:4  2:4706  80:2  7:3978 S_ gen ¼ m T0 200297:4 ¼ 33:11 kW K1  298:15 Having calculated S_ gen , δD cond can be obtained: δD cond ¼ ¼

_ D T0 S_ gen Ex ¼ _ 7  Ex _ 8 _ F Ex _ 14 + Ex Ex 298:15  33:11  103 ¼ 1:000 1:4 + 8:1  ð0:3Þ

2.7 Case study

The exergy loss ratio:

97

  1 0 T0 Q 1  cond _ExQcond 298:15 T C B δLcond ¼ ¼ ¼ 200297:[email protected]  A _ExF _ 14 ex14 + m ð40:29 + 273:15Þ + ð40:29 + 273:15Þ _ 7 ex7  m _ 8 ex8 m 2 ¼ 9:77 MW Deaerator feed pump (DFP): εDFP ¼

_ P Ex _ 9  Ex _ 8 Ex 0:0  ð0:3Þ ¼ ¼ ¼ 0:874 _ExF _ 107:3ð172  168:8Þ  103 W DFP

There is no loss. Consequently: δLLP ¼ 0 L δD DFP ¼ 1  εDFP  δDFP ¼ 1  0:874  0 ¼ 0:126

Boiler feed pump (BFP): Similar to DFP, we have: εBFP ¼

_ P Ex _ 12  Ex _ 11 Ex 28:4  26:2 ¼ ¼ ¼ 0:909 _ExF _ 119:2ð1028:6  1008:3Þ  103 W BFP

There is no loss. Consequently: δLLP ¼ 0 L δD BFP ¼ 1  εBFP  δBFP ¼ 1  0:909  0 ¼ 0:091

Closed feed-water heater (CFWH): εCFWH ¼

_ P Ex _ 10  Ex _ 9 13:1  0:0 Ex ¼ ¼ ¼ 0:604 _ F Ex _ 5  Ex _ 13 25:1  3:4 Ex δLCFWH ¼ 0

L δD CFWH ¼ 1  εCFWH  δCFWH ¼ 1  0:604  0 ¼ 0:396

DA: εDA ¼

_ P m _ 10 ðex11  ex10 Þ 107:3ð219:5  122:4Þ Ex ¼ ¼ 0:873 ¼ _ExF _ 4 ðex4  ex11 Þ 11:9ð1222:9  219:5Þ m δLDA ¼ 0

L δD DA ¼ 1  εCFWH  δCFWH ¼ 1  0:873  0 ¼ 0:254

The results are summarized in Table 2.2.

98

2. Thermal modeling and analysis

TABLE 2.2 Values of exergetic efficiency as well as exergy destruction and loss ratios for the components of the investigated steam power plant. Component

_ F (MW) Ex k

_ P (MW) Ex k

_ D (MW) Ex k

_ L (MW) Ex k

εk

δD k

δLk

θD k

θLk

HP turbine

37.0

35.2

1.8

0.0

0.952

0.048

0

0.082

0

IP turbine

94.1

86.8

7.3

0.0

0.923

0.077

0

0.332

0

LP turbine

30.1

27.6

2.5

0.0

0.918

0.082

0

0.114

0

Condenser

9.83

N.A.

0.03

9.80

N.A

0.003

0.997

0.001

1.000

DFP

0.34

0.30

0.04

0.00

0.874

0.126

0

0.002

0

BFP

2.42

2.20

0.22

0.0

0.909

0.091

0

0.010

0

CFWH

21.7

13.1

8.6

0.0

0.604

0.396

0

0.391

0

DA

11.9

10.4

1.5

0.0

0.873

0.126

0

0.068

0

2.8 Summary Details of thermal modeling and assessment based on the exergetic method of energy system analysis were given in this chapter. Basics of thermodynamics laws and exergy analysis were given to have a zero-dimensional model for energy systems. Various exergy transfer mechanisms in energy systems were discussed and quantified. Accordingly, exergetic balance equations, along with notions of exergy concept, were presented, and various thermodynamic loss mechanisms, including exergy destruction and exergy loss, were presented and discussed. Exergy destructions in sample irreversible process, that is, heat transfer and friction processes were discussed while the Gouy-Stodola theorem for exergy destruction was given. Various criteria including exergetic efficiency, efficiency defect, and the relative irreversibility were introduced for thermal assessment of energy systems, while the exergetic efficiency as a most favorable objective function for the thermal optimization was emphasized. Finally, the discussed exergy analysis and thermal modeling concepts were examined in a case study. Advanced thermal modeling tools, including finite-time thermodynamics, finite-speed thermodynamics, combined finite-time finite-speed analysis, quasi-steady thermodynamic models, and the advanced exergetic analysis approach, will be discussed in the next chapter.

2.9 Exercises 1. In a chiller, R-134a, as refrigerant enters to a chilled water heat exchanger with the vapor quality of 0.4 (x ¼ 0.4) at 150 kPa and leaves the heat exchanger while it is superheated about 5°C above saturated temperature. The chilled water enters at 7°C and leaves the heat exchanger at 12°C. (i) Determine the mass flow rate of the chilled water.

2.9 Exercises

2. 3.

4.

5.

99

(ii) Specific exergies of water and refrigerant at inlet/outlet conditions (iii) Determine the irreversibility of the process. (iv) Determine irreversibility due to the heat transfer between two streams. (v) What is the exergetic efficiency of this heat exchanger? Determine the chemical exergy of air and methane mixture if the mass ration of methane to the air in the mixture is 10. In a combustion chamber, a fuel in which its mass composition consists of 45% methane and 55% ethane, burns with atmospheric air that its inlet condition is 25°C and excess air ratio is 50%. The mass flow rate of the fuel is 50 kg s1. (i) Determine the total irreversibility of the process. (ii) Calculate the exergy destruction and exergy loss of the process. (iii) Calculate the efficiency defects and the relative irreversibilities of the process. (iv) Draw the Grossman and pie diagrams for the process. In the cycle of a gas turbine with 30 MW of net power generation, the pressure ratio is 10, and isentropic efficiencies of the compressor and turbine are 85%. This gas cycle is installed at sea level with 100 kPa environmental pressure while the ambient condition is 25°C. The fuel of this gas cycle is pure methane. The flue gases that leave the combustion chamber are directed to an air preheater that preheats the inlet air (o the combustion chamber) to 850°C. Then, the flue gases that leave the air preheater are exhausted to the environment. (i) Determine exergetic efficiency, frictional reheat, and recoverable part of the frictional reheat in the air compressor. (ii) Determine exergetic efficiency, frictional reheat, and recoverable part of the frictional reheat in the turbine section of the cycle. (iii) Determine the flue gas temperature at the outlet of the combustion chamber. (iv) Determine the exergetic efficiency of the combustion chamber. (v) Calculate exergy destruction, loss, efficiency defects, and relative irreversibilities of various parts, including the air compressor, combustion chamber, turbine, and the air preheater. (vi) Determine the endogenous, exogenous, avoidable, and unavoidable exergy destruction of the air preheater. For a power plant given in Section 2.8, if the thermal energy is provided by the combustion of methane as a fuel, there is 5% of thermal energy loss through the wall of the steam generator to the environment at 25°C, and stoichiometric air is used in the combustion process, calculate following items: (i) Determine exergy destruction and loss of the steam generator. Accordingly, modify exergy destruction, loss, and exergetic efficiency of the boiler. (ii) Modify, Table 2.2, which was given for the case study of Section 2.8 with the new values of exergy destruction and loss obtained in part (a) of this exercise. (iii) If excess air is changed into 20%, find the new values of exergy destruction, loss, and exergetic efficiency. (iv) Determine endogenous and exogenous components of the exergy destruction of the steam generator (boiler).

100

2. Thermal modeling and analysis

References [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]

Sonntag RE, Van Wylen GJ, Borgnakke C. Fundamentals of thermodynamics. New York: Wiley; 2008. Cengel YA, Boles MA. Thermodynamics: an engineering approach. Sea 2002;1000:8862. Smith JM. Introduction to chemical engineering thermodynamics. New York: ACS Publications; 1950. White FM. Introduction to Fluid Mechanics. McGraw-Hill Education, New York, 2015. Bejan A, Tsatsaronis G. Thermal design and optimization. New York: John Wiley & Sons; 1996. Kotas TJ. The exergy method of thermal plant analysis. London: Elsevier; 2013. Kemp IC. Pinch analysis and process integration: A user guide on process integration for the efficient use of energy. Amsterdam: Elsevier; 2011. Moran MJ, Shapiro HN, Boettner DD, Bailey MB. Fundamentals of engineering thermodynamics. USA: Elsevier; 2010. Tsatsaronis G, Cziesla F. Encyclopedia of Physical Science and Technology. vol. 16. San Diego: Academic Press; 2002 chap. Thermoeconomics. Tsatsaronis G, Park M-H. On avoidable and unavoidable exergy destructions and investment costs in thermal systems. Energ Conver Manage 2002;43:1259–70. Cziesla F, Tsatsaronis G, Gao Z. Avoidable thermodynamic inefficiencies and costs in an externally fired combined cycle power plant. Energy 2006;31:1472–89. Kelly S, Tsatsaronis G, Morosuk T. Advanced exergetic analysis: Approaches for splitting the exergy destruction into endogenous and exogenous parts. Energy 2009;34:384–91. Tsatsaronis G. Recent developments in exergy analysis and exergoeconomics. Int J Exergy 2008;5:489–99.

C H A P T E R

3 Advanced thermal models 3.1 Introduction Basic concepts of thermal modeling based on zero-dimensional thermodynamic analysis were given in Chapter 2. However, thermodynamic models are general and can be implemented on all similar systems; sometimes, they lack accuracy for modeling of real energy systems. For example, however, the overall performance of engines is approximated by Otto, Diesel, and Stirling cycles, in real cases, the thermal performance of engines is very different from what was predicted by these thermodynamic cycles. Therefore, it is unsatisfactory to employ such a simplified thermodynamic analysis for modeling, assessment, and optimization of such energy systems. In most cases, thermodynamic models of Chapter 2 can be employed on the thermal system at SSSF condition; however, when this condition is not governing the system, such as the cyclic process of closed thermodynamic systems, the accuracies of thermodynamic models are very low. For example, in classical thermodynamics, there are ideal cycles, including Otto, Diesel, and Stirling cycles; but, these cycles are less successful in predicting thermal performances of real engines. On the other hand, multidimensional numerical thermal models consume the vast amount of the computational time that makes them difficult to be used in try and error calculations of optimization processes. Moreover, numerical models are developed for a specific system with fixed geometrical specifications and cannot be easily extended to similar systems with different specifications. For example, when a CFD model is made for simulation of internal combustion (IC) engines, it is only applicable for that engine and cannot be used for other types of IC engines with different specifications. Due to lack of generality and computational time consumption, the numerical CFD models are not usually used for optimization purposes, and we need similar models to thermodynamic models that were given the previous chapter, but with more accuracy. The advance thermal model is intended to be used for the augmentation of the accuracy of thermal models. In this regard, finite-time thermodynamics (FTT), finite-speed thermodynamics (FST), combined finite-time finite-speed analysis (FTT-FST), and quasi-steady thermodynamic models are presented in this chapter along with several case studies about IC and Stirling engines. The aim of this book is not the thermal CFD model; at the end of this

Modeling, Assessment, and Optimization of Energy Systems https://doi.org/10.1016/B978-0-12-816656-7.00003-8

101

# 2021 Elsevier Inc. All rights reserved.

102

3. Advanced thermal models

chapter, these models for steady and transient (dynamic) modeling of energy systems can be found in related literature, for example, Ref. [1]. In addition, the dynamic thermal model using the CFD approach was reviewed in Ref. [2]. These aspects are out of the scope of this book.

3.2 Chapter’s outline In Section 3.3, finite-time thermodynamics (FTT) as a class of nonequilibrium thermodynamic is given. Case studies, including Stirling and Otto cycles, are given as examples of FTT applications. In Section 3.4, finite-speed thermodynamics (FST) suitable for control volume with moving boundary systems such as a cylinder-piston system is given and examined on a Stirling cycle as a case study. Combined FTT-FST models that employ the advantage of both FTT and FST are given in Section 3.5 and using a case study, which is an IC engine, and it is shown that the combined methodology can be used to model a real IC engine with reasonable accuracy. Section 3.6 is dedicated to quasi-steady models that are suitable for energy systems, such as different kinds of engines that encounter a mechanical cyclic change in the thermodynamic state. In engines, thermodynamic state changes with the crank angle in a mechanical cyclic process. The application of quasi-steady models is explained for Stirling engines as an example is discussed in this section. The comprehensive combined thermal models are discussed in Section 3.7. In this chapter, for each model, examples of case studies are provided. Comprehensive models that use combinations of all previous approaches (FTT, FST, and quasisteady models) and different thermal loss mechanisms are discussed by its application on the Stirling engine based on modeling of Stirling engines/coolers as a case study. The conclusion of the chapter is presented in Section 3.8, and exercises are also given in Section 3.9.

3.3 Finite-time thermodynamics Finite-time thermodynamics, which is denoted as FTT, is a class of nonequilibrium thermodynamics [3]. In classical thermodynamics, processes are assumed to undergo under the quasi-equilibrium condition, which means that deviation from the equilibrium state in each stage of the process is negligible, and therefore, processes must be undergone very slowly within an infinite time. Finite-time thermodynamics is developed based on the notion that in real energy systems, processes undergo within a finite time rather infinite time; therefore, processes are not performed in quasi-equilibrium conditions and must be analyzed by the concepts of nonequilibrium thermodynamics. FTT was invented in 1975 by Andersen, Berry, and Salamon [4]. The FTT was developed based on macroscopic viewpoint rather than the thermodynamic microscopic one; therefore, most concepts of the classical thermodynamics such as thermodynamic potential, exergy (availability) and endoreversible heat engines are reformulated by the new concept (FTT) [4]. Nevertheless, some new concepts such as the nonequivalence of criteria of merit, the importance of power as an objective function, the generality of the endoreversible engine (engine with internal reversibility), and thermodynamic length are presented by the FTT [4].

3.3 Finite-time thermodynamics

103

On the other hand, in classical thermodynamics impose limits on the performance of thermodynamic systems which are unrealistic. For example, based on Carnot limitation on the maximum thermal efficiency of a heat engine, which operates between two temperature sources of 900 K and 300 K is 0.67 (1  (300/900)¼0.67); however, the real value of the thermal efficiency is much lower, for example, 0.30. Using FTT, more realistic bound on the maximum performance of thermal systems are imposed. However, finite-time thermodynamics was developed according to consideration of the limited time of thermodynamic processes; later, it was extended to the finite area, finite volume, finite conductance, and finite cost [5]. In these extensions, essential contributions might not specifically target analysis or optimization in terms of time. It should be noted that there are also some speculations against the validity and logic behind the FTT [6–8]; in Ref. [9], some rebuttals were given on criticisms of the mentioned Refs. [6–8]. In addition, the majority of articles support this subject, and it was observed that the FTT models succeed in the simulation of thermal systems in most cases. Therefore, in the present book, FTT is covered as one of the advanced thermal methodologies for modeling, assessment, and optimization of energy systems.

3.3.1 Limitation on the thermal efficiency of heat engines driven by the heat transfer In classical thermodynamics, the limitation on the thermal process that is driven by heat transfer to generate mechanical power (heat engines) is governed by the Carnot expression. It indicates that for a heat engine that is operated between two thermal sources with TH and TL, the maximum thermal efficiency, which is equal to the Carnot heat engine, is determined as follows: ηth, c ¼ 1 

TL TH

(3.1)

Eq. (3.1) is known as the Carnot efficiency. In real cases, since there is no assumption for the external reversibility of the heat engines, the engine is linked to the sources by finite heat conductance as schematically shown in Fig. 3.1. Based on Fig. 3.1, it is observed that there are heat transfer resistances between the heat source and heat sink in heat transfer linkage to the engine; therefore, the effective temperature of heat source is reduced from TH to Th (TH > Th) and the effective temperature of the heat sink is increased from TL to Tl (TL < Tl). Hence, the limit of thermal efficiency of the heat engine is lower than with what was predicted by Eq. (3.1). In this case, what is called as the CurzonAhlborn efficiency is replaced to the Carnot efficiency as follows [10]: rffiffiffiffiffiffi TL ηth, cual ¼ 1  TH

(3.2)

where ηth, cual is the Curzon-Ahlborn limitation on the thermal efficiency of heat engines. For an engine operating between 900 K and 300 K, the limitation on the thermal efficiency that is predicted by Eq. (3.2) is 0.423; however, Eq. (3.1) predicts it as 0.667. The efficiency of a real engine that operates in this temperature range was 0.30, as discussed before. Therefore, the

104

3. Advanced thermal models

FIG. 3.1 Schematic of an endoreversible heat engine (Carnot cycle) with finite conductance of heat transfer from reservoirs to the engine.

Curzon-Ahlborn model imposed a more realistic limitation on the thermal efficiency of heat engines compared to the Carnot efficiency of the classical thermodynamics. Curzon-Ahlborn expression (Eq. 3.2) can be approved by considering the schematic of Fig. 3.1. Based on this schematic, for the rate of heat transfer from the heat source to the engine and also from the engine to the heat sink, we have: _ H ¼ dQH ¼ UH AH ðTH  Th Þ ¼ αH ðTH  Th Þ Q dt

(3.3a)

_ ¼ dQL ¼ UL AL ðTl  TL Þ ¼ αL ðTl  TL Þ Q L dt

(3.3b)

where U and A are overall heat transfer coefficient (W m2 K1) and heat transfer area of the engine (m2), respectively, and α ¼ U  A (W K1). If Eq. (3.3a) and (3.3b) are integrated for a thermodynamic cycle to give the time that the heat is absorbed by the engine within a thermodynamic cycle (tH) and time required to reject the heat to the heat sink within a thermodynamic cycle (tL), we have: tH ¼

QH αH ðTH  Th Þ

(3.3c)

tL ¼

QL αL ðTl  TL Þ

(3.3d)

For a complete thermodynamic cycle, we have:

105

3.3 Finite-time thermodynamics

tcycle ¼ tH + tL ¼

QH QL + αH ðTH  Th Þ αL ðTl  TL Þ

(3.3e)

Eq. (3.3e), which computes the finite-time of a thermodynamic cycle, is used to determine the output mechanical power of the endoreversible heat engine as follows: _ ¼ W ¼ W tcycle

ðQH  QL Þ  QH QL + αH ðTH  Th Þ αL ðTl  TL Þ

(3.3f)

Since in the Carnot cycle, the cycle is completed in infinite time, that is, tcycle ! ∞ ) _ carnot ! 0. Eq. (3.3e) denotes the difference in the approach of the FTT with the classical therW _ carnot ! 0 for modeling of heat engines. modynamic in which we have tcycle ! ∞ ) W For an endoreversible heat engine, Carnot expression implies that: QH QL QL Tl  ¼0) ¼ Th T l Q H Th

(3.3g)

Combining Eqs. (3.3f ) and (3.3g) leads to following expression for the power of the heat engine: _ ¼ W

ð T h  Tl Þ  Th Tl + αH ðTH  Th Þ αL ðTl  TL Þ

(3.3h)

If TH ¼ Th + ΔTH and TL ¼ Tl  ΔTL is substituted in Eq. (3.3f ), we have: _ ¼ W

½αH :αL :ΔTH :ΔTL :ðTH  TL  ΔTH  ΔTÞ ½αL :TH :ΔTL + αH :TL :ΔTH + ðαH  αL Þ:ΔTH :ΔTL 

(3.3i)

To have maximum power, we must have:

8 0:5 Th ¼ βTH > > > > > > > < Tl ¼ βTL0:5 ) ) 3 2 > > > 0:5 0:5 0:5 > > > _ > > > ∂ W ð T :T Þ  T ð α :T Þ + ð α :T Þ H L L H H L L > > > > > : ¼0 4 5 : ΔTH, max ¼ >  0:5  > ∂ΔTL 0:5 :β ¼ 1 + ðαH :αL Þ0:5 α +α 8 _ ∂W > > > > < ∂ΔTH ¼ 0

8 > TH  ðTH :TL Þ0:5 > > ΔT ¼ > H, max > < 1 + ðαH :αL Þ0:5

H

L

Accordingly, the maximum power of an endoreversible heat engine becomes:  0:5  0:5 2 L T H  TL _ max ¼ αH :α W  0:5 2 αH + α0:5 L On the other hand, the maximum thermal efficiency is:

(3.3j)

(3.4)

106

3. Advanced thermal models

0:5 Tl TL + ΔTL,max TL ηth,max ¼ 1  ¼ 1  ¼1 ¼ ηth, cual Th TH  ΔTH,max TH Therefore, the expression of the Curzon-Ahlborn for the efficiency of an endoreversible heat engine (Eq. 3.2) is proved. Eq. (3.2) is more desirable than Eq. (3.4) since it is dependent only on the temperatures of the heat source and heat sink; however, Eq. (3.4) is also dependent on the heat transfer coefficients of the heater and cooler of the engine (αH and αL). Therefore, Eq. (3.2) is rather general. Nevertheless, in Ref. [11], there are several other expressions of the thermal efficiency of heat engines that are dependent on the heat transfer coefficient. It should be noted that the generality of Eq. (3.2) is not comparable with Carnot expression (Eq. 3.1), since it was driven by the assumption that the heat transfer is the only source of external irreversibility for the heat engine on the one hand, and assuming a specific form of heat transfer based on the newton’s heat transfer law as per Eqs. (3.3a) and (3.3b). Eq. (3.2) was obtained based on a particular form of heat transfer (Newton’s cooling law, Eqs. 3.3a, and 3.3b). Other models for the heat transfer equation could be assumed. For example, when radiative heat transfer is an effective mechanism, the formula is different from Eqs. (3.3a) and (3.3b). If the heat transfer model is according to a general form of Q ∝ (ΔTn)m, which represents a generalized convective heat transfer law Q ∝ (ΔT)m and the generalized radiative heat transfer law, Q ∝ ΔTn other forms of the finite-time thermal efficiency and output power are obtained that are different from the expression of Curzon-Ahlborn (Eq. 3.2). One example of expression was given in Ref. [3] where the following general form of convective heat transfer was considered:

_ H ¼ dQH ¼ βH 1  1 (3.5a) Q dt T h TH

_ L ¼ dQL ¼ βL 1  1 (3.5b) Q dt TL T l where β is the heat transfer coefficient. In such a case, the maximum efficiency of the endoreversible heat engine is:

1 + ðβH =βL Þ0:5 T

 1 L (3.6) ηmax ¼  TL TH 0:5 2 + 1 ðβH =βL Þ TH Unlike the Curzon-Ahlborn expression for thermal efficiency of an endoreversible heat engine that is only a function of reservoirs temperature (Eq. 3.2), Eq. (3.6) also depends on heat transfer coefficients of the engine’s heater and cooler (βH and βL). The consequence of the new expressions like Eqs. (3.2) or (3.6) would be applicable to the definition of thermal exergy associated with heat transfer that was obtained in Chapter 2 using the assumption that the equivalent heat is transformed to an endoreversible heat engine by Eq. (2.44) or (2.47). The aforementioned procedure for obtaining the thermal efficiency and output power of an endoreversible heat engine can be repeated for every thermodynamic cycle of the air engines such as Otto, Diesel, and Stirling cycles to obtain more realistic boundary on calculated output power and thermal efficiency of these engines.

3.3 Finite-time thermodynamics

107

3.3.2 Limitation on the thermal efficiency of heat engines due to the mechanical friction The FTT concepts developed in Section 3.3.1 were based on an endoreversible engine. For real engines, its prediction is still far from the real performance since engines are faced with various irreversibilities and losses; therefore, they are not endoreversible, as was supposed in Section 3.3.1. One of the main reasons that cause the reducing performance of engines is due to the irreversibilities of the friction mechanisms (mechanical friction and fluid friction). In order to have a more realistic prediction on the performance of thermal engines, besides the FTT, power and efficiency losses due to the mechanical friction must also be taken into account. It should be noted that besides friction, there are other sources of losses such as heat loss, leakage of the working fluid, hysteresis effect of the gas, and mechanical loss due to the inertial effect of the crack mechanisms that still have not been considered yet. Details for comprehensive thermal models that take into account other losses will be given in this chapter in Section 3.7. In the previous section (Section 3.3.1), the effect of external irreversibility of heat transfer on the performance of an endoreversible heat engine was considered that led to Eq. (3.2). Now, we assume that the only irreversibility is due to the friction, and there are no other irreversibilities, including external irreversibility of the heat transfer. Suppose in an engine, P, f, and vp are the instantaneous gas pressure over the piston, friction factor (associated to both mechanical friction and turbulent flow), and instantaneous linear velocity of the piston; therefore, we have: þ F ¼ PA  fvp ) δW ¼ PdV  fv2p ðtÞdt ) W ¼ QH  QL  f v2p ðtÞdt

(3.7a)

The third term on the left-hand side of Eq. (3.7a) can be replaced by [12]: þ v2p ðtÞdt ¼

δL2p tcycle

(3.7b)

where Lp is the linear course of the piston, δ is a fixed parameter characterizing the dependence of velocity with respect to the time [12], and tcycle is the duration of one mechanical cycle. The output power of the engine based on Eqs. (3.7a) and (3.7b) becomes: f δL2p _ ¼ QH  QL  W tcycle t2cycle

(3.7c)

For a fixed value of QH and QL, the power is the only function of the cycle period (tcycle); therefore, the condition of the maximized power is obtained by:

108

3. Advanced thermal models

8 2f δL2p > > > ¼ t < cycle, opt _ ∂W QH  QL ¼0) > _ ðQH  QL Þ2 ∂tcycle > > ¼ W : max 4f δL2p For thermal efficiency of the heat engine with only friction effect, we have:



f δL2p W QH  QL QL TL ηf ,max ¼ ¼ 0:5ηth,c ) ηf ,max ¼ 0:5 1  ¼  ¼ 0:5 1  QH tcycle,opt QH QH TH QH

(3.8)

(3.9)

It means that if the only effect of mechanical friction is considered in a heat engine, the maximum limit for its thermal efficiency is half the Carnot efficiency. This is much less than the limitation imposed by the Curzon-Ahlborn model in Section 3.3.1 so that for an engine that is operated between 900 K and 300 K, Eq. (3.9) implies that the maximum thermal efficiency is 0.333; however, these limits by Curzon-Ahlborn and Carnot expressions were 0.423 and 0.667, respectively.

3.3.3 Limitation on the thermal efficiency of heat engines due to the mechanical friction and heat transfer resistance For an engine with simultaneous effects of external irreversibility of the heat transfer (similar to what was considered in Section 3.3.1) as well as the internal irreversibility due to the mechanical friction, Rebhan [12] showed that the maximum thermal efficiency is something between what was predicted by Eqs. (3.9) and (3.2); therefore, we have: "

0:5 # TL TL  ηth,max  1  (3.10) 0:5 1  TH TH Accordingly, for engines that operate between 900 K and 300 K, Eq. (3.10) indicates that 0.333  ηth, max  0.423. For more details regarding Eq. (3.10) and the output power of the considered case of the thermal engine, refer to Ref. [12]. A similar analysis could be performed to obtain the thermal efficiency and output power of heat engines that work based on Otto, Diesel, and Stirling cycles to obtain a more realistic boundary on calculated output power and thermal efficiency of these kinds of engines.

3.3.4 Limitation on the thermal efficiency of heat engine driven by chemical reactions In some cases, the heat of the thermal engine is provided by the combustion of the fuel, similar to the case of IC engines. Since the mixture of combustion products has a finite heat capacity, heat from the combustion cannot be transformed into the work by the Carnot efficiency since the temperature of the high-temperature source is reduced while it is transferred to the engine. For a reversible engine that operates between a heat source of finite and

3.3 Finite-time thermodynamics

109

constant heat capacity at TH and a heat sink with infinite heat capacity at TL, the maximum thermal efficiency is obtained from the following expression [13]:



TL TH ln (3.11) ηth,max ¼ 1  T H  TL TL Therefore, for an engine that operates between 900 K and 300 K as the temperatures of the heat source and heat sink, the thermal efficiency is predicted to be 0.451 by Eq. (3.11). Based on Eqs. (3.2) (Curzon-Ahlborn expression) and (3.1) (Carnot expression) it previously estimated as were 0.423 and 0.667, respectively. Based on Eq. (3.9), it was 0.333. For a real engine, the thermal efficiency might be none of the predicted values. By combining aforementioned mechanisms and considering other loss effects (heat loss, leakage of the working fluid, hysteresis effect of the gas, mechanical loss due to inertial effect of the crack mechanisms, and so on), it is possible to predict thermal efficiency and output power as close to real value as possible. This is the subject of research and has been done for some types of engines. For example, the effect of two finite thermal reservoirs on the thermal performance of endoreversible heat engines was studied in Ref. [14], or similar research that considered the heat leakage between reservoirs in addition to finite thermal reservoirs was studied by Chen et al. [15]. Some examples of FTT modeling of real engines will be given in Section 3.3.7. The proof of Eq. (3.11) was extensively given in Refs. [16–18].

3.3.5 Finite-time exergetic analysis of heat engines Exergetic analysis of the open and closed systems was presented in Chapter 2. For the case of the closed system that undergoes the thermodynamic process, since processes are not SSSF, the classical thermodynamic models have inappropriate accuracy. In a similar manner, the definition of exergy in such a system may be modified by the FTT concepts to have more realistic results. As was discussed in Chapter 2, for a closed system, we face three elements of exergy in the analysis: exergy of the work transfer, thermal exergy of the heat transfer, and the nonflow exergy of the system’s contents. For the case of a work transfer, since the work is ordered energy, the exergy transfers due to work transfer are precisely equivalent to the amount of the work transferred within a finite time of the process. Therefore, it is required to modify the definition of thermal exergy and nonflow exergy of the classical thermodynamics by the FTT concepts. 3.3.5.1 Thermal exergy associated with the heat transfer based on the FTT Based on the Curzon-Ahlborn limitation on the efficiency of endoreversible engines, the thermal exergy associated with the heat transfer by Eqs. (2.44) and (2.47) can be redefined as follows:

ðh i h h   i   i Q _ ¼ 1  T0 =T 0:5 _ExQ ¼ 1  ðT0 =TðAÞÞ0:5 qðAÞdA ¼ 1  T0 =T 0:5 Q (3.12a) cual tcycle A

Eq. (3.12a) can be easily proved using the definition of the thermal exergy and CurzonAhlborn equation. Different expressions based on the models of Eqs. (3.6) and (3.11) would be obtained as follows, respectively:

110

3. Advanced thermal models

ð

2

6 _ Q ¼ 6 Ex cual 4





3

7 1 + ðβ=β0 Þ T  1 0 7

qðAÞdA T0 T ðA Þ 5 0:5 β=β 2 + 1  ð Þ A 0 T ðA Þ 2 3

0:5 6 1 + ðβ=β0 Þ T 7_

 1 0 7 Q ¼6 4 T0 T 5 0:5 2+ 1 ðβ=β0 Þ T 2 3



6 1 + ðβ=β0 Þ0:5 T0 7 Q 6 7

 1 ¼ 4 T0 T 5 tcycle 2+ 1 ðβ=β0 Þ0:5 T

_ Q ¼ Ex cual

0:5

ð A



T0 1 T ð A Þ  T0





(3.12b)



 T ðA Þ ln qðAÞdA T0



 T0 T _ ln Q T0 T  T0 



T0 T Q ln ¼ 1 T0 tcycle T  T0 ¼ 1

(3.12c)

3.3.5.2 Nonflow exergy prediction based on the FTT In classical thermodynamics, nonflow exergy of the contents of a closed thermodynamic system was defined. It was expressed in Chapter 2 using Eq. (2.72) and if we neglect kinetic and potential terms of the nonflow exergy, the nonflow exergy function is defined as follows: X Exnf ¼ U + P0 V  T0 S + μ0i Ni (3.13) i

where μ0i is the chemical potential of the ith species and Ni is the number of mole of the ith species in the mixture. In FTT analysis, it can be said that if a heat engine produces work within a finite time, which the start time of the process is denoted by ti and finished at tf, the generated work is: 9 ð tf  = ð tf     W ¼ ΔExnf  T0 S_ gen :dt ) W ¼ Exnf ðti Þ  Exnf tf  T0 (3.14a) S_ gen :dt   ti ; ti ΔExnf ¼ Exnf tf  Exnf ðti Þ The last term on the right-hand side of Eq. (3.15) is related to exergy destruction (GouyStodola expression), as discussed in Chapter 2. It is clear that for a reversible engine, we have:

3.3 Finite-time thermodynamics

Wrev ¼ ΔExnf

111 (3.14b)

In the finite-time analysis, it can be said that at any arbitrary period from the start of the process say τ, the finite-time nonflow exergy of the system if the process is performed on a path called ξ0 subject to a set of constraints in the form gi in the form of is [19]:

ð tf   _ ExFTT ð τ Þ ¼ max W ð τ Þj ¼ max ΔEx  T :dt S 0 gen nf nf ξ0 ξ0 ti ξ0 (3.15a) s:t : gi ðX1 , :…Xn , Y1 , …, Yn Þ ¼ 0 It is an optimization problem in which the objective function must be maximized while the optimization is subject to a set of constraints given by gi(X1, .…Xn, Y1, …, Yn) ¼ 0. In Eq. (3.16), Xj and Yj express for any arbitrary extensive variables and its conjugate intensive one [19]. In Eq. (3.15a), ξ0 represents an ideal process suitable for modeling of a real process, ξ. Three examples of an ideal process for evaluations of the finite-time nonflow exergy of thermal engines are Curzon-Ahlborn engine, engines with friction and heat leakage between reservoirs, and engines with finite reservoirs (with finite heat capacities) were studied in Ref. [19]. Eq. (3.15a) must be maximized to obtain expressions for the nonflow exergy of thermal engines, and based on the employed model, a different expression may be obtained. In this regard, the following expression was obtained for the finite-time nonflow exergy based on Curzon-Ahlborn model [19]: 2 αH αL  0:5 T  T00:5 τ (3.15b) ExFTT nf ðτÞ ¼ ðαH + αL Þ For a heat engine with finite heat capacities of reservoirs, we have [16, 19]: " " ( ð1=ðτ + 1ÞÞ )# # T T FTT  1  ð τ + 1Þ 1 Exnf ðτÞ ¼ CT 0 T0 T0

(3.15c)

A similar approach by considering heat transfer equations from/to reservoirs in the form of Q ¼ α(ΔTn)m was studied by Xia et al. [20] and following form of the finite-time nonflow exergy was obtained by the solution of the following nonlinear equation: 2 3 6 7 6 7 6 7 7  6 T 6 7 FTT FTT  1 Exnf ðτÞ ¼ Exnf , rev  Exnf ðτÞ + ΔU 68 7 3ð1=mÞ 9ð1=nÞ 2 6> 7 FTT > 6< 7 = Exnf ðτÞ + ΔU 6 7 n 5 4 T 4 5 > > ατ ; :

(3.15d)

where Exnf, rev is nonflow exergy obtained in classical thermodynamics as per Eq. (3.13). Eq. (3.15c), which was presented by Xia et al. [20], was solved for three cases, including generalized radiative heat transfer law (where m ¼ 1 and n ¼ 4), generalized convective heat transfer law (where n ¼ 1), and a fixed amount of heat transfer various expression for the

112

3. Advanced thermal models

nonflow exergy under these models were given. For more detail, refer to Ref. [20]. It should be noted that in Refs. [16, 19, 20], the nonflow exergy is called availability and denoted by A. Similar research can also be found in a study that was conducted by Stanislaw et al. [21] to give various shapes of thermal exergy based on different models. 3.3.5.3 Exergetic efficiency of endoreversible heat engines based on the FTT Exergetic efficiency of an endoreversible heat engine with finite conductance of heat transfer from/to thermal reservoirs that were depicted in Fig. 3.1 is [22]: εcual ¼

 0:5 Wcual ¼ 1  T0 =T ¼ ηcual Qh Ex

(3.16a)

It is a clear conclusion since the engine is assumed to be endoreversible; hence, its thermal efficiency and exergetic efficiency are equivalent. If one wishes to consider the external irreversibility of heat transfer, too, the definition of the exergetic efficiency would be changed as follows:  0:5 Wcual 1  T0 =T   (3.16b) ¼ εcual ¼ 1  T0 =T ExQH If external irreversibilities are also considered, different expressions for exergetic efficiency of the hot air engines, based on other models (Eqs. 3.6, 3.9, and 3.11) would be obtained as follows, respectively:

1 + ðβH =βL Þ0:5 T0   1

T0 T 2 + 1 ðβH =βL Þ0:5 Wmax 1 + ðβH =βL Þ0:5 T

   ¼ (3.16c) ε ¼ QH ¼ T0 1  T0 =T Ex 0:5 2+ 1 ðβH =βL Þ T   Wf 0:5 1  T0 =T   ¼ 0:50 (3.16d) ε ¼ QH ¼ 1  T0 =T Ex



TL TH ln 1 Wmax T H  TL TL   ε ¼ QH ¼ (3.16e) =T 1  T Ex 0

3.3.6 Other aspects of the finite-time thermodynamics FTT is used in thermal science to provide some parameters and criteria to obtain high performance of the system or define constraints to simulate a thermal engine with a realistic approach. These concepts might be optimal time and path of thermodynamic processes, thermodynamic length, potential structures, chemical work of chemical processes, and so on. The first aspect, which is related to find the optimal time and path of the thermal process,

3.3 Finite-time thermodynamics

113

is addressed in this section. Other aspects that are out of the scope of this book can be found in Refs. [4, 13, 23, 24] and their related references. 3.3.6.1 The optimal time and optimal path of the thermal process However, the FTT is used in the aforementioned explanations to find the maximum potential of power generation in heat engines with a more realistic basis compared to classical thermodynamics; it has other applications too. One application is to find the detailed time path of the processes of heat engines to yield the maximum power [13]. Similar approaches may be employed to find the optimized time path of processes but with other criteria, for example, maximum thermal efficiency, maximum exergetic efficiency, and the minimum entropy production or minimum exergy destruction. Another role of FTT is to find generic models for simulation of real systems in a similar way that in classical thermodynamics, the cycles such as Carnot cycle, Otto cycle, Diesel cycle, Stirling cycle, Ericson cycle, and Brayton cycles are used as the generic model for heat engines. With the introduction of time constraints and corresponding time-dependent losses, this required possibility to provide a more realistic generic model for a real engine is provided by the FTT [13]. As one application for optimizing a heat engine with consideration of the finite time of the process as a decision variable of optimization, consider that it is required to optimize a Curzon-Ahlborn engine that was depicted in Fig. 3.1. The efficiency of this engine was obtained by Eq. (3.2) that is an efficiency that is obtained when the power of the engine is maximized; therefore, it is not the maximum achievable thermal efficiency. If the total cycle period is fixed (tcycle ¼ cte) (practically, it means that in a real case, the engine rotation frequency is constant), the goal is maximizing either thermal efficiency, exergetic efficiency, the revenue of the engine, or minimizing entropy generation, that is, minimizing the exergy destruction of this engine. The internal processes of the Curzon-Ahlborn engine are quite similar to the Carnot engine, that is, one isotherm process of heat absorption from the hot reservoir, one isotherm process of heat rejection to the cols reservoirs, and two isentropic compression and expansion processes. Since in Curzon-Ahlborn engine only external irreversibility of the cycle is assumed to be in two heat transfer processes, and it is assumed that expansion and compression processes are spontaneous processes (duration times of these processes are assumed to be zero); therefore, we have: tcycle ¼ tH + tL ¼

60 Nr

(3.17)

where tH and tL are durations of heat absorption and heat rejection processes, respectively. In Eq. (3.17), Nr is the constant rotational speed of the engine in rpm (revolution per minute). The 60  tH, opt ). The obgoal is to find optimal values of either tH or tL, for example tH, opt (tL, opt ¼ N r jective function, as mentioned before, might be one of the objectives that were mentioned earlier (maximizing either thermal efficiency, exergetic efficiency, the revenue of the engine, or minimizing entropy generation, that is, minimizing the exergy destruction of this engine). From Eqs. (3.3a) and (3.3b), we have:

114

3. Advanced thermal models

Th ¼ TH 

Tl ¼ TL +

QH ¼ TH  α H tH QL ¼ TL + αL tL

QH

60  tL Nr

αH

αL

(3.18a)

QL

60  tH Nr

(3.18b)

Based on Eqs. (3.18a) and (3.18b) expressions for thermal efficiency, exergetic efficiency, and output power of the Curzon-Ahlborn engine as functions of tH or tL are obtained as follows: 0 1



Tl ¼1 ηth ¼ 1  Th

B BT L + @

C QL

C A 60 αL  tH Nr

QH TH  αH tH



QL TL + αL tL



Tl ¼10 ηth ¼ 1  Th B B TH  @

1

(3.19a)

(3.19b)

C QH

C A 60  tL Nr 13

αH

9 82 0 > > > > > > B C7 > > QL 6 > > > > B C

T + > > 6 7 L > > @ A > >6 7, 60 > > ( , ) > > 6 7





α  t L H = < 6 7 Tl TL T N L r 6 7

ε¼ 1 1 ¼ 61  1  7 > QH Th TH TH > > > 6 7 > > TH  > > 6 7 > > α t > > 6 7 H H > > > > 4 5 > > > > > > ; : 9 82 3 > > > > > >6 7 > > > > 6 7 > >

> > > > 6 7 > > Q L > 6 7 ( , ) , > >





> TL + = < 6 7 Tl TL T α L tL L 6 17 ε¼ 1 1 ¼ 61  0 1 7 > 6 7 Th TH TH > > > > > 6 > > B C7 > >6 Q 7 H > > B C > >

6 7 T  H > > @ A > >4 5 60 > > > > αH  tL ; : Nr

(3.20a)

(3.20b)

3.3 Finite-time thermodynamics

2

0

13

B C 6 BTL + QL C7 6 @ A7 6 7 60 7

6



αL  tH 6 7 Q T Q :N N H H r l r _ 6 7

1 1 ¼ W¼ 6 7 Q tcycle Th 60 H 6 7 TH  6 7 αH tH 6 7 4 5

2

115

(3.21a)

3

6 7 6 7

6 7 QL 6 7





6 TL + 7 Q T Q :N α t 6 H H r l L L _ ¼ 17 1 ¼ W 61  0 7 6 7 tcycle Th 60 6 7 B C Q 6 B TH  H C 7 6 @ A7 4 5 60 αH  tL Nr

(3.21b)

If every parameter (QH, QL, TH, TL, αH, αL, and Nr) except tH or tL is assumed constant, it is possible to find the optimum values of tH or tL; therefore, tH, opt or tL, opt are obtained based each objective as follows: dηth dηth ¼ 0 ) tH, opt OR ¼ 0 ) tL, opt dtH dtL

(3.22a)

dε dε ¼ 0 ) t0H, opt OR ¼ 0 ) t0L, opt dtH dtL

(3.22b)

_ _ dW dW ¼ 0 ) t00H, opt OR ¼ 0 ) t00L, opt dtH dtL

(3.22c)

The process of optimization was provided by a schematic graphic in [13] that is regenerated in Fig. 3.2. In this figure, Eqs. (3.19a, 3.19b), (3.20a, 3.20b), and (3.21a, 3.21b) are plotted in tH–tL space, that is, tH is the horizontal axes and tL is the vertical axes. Based on this figure, the engine should be designed so that the values of tH and tL is located in the hatched area of this figure. The optimal values of tH, opt and tL, opt are located at the intersection of the triangle line (tcycle ¼ tH + tL ¼ cte) and plots of each objective (Eqs. (3.19a, 3.19b), (3.20a, 3.20b), and (3.21a, 3.21b)). The aforementioned analysis was conducted for the Curzon-Ahlborn engine and can be extended in a similar manner for other engines with other types of irreversibilities. Through optimal control on the duration of the process, the optimal path for these processes is also found so that, for example, entropy generation of the process during the path of the process is minimized. See also Refs. [25, 26].

116

3. Advanced thermal models

FIG. 3.2 Schematic of the graphical optimization of a heat engine to find optimal processes’ time.

3.3.7 Case studies of heat engines analyzed by the FTT model Two case studies, including the Otto cycle and Stirling engine for predicting spark-ignition IC engines and Stirling engines, are discussed, respectively. FTT was also used to give more realistic thermal models of other cycles, such as the Diesel cycle [27, 28], Brayton cycles [29–31], Ericsson cycle [32, 33], and Rankine cycle [34, 35]. For details regarding FTT models applied on these cycles, refer to their relevant mentioned references. 3.3.7.1 Otto cycle (i) Otto cycle in the classical thermodynamics:

In the classical thermodynamics, the Otto cycle, which is a closed standard air cycle, is provided as a generic model for spark-ignition IC engines. As is known from the textbooks of the classical thermodynamics, for example Refs. [36, 37], this cycle is composed of four processes, including: 1. Process 1 ! 2: Isentropic compression process. It simulates the compression of the air-fuel mixture in a real spark-ignition IC engine when the piston moves from the BDC (bottom dead center) to the TDC (top dead center). 2. Process 2 ! 3: Heat absorption process at constant volume from a hot reservoir, which is also called an isochoric heat absorption process. It models the combustion process of the air-fuel mixture in a real spark-ignition IC engine when the piston is at the TDC. 3. Process 3 ! 4: Isentropic expansion process, which represents the suction process of the air-fuel mixture in a real IC engine when the piston moves from TDC to BDC. 4. Process 4 ! 1: Isochoric heat rejection process to a heat sink. This process is substituted for the exhaust process of the combustion products from a real spark-ignition IC engine when the piston is at the TDC.

3.3 Finite-time thermodynamics

117

(A)

(B) FIG. 3.3 Process diagrams of the Otto cycle (A) Pressure-Volume diagram; (B) Temperature-Entropy diagram.

These processes are schematically depicted on the T-S and PdV diagram in Fig. 3.3. In the classical thermodynamics the Otto cycle is simulated as follows: ηOtto ¼ 1 

QL mcv ðT4  T1 Þ T1 ðT4 =T1  1Þ ¼1 ¼1 QH mcv ðT3  T2 Þ T2 ðT3 =T2  1Þ

On the other hand, for the isentropic process, we have [36, 37]: γ1 γ1 T2 V1 V4 T3 ¼ ¼ ¼ T1 V2 V3 T4

V1 V4 ¼ rv ¼ V2 V3

(3.23a)

(3.23b)

From Eqs. (3.23a) and (3.23b), we have: ηOtto ¼ 1 

T1 1 ¼ 1  γ1 T2 rv

(3.24)

118

3. Advanced thermal models

where rv and γ are volumetric compression ratio of the engine and the adiabatic gas constant (γ ¼ cp/cv), respectively (cp and cv are specific heat capacity at constant pressure and constant volume (kJ kg1 K1), respectively). The output estimated work of the Otto cycle is:   1 WOtto ¼ ηOtto QH ¼ 1  γ1 mcv T1 ðT4 =T1 + 1Þ rv (3.25)  

1 γ1 ¼ mcv T1 1  γ1 ðT3 =T1 Þrv  1 rv where T1 is considered as the suction temperature, which is usually equal to the environmental temperature (T1 ¼ T0) for natural aspiration IC engines. Moreover, the mean effective pressure of the engine is defined as follows: Pm ¼

WOtto WOtto ¼ V1  V2 VSwept

(3.26)

Based on given formulation, for a natural aspiration spark-ignition IC engine with volumetric compression ratio of 10 and suction temperature and pressure of 288 K and 100 kPa, the thermal efficiency is 0.602 (60.2%) and if 1800 kJ kg1 of heat is transferred to the engine in each cycle, the output work and mean effective pressure are 1083.6 kJ kg1 and 1456 kPa, respectively. For a real engine with similar specifications, the thermal efficiency is less than 30%; hence, the Otto cycle is unsuccessful in predicting the thermal performance of a real engine. Through providing an FTT model for the FTT, it is possible to provide a better approximation of the thermal performance of the real spark-ignition IC engine. In Section 3.5, by introducing a combine finite-time/finite-speed thermodynamic, a very accurate model for the thermodynamic cycle of real spark-ignition IC engines will be given and validated by the performance of real engines. (ii) Otto cycle in the finite-time thermodynamics:

Several attempts [38–40] have been conducted to present an FTT model for Otto cycle since the FTT was invented by the Cursor-Ahlborn in 1975. The early approaches were quite similar to what presented by Curzon-Ahlborn for the Carnot engine but applied to the Otto cycle. In most recent works, various irreversibilities of real engines were considered in the model to provide more accurate predictions as possible. For example, Ge et al. [39] considered the effect of irreversibilities of external heat transfer as well as the variable specific heat of the working fluid in their model. In another work [40], they provided an FTT model for Otto engine in addition to effects that were considered in their previous work, and they also considered the mechanical friction due to the movement of the piston and heat transfer loss from the engine. One FTT model for Gasoline engines that have been used by Barjaneh and Sayyaadi [41] that takes into account the heat loss from the engine to the environment is as follows: For the isentropic compression process of the Otto cycle, we had: T2 ¼ T1 rγ1 v

(3.27a)

3.3 Finite-time thermodynamics

119

On the other hand, for the heat absorption process (2 ! 3), we have: T3 ¼

Q23 + T2 m:cv,23

(3.27b)

where Q23 denotes the heat given to the cycle and m is the mass of the gas-fuel mixture inside the cylinder (m ¼ ma + mf). In Eq. (2.28b), cv, 23 is the average volumetric specific heat of the air between states #2 and #3. The heat added to the engine during this process is calculated based on the heating value of the fuel as follows [42]: Qin ¼ Q23 ¼ mf :QHV :ηC

(3.27c)

where mf is the mass of consumed fuel, QHV is the heating value of the fuel (lower heating value or the higher heating value), and ηC is the combustion efficiency that assumed to be 95% [43]. This is a typical value of the combustion efficiency of SI engines. However, the exact value of this parameter would be obtained with combustion models of the combustion chambers. On the other hand, the mass of the air is the cylinder of a natural aspirated spark-ignition IC engine is given as follows [43]:

VSwept :BSFC:ηv (3.28a) ma ¼ 588:41ρa 3456 where ρa, BSFC, and VSwept are the air density (kg m3), the brake-specific value of the fuel consumption (g kW1 h1), and the swept volume (displacement volume) of the piston in the cylinder (cm3), respectively. In Eq. (3.28a), ηv is the volumetric efficiency of the engine, which is obtained as follows [43]: ηv ¼

_ 260493:13W:BSFC VSwept :Nr

(3.28b)

_ is the engine’s power (kW) and Nr is the engine’s rotational speed (rpm). where W The 3–4 process is an adiabatic expansion, and in FTT it is modeled same as an adiabatic expansion model of classical thermodynamics; therefore, in a similar manner to the compression process, the gas temperature at the final stage of expansion process was calculated as follows: T4 ¼ T3 =rγ1 v

(3.29)

Therefore, temperature and pressure at four states of the Otto cycle (states #1, #2, #3, and #4) are obtained. The output work, output power, and thermal efficiency of the engine considering the heat loss to the environment are: WOtto, FTT ¼ m½cv,23 ðT3  T2 Þ  cv, 41 ðT4  T1 Þ  WQ   m½cv,23 ðT3  T2 Þ  cv,41 ðT4  T1 Þ  WQ Wnet, FTT _ ¼ W Otto, FTT ¼ tcycle tcycle   Nr m½cv,23 ðT3  T2 Þ  cv,41 ðT4  T1 Þ  WQ ¼ 60

(3.30a)

(3.30b)

120

3. Advanced thermal models

ηOtto, FTT ¼

WOtto, FTT m½cv,23 ðT3  T2 Þ  cv,41 ðT4  T1 Þ  WQ ¼ Qin mcv,23 ðT3  T2 Þ

(3.30c)

In Eqs. (3.30a), (3.30b), and (3.30c), WQ is the heat loss to the environment from the cylinder’s wall given as follows [44]: WQ ¼

  πεhBT 3 tcycle V0 2Tw B + ð1 + rv Þ 1 + rγ1  v 16 Ap T3

(3.31)

where ε is phenomenological constant considered to be 0.1 [44], h is the averaged heat transfer coefficient, which is assumed to be 1000 W m2 K1 [44], B is the bore diameter of the cylinder, Ap is facing area of the piston, V0 is clearance volume, and Tw is the average temperature of the cylinder wall assumed to be 480 K [44]. For usage in the model, an accurate estimation for volumetric specific heat as a function of the gas temperature would be used to obtain better results. Abu-Nada [45] presented the following expression for this property: cv ¼ 2:506  1011 T2 + 1:454  107 T 1:5  4:246  107 T + 3:162  105 T 0:5  1:512  104 T1:5 + 3:063  105 T 2  2:212  107 T3 + 1:3303  R

(3.32)

where R is the gas constant. More precise FTT models that encounter mechanical friction, gas throttling loss, pumping loss, imperfect combustion, and so on were also developed in a Ph.D. thesis of Cullen [44]. He provided a sophisticated FTT model that was developed based on foundations that were previously presented by other researchers [22, 45–47], and he verified the presented model in simulation of a real gasoline engine. In this method, the work output of the Otto cycle that was previously given by Eq. (3.30a) is modified as follows: WOtto, FTT ¼ m½cv,23 ðT3  T2 Þ  cv,41 ðT4  T1 Þ  IR cv,41 ðT4  T1 Þ  WQ  Wf

(3.33a)

where Wf is the work loss due to the mechanical friction which is [38]: Wf ¼ μv2p tcycle ¼

60μv2p Nr

0:30Wrev tcycle 1:8WOtto,revr ¼ π 2 S2 π 2 S2 Nr 2S 2S:Nr vp ¼ 2Sf ¼ ¼ 60 tcycle μ¼

(3.33b)

where vp and S are the average linear speed of the piston (m s1) and piston’s stroke, respectively. In Eq. (3.33b) is the reversible work of the Otto cycle obtained previously by Eq. (3.25). In Eq. (3.33a), IR is a dimensionless parameter that represents various internal irreversibilities such as gas throttling, pumping loss, and imperfect combustion. A good approximation for this factor is 1.4 (IR ¼ 1.4) [48].

3.3 Finite-time thermodynamics

121

In Eq. (3.33a), for estimation of T2 and T3, Eqs. (3.27a) and (3.27b) are used; but, for T4 the following expression is presented in [44]:

  T3 tcycle V0 Tw 1γ B + ð1 + rv Þ 1 + rv  2 8 Ap T3

T4 ¼ + 2Tw  T3 B + x34 t34 2

(3.33c)

where t34 is the duration of the power stroke process (t34 ¼ 14 tcycle ) and x34 is the mean position of the piston which is: x34 ¼ 0:5S + x0

(3.33d)

In Eq. (3.33d), x0 is the initial position of the piston. If work is obtained by Eq. (3.33a), the power could also be found by dividing it to the cycle period (in a similar manner to Eq. (3.30b)), and the thermal efficiency is obtained in a similar manner to Eq. (3.30c). In [44], further analysis for exhaust gases of the engine was given that was not presented here but will be given in Section 3.5, where the combined FTT-FST model will be given. In addition, Cullen verified his model on a real engine that can be found in Ref. [44]. Since, in Section 3.5, a more accurate model will be presented, the application of the model to real engines is postponed to Section 3.5. 3.3.7.2 Stirling cycle Another closed standard air cycle is the Stirling cycle, which is the generic model for simulation of Stirling engines and coolers. This cycle is a closed regenerative cycle in which its working fluid is a gas such as the air, helium, and hydrogen. “Closed cycle” means this working fluid is permanently contained within the thermodynamic system; therefore, it is called a closed cycle. On the other hand, these engines are known as the external heat engines implying that thermal energy is provided by external heat sources. This is unlike the IC engine that the working fluid participates in the combustion process, that is, they are known as internal combustion heat engines. The term “regenerative” that is usually referred to these types of engines implies that in these engines there is a heat exchanger known as the regenerator, and its role is the regeneration of thermal energy between processes in order to magnify the thermal efficiency. Since Stirling systems are less familiar for readers in comparison to the IC engine, in this section, first of all, it is tried to introduce it very briefly. More details must be found in sophisticated related references [49–57]. The Stirling engine was invented by Robert Stirling and his brother in 1816. From the advantages of this engine, the suitable efficiency and wide range of employed fuels or heat sources can be pointed out. Since these engines do not use internal combustion processes like IC engines, their operation is relatively silent in comparison. It has been identified that the Stirling engine has excellent potential for meeting continuous power requirements in the range of 5–20 kW for electrical power generation and water pumping requirements in third world countries [58]. Stirling engine operates by cyclic compression and expansion of working fluid at different temperatures, such that there is a net conversion of heat energy to mechanical work. In this regard, the working gas is compressed in the cold section of the engine and expanded in the

122

3. Advanced thermal models

hotter portion, so the net effect is the conversion of heat into work. An internal heat exchange called the regenerator increases the Stirling engine’s thermal efficiency as described before by regenerating thermal energy between processes. The closed-cycle operation causes the transmission of the heat from the heat source to the heat sink through the working fluid in which the net effect is the power generation. A Stirling engine system operates with at least one heat source, one heat sink, and it benefits several heat exchangers, including a heater, a cooler, and a regenerator. Some types may combine or dispense with some of these. In small, low power engines, heater and cooler simply consist of the walls of the hot and cold space(s), respectively. For larger systems that a higher value of the power is acquired since a greater surface area is required to transfer heat, these heat exchangers are separated parts of the engine. Typical heaters may consist of tubes with internal and external fins. Similarly, cooler of large capacity Stirling system consists of a heat transfer surface that is cooled by air or liquid coolants, for example, cold water. An internal heat exchanger that stores temporary heat when the working fluid passes through it first in one direction and releases it when the working fluid flows in reverse direction is the regenerator that is placed between hot and cold spaces. For this purpose, the regenerator is made of a metal mesh or foam, and benefits from the high surface area, and therefore a high heat capacity as well as the low conductivity. Designing Stirling engine heat exchangers is a balance between high heat transfer on the one side and low-pressure drop on the other side in order to give a higher thermal performance to the system. On the other hand, the reverse effect of heat exchangers is that these parts increase the total dead volume of the engine. The dead volume has a negative effect on the performance of a Stirling system. Therefore, in designing a Stirling system, a balance should be performed on heat transfer performance on the one hand, and on the pumping loss and dead volume on the other hand. Three known configurations for Stirling engine are given based on the way that working fluid is moved between the hot and cold spaces: These configurations are alpha-type, beta-type, and gamma-type Stirling engines. The alpha Stirling engine uses two power pistons and two working cylinders, including one hot piston cylinder and one cold piston cylinder. These two cylinders are connected by a pipe, and pistons are controlled by a common driving mechanism. The beta Stirling engine comprises a cylinder with a hot end and a cold end. It has one power piston and another piston that is called “displacer,” which its role is the direction of the working fluid between the hot and cold ends. The gamma configuration is something between alpha and beta types. It has two cylinders that, in one cylinder, a displacer, with a hot and a cold end, is placed, and in another cylinder, the power piston is installed. In gamma engines, two pistons are typically in parallel and joined 90 degrees out of phase on a crankshaft. Cylinders of gamma systems are joined so that it forms a single space; therefore, the gas pressure in both cylinders is the same. A schematic of three configurations of the crank-type Stirling system is given in Fig. 3.4. More details regarding these configurations may be found in Refs. [51, 53]. Stirling engines use various types of crank mechanisms such as Ross-Yoke, Rhombic, Ringbom, Swashplate, and free piston. Moreover, other kinds of Stirling engines such as rotary type and thermoacoustic ones have been developed. Stirling engine in reverse mode is used as Stirling cooler in refrigeration and cryogenic applications. More detail regarding mechanisms, operation, and design of Stirling engines can be found in Refs. [49–57].

123

3.3 Finite-time thermodynamics

Regenerator Cold volume

Hot volume a Heater

Cold piston Cooler

Hot piston

(A) Hot volume Heater Regenerator

Displacer

Cold volume Cooler Working piston

a

(B) Heater Hot volume

Working piston Cold volume a

Regenerator

Cooler

Displacer

(C) FIG. 3.4 Various configurations of crank type Stirling engine including (A) Alpha engine; (B) Beta engine; (C) Gamma engine [59].

124

3. Advanced thermal models

(i) Stirling cycle in the classical thermodynamics:

Another closed standard air cycle is the Stirling cycle, which is the generic model for simulation of Stirling engines and coolers. In the classical thermodynamics, this cycle is composed of four processes as follows [36, 37]: 1. Process 1 ! 2: Isothermal compression process while the heat is rejected to a heat sink. 2. Process 2 ! 3: Isochoric (constant volume) process in which the heat is absorbed from a regenerator. 3. Process 3 ! 4: Isothermal expansion process where the heat is absorbed from a heat source. 4. Process 4 ! 1: Isochoric (constant volume) process in which heat is rejected to a regenerator. These processes are schematically depicted on the T-S and PdV diagram in Fig. 3.5.

(A)

(B) FIG. 3.5 Processes diagrams of the Stirling cycle (A) Pressure-Volume diagram; (B) Temperature-Entropy diagram.

3.3 Finite-time thermodynamics

125

In processes 2 ! 3 and 4 ! 1 from and to the working fluid using a regenerator, if there is an ideal regeneration process, it can be proved that the thermal efficiency of the Stirling cycle is equal to the Carnot cycle [37]. Due to several sources of internal and external irreversibilities as well as the imperfectness of the regeneration process, the thermal efficiency and output work of a real Stirling cycle are much lower than the corresponding value of the Carnot cycle. Evaluation of the real performance of Stirling systems has been the subject of much research so far. One method to have a better estimation is using the FTT model, while more sophisticated models for a better approximation will be discussed in this chapter in Sections 3.5, 3.7, and 3.8. (ii) Stirling cycle in the finite-time thermodynamics

Similar to the Otto cycle, several tasks have been dedicated to provide finite-time thermodynamic modeling of Stirling cycles [60–65]. Since in the next sections, more accurate models for thermal simulation of Stirling engines will be provided, in this section, only a brief introduction regarding the FTT model of the Stirling cycle from the aforementioned references is cited. In this regard, an FTT model for simulation and optimization of a solar Stirling cycle is presented by Ahmadi et al. [65]. The actual useful heat that is absorbed by the dish collector, considering conduction, convection, and radiation losses, is given as [13]:  4   TL4 (3.34a) qu ¼ IAapp η0  Arec hðTH  TL Þ + εδ TH where h is the conduction/convection heat transfer coefficient in the solar dish, TH and TL are the absorber and ambient temperatures, respectively. Moreover, I is the direct solar flux intensity, η0 is the collector optical efficiency, Arec and Aapp are the absorber and collector aperture areas, respectively. In Eq. (3.34a),ε is the emissivity factor of the collector and δ is the Stefan-Boltzman constant (5.670374419…  108 W m2  K4). The thermal efficiency ηs of the dish collector is obtained as follows [63]: ηs ¼

 4  qu 1 hðTH  TL Þ + εδ TH ¼ η0   TL4 IAapp IC

(3.34b)

If the temperature of the working fluid in isothermal expansion and compression processes is denoted as Th and Tl, respectively, the finite heat transfer rate in the regenerator is given as follows: Qr ¼ mcv εr ðTh  Tl Þ (3.35a) where cv is the volumetric specific heat of the working fluid in the regenerative processes, εr is the effectiveness of the regenerator, and m is the mass of the working fluid. The effectiveness of the regenerator is determined based on sophisticated approaches for thermal analysis of these devices, see, for example, Ref. [56]. Thus, the regenerative heat loss in two regenerative processes is given: ΔQr ¼ mcv ð1  εr ÞðTh  Tl Þ

(3.35b)

Due to the significant irreversibility of the finite rate of heat transfer in the regenerator, the time of the regenerative processes cannot be ignored in comparison to durations of isothermal expansion/compression processes [62]. In this regard, it is assumed that the gas temperature during regenerative processes is given as follows [33, 63, 64, 66]:

126

3. Advanced thermal models

dT ¼ Mi dt

(3.36a)

where M is a proportionality constant, which is independent of the temperature difference and depends only on the property of regenerative material, called the regenerative time constant, and  sign belongs to the heating (i ¼ 1) and cooling (i ¼ 2) processes, respectively [63]. Therefore, the regenerative time is: tre ¼

T h  Tl T h  Tl + M1 M2

(3.36b)

For a Stirling cycle, the amounts of absorbed heat from the heat source (Qh) and the reject heat to the heat sink (Ql) are as follows:  4   Th4 th ¼ mRT h ln ðrv Þ + mcv ð1  εr ÞðTh  Tl Þ Qh ¼ hhc ðTH  Th Þ + hhr TH Ql ¼ ½hlc ðTH  Th Þtl ¼ mRT l ln ðrv Þ + mcv ð1  εr ÞðTh  Tl Þ

(3.37a) (3.37b)

where hhc and hhr are convection and radiative heat transfer coefficients at the hot end of the engine (heater), respectively. Similarly, in Eq. (38b) hlc is the convective heat transfer coefficient on the cold side heat exchanger (cooler). In addition, R and rv are the gas constant and volumetric compression ratio of the engine, which is equal to the ratio of volumes of two regenerative processes, that is rv ¼ V2/V1 ¼ V3/V4. In addition, there is heat leakage directly from the heat source to the heat sink which is directly proportional to the temperature difference of sources and the cycle time, and it is determined from the following expressions [33, 63, 64, 66]: Q0 ¼ k0 ðTH  TL Þtcycle

(3.38)

where k0 is the conductive thermal bridge loss coefficient and tcycle is the cyclic period of the temperatures. The net heat absorbed from the heat source (QH) and heat rejected to the heat sink (QL) is obtained using the following expressions: QH ¼ Qh + Q0 (3.39a) QL ¼ Ql + Q0

(3.39b)

The total cyclic period of the cycle is: tcycle ¼ th + tl + tre ¼

mRT h lnðrv Þ + mcv ð1  εR ÞðTh  Tl Þ  4  hhc ðTH  Th Þ + hhr TH  Th4 mRT l lnðrv Þ + mcv ð1  εR ÞðTh  Tl Þ hlc ðTl  TL Þ

1 1 + + ð Th  Tl Þ M1 M2 +

(3.40)

3.3 Finite-time thermodynamics

127

Considering the cyclic period of the Stirling engine, the power output and thermal efficiency of the engine are given as follows: _ Stirling, FTT ¼ WStirling, FTT ¼ QH  QL W tcycle tcycle ηth, Stirling, FTT ¼

QH  QL QH

(3.41a) (3.41b)

Substituting Eq. (3.40) in Eqs. (3.41a) and (3.41b) leads to the following expressions for power and thermal efficiency of the Stirling, we have: _ Stirling, FTT ¼ W

ηth, Stirling, FTT ¼

T h  Tl Th + LðTh  Tl Þ T + LðTh  Tl Þ  4 + l + M ð Th  Tl Þ 4 hlc ðTl  TL Þ hhc ðTH  Th Þ + hhr TH  Th 2

Th  Tl

(3.42a)

3

Th + LðTh  Tl Þ T + L ð Th  Tl Þ 6 7  + l + MðTh  Tl Þ5 Th + LðTh  Tl Þ + ½k0 ðTH  TL Þ4 hlc ðTl  TL Þ 4 4 hhc ðTH  Th Þ + hhr TH  Th (3.42b)

where cv ð1  εr Þ R lnðrv Þ

1 1 1 M¼ + mRlnðrv Þ M1 M2 L¼

(3.42c) (3.42d)

Consider that there is intended to define the optimum value of the working fluid in the hot side to have a maximized power; therefore, we must have: _ Stirling, FTT ∂W ¼ 0 ) Th, opt ∂Th

(3.43)

By employing Eq. (3.43), and if temperature ration of the engine is defined as x ¼ Tl/Th, we obtain [67]: 8 5 4 3 2 1 + A6 T1opt + A5 T1opt + A4 T1opt + A3 T1opt + A2 T1opt + A1 ¼ 0 A7 T1opt

where

(3.44)

  2 8 5 + K2 h2hr TH + 2K2 hhc hhr TH A1 ¼ K1 hhc TL2  K2 h2hc TH

(3.45a)

4 + 2K2 h2hc TH  2K1 xhhc TL A2 ¼ 2K2 hhc hhr TH

(3.45b)

A3 ¼ K1 hhc x2  K2 h2hc

(3.45c)

A4 ¼ 4K1 hhr TL2 Th3

(3.45d)

128

3. Advanced thermal models

A3 ¼ K1 hhc x2  K2 h2hc

(3.45e)

4  8K1 hhc xT L + 2K2 hhc hhr TH A5 ¼ 2K2 h2hr TH

(3.45f)

A6 ¼ 4x2 K1 hhr  2K2 hhc hhr

(3.45g)

A7 ¼ K2 h2hr

(3.45h)

K ¼ M ð 1  xÞ

(3.45i)

K1 ¼ ð1 + KÞh2lc

(3.45j)

K2 ¼ ðx + KÞxhlc

(3.45k)

Th, opt is obtained by the numerical solution of Eq. (3.44). Substituting Th, opt into Eqs. (3.42a) and (3.42b)), the maximized power and its corresponding thermal efficiency are obtained [67]. The thermal efficiency of the entire system is a product of thermal efficiency of the collector (Eq. 3.34b) and efficiency of the Stirling cycle (Eq. 3.42b); therefore, we have: ηm ¼ ηs ηt

(3.47)

For a given Stirling cycle, the initial operating data are assumed as given by Yaqi et al. [63] as follows: x ¼ Tl =Th ¼ 0:5, hhc ¼ hlc ¼ 200W K1 ,hhr ¼ 4  108 W K4 , ngas ¼ 1mol, rv ¼ 2, εr ¼ 0:9, η0 ¼ 0:85,R ¼ 4:3J mol1 K1 , cv ¼ 15J mol1 K1 , δ ¼ 5:67  108 W m2 K4 , TL ¼ 320K, TH ¼ 1100K, T0 ¼ 300K, h ¼ 20W m2 K1 , TH ¼ 1100K, I ¼ 1000W m2 , C ¼ 1300,

1 1 ¼ 2  105 s K1 + M1 M2 Accordingly, following the optimal specifications of the solar Stirling cycle based on (3.42a) and (3.42b) are obtained: _ Stirling,FTT ¼ 10:641kW,andη ¼ 29:05% Th, opt ¼ 884:0K, Tl ¼ 442:0K, W m The Carnot efficiency of this cycle is 50.0% (the efficiency of the ideal Stirling cycle is equal to the Carnot cycle), it is clear that considering FTT and nonideal regenerator, the calculated efficiency is much lower than the ideal efficiency. The aforementioned optimization was only based on one objective function (output power) and one decision variable (Th). In a more generalized optimization, three decision variables were considered in Ref. [65] as follows: Th: The highest temperature of the working fluid at isothermal. Tl: The lowest temperature of the working fluid at the isothermal process. TH: The absorber temperature.

3.4 Finite-speed thermodynamics

129

Optimization was performed while both output power and thermal efficiency were maximized simultaneously in a multiobjective optimization approach (multiobjective optimization will be discussed later in Chapter 7) while following constraints were imposed on optimization process [65]: Th > T l

(3.48a)

Tl > 320K

(3.48b)

700K < TH < 1600K

(3.48c)

0:4 < x < 0:7

(3.48d)

At the same condition as before, the following results were obtained by a new optimization approach [65]: _ Stirling, FTT ¼ 21:587kW, and η ¼ 26:68% Th, opt ¼ 1248:0K, Tl, opt ¼ 539:4K, TH, opt ¼ 1569:2K, W m The aforementioned FTT analysis for the Stirling cycle was presented only as an example.

3.4 Finite-speed thermodynamics Finite-speed thermodynamics (FST) was introduced in the works of Stoian Petrescu and his colleague [68–73]. He selected the term of finite-speed thermodynamics in an analogy to the finite-time thermodynamics. Indeed, in their model, they provided the change of working gas over the piston due to the piston motion that is different from the bulk pressure. Based on their analysis, when a piston moves in a cylinder of an engine in the compression process, the gas pressure over the piston’s surface is a little higher than the bulk gas pressure inside the cylinder; therefore, in a real case, the compression process consumes more work than the work of compression predicted by the classical thermodynamics. In the expansion process, the case is reversed, that is, the gas pressure over the piston’s face is a little lower than the bulk gas pressure. Then, the expansion process generates a lower work than the predicted expansion work of the classical thermodynamics. These pressure losses are caused by the finite speed movement of the piston that generated pressure waves in the working spaces. These waves propagate in the working gas at the speed of sound [19, 28]. The overall effect of this process for a cycle of an engine is the generation of less power compared to predicted power when this phenomenon is not considered. Therefore, indeed, finite speed is a kind of work loss in engines. In the opinion of the author, FST is not a concept in nonequilibrium thermodynamics like FTT, and this terminology is presented just as a generic to the FTT. Regardless that FST is considered as a branch in thermodynamics or only a work loss in the engine, it has a significant effect in deviation of the operation of real engines from classical thermodynamics. The author and his colleagues used this concept in several studies regarding thermal modeling of engines (Stirling and Otto engines) alone [74] or in combination with other advance thermal approaches [41, 75–81] and found it a useful for a more precise prediction of the thermal performance of engines.

130

3. Advanced thermal models

In the finite-speed thermodynamics (FST), pressure losses due to the finite speed of the piston that is calculated in terms of the average molecular speed and piston speed. Moreover, in the calculation process, this term is integrated into a similar effect caused by mechanical friction. Finally, the effective gas pressure in the cylinder of the engine is corrected as follows [68–73]:

avp ΔPf  (3.49a) Pcorr ¼ P 1  c P ΔPFST ¼ 

avp ΔPf  c P

(3.49b)

In Eqs. (3.49a) and (3.49b), the sign (+) is used for the compression process, and sign () is used for expansion one. Also, vp is the piston velocity, a is a coefficient, c is the speed of sound, and ΔPf is the pressure drop due to the mechanical friction between the piston and cylinder. In Eqs. (3.49a) and (3.49b), a and c by some modification from Refs. [68–73] are: a¼γ (3.49c) pffiffiffiffiffiffiffiffiffi c ¼ γRT (3.49d) pffiffiffiffiffiffiffiffiffi pffiffiffiffiffi (In Refs. [68–73], it was given that a ¼ 3γ and c ¼ 3RT , while c is introduced as the instantaneous average speed of molecules.) Different correlations for the pressure drop due to the mechanical friction of the piston and cylinder (ΔPf) are available. As an example, the following correlation was suggested by Heywood [43]:

Nr (3.49e) ΔPf ¼ 0:97 + 0:15 1000 where Nr is the angular rotational speed of the engine in rpm. Finally, the work loss due to the motionð of can be calculated as follows: the piston motion

γup ΔPf  dV (3.50)  Wloss, FST ¼ c P In the aforementioned equations, P is the bulk pressure of the gas in the cylinder. In order to complete the model for higher accuracy, in continuation of the calculation procedure, the pressure loss due to the throttling of the working gas when it passes through the engine’s valves (IC engines) or spaces (Stirling engines) is considered too. This is different from pressure drop in heat exchangers (e.g., heater, cooler, and regenerator of Stirling engines). Accordingly, Eq. (3.49a) is modified as follows: ΔPFST, thottling ¼ 

γvp ΔPf ΔPthrottling   c P P

ΔPthrottling ¼ C:v2p

(3.51a) (3.51b)

where C is a constant. It is assumed to be 0.0045 [82]. Therefore,

work loss becomes as follows: ð γup ΔPf ΔPthrottling   dV (3.52) Wloss ¼  c P P

3.4 Finite-speed thermodynamics

131

This work loss is subtracted from the theoretical work of the engine that is obtained from the classical thermodynamics or FTT.

3.4.1 Case studies in the FST Several case studies on the application of the FST in the modeling of various engines have been performed. Several examples of Otto, Diesel, and Stirling cycles were presented in Refs. [65, 69, 70, 72, 75, 82]. In Ref. [65], a sophisticated FST model and optimized power, second-law efficiency, and pumping losses of a Stirling cycle in a multiobjective optimization while eleven parameters of the cycles such as engine’s rotation speed, mean effective pressure, temperatures of heat source and heat sink (thermal reservoirs), temperature differences between thermal reservoirs and the working fluid, regenerator’s specifications (length, diameter, and number of gauzes of the matrix), piston diameter, and stroke were considered as decision variables. The model is used to optimize a real Stirling cycle reviewed in Ref. [83], and using the model; the proposed cycle was optimized. More detail regarding the formulation of the model that was used to predict the aforementioned three objective functions can be found in Ref. [65]. In the literature of Thermal modeling of the Stirling system, it was discussed in practice, and it is impossible to have isothermal compression and expansion processes due to some theoretical limitation [51]. Therefore, Urieli and Berchowitz [51] suggested adiabatic expansion/compression processes instead of isothermal processes of the original cycle in the classical thermodynamics. In other researches, Babaelahi and Sayyaadi [78, 79] suggested that these two processes (expansion/compression processes) are neither isothermal nor adiabatic; but, those are polytropic processes. Considering these processes to be adiabatic or polytropic causes more realistic results than predicted when these are considered as isothermal processes. In a study conducted by Hosseinzadeh et al. [75], a model based on the combination of the FST and polytropic models was presented and shown that can predict a real Stirling cycle very accurately. They called their model the PFST model, which is abbreviated from the polytropic and finite-speed thermodynamics [75]. If the cycle is similar to Fig. 3.5; but, processes 1 ! 2 and 3 ! 4 are polytropic instead of isothermal processes; based on the methodology, the net polytropic work of Stirling cycle for expansion/compression processes are [75]:    ne 1 rv  1 x rvnc 1  1 + Wpoly ¼ mRT 1 1  nc 1  ne

(3.53)

where ne and nc are polytropic ratios of expansion and compression processes, respectively; x is the temperature ratio (x ¼ T3/T1); and rv is the volumetric compression ratio. Then three pressure drops including pressure drop due to the gas throttling effect plus the pressure drop in the regenerator, pressure drop due to FST effect, and pressure drop due to the mechanical friction are calculated

 [75]: 2 2 

as2follows 15 B Pm s Nr (3.54a) ΔPthrot® ¼ N 2 γ NR DR 2Rð1 + 1=xÞðT3 + ΔTL Þ 900

132

3. Advanced thermal models

where N,NR, DR, and B are the number of regenerator’s mesh in each regenerator, the number of the regenerator for the Stirling engine, the diameter of the regenerator, and cylinder bore (piston’s diameter), respectively. Moreover, Pm, s, and N2r are instantaneous mean gas pressure inside the engine, piston’s stroke, and rotational speed of the engine (rpm), respectively, and ΔTL is the temperature difference between the working fluid in the cooler and the heat sink. The pressure drop due to the FST effect for a complete cycle of the Stirling engine could be given as [69]:





s:Nr 4Pm rv ln ðrv Þ ΔPFST ¼ 60 ð1 + 1=xÞð1 + rv Þ rv  1 sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi! (3.54b)  

 γ 0:5 1 T1  ΔTH pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 1+  T3 + ΔTL R T3 + ΔTL where ΔTH is the temperature difference between the working fluid in the heater and the heat source. Other terms were introduced previously. For pressure drop due to the mechanical friction, a different model than Eq. (3.49e) was used as follows [69]:

  ð0:4 + 0:0045s:Nr Þ  105 1 (3.54c) 1 ΔPf ¼ 1  ð1=3rv Þ rv Therefore, total pressure drop due to three effects is: ΔPtot ¼ ΔPthrott® + ΔPFST + ΔPf

(3.55)

Then, a second law efficiency that encounters the effect of irreversibilities related to pressure losses of the piston motion (FST) and mechanical friction, as well as throttling and regenerator loss, is defined as follows [70, 75]: 2 3 6 3ð1  1=3rv Þð1 + rv Þð1 + 1=xÞΔPtot 7 7

ηII ¼ 1  6 4 5 T1  ΔTL : ln ðrv Þ 4Pm :ηc :ηirr, reg : T3 + ΔTH

(3.56)

where ηc and ηirr, reg are the Carnot efficiency and regenerator irreversibility, respectively.

T1  ΔTL (3.57a) ηc ¼ 1  T3 + ΔTH ηirr, reg ¼

1  0:72X1 + 0:28X2 1 + ηc ðγ  1Þ ln ðrv Þ 

(3.57b)

In Eq. (3.57b), X1 and X2 are related terms of loss coefficient in the regenerator that are [69]:

133

3.4 Finite-speed thermodynamics

X1 ¼

1 + 2M + eBr 2ð1 + MÞ

(3.57c)

M + eBr 1+M

(3.57d)

X2 ¼

In Eqs. (3.57c) and (3.57d), M is the ratio of the heat capacity of the gas (working fluid) to the heat capacity of the regenerator’s materials (meshes); hence, M¼

Cg mcv ¼ Cr mr cr

(3.57e)

Moreover, in Eqs. (3.57c) and (3.57d), for Br, we have [70, 75]:



hr A r 30 B r ¼ ð1 + M Þ mcv Nr

(3.57f)

where hr h and Ar AR stand for heat transfer coefficient and regenerator area, respectively. Correlation for determination of these parameters is given in Refs. [70, 75] and also with more sophisticated analysis and details in Ref. [56]. Having the value of ηII in Eq. (3.56) and its subsequent equations (Eqs. 3.57a–e), and considering Eq. (3.53) for the Wpoly, the net power of the Stirling cycle is given as follows [70, 75]:

Nr _ (3.58) W Stirling, net ¼ ηII :Wpoly 60 The rate of heat addition to the Stirling cycle in the polytropic model is [75]:





  1ne  2πNr 2πNr 1  εr  1ne rv  1 1nc _ ¼ mRT 1 rv  xrv + Q H ¼ QH 60 60 γ1 1  ne

(3.59)

Therefore, the thermal efficiency of the Stirling cycle is obtained as follows: ηth,Stirling ¼

_ Stirling, net W ¼ _H Q

 mRT 1

1  εr γ1





ηII :Wpoly e c r1n  xr1n v v

  1ne  r 1 + v 1  ne

(3.60)

In Eqs. (3.59) and (3.60), εr is the effectiveness of the regenerator that can be found from the correlation given in Ref. [75]. The definition of the regenerator’s effectiveness can also be found in Refs. [51, 56]. The volumetric compression ratio of the ideal Stirling cycle is defined in classical thermodynamics as rv ¼ Vmax/Vmin ¼ V2/V1 ¼ V3/V4; however, for more accuracy in calculation, it can be modified for real engine considering the dead volume (including volumes of hot and cold spaces, regenerator, and transfer ports) as follows: rv ¼

Vmax + Vdead Vmin + Vdead

(3.61)

134

3. Advanced thermal models

TABLE 3.1 Specifications of the GPU-3 Stirling engine [75]. Parameter

Value

Parameter

Value

Heater temperature

977 K

Number of regenerators

8

Cooler temperature

288 K

Regenerator diameter

22.6 mm

Mean pressure

41.4 MPa

Regenerator length

22.6 mm

Frequency

41.7 Hz

Wire diameter/Material

40 μm/Stainless Steel

Piston diameter

69.9 mm

Number of mesh layers

308

The swept volume of Displacer

120.8 cc

Polytropic index of expansion space

1.77 [78]

The swept volume of Piston

113.1 cc

Polytropic index of compression space

1.56 [[78]

The dead volume of comp. space

28.7 cc

Mass of the working fluid

1.13 g

The dead volume of Exp. space

30.5 cc

Working fluid

Helium

More details regarding the calculation of the dead volume and the volumetric compression ratio for the betta type Stirling engine were given in Ref. [75]. The PFST model was employed to model (and optimized) a real Stirling engine in Ref. [75]. The benchmark Stirling engine was GPU-3 (Ground Power Unit) with a 3-kW nominal power that was designed and built for the Army by General Motors. This engine is a single cylinder with the rhombic drive mechanism. It is capable of producing a maximum engine output of approximately 7.5 kW with hydrogen working fluid and 3.91 kW obtained with helium working fluid [84]. This engine was tested in the NASA Lewis Research Center [85]. General specifications of the GPU-3 Stirling engine were summarized and indicated in Table 3.1. The predicted results of the PFST model are compared with experimental data in Table 3.2. However, there is still a significant error in power prediction using the PFST model (+49.2%); if results are compared to simple FST model, it will be observed that using that simple FST model, the power and thermal efficiency are predicted as 4.16 kW and 12.6%, respectively [75]. It means that errors of the simple FST model are +71.9% and  8.7% (as difference), respectively. In Section 3.7, more accurate thermal models will be introduced to have much accuracy, but more complexity. In addition, details of the simple FST model that do not consider polytropic expansion/compression processes and are based on isothermal processes can be found in Ref. [86].

TABLE 3.2

Comparison of the predicted power and thermal efficiency by PFST model and experimental data.

M model

Output power (kW)

Power prediction error (%)

Thermal efficiency (%)

Thermal efficiency prediction error (%)

PFST model [75]

3.61

+49.2

23.30

+2.00

Experimental [85]

2.42



21.30



Working gas: Helium, TH ¼ 977 K, TL ¼ 288 K, Pmean ¼ 4.14 MPa, and Nr ¼ 2500 rpm.

3.5 Combined finite-time/finite-speed models

135

3.5 Combined finite-time/finite-speed models In Sections 3.3 and 3.4, FTT and FST were introduced as more accurate thermodynamic models in comparison to the classical thermodynamic models. Case studies were given, and the applications of FTT and FST were developed to simulate the thermodynamic cycles of thermal engines. It is expected that if both concepts are used simultaneously, more accurate results may be obtained. Therefore, in this section, the combined finite-time/finite-speed model is reviewed by presenting a case study. The methodology is presented for the spark-ignition IC engine based on the Otto cycle and examined on two real natural aspiration spark-ignition IC engines.

3.5.1 Combined finite-time/finite-speed model for the Otto cycle In previous sections (Section 3.3), the Otto cycle was introduced, and an FTT model was discussed to enhance the accuracy of the analysis of the cycle compared to the classical thermodynamic model. A more accurate model based on the combined FTT-FST modeling was presented by Barjaneh and Sayyaadi [41]. In this section, the methodology is introduced very briefly and examined on real engines as case studies. According to the methodology, Eq. (3.27a) is modified as follows [86]: T2 ¼ T1 rβvðγ1Þ

 β¼ 1+

γvp ΔPthrott ΔPf + + c Pm, i Pm, i



(3.62a) (3.62b)

Pm, i ¼

P 1 + P2 2

(3.62c)

Tm, i ¼

T 1 + T2 2

(3.62d)

2S:Nr 60

(3.62e)

vp ¼

where S is the stroke and Nr is the rotational speed. Other temperatures, including T3 and T4, are defined as per Eqs. (3.27a) and (3.33c), respectively. The output work of the cycle that was already presented by Eq. (3.33a) is modified for FST and trotting losses as follows [41]: WOtto, FTTFST ¼ m½cv,23 ðT3  T2 Þ  cv, 41 ðT4  T1 Þ  IR cv, 41 ðT4  T1 Þ  WQ  Wf  WFST  Wthrott

(3.63)

where Wf and WQ are the work loss due to the mechanical friction and engine’s heat transfer loss that was already given by Eqs. (3.33b) and (3.31), respectively. In Eq. (3.63), WFST and Wthrott are losses due to the motion of the piston and gas throttling effect when it passes through inlet/outlet valves of the engine. For these work losses, we have [41]:     (3.64a) Wthrott ¼ Vdisp 0:97 + 0:046vp ¼ B:S 0:97 + 0:046vp

136 WFST ¼

þn

3. Advanced thermal models

h γvp i o Pm, i 1  dV c

ð2 n ð4 n h h γvp i o γvp i o Pm,34 1  Pm,12 1 + dV + dV ¼ c c 3 1

(3.64b)

Then, the output power and thermal efficiency are: _ Otto, FTTFST ¼ WOtto, FTTFST ¼ WOtto,FTTFST :Nr W tcycle 60 ηOtto, FTTFST ¼

WOtto, FTTFST Qin

(3.65a) (3.65b)

where Qin was given previously by Eq. (3.27c).

3.5.2 Evaluation of thermal energy of the exhaust gases from Otto engines IC engines are not only used in automotive industries. They might be used for stationary power generation that sometimes is in the form of the prime mover of a CHP or CCHP system. These engines can also be hybrid with a Stirling engine that absorbs the thermal energy of the exhaust gases of the IC engine as its heat source [44, 87]. In such cases, it is essential to evaluate the temperature, flow rate, and thermal energy of the exhaust gases. This thermal energy is used in the analysis of the bottoming cycle (in CHP, CCHP, and Stirling cycle of the hybrid IC-Stirling system). In addition, even if the IC engine is used alone without any bottoming cycle, this thermal energy must be evaluated for the determination of heat and exergy losses of the engine. Therefore, in this part analysis for estimation of the temperature, mass flow rate, and thermal energy of exhaust gases in natural aspiration spark-ignition IC engines based on the procedure given in Refs. [43, 88] and also summarized in Refs. [41, 44] is provided. In the final stage of the engine’s operation, the discharged valve opens, and the piston moves upward, and the exhaust gas is withdrawn from the cylinder. Immediately after opening the discharged valve and before moving piston, the gas pressure in the cylinder tends to drop to the ambient pressure. Therefore, some amount of gas comes out of the piston. This process is called blowdown. To obtain the remaining gas in the cylinder, an estimate of the exhausted gas in the cylinder during the blowdown process was obtained as follows [43, 88]:

+1 nv CD AR P4 0:5 2 2ðγγ1 Þ _ bd ¼ pffiffiffiffiffiffiffiffiffiffi γ (3.66) m γ+1 R g T4 where nv is the number of valves, CD is the discharge coefficient, AR is the throat area. _ bd tbd mdisp ¼ m  m

(3.67)

Therefore, the magnitude of the remaining gas was obtained as [44]: where tbd is the blowdown period. This value was taken to be approximately about 7% of the total cycle period [44]. The temperature of the gas inside the cylinder after blowdown can be obtained through [44]:

137

3.5 Combined finite-time/finite-speed models

T5 ¼ T4 





Rmass, cyl :Qex :tcycle 60Rmass, cyl :Qex ¼ T4  mdisp :cp, ex mdisp :cp, ex :Nr

(3.68a)

m  disp m

(3.68b)

where Rmass, cyl ¼

Finally, the thermal energy, enthalpy, and the temperature of exhaust gases after the blowdown process are given as follows [44]: Qex ¼ Qin  Wnet

(3.69a)

_ bd tbd cp, T4 T4 + mdisp cp, T5 T5 Htotal ¼ m

(3.69b)

2Htotal  Tex, avg ¼  m cp, T4 + cp, T5

(3.69c)

3.5.3 Case study The developed FTT-FST model was validated on two case-studied engines in Ref. [41]. The first engine was a natural aspiration gasoline-fired four-stroke spark ignitions IC engine that is Ricardo Wave, which is also studied in Ref. [44]. The second case study was gasoline, and CNG fired a natural aspiration engine called the EF7 engine [41]. Here, the application of the FTT-FST model is only examined on the first engine and compared to the model of Ref. [44]. More details regarding the comparison to the EF7 engine can be found in Ref. [41]. The general specification of the Ricardo Wave engine is given in Table 3.3. FTT-FST model of [41] that was also given in this section (Section 3.5) was compared with the pure FTT model of Ref. [44] that was reviewed in Section 3.4 in predicting the real test data of Ricardo Wave engine in Table 3.4.

TABLE 3.3 General specifications of the Ricardo wave engine. Parameters

Values [44]

Number of cylinders

4

Effective engine’s volume (CC)

2000

Bore (mm)

85.0

Stroke (mm)

88.0

Compression ratio

9.0

Rotational Speed (rpm)

1000–6500

Power (kW)

85 at 6000 rpm

138

3. Advanced thermal models

TABLE 3.4 Comparison of the FTT and the combined FTT-FST models on prediction of the performance of the Ricardo Wave engine (given in Table 3.3) at 3000 rpm. Parameter

FTT model [44]

Combined FTT-FST Model [41]

Test data [44]

Power (kW)

133.6

69.4

50.0

Thermal Efficiency (%)

67.0

34.8

27.6

Error in power prediction (%)

+167.5

+39.0



Error in thermal efficiency prediction (as difference) (%)

+39.4

+7.2



More detail and comparison were given in Ref. [41]. In addition, analysis of the exhaust gases of the engine that are essential for implementing the engine in CHP, CCHP, and hybrid engines (Otto-Stirling engines) was conducted and presented in Ref. [41]. Table 3.4 indicates that using a combined FTT-FST model, more accurate results would be obtained compared to the FTT. A higher accuracy needs to be obtained by numerical models (CFD models) or other advanced approaches that might come from a combination of various approaches in future research. The FTT-FST model was successfully used in modeling of CHP and CCHP [89, 90] and hybrid Otto-Stirling system [87].

3.6 Quasi-steady models (case study: Stirling engines) As it was observed in the previous section, however, using FTT, FST, and combined FTTFST models, the accuracy of thermal models for unsteady energy systems (such as different thermal engines) is improved compared to the classical thermodynamic models, significantly; nevertheless, this accuracy does not grow further, and still there is a significant inaccuracy for many applications (see Tables 3.2 and 3.4). On the other hand, those models are presented for cycles of systems, not real systems. It means that using those model thermodynamic cycles of Otto and Stirling cycles are analyzed; but the real engines have many practical details and parameters that are not included in those thermal models. For example, it is known that the thermal performance of a Stirling engine is affected by geometrical and thermal specifications of its heat exchangers (heater, cooler, and regenerator), type of the engines (alpha, beta, gamma), type of crank mechanisms (Rhombic, Ross-Yoke, and so on), geometrical specifications of cylinder, piston, and displacer, different volumes (swept volume and dead volume), stroke, crank rotation angle, phase difference between cylinder, and many other parameters that are absent in previous thermal modeling of Stirling cycle (FTT, FST, and combined FTT-FST models). Therefore, using FTT, FST, and combined FTT-FST models, it is impossible to study the effects of these parameters on the performance of real systems. Quasi-steady models have been invented to cover the aforementioned shortcomings of FTT, FST, and combined FTT-FST models. This kind of thermal model considers nonsteady behaviors of thermodynamic systems such as different kinds of engines in which the thermodynamic state of the system is not constant and changes with time. In engines, as was found in previous sections, the thermodynamic state of the working fluid is altered within the thermodynamic cycle. In quasi-steady models, the processing time is divided into a number of

3.6 Quasi-steady models (case study: Stirling engines)

139

infinite small time intervals so that the state of the system in each interval is assumed approximately constant and dependent on the state of the previous interval. Most famous quasisteady models have been developed for modeling of Stirling engine (not Stirling cycle). In this section, quasi-steady models that have been developed for thermal modeling of Stirling engines/coolers are discussed. Similar approaches must be developed for other energy systems. An early quasi-steady model was developed by Urieli and Berchowitz [51] and is called the “Adiabatic model,” and then the adiabatic model was modified to take into account irreversibilities and nonideal heat transfer behaviors of heat exchangers and the modified model was named as the “Simple model.” The Adiabatic and Simple models that were presented by Urieli and Berchowitz were built based on the early foundation that given in the early 20th century by Schmidt and called Schmidt isothermal model [91]. However, the Schmidt model considered isothermal expansion/compression processes, Urieli and Berchowitz [51] showed that this assumption leads to paradoxical results for real engines and they suggested adiabatic expansion/compression processes instead; therefore, they called their early model as the Adiabatic model. The adiabatic model is a quasi-steady zero-dimensional numerical model that only considers the processing time (not dimensions of the system) in its calculation procedure. Therefore, it is the quasi-steady and zero-dimensional model. In the literature of Stirling engine ([51, 76–81]), this model is also called as the second-order thermal model (the first-order models are cyclic and analytical models such as FTT and FST model, and the CFD models are called as the third-order models).

3.6.1 Schmidt model However, the Schmidt model is not a quasi-steady model, and it is a closed-form (analytical) model that was given for the Stirling engine (not Stirling cycle). Nevertheless, it is used when the quasi-steady model is used as a first iteration (quasi-steady model that will be given in the next sections are numerical methods that use a number of iterative calculations, in the first iteration, Schmidt model is used). The Schmidt model is developed based on the following assumptions: 1. 2. 3. 4. 5. 6. 7. 8.

Processes are steady-state, steady-flow (SSSF). The regeneration process is complete and ideal. Instantaneous pressure is constant over entire system. The working fluid is an ideal gas. There is a constant mass of the working fluid without any leakage. There is no temperature gradient within heat exchangers. The surface temperature of the piston and cylinder is constant. The rotational speed of the engine is constant.

In the Schmidt model, the Stirling engine is divided into three spaces: expansion space, compression space, and the regenerator. The work of engine as we know for a cycle is: þ W ¼ PdV

(3.70)

140

3. Advanced thermal models

On the other hand, from the ideal gas law, we have: X PV P X Vi ¼ PV ¼ mRT ) m ¼ RT i R i Ti i

(3.71a)

Since the engine is divided into three compartments—expansion space, compression space, and the regenerator—the instantaneous gas pressure within the engine is obtained as follows: mR

Pð θ Þ ¼ Vc ðθÞ Ve ðθÞ Vr ðθÞ + + Tc Te Tr

(3.71b)

where Vc, Ve, and Vr are volumes of compression space, expansion spaces, and the regenerator. In addition, in Eq. (3.71a), θ is the crank angle. If the crank system imposed sinusoidal change on volumes, we have [49]: Vc ðθÞ ¼ 0:5VC ð1 + cos θÞ + 0:5VC ð1 + cos ðθ  αÞÞ + Vdc

¼ 0:5VE 1  cos θ + kp ð1 + cos ðθ  αÞÞ

(3.72a)

Ve ðθÞ ¼ 0:5VE ð1 + cos θÞ + Vde

(3.72b)

Vr ðθÞ ¼ VR

(3.72c)

where VC, VE, and VR are total volumes of compression space, expansion space, and the regenerator. Moreover, Vdc and Vde are the dead volumes of compression and expansion spaces, respectively. In Eq. (3.72a), α is the phase angle between two pistons processes. kp is the ratio of the total volume of compression space to the total volume of expansion space, that is kp ¼ VC/VE. Based on Eqs. (3.72a-c), the total volume of the engine as a function of the crank’s angle is obtained as follows: V ðθ Þ ¼ V e ðθ Þ + V c ðθ Þ + V R 

 (3.73) Ved + Vec + VR ¼ 0:5VE 1 + kp ð1 + cos ðθ  αÞÞ + 2 VE By substitution of Eqs. (3.72a)–(3.72c) in Eq. (3.73b), we have: 

 1  cos θ + kp ð1 + cos ðθ  αÞÞ 2mRT r + 2ν Pð θ Þ ¼ 1 + cos θ + VE x

(3.74a)

where T E  TC

TE ln TC

ln ðxÞ + μdc v ¼ μde  μr 1x Tr ¼

(3.74b)

(3.74c)

3.6 Quasi-steady models (case study: Stirling engines)

141

μde ¼

Vde VE

(3.74d)

μdc ¼

Vdc VE

(3.74e)

μr ¼

VR VE

(3.74f)

In Eqs. (3.74a) and (3.74c), x is the temperature ratio, that is x ¼ TC/TE. Based on instantaneous pressure, the output work of the Stirling cycle is calculated as follows [49]: ð 2π dV ðθÞ W ¼ We + Wc ¼ PðθÞ dθ dθ θ¼0 ð 2π ð 2π dV e ðθÞ dV c ðθÞ (3.75) dθ + dθ PðθÞ Pð θ Þ ¼ dθ dθ θ¼0 θ¼0

kp sin α pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ) WSchmidt ¼ π ð1  xÞPmean VE Z + Z2  X 2 where mean effective pressure is [49]: Pmean ¼ Pmax Also, we have:

ZX Z+X

0:5



Pmax Z+X ¼ Pmin ZX

In Eqs. (3.75) and (3.76a,b), X and Z are [49]: h i0:5   X ¼ ð1 + xÞ2 + 2ðx  1Þkp cos α + k2p

(3.76b)

(3.77a)

 Z¼

   4x ðμde + μdc + μR Þ + 1 + x + kp x+1

(3.76a)

(3.77b)

The thermal efficiency of the Stirling engine is [49]: ηth, Schmidt ¼ 1 

TL TH

(3.78)

Further details on Schmidt analysis applicable to three types of engines—alpha, beta, and gamma engines—were given [91]. The Schmidt analysis as the first isothermal model developed for the Stirling engine (not Stirling cycle) was employed on the GPU-3 engine with the specification given in Table 3.1 by Walker [50]. The results were also reported in Ref. [75] and indicate that the power and thermal efficiency of this engine are estimated as 6.83 kW and 55.2%, respectively. From Table 3.2,

142

3. Advanced thermal models

the real value of the power and thermal efficiency of this engine are 2.42 kW and 21.30% [85], respectively. Therefore, using Schmidt theory, +182.2% error in prediction of power and +33.9% error (as difference) in the prediction of the thermal efficiency exist. Therefore, however, the Schmidt theory is the first model for thermal simulation of Stirling engines, it had no accuracy for practical application; nevertheless, its results are used as the first iteration of other quasi-steady numerical models developed later.

3.6.2 Adiabatic model As was discussed in Section 3.6.1, the Schmidt model has very low accuracy. On the other hand, since in Schmidt analysis, the engine is divided into three parts, and expansion, compression spaces are isothermal, it means that temperature in heater and expansion space is the same. Similarly, the temperatures of cooler and compression space are the same too. It means that heater and cooler are unnecessary parts of the engine and play no role in the operation of the Stirling engine, but in a real case, it is known that it is not correct and heater and cooler are essential parts of the engine. The adiabatic model is a quasi-steady thermal model that was developed by Urieli and Berchowitz [51]. In their model for solving the paradox of Schmidt model, compression and expansion processes are assumed to be adiabatic, not isothermal processes. Their model is a numerical zero-dimensional model that is developed based on only time differentiation. Adiabatic expansion and compression spaces were the core of the Adiabatic and Simple analyses. The adiabatic model was developed based on the following assumptions: All processes are performed in a steady-state condition. The engine is working at constant angular velocity. The working fluid is an ideal gas. The engine is working with adiabatic compression and expansion spaces. Instantaneous pressure of compression and expansion spaces are uniform. Working fluid temperatures in the cooler and heater are constant. The temperature of the working fluid in the regenerator is linearly changed. The kinetic and potential energies of gas streams are negligible. Heat is transferred to the working fluid only in the heater and cooler. The total mass of the working gas is constant. Heat leakage between compression and expansion spaces and heat transfer to the environment are negligible. 12. The leakage of gas to the outside of the engine is assumed to be zero. 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11.

In the Adiabatic model, the Stirling engine was divided into five compartments, as illustrated in Fig. 3.6. In this figure, single suffixes c, k, r, h, and e represent five compartments, including compression space, Kooler (cooler), regenerator, heater, and expansion space, respectively. Double suffixes (ck, kr, rh, he) are dedicated to four interfaces between the compartments. For example, ck refers to the interface of the compression space and the Kooler (cooler). The principal governing equations are derived based on state equations of the ideal gas and conservation equations of mass and energy in each compartment. By developing the governing equations for five compartments of the Stirling engine, a system of ordinary

143

3.6 Quasi-steady models (case study: Stirling engines)

Wc Vc mc Tc

Vh mh Th Vk mk Tk Vr mr Tr mhe’ mrh’ mck’ mkr’ Qr Qh The Qk Tkr Trh Tck

We Ve me Te

p

Compression

Kooler (Cooler)

c

k

Temperature

ck

Regenerator

Heater

r

Expansion

h

e Te

Th

kr Tr

Tc

Tk

rh

he

FIG. 3.6 Schematic model for five compartments of the Stirling engine [51].

differential equations is obtained. In this case, a nonsteady form of governing equations is used in the form of derivation to the time. For an engine, when it rotates at constant rotational d . For the speed, the derivation to the time is equal to derivation to the crank angle, that is dtd ¼ dθ d sack of simplicity in writing equation, from now one to the end of this chapter, dθ is shown by d . d, that is d≡ dθ For a sample compartment as per Fig. 3.6, the energy balance can be written as follows:   _ i cp T i  m _ o cp To ¼ dW + cv dðmT Þ dQ + m (3.79) where dQ  is rate heat absorption or rejection from (or into) the working fluid via the external    dQ dW ¼ and dW shows the net output work dW ¼ dW resources dQ ¼ dQ dt ¼ dθ . dt dθ By differentiation, from the ideal gas law, we have: PV ¼ mRT )

dP dV dm dT + ¼ + P V m T

(3.80)

The total mass of the gas in the engine, which is constant, is: m ¼ mc + mk + mr + mh + me ) dmc + dmk + dmr + dmh + dme ¼ 0

(3.81)

For heat exchangers (heater, cooler, and regenerator) where volume and temperature are constant, we have:





dmi dPi dP Vi ¼ ) dmi Þi¼h,k, r ¼ (3.82a) mi i¼h,k, r Pi i¼h,k, r Ti i¼h, k,r R

144

3. Advanced thermal models

From the energy balance, for compression space based on Fig. 3.6, and also considering the ideal gas law, we have:

dP  PdV c + Vc γ cp Tck dmc ¼ dW c + cv dðmc Tc Þ ) dmc ¼ (3.82b) dW c ¼ PdV c RT ck Similarly, for expansion space, we have:



dP PdV e + Ve γ dme ¼ RT he

(3.82c)

By substituting Eqs. (3.82a)–(3.82c) into Eq. (3.81), expression foe pressure change in the engine is obtained as follows:

dV c dV e γP + Tck The

 (3.83) dP ¼  Vc Vk Vr Vh Ve + +γ + + Tck Tk T r T h The From the energy balance equation for the three heat exchangers (cooler, regenerator, and heater), we have: Vk cv dP + cp ½Tck dmc  Tkr ðdmc + dmk Þ R

(3.84a)

Vr cv dP + cp ½Trk ðdmc + dmk Þ  Trh ðdmc + dmk + dmr Þ R

(3.84b)

Vh cv dP + cp ½Trh ðdmc + dmk + dmr Þ  The ðdme Þ R

(3.84c)

dQk ¼ dQr ¼

dQh ¼

In summary, for each compartment of Fig. 3.6, five governing equations, as summarized in Table 3.5, are defined. If governing equations were derived previously and summarized in Table 3.5 for the five compartments of the Stirling engine (illustrated in Fig. 3.5), a system of ordinary differential equations (ODE) is obtained. This system of ODE, as well as its governing boundary condition, is summarized in Table 3.6. In equations of Table 3.5, variables including Vc, Ve, dVc, and dVe are obtained based on the configuration of the engine as analytic functions of the crank angle θ and Vk, Vr, and Vh are dead volumes of the engine within cooler, regenerator, and heater. These parameters are determined based on geometric specifications of heat exchangers and regenerator. Regenerator temperature is considered a mean of the effective temperature of the heater and cooler [51]. Table 3.6 indicates that, except for the aforementioned constants, it is required to solve 16 ordinary differential equations including 22 variables over a complete cycle, among which seven derivatives (Tc, Te, Qk, Qr, Qh,Wc, and We) are numerically integrated and nine variables and derivatives (W, P, Vc, Ve, mc, mk, mr, mh, and me) are analytically determined [51]. Moreover, there are six boundary conditions and mass flow rate equations, as indicated in Table 3.5.

3.6 Quasi-steady models (case study: Stirling engines)

145

TABLE 3.5 Governing equation of the adiabatic analysis [77]. Description

Temperature

Governing equation

dP PdV + V γ dm ¼ RT

dV c dV e γP + The

Tck  dP ¼  Vc Vk Vr Vh Ve + +γ + + Tck Tk Tr Th The dV dP dm dT ¼ T V + P + m

Heat

dQk ¼ VcRv dP + cp ½Ti dmi  To dmo 

Work

dW ¼ PdV

Mass

Pressure

This model is a “quasi steady-flow” system because over each integration interval, the four mass flow rates including mck, mkr, mrh, and mhe remain constant while no acceleration effects are considered. The most straightforward approach to solving a set of ordinary differential equations is to formulate it as an initial-value problem, in which the initial values of all the variables are known, and the equations are integrated from that initial state over a complete cycle [51]. If the vector y represents the unknown variables, y(θ) must be evaluated in such a way that satisfies both the differential equations and the initial conditions while the initial condition is denoted by y(θ ¼ 0) ¼ y0, and the set of differential equations is denoted by dy ¼ f(θ, y). A numerical solution to this problem is accomplished by first computing the values of the derivatives at θ ¼ 0(θ0) and proceeding in small increments, that is, Δθ to a new angle, that is θ1 ¼ θ0 + Δθ. Therefore, the solution is composed of a series of short straight-line segments that approximate the exact function y(θ) [51]. Since the initial value of gas temperature in compression and expansion spaces, as well as the enthalpy flows, is not known, the problem is a boundary-value problem, not an initialvalue problem. Due to the cyclic operation of the engine, the system can be formed as an initial value problem by assigning arbitrary initial conditions that are usually specified by the Schmidt model, and integrating the equations through several complete cycles until a cyclic steady state has been attained [51]. This process is used to convert the boundary-value problem to an initial-value problem. Then, the obtained initial-value problem is solved using the Classical fourth-order Runge-Kutta method. Classical fourth-order Runge-Kutta method is usually used to solve systems of boundary value ordinary differential equations; however, in this case, the equations were initial-value problems. Initial estimation of the working fluid mass is usually performed using the Schmidt model [51]. Moreover, initial values of gas temperature in compression and expansion cylinders were assumed for these parameters at the beginning of the cycle and integrate equations over the complete cycle. Then, several numerical solutions were performed until the steady-state condition, in which magnitudes of temperatures at the end of the cycle converged to the corresponding temperatures at the beginning of the cycle. Therefore, the magnitude of temperatures at the start of the cycle (θ ¼ 0) should be equal to the corresponding values at the end of the

146

3. Advanced thermal models

TABLE 3.6 System of ordinary differential equations in the Adiabatic analysis [76, 77]. mR Vc Vk Vr Vh Ve + + + + Tc Tk Tr Th Te

dVc dVe γP + Tck The

dP ¼ Vc Vk Vr Vh Ve + +γ + + Tck Tk Tr Th The



mi ¼

PV i ,i ¼ c,k,r,h,e RTi

dme ¼

dmc ¼

PdV e + Ve

dP γ

Pressure

Pressure variation

Mass Mass variation

RThe PdV c + Vc

dP γ

RTck

dmi ¼ mi

dP ,i ¼ k,r,h P

_ ck ¼ dmc m

Mass flow

_ ck > 0 then Tck ¼ Tc else Tck ¼ Tk If m

Conditional temperature

m_ kr ¼ m_ ck  dmk m_ rh ¼ m_ he + dmh If m_ he > 0 then The ¼ Th else The ¼ Te



dP dV e dme  + Ve me P

dP dV c dmc dT c ¼ Tc  + Vc mc P dT e ¼ Te

Temperature variation

dQk ¼

Vk cv dP + cp ðTck dmc  Tkr ðdmc + dmk ÞÞ R

Heat output of the cooler

dQr ¼

Vr cv dP + cp ðTkr ðdmc + dmk Þ  Trh ðdmc + dmk + dmr ÞÞ R

The heat receiving and rejecting from the regenerator

dQh ¼

Vh cv dP + cp ðTrh ðdmc + dmk + dmr Þ  The ðdme ÞÞ R

Heat input to the heater

dWe ¼ PdVe

Work of expansion process

dWc ¼ PdVc

Work of compression process

cycle (θ ¼ 2π). Hence, calculations were repeated until the same gas temperatures were obtained for θ ¼ 0 and θ ¼ 2π. The system of the differential equation of the system as per Table 3.6 is in general form as follows: dy dy (3.85) dy ¼ ¼ ¼ f ðθi , yi Þ dt dθ

3.6 Quasi-steady models (case study: Stirling engines)

147

Based on the fourth-order Runge-Kutta method, for Eq. (3.85), we have: 1 yi + 1 ¼ yi + ðK1 + 2K2 + 2K3 + K4 Þ 6 where

K1 ¼ Δθ:f ðθi , yi Þ

1 1 K2 ¼ Δθ:f θi + Δθ, yi + K1 2 2

1 1 K3 ¼ Δθ:f θi + Δθ, yi + K2 2 2 K4 ¼ Δθ:f ðθi + Δθ, yi + K3 Þ

(3.86) (3.87a) (3.87b) (3.87c) (3.87d)

Fig. 3.7 illustrates the algorithm of the Adiabatic analysis. The ideal Adiabatic model of Urieli and Berchowitz [51] was employed on the GPU-3 engine with the specification given in Table 3.1. The results indicate that the power and thermal efficiency of this engine is estimated as 8.29 kW and 62.3%, respectively. From Table 3.2, the real value of the power and thermal efficiency of this engine are 2.42 kW and 21.30% [85], respectively. Therefore, using the ideal Adiabatic model, +242.6% error in the prediction of power and + 41.0% error (as difference) in the prediction of the thermal efficiency are obtained. It is observed that its accuracy is even lower than the Schmidt analysis. Nevertheless, using sophisticated models that are developed based on the ideal Adiabatic analysis with consideration of various losses, more accurate models have been achieved. The first attempt was performed by Urielia and Berchowitz themselves [51] when they presented their modified model called the Simple model. The Simple model will be discussed in Section 3.6.3. Recent models with sophisticated approaches that have considered various effects of real engines were developed by the author and his research teams in Refs. [76–79, 81]. These methodologies and results will be cited in Section 3.7, briefly.

3.6.3 Simple model Ideal Adiabatic model was given as the first attempt for developing a quasi-steady model of Stirling engine, and as it was discussed, the model has very low accuracy in predicting the thermal performance of the system. It was due to a lack of consideration of various loss mechanisms of real engines in the ideal Adiabatic model. The Simple model that was presented by Urielia and Berchowitz themselves [51] was indeed a modified adiabatic model that considers imperfect heat transfer of heat exchangers of real Stirling engine. In addition, this model considers pumping loss of working gas flow through heat exchangers. Therefore, it is expected to have higher accuracy compared to the ideal Adiabatic model given in Section 3.6.2. 3.6.3.1 Nonideal heat transfer The performance of Stirling engines for heat recovery is evaluated by regenerator effectiveness. Effectiveness is defined as a ratio of real enthalpy change to maximum enthalpy change of working fluid in the regenerator. Regenerator effectiveness changes from 0.0 (for no heat recovery) to 1.0 (for complete heat recovery). When effectiveness is less than unity, the output gas temperature from the regenerator is less than the temperature of the heater. This heat

148

3. Advanced thermal models

Start

Specifying geometrical specifications Specifying engine construction Defining operational parameters Determining initial conditions

For i (i =1: n)

Specifying

and d

Determining Ve ,Vc , dVe , dVc Determining P and m in spaces Determining dP and dm by d Numerical solution of 7 differential equations by the Runge-Kutta method Specifying the new values for parameters Saving the values in specific matrix Determining new temperature in spaces

Check

Yes

converge

Output: ideal work and thermal efficiency

No Replacing new temperature in initial conditions

FIG. 3.7 Flow chart of the ideal adiabatic thermal model [77].

End

3.6 Quasi-steady models (case study: Stirling engines)

149

should be supplied by an external heat source, which causes efficiency reduction. These definitions can be written for the heater and cooler, respectively, as follows: Qh ¼ Qhideal + Qrloss ¼ Qhideal + Qrideal ð1  εÞ

(3.88a)

Qk ¼ Qkideal  Qrloss ¼ Qkideal  Qrideal ð1  εÞ

(3.88b)

where Qrloss is the heat loss in the regenerator, Qh is the heat added to the working fluid in the heater, Qk is the heat rejection to the cooler, and ε is the regenerator effectiveness. Regenerator effectiveness could be evaluated as a function of the input and output temperatures by assuming a linear profile in the regenerator; therefore, we have [51]. ε¼

1 δT 1+ Thi  Tho

(3.89)

where δT is temperature difference between the hot and cold streams in the regenerator and Thi and Tho are hot stream temperatures at the input and output of the regenerator. _ p ðThi  Tho Þ ¼ hAwg δT) leads to the folThe energy balance equation for the hot stream (mc lowing expression for regenerator effectiveness: 1 1 NTU (3.90) ¼ ε¼ ¼ _ p 1 mc 1 + NTU 1+ 1+ NTU hAwg Convection heat transfer coefficient (h) can be calculated as follows [56]: St ¼ 0:023 Re0:2 Pr0:6 NTU ¼

StAwg A

(3.91a) (3.91b)

In Eqs. (3.90), (3.91a), and (3.91b), NTU, St, Awg, A, h, Re, and Pr are the number of transfer unit, Stanton number, wet area of gas in the heat exchanger, cross-section area of heat exchanger, convective heat transfer coefficient, Reynolds number, and Prandtl number, respectively. In the evaluation of the Reynolds number, the hydraulic diameter of the regenerator mesh is obtained as [56]: DH, r ¼

4Π Φð1  ΠÞ

(3.92a)

Awg Vmesh

(3.92b)

Φ¼

where Vmesh, Π, and Φ are volume of wires, porosity, and shape factor of the regenerator mesh, respectively. Because of the nonideal heater and cooler, the working fluid temperatures in these two heat exchangers are lower and higher than the wall temperature, respectively. By calculating the heat loss in nonideal regenerator and heat transfer calculation, the wall temperature in cooler and heater can be calculated as follows [51]: Qh ¼ Qhideal + Qrloss ¼

hh Awh ðTwh  Th Þ f

(3.93)

150

3. Advanced thermal models

where f, Twh, hh, Awh, and Qh are engine rotation frequency, wall temperature in the heater, convective heat transfer of the working fluid in the heater, heat transfer area of the heater and rate of heat transfer in the heater, respectively. Therefore, the heater temperature is corrected from the value of heater wall temperature as follows [51]: Th ¼ Twh 

Qh f hh Awh

(3.94)

In a similar manner, the cooler temperature is corrected as [51]: Tk ¼ Twk 

Qk f hk Awk

(3.95)

In Eqs. (3.94) and (3.95), the heat transfer coefficient is obtained using the following correlation [51]: hjk, h ¼

0:0791μ:cp : Re0:75 m 2DH : Pr

(3.96)

where Rem and DH are Reynolds number and hydraulic diameter of the heater or cooler, respectively. Corrected values of the heater and cooler temperatures give feedback to the solver of the system of differential equations (cited in Section 3.6.2) until the convergence criteria for the magnitude of gas temperatures are satisfied. 3.6.3.2 Pumping loss effects Pressure drops in heat exchangers due to the fluid friction cause power loss in Stirling engines. The pressure drop in heat exchangers should be calculated in order to calculate the power loss due to pressure losses. The pressure drops in heat exchangers can be obtained as [51]: ΔP ¼ 

2fRe μuV d2 A

(3.97)

where d is the hydraulic diameter, u is the velocity, V is the volume, A is the flow cross-section area, and fRe is a Reynolds friction factor. fRe is defined as follows [51]: 8 16 Re < 2000 > > < (3.98) fRe ¼ 7:343  104 Re1:3142 2000 < Re < 4000 > > : 0:75 Re > 4000 0:0791 Re The net power loss due to pressure drop in heat exchangers of the Stirling engine is evaluated as follows: ðX Wloss ¼ ΔPdV e (3.99) This work is subtracted from the calculated work obtained by the numerical solution of ODE (Table 3.5). The Simple model of Urieli and Berchowitz [51] was employed on the GPU-3 engine with the specification given in Table 3.1. The results indicate that the power and thermal efficiency of this

3.7 Comprehensive combined thermal models (case study: Stirling engines)

151

engine are estimated to be 6.70 kW and 52.5%, respectively. From Table 3.2, the real value of the power and thermal efficiency of this engine are 2.42 kW and 21.30% [85], respectively. Therefore, using the Simple model, +176.9% error in prediction of power and + 31.2% error (as difference) in the prediction of the thermal efficiency are obtained. If it compares with the ideal adiabatic model, it indicates that error in predicting the power is improved from +242.6% into +176.9% (65.7% reduction). This figure for thermal efficiency is an improvement from +41.0% into +31.2%. It is observed that its accuracy is even lower than the Schmidt analysis. If it is compared to the Schmidt model (Section 3.6.1), the accuracy of the Simple model is a little better than the corresponding accuracy of Schmidt model so that the power prediction’s accuracy is reduced from +182.2% into +176.9% (+5.3% improvement) and for thermal efficiency’s prediction it was reduced from +33.9% into 31.2% (as a difference), that is, +2.7% improvement. Nevertheless, it is observed that even using the Simple model, the prediction accuracies of the model are still unsatisfactory. In the next section, the methodology for obtaining very accurate thermal models of Stirling engines based on modification on the Simple model will be discussed.

3.7 Comprehensive combined thermal models (case study: Stirling engines) It is expectable if various sophisticated thermal models are combined; it may lead to a more accurate model. Such models must be developed by researchers for their proposed energy system in their study, and a unique methodology that can be applied for all energy systems cannot be presented here. In this section, sample comprehensive thermal models that were developed for Stirling systems by author and his coworkers are given, and those can admire readers for developing similar models for their proposed energy systems in their future research.

3.7.1 CAFS thermal model In the previous section (Section 3.6) quasi-steady zero-dimensional numerical model was discussed for thermal modeling of the Stirling engine, but, as was observed, even the Simple model (Section 3.6.3) has low accuracy in simulation of Stirling system. One attempt to increase the accuracy of the Simple model was performed by Hossenzade and Sayyaadi [77]. The presented model was based on the combination of the Simple model as a quasi-steady and FST. They called their model as CAFS model, which is abbreviated from Combined Adiabatic-Finite Speed. In their model, the power loss due to the motion of piston, gas throttling effect, and mechanical friction was subtracted from the computed power estimated by the Simple model. The CAFS model is a quasi-steady model based on a modification of the Simple model, in which for each Δθ, the power loss due to the aforementioned effects is computed as follows: δWloss ¼ δWFST + δWf + δWthrott: where

 γu  p δWFST ¼ Pm  dV c 2 3  

6 0:4 + 0:0045up  105 7 1 6 7

δWf ¼ ΔPf dV ¼ 4 5 1  rv dV 1 3 1 rv

(3.100) (3.101a)

(3.101b)

152

3. Advanced thermal models

δWthott ¼ ΔPthott dV ¼ ðΔPk + ΔPr + ΔPh ÞdV

(3.101c)

Correlations used for calculation of ΔPthott were given in Ref. [77]. The algorithm of the CAFS method is shown in Fig. 3.8. Fig. 3.8 shows the algorithm of CAFS as three main sections. Section I of the algorithm is the work based on an ideal adiabatic model developed by Urieli [51]. The working principle of this section was explained in Section 3.6.2. The output of Section I is modified for imperfect regeneration of the regenerator based on simple analysis (Section 3.6.3), as demonstrated in Section II of Fig. 3.8. This kind of irreversibility affects the temperature of spaces. Therefore, the output temperature of this section is used as feedback temperatures for Section I. This process is repeated until convergence is obtained in the magnitude of space temperatures. The output temperature of Section II gives feedback to Section I (Adiabatic analysis), and calculation is repeated until convergence in temperatures is obtained. Then, the output results of Section II are used as inputs of Section III, which is demonstrated in Fig. 3.8. In this section, work loss due to the throttling process (pressure drop) in the heater, cooler, and regenerator along with work loss due to the finite speed of piston and mechanical friction is determined and subtracted from the work output of Section II for each crank’s rotation interval. These parameters are used to correct the magnitude of the work obtained in Section II. Furthermore, in Section III of the algorithm of Fig. 3.8, the effect of the finite speed of piston and mechanical friction is considered based on Eq. (3.101b). Finally, work output is determined by subtracting the work loss obtained from Eq. (3.100) from the output power calculated in Section II of the algorithm (dθ ¼ 2π/n). For each interval (dθ), the algorithm starts with temperature estimation, as shown in Section I of Fig. 3.8. More details regarding the calculation method and correlations used were given in Ref. [77]. Once again, the CAFS was examined on the GPU-3 engine with the specification given in Table 3.1. The results indicate that the power and thermal efficiency of this engine are estimated as 4.11 kW and 36.2%, respectively. From Table 3.2, the real values of the power and thermal efficiency of this engine are 2.42 kW and 21.30% [85], respectively. Therefore, the error is the prediction of the power, and the thermal efficiency of the GPU-3 engine using the CAFS model is 69.8% and 14.9% (as a difference), respectively. If it is compared with the Simple model given in Section 3.6.3 (+176.9% error in power prediction and 31.2% error in prediction of the thermal efficiency), it is observed that using that model, the accuracy of the thermal model is much modified; nevertheless, there is still significant inaccuracy.

3.7.2 Simple-II thermal model Later, the Simple-II model was presented by Babaelahi and Sayyaadi to improve the accuracy of previous models. The system of differential equations of the Simple (Adiabatic) model was modified to include the effect of heat absorption and rejection between expansion and compression spaces by displacer (known as shuttle conduction heat loss) and mass leakage between working and buffer spaces. Therefore, differential equations of mass and energy conservations of the Simple analysis were modified to include terms of shuttle effect and mass leakage, respectively. Moreover, new forms of conservation equations were used to modify the differential equation related to pressure. The new corrected system of differential equations was numerically solved using the fourth-order Runge-Kutta method [17]. Then, similar to the Simple model, the

153

3.7 Comprehensive combined thermal models (case study: Stirling engines)

Section I: Ideal adiabatic analysis

Start

Specify geometrical specifications

Specify engine construction

Section III: Mechanical friction and FST implimentation

Yes

For n elements

Pressure drops in heater and cooler

Pressure drop in regenerator

Section II: Actual adiabatic analysis (simple analysis)

Check new convergence

Define operational parameters

No

Dtermine initial conditions

For n elements

New gas temperature in exchangers

Numerical solution

Heater and cooler heat transfer coefficient

(Fourth order Runge-Kutta)

Specify temperature in spaces

Regeneration effectiveness

Finite speed of pistons effect Start simple analysis Mechanical friction lossess

End

FIG. 3.8 Flow chart of CAFS thermal model [77].

Yes

Check convergence

No

Replace new temperature in intial conditions

154

3. Advanced thermal models

results of the numerical solution were corrected for nonideal heat transfer and pressure drops in heat exchangers (heater, cooler, and regenerator). In a final modification of the method, the results obtained in the previous parts of calculation were modified for losses due to the finite speed of the pistons (working pressure over two pistons was corrected), mechanical friction, and longitudinal conduction loss between the heater and cooler through the regenerator wall. For correcting working pressure on two pistons, the method of finite speed thermodynamic was applied. In summary, it can be said that specifications of the Simple-II model were the consideration of various loss effects, including shuttle effect, mass leakage effect, power losses due to the finite speed of pistons, mechanical friction, and longitudinal conduction heat loss through the regenerator’s wall. These effects were integrated into the Simple analysis of Urieli and Berchowitz. Simple-II works based on similar concepts to those of Simple analysis. In this model, first, effects of shuttle heat transfer loss and gas leakage to crankcase were implemented in a differential form into the ideal adiabatic analysis. In this regard, the system of ordinary differential equations of adiabatic analysis (Section 3.6.2) was modified to include shuttle effect heat transfer loss and gas leakage, and a new system of equations was obtained. In the next step, in a similar manner to the Simple analysis (Section 3.6.3), results of the previous step were modified to include effects of pressure loss in the regenerator, heater, and cooler, pressure loss due to finite motion of piston, power loss due to mechanical friction, conduction heat loss in the regenerator wall, and nonideal heat transfer of heat exchangers. In summary, it can be said that, in the developed new thermal model (Simple-II), loss effects of Stirling engines were divided into three categories. One part of loss mechanisms, including gas leakage and shuttle effect, was considered in the basic ordinary differential equations. The second category of losses was nonideal heat transfer and pressure drops in heat exchangers that were differentially evaluated in combination with the first part and used to correct the temperature of engine spaces. The third category of losses was pressure loss due to finite motion of the piston, mechanical friction, and longitudinal heat conduction between the heater and cooler through the regenerator wall, which was calculated as separate loss terms which did not affect temperature distribution of engine spaces. Fig. 3.9 summarizes the three categories of loss mechanisms in a Stirling engine. In the Simple-II thermal model, the assumptions of the original Adiabatic model (Section 3.6.2) were modified, and assumptions #10, #11, and #12 of Section 3.6.2 were deleted from the list of assumption. For each compartment of the engine illustrated in Fig. 3.6 energy balance equation in the differential form are modified to include shuttle effect as follows [76]:   _ i c p Ti  m _ o cp To ¼ dW + cv dðmT Þ (3.102) dQ  dQshuttle + m dQshuttle denotes heat loss due to shuttle conduction by the displacer and is obtained as follows [92]: πS2 kg Dd ð T e  Tc Þ (3.103) dQshuttle ¼ 8JLd where S, kg, Dd, J, Ld, Te, and Tc are stork, the thermal conductivity of gas, the diameter of the displacer, the gap between displacer and cylinder, displacer length, gas temperature in expansion space, and gas temperature in compression space, respectively. The third term on the left-hand side of Eq. (3.102) determines the net absorbed enthalpy of the working fluid in each compartment of the engine due to in/outflows. The second term in

155

3.7 Comprehensive combined thermal models (case study: Stirling engines)

Heat input to the stirling engine from the external heat source Leakage effect Heat loss in basic ODE Shuttle effect Non-ideal heat exchanger Heat transfer as loss effect Conduction heat loss

rk Wo

s FST and pressure-drop

los

in heat exchanger and mechanical friction

Output work Heat rejected to the heat sink

Net ou

tput

wor

k

FIG. 3.9 Various loss effects of Stirling engines [76].

the right hand of the energy conservation equation shows the change of differential internal energy of the working fluid. The total mass of the working fluid, by consideration of the mass leakage is corrected as follows: (3.104a) m ¼ mc + mk + mr + mh + me  mleak dmc + dmk + dmr + dmh + dme  dmleak ¼ 0

(3.104b)

where mleak denotes mass leakage to crankcase due to the leakage effect. The leakage to the crankcase was calculated as follows [76].

P + Pbuffer J 3 P  Pbuffer (3.105) up J  mleak ¼ πD 4RT g 6μ L where J,D, Tg, L, up, μ, P, and Pbuffer are the annular gap between piston and cylinder, piston diameter, gas temperature, piston length, piston linear velocity, the viscosity of working flow, the pressure of working space, and pressure of buffer space, respectively. With these definitions, Eq. (3.104a) can be rewritten in the following form:

9 8 Vc Vk Vr Vh Ve > > >  >

 P + + + + < T P + Pbuffer J 3 P  Pbuffer Tk Tr Th Te = c  πD up J  m¼ > > 4RT g 6μ L R > > ; :

(3.106)

The system of the differential equation of the ideal adiabatic model that was already given in Table 3.6 was modified in Ref. [76] and summarized in Table 3.7. The solution algorithm of the Simple-II thermal model is illustrated in Fig. 3.10. This system of equations was solved using the fourth-order Runge-Kutta method, as described in Section 3.6.2.

156

3. Advanced thermal models

TABLE 3.7 System of ordinary differential equations as per Simple-II thermal model [76].

9 8 Vc Vk Vr Vh Ve > > >

= c r e k h > > R > > : ; 

 3 P + Pbuffer J P  Pbuffer ¼m up J   πD 4RTg 6μ L



dV c dV e dQshuttle R The  Tck + Rdmleak P + + Tck The T he Tck cp dP ¼ Vc Vk Vh Vr Ve + + + + γTck Tk Th Tr γThe

mi ¼

PV i ,i ¼ c,k,r,h,e RTi

mleak ¼ πD

dme ¼

dmc ¼

P + Pbuffer J3 P  Pbuffer up J  4RTg 6μ L

PdV e +

Ve dP γ

RThe PdV c +

Vc dP γ

RTck

dmi ¼ mi

Pressure

Pressure variation

Mass



Mass variation dQ  shuttle cp The



dQshuttle cp Tck

dP , i ¼ k,r,h P

_ ck ¼ dmc m

Mass flow

_ ck > 0, Tck ¼ Tc else Tck ¼ Tk For m _ he > 0, The ¼ Th else The ¼ Te For m

dP dV e dme  + dT e ¼ Te Ve me P

dP dV c dmc dT c ¼ Tc  + Vc mc P

Conditional temperature

m_ kr ¼ m_ ck  dmk m_ rh ¼ m_ he  dmh

Temperature variation

dQk ¼

Vk dPcv _ ck  Tkr m _ kr Þ  cp ðTck m R

Heat output of the cooler

dQr ¼

Vr dPcv _ kr  Trh m _ rh Þ  cp ðTkr m R

The heat receiving and rejecting from the regenerator

dQh ¼

Vh dPcv _ he  The m _ he Þ  cp ðThe m R

Heat input to the heater

dWe ¼ PdVe

Work in the expansion process

dWc ¼ PdVc

Work in the compression process

As is apparent from Fig. 3.10, in the next step, the calculation was entered into the Simple analysis section, in which the nonideal heat transfer effect was taken into account to correct the magnitude of cooler and heater temperatures in accordance to the Simple model given in Section 3.6.3. The corrected magnitudes of cooler and heater temperatures gave feedback to the numerical solution section until convergence for the magnitude of temperatures was

3.7 Comprehensive combined thermal models (case study: Stirling engines)

157

Start

Specify geometrical and operational data

Determine pressure drops and loss effect Yes No

Determine initial condition

Convergence

Derive governing equation

Specify new gas temperature in exchangers

Specify temperature in spaces

Heater and cooler heat transfer analysis Yes (Start simple analysis)

No

Convergence

Regenerator analysis

FIG. 3.10 Flow-chart of the Simple-II thermal model [76].

obtained. Finally, the magnitude of output power was corrected for power losses due to pressure drops in heat exchangers, mechanical friction, and finite motion of the piston. In addition, the magnitude of heat transfer in the heater was corrected for including the effect of conductive heat loss through the regenerator wall form the following equation [76]: Qregleak ¼ Rcond ðTwh  Twk Þ

(3.107)

where Rcond, Twh, and Twk are conduction resistance of the regenerator’s wall and wall’s temperatures of the heater and cooler, respectively. Simple-II was examined on the GPU-3 engine with the specification given in Table 3.1. The results indicate that the power and thermal efficiency of this engine are estimated as 3.62 kW and 28.4%, respectively. Therefore, the errors in the prediction of the power and thermal efficiency of the GPU-3 engine using the Simple-II model are 49.6% and 7.1% (as a difference), respectively. It is comparable with the corresponding accuracy of the CAFS model, which were + 69.8% error in power prediction and 14.9% error in prediction of the thermal efficiency. It was found that using the Simple-II, the accuracy of the thermal model is much superior to the CAFS and Simple model as well.

3.7.3 Polytropic thermal model As mentioned before, expansion/compression processes were suggested to be adiabatic by Urieli and Berchowitz [51] and repeated in Refs. [76, 77], while in early models such as Schmidt model, these processes were assumed to be isothermal. Later, Babaelahi and Sayyaadi [78] suggested that these processes are neither isothermal nor adiabatic; but, they are polytropic. In addition, they considered all losses and effects that they previously considered in the Simple-II model [76]. Accordingly, they called their model as PSVL model that is abbreviated

158

3. Advanced thermal models

from Polytropic analysis of the Stirling engine with Various Losses (PSVL). In the new numerical thermal model, polytropic analysis was presented so that polytropic expansion and compression in working spaces were considered instead of isothermal or adiabatic models of previous works [51, 76, 77]. A system of differential equations related to the polytropic analysis of spaces was developed, and a methodology was presented for determining polytropic indexes of expansion/compression spaces as a function of crank angle. 3.7.3.1 PSVL model Considering the polytropic expansion/compression processes, the energy balance equation that was already given by Eq. (3.102) is corrected as follows:   dQ  dQpolytropic  dQshuttle + mi Cp, i Ti  mo Cp To ¼ dW + Cv dðmT Þ

(3.108)

where dQ is heat absorption or rejection from (or into) the working fluid via external resources and dW shows net output work. In Eq. (3.108), dQpolytropic denotes heat loss due to polytropic heat loss of the engines’ compartment. This is a new term that was added to the energy conservation equation in the PSVL thermal model. Polytropic heat transfer from engine spaces to the surrounding, dQpolytropic, is calculated as follows [22]: Qpolytropic ¼ mCn ðT0  TÞ

(3.109a)

dQpolytropic ¼ Cn ðT0  T Þdm  mCn dT

(3.109b)

In Eqs. (3.109a) and (3.109b), T and T0 are temperature in the compartment and ambient temperature, respectively. Cn is the polytropic specific heat capacity, which could be evaluated as follows [93]: Cn ¼ Cv

nγ n1

(3.109c)

The polytropic index was calculated using the following procedure: PV n ¼ const:

(3.110a)

dðPV n Þ ¼ dðconst:Þ ¼ 0   P nV n1 dV + V n ðdPÞ ¼ 0

(3.110b)

Differentiating Eq. (3.110a) leads to:

(3.110c)

Therefore, polytropic indexes of expansion/compression spaces are separately determined from the following expression: n¼

VdP PdV

(3.110d)

In this case, it was shown that dmc and dme in Eq. (3.104b) are corrected as follows [78]: Cn ðT0  Tc Þdmc  mCn dTc + Qshuttle + CP Tck dmc ¼ PdV c + Cv dðmc Tc Þ

3.7 Comprehensive combined thermal models (case study: Stirling engines)



PV c Cn ðT0  Tc Þdmc  mCn dT c + Qshuttle + CP Tck dmc ¼ PdV c + Cv d R

Cv Cv Cn ðT0  Tc Þdmc  mCn dT c + Qshuttle + CP Tck dmc ¼ P 1 + dV c + Vc dP R R

159

Cn mCn Qshuttle PdV c Cv + ðT0  Tc Þdmc  dTc + + Tck dmc ¼ Vc dP Cp Cp Cp R RCp C n ð T 0  Tc Þ mCn Qshuttle PdV c 1 dmc  dT c + + dmc ¼ + Vc dP Cp Tck Tck Cp Tck Cp RT ck RγTck   Cn T0  Tc Cn mc Qshuttle PdV c Vc dmc +1 + dTc + ¼ + dP Cp Tck Cp Tck Cp Tck RT ck γRT ck 20 3 1 Vc



dP PdV + c 6B 7 C γ 6B C  Cnc mc dTc  Qshuttle 7 [email protected] A Cp Tck Cp Tck 5 RTck dmc ¼

(3.111a)



 Cnc T0  T c +1 Cp Tck

_ ck . From the boundary condition, it is known that dmc ¼ m In a similar manner for the expansion space, the following can be written: 20 3 1 Ve



6BPdV e + γ dPC 7 6B C  Cne me dT c + Qshuttle 7 [email protected] A RT he Cp The Cp The 5 dme ¼



 Cne T 0  Te +1 Cp The

(3.111b)

_ rh ¼ m _ he  dmh . From the boundary condition, it is known that m Substituting dmc and dme obtained from Eqs. (3.111a) and (3.111b) in Eq. (3.104b) leads to the following expression of differential pressure in the working space: 39 1 820 Ve ! ! > > > dP PdV + e >6B > 7> C > γ > > C  Cne me dT e + Qshuttle 7> 6B > > > 5> A 4 @ > > > C T C T RT > p p > he he he > < = " ! ! # > > > > T0  Te Cne > > > > +1 > > > > > > C T p > > he > > > > : ; 39 1 820 V c ! ! > > > >6BPdV c + γ dPC > 7> > > > C  Cnc mc dT c  Qshuttle 7> 6B > > > 5> A >[email protected] > > C T C T RT > p ck p ck > ck > < = " ! ! # + > > > > T0  Tc Cnc > > > > +1 > > > > > > Cp Tck > > > > > > : ; " # dP Vh Vr Vk + dmleak ¼ 0 + + + R Th Tr Tk

(3.112)

160

3. Advanced thermal models

Finally, with suitable simplification, the following equation could be obtained for dP: 2PdV 6 The γ 6 4 dP ¼

where

e



RCne me RQshuttle PdV c RCnc mc RQshuttle 3 dTe +  dTc  Cp The Cp The Tck Cp Tck Cp Tck 7 7 + Rmleak + 5 B1 B2   Vc Ve Vk Vr Vh + +γ + + Tck B1 Tck B2 Tk Tr Th



 Cne T 0  Te +1 B1 ¼ Cp The 

 Cnc T 0  Tc B2 ¼ +1 Cp Tck

(3.113)

(3.114a) (3.114b)

Other aspects of the model, such as the differential form of dTc and dTe, heat transfer rate in the cooler, heater, and regenerator, and the output work performed by the power piston can be given as before for the Simple, CAFS, and Simple-II models [51, 76, 77]. The set of differential equations and their boundary condition was summarized in Table 3.8. It is compared with differential equations of the Simple and Simple-II as given in Tables 3.6 and 3.7, respectively. In the PSVL model, real losses of the Stirling engine were categorized into three levels. The related terms of the first categories of losses, including the polytropic heat loss, shuttle effect, and gas leakage, were considered in the developing a system of ordinary differential equations as given in Table 3.8. The second category of losses, including nonideal heat transfer and pressure drops in heat exchangers, was evaluated in a differential form and used to correct numerical results of the basic polytropic differential equations quite similar to the Simple model of Urieli and Berchowitz [51] given in Section 3.6.3. In the second category, the thermal analysis of nonideal heat exchangers affected the values of temperature calculated in the previous step (numerical solution step). In the third category of losses, power losses due to the finite motion of the piston, mechanical friction, the conduction heat loss from expansion to compression spaces through the regenerator wall were calculated as separate loss terms; then, these losses were subtracted from the results obtained in previous steps. The solution algorithm of the new polytropic thermal model is illustrated in Fig. 3.11. As is clear from Fig. 3.10, in the first step of the calculation, the system of ordinary differential equations that are summarized in Table 3.8 is numerically solved using the fourth-order Runge-Kutta method. Initial values of the polytropic indexes in compression and expansion spaces (nc and ne) were estimated by arbitrary values. Then, numerical solutions of differential equations were performed several times until the steady-state condition, in which magnitudes of temperatures and polytropic indexes at the end of cycle converging to the corresponding temperatures and polytropic indexes at the beginning of the cycle were obtained. In other words, the magnitude of temperatures and polytropic indexes at the start

3.7 Comprehensive combined thermal models (case study: Stirling engines)

TABLE 3.8

System of ordinary differential equations in the polytropic-convective thermal model [78].

9 8 Vc Vk Vr Vh Ve > > >



=  P+P J3 P  Pbuffer buffer c r e k h m¼ up J   πD > > R 4RTg 6μ L > > : ;

2PdV RC m RQshuttle PdV c RCnc mc RQshuttle 3 e ne e  dT e +  dT c  6 The C T C T T C T Cp Tck 7 p p he p he ck ck 7 + Rmleak γ 6 + 5 4 B1 B2

Pressure

Pressure Variation

  Vc Ve Vk Vr Vh + +γ + + Tck B1 Tck B2 Tk Tr Th

dP ¼

 B1 ¼ mi ¼

161

Cne Cp



 h   i T0  Te c +1 + 1 , B2 ¼ CCncp T0TT ck The

PV i ,i ¼ c,k,r,h,e RTi

mleak ¼ πD

P + Pbuffer J3 P  Pbuffer up J  4RTg 6μ L

Mass



3 1 20 Ve



6BPdV e + γ dPC C m Q ne e shuttle 7 7 C 6B dT c + A [email protected] RThe Cp The Cp The 5 dme ¼



 Cne T0  Te +1 Cp The 3 1 20 Vc



dP PdV + c 7 C 6B γ C  Cnc mc dT c  Qshuttle 7 6B A [email protected] RTck Cp Tck Cp Tck 5

dmc ¼



 Cnc T0  Tc +1 Cp Tck

Mass Variation



dP , i ¼ k,r,h P

dP dV e dme  + dT e ¼ Te Ve me P

dP dV c dmc dT c ¼ Tc  + Vc mc P dmi ¼ mi

Temperature Variation

dQk ¼

Vk dPcv _ ck  Tkr m _ kr Þ  cp ðTck m R

Heat Output of Cooler

dQr ¼

Vr dPcv _ kr  Trh m _ rh Þ  cp ðTkr m R

Heat Receiving and Rejecting from the Regenerator

dQh ¼

Vh dPcv _ he  The m _ he Þ  cp ðThe m R

Heat Input to Heater

dWe ¼ PdVe

Work in Expansion Process

dWc ¼ PdVc

Work in Compression Process

nc ¼ 

Vc dP PdV c

ne ¼ 

Ve dP PdVe

Polytropic Indexes

162

3. Advanced thermal models Determine pressure drops and loss effect (FST and mechanical friction and heat conduction losses)

Start

Output power and thermal e fficiency

Yes Specify geometrical and operational data and polytropic index at

No Polytropic index (at

)=polytropic index (at

)

Yes No Determine initial condition

Convergence

Numerical solution of governing equation

Specify new gas temperature in exchangers

Specify t emperature in spaces

Heater and cooler heat t ransfer analysis

Yes (Start simple analysis)

No

Convergence

FIG. 3.11

Regenerator analysis

Flowchart of the PSVL thermal model for thermal simulation of Stirling engines [78].

of the cycle (θ ¼ 0°) had to be equal to the corresponding values at the end of the cycle (θ ¼ 360°). Hence, the calculations were repeated until the same gas temperatures, and polytropic indexes were obtained for θ ¼ 0° and θ ¼ 360°. As is clear from Fig. 3.11, in the next step, the calculation was entered into the Simple analysis section, in which the nonideal heat transfer effect was taken into account to correct the magnitude of the heater and cooler temperatures using Eqs. (3.94) and (3.95). The corrected magnitudes of cooler and heater temperatures gave feedback to the numerical solution section until convergence for the magnitude of temperatures was obtained. Finally, the magnitude of output power was corrected for power losses due to pressure drops in heat exchangers, mechanical friction, and finite motion of the piston quite similar to the Simple-II model. In addition, the magnitude of heat transfer in the heater was corrected to include the effect of conductive heat loss through the regenerator wall as per Eq. (3.107). Once more, the PSVL model was examined on the GPU-3 engine and found that the power and thermal efficiency of this engine are estimated as 3.03 kW and 24.4%, respectively. Therefore, the error is the prediction of the power, and the thermal efficiency of the GPU-3 engine using the Simple-II model is 25.2% and 3.1% (as a difference), respectively. If it is compared with the Simple-II model, which was +49.6% error in power prediction and 7.1% error in prediction of the thermal efficiency, it is found that a reasonable modification on the accuracy of the thermal model is obtained using the PSVL thermal model.

3.7 Comprehensive combined thermal models (case study: Stirling engines)

163

3.7.3.2 Modified PSVL and CPMS models Babaelahi and Sayyaadi modified their polytropic model to achieve higher accuracy in [79]. In the new model, the PSVL model (polytropic analysis of Stirling engine with various losses) [78] was modified based on coupling the convective heat transfer mechanism to polytropic expansion/compression processes. In this regard, they provided two models, the modified PSVL model and the CPMS model. The CPMS model is abbreviated from the Comprehensive Polytropic Model of Stirling engines. In new models, to the contrary of previous models (Simple, CAFS, Simple-II, and PSVL), that working gas in heater and cooler is assumed isothermal (see temperature profiles of the heater and cooler in Fig. 3.5, temperature profiles in these exchangers were considered for the working gas. Furthermore, an exponential temperature distribution of the gas along the regenerator length was assumed in the modified PSVL model and replaced to the linear distribution of previous models (Simple, CAFS, Simple-II, and PSVL). Another modification is the interconnection of the real heat transfer characteristic of expansion/compression spaces to their polytropic indexes in the modified PSVL model. (i) Temperature distribution in the Stirling engine’s heat exchangers

The temperature profile within the heat exchanger affects both the physical properties of the working gas and the boundary condition of differential equations. In this regard, Fig. 3.6 is a modified into Fig. 3.12. For the heater of the Stirling engine, the convective heat transfer equation is:

FIG. 3.12 Modified temperature profile within compartments of Stirling [80].

164

3. Advanced thermal models

_ h cp, h dTh dqh ¼ m dqh ¼ hðTw, h  Th ÞdA

) )



dTh h ¼ dA _ p mc Tw, h  Th h

(3.115)

By integration of Eq. (3.99a), we have:  

ð dTh h ðTw, h  Th, o Þ hA ¼ ¼  dA ) ln _ p _ p h mc mc Tw  T h ðTw , h  Th, i Þ

Tw, h  Th, o hA ; ¼ exp  _ p h mc Tw, h  Th, i ð

(3.116a)

On the other hand, we have: _ h cp, h ðTh, o  Th, i Þ qh ¼ m

(3.116b)

If the wall temperature of the heater is known, from Eqs. (3.116a) and (3.116b), the inlet/ outlet temperatures of working gas to/from the heater are found and can be used as a more realistic boundary condition at interfaces of heater compartment to other compartments, that is, regenerator and expansion space (see Fig. 3.12) in a system of differential equations given in Table 3.8. In a similar manner, for cooler, we have [80]:

Tw, k  Tk, o hA ¼ exp  (3.117a) _ p k mc Tw, k  Tk, i _ k cp, k ðTk, i  Tk, o Þ qk ¼ m

(3.117b)

In the thermal analysis of regenerator, as shown in Section 3.6.3.1, the mean temperature of working gas in the regenerator was used to calculate Reynolds number, Prandtl number, Stanton number, and heat transfer coefficients in the regenerator. The average gas temperature in the regenerator depends on gas temperature distribution along the regenerator length. In the previous models (simple, CAFS, Simple-II, and PSVL), the temperature distribution for working gas in the regenerator was considered to have a linear profile between heater and cooler. Organ [56] suggested an exponential temperature distribution for the gas temperature along the regenerator length in the heating mode of the regenerator as follows [56]: ∂TW dT W Tk  Th ¼ ¼ ∂x dx Lreg

(3.118a)

where Tk,Th, and Lreg are cooler temperature, heater temperature, and regenerator length, respectively. Therefore, the longitudinal wall’s temperature of the is found as follows:

T k  Th x (3.118b) TW ð x Þ ¼ Lreg The exponential gas temperature profile along the regenerator length when the regenerator is in the heating period was obtained by Organ as follows [56]:

3.7 Comprehensive combined thermal models (case study: Stirling engines)

ΔTðxÞ ¼ Tg ðxÞ  Tw ðxÞ ¼ 



 x NTU L T k  Th reg for heating period 1e NTU

165 (3.119a)

In a similar manner to what was suggested by Organ [32], a similar temperature profile for the cooling period of the regenerator was obtained as:  #

" x NTU 1 L T k  Th reg 1e for cooling period (3.119b) ΔTðxÞ ¼ Tg ðxÞ  Tw ðxÞ ¼ NTU where Tg is the working gas’s temperature in the regenerator and x is defined across the regenerator length. Therefore, the average gas’s temperature in the regenerator was obtained as [79]: 8 x¼Lreg 



 ð > x > > NTU L T k  Th T k  Th > reg > x 1e > > Lreg NTU > > > > > x¼0 for heating period < Lreg (3.120) Tg, avr ¼ x¼Lreg (   #) >

"

ð > x > NTU 1 Tk  T h T k  Th > Lreg > 1e x > > > L NTU reg > > > x¼0 > for cooling period : Lreg Calculation procedures of the regenerator wall and gas temperature are given in Figs. 3.13A and B, respectively. (ii) The real value of polytropic indexes in Stirling engines

In the original PSVL thermal model, Qpoly and dQpoly were calculated based on Eqs. (3.109a) and (3.109b) using the magnitudes of Cn, T, T∞, and dT without considering heat transfer thermal resistance between the working gas and environment. Therefore, the parameters were calculated only based on the thermodynamic principle with no need for applying heat transfer principles. In a real case, it is known that the actual magnitude of polytropic heat loss depends not only on the thermodynamic of the polytropic process but also on the heat transfer characteristics of working gas, cylinder wall, and natural convection outside the working cylinders. Therefore, polytropic heat transfer,Qpoly, should also depend on the overall thermal resistance of heat transfer between the working gas (inside the cylinders) and the environment. In this new thermal model, unlike the original PSVL, polytropic heat loss from expansion/compression cylinders was determined based on both thermodynamic principles of the polytropic process as in Eq. (3.109a) and heat transfer principles presented in the following procedure. The heat transfer rate from the working spaces to the surrounding was: _ cylsur ¼ T  T∞ Q Rt

(3.121a)

where Ti, T∞, and Rt are the temperature of the gas in working space, the ambient temperature around the cylinders, and overall heat transfer thermal resistance between the working gas and the surrounding, respectively. The total thermal resistance was defined as:

166

3. Advanced thermal models

Initialize temperature in regenerator T g,i =(T h –T k)/Ln(T h/T k)

Solution of differential equation

T g,i =T g,e

No

Non-ideal heat transfer analysis in r egenerator and calculation of new regenerator temperature T g,e based on exponential profile

Converged

Go next

|T g,i –T g,e |< e ?

step

Yes

(A)

Initialize wall temperature in working space T wc,i =Tc, T we,i =T e

Solution of differential equation and analysis of l oss mechanism

T wc,i =T wc,f T we,i –T we,f

No

Calculation of convection heat transfer in working spaces & calculation of new value for cylinder wall ( based on thermal resistance t heory), T wc,f and T we,f

Converged

Go next

|T wc,i –T wc,f |< e |T we,i – T we,f |< e

Yes

step

?

(B) FIG. 3.13 erator [79].

Calculation procedure of (A) the working gas in the regenerator, (B) wall’s temperature of the regen-

3.7 Comprehensive combined thermal models (case study: Stirling engines)

Rt ¼ Rconv,i + Rcond,w + Rconv, o ¼

1 L 1 + + hi Ai kw Ac ho Ao

167 (3.121b)

where hi and ho are convective heat transfer coefficient in the working space and natural convection heat transfer coefficient outside the wall of the cylinders. In Eq. (3.121b), kw and L are thermal conductivity and length of the cylinder wall, respectively. Inside, middle and outside heat transfer areas of the cylinders (side areas of the cylinders measured at inner, average, and outer radius of cylinders) are denoted by Ai, Ac, and Ao in Eq. (3.121b). It should be mentioned that, as pistons move in the cylinder, the heat transfer portion of cylinders is changed with crank angle; therefore, Rt, L, Ai, Ac, and Ao in Eq. (3.121b) are not constant, but vary with crank angle. In evaluating thermal resistance terms in Eq. (3.121b), convective heat transfer coefficients inside and outside the cylinders (hi and ho) should be evaluated. The convective heat transfer coefficient for the working gas inside the cylinders,hi, was obtained as follows [94]: 8 k > > 0:023ð ReÞ0:8 ð PrÞ0:4 > > > D h" > > 0:07 # > > k Dh < 0:8 0:4 0:023ð ReÞ ð PrÞ 1+ hconv ¼ L Dh > > > > k > > 1:86  ðGzÞ0:333 > > Dh > : 5

Re > 10000 2100 < Re  10000

(3.122a)

Re  2100 and Gz > 10 Re  2100 and Gz  10

In Eq. (3.122a), Gz is the Graetz number defined as follows: Gz ¼ Re: Pr:

Dh L

(3.122b)

The convective heat transfer coefficient in the surrounding environment of the cylinders (ho) was considered as 7.0 W m2 K1 [94]: It should be mentioned that the unit of the polytropic heat loss from the cylinders predicted by Eq. (3.109a) (based on the polytropic thermodynamic principle) and Eq. (3.121a) (based on _ the heat transfer principle) was different; that is, the unit of Q cylsur was W or kW; however, that of Qpoly was J or kJ. On the other hand, thermodynamic correlation of polytropic heat loss from expansion/compression spaces to the surrounding, Qpoly, that was expressed by Eq. (3.109a), ΔT, might be taken as the difference between the gas temperature and cylinder wall temperature, (T  Tw); therefore: Qpoly ¼ mCn ðT  Tw Þ

(3.123a)

In addition, based on the convective model, the wall temperature of the cylinders can be determined as [79]: Tw ¼

Rcond, w + Rconv, o ð T  T∞ Þ + T ∞ Rconv, i + Rcond,w + Rconv, o

(3.123b)

Substituting Eq. (3.123b) into Eq. (3.123a) could lead to the following expression for the polytropic heat loss obtained as follows:

168

3. Advanced thermal models

Qpoly ¼ mCn

Rconv, i ðT  T∞ Þ Rt

(3.124a)

Polytropic heat loss,Qpoly, based on the original PSVL analysis, was taken as mCn(T  T∞) in the new model and multiplied by the Rconv, i/Rt. This new term (Rconv, i/Rt) reflected the effect of heat transfer resistance in the polytropic model. Therefore, the original PSVL was valid only when Rconv, i/Rt ’ 1.0, that is Rcond, w + Rconv, o ’ 0.0. As Rcond, w is usually negligible (due to the high conductivity of metallic wall), Rconv, o < < Rconv, i should be used to apply the original PSVL model [28]: that is mCn(T  T∞). In a real case, the case is opposite since, for the outside of the cylinders, we have natural convection; therefore, we have Rconv, o > Rconv, i; however, the heat transfer mechanism inside the cylinders was forced convection: Rconv, o > Rconv, i. Therefore, suggesting Qpoly ¼ mCn(T  Tw) in the original PSVL imposed error in results. Hence in the new convective-polytropic model as a modification of PSVL, polytropic heat loss estimated by Qpoly ¼ mCn(T  T∞) was substituted by Eq. (3.124a). Based on Eq. (3.124a), dQpoly that was estimated by Eq. (3.109b) in the original PSVL model was corrected in the new modified PSVL model as [79]: 

 Rconv, i T (3.124b) dQpoly ¼ Cn ðT  T∞ Þdm  md Cn Rt In numerical calculations, first, gas temperature, T, and polytropic indexes of cylinders, n, were suggested. Then, based on Eq. (3.124b), Cn and hence n were estimated again until convergence in T and n was obtained. In this regard, n in each iteration was obtained using Eq. (3.109c) as: VdP Cn  kCv (3.125) ¼ n¼ PdV Cn  Cv The procedure for calculating polytropic indexes of expansion/compression cylinders is illustrated in Fig. 3.14. (iii) Solution procedure of the modified PSVL and CPMS models

The overall system of ODE equations in the modified PSVL and the CPMS models is the same as the PSVL model that was already given in Table 3.8. The solution algorithm of the current thermal model is illustrated in Fig. 3.14. The CPMS model was examined on the GPU-3 engine and found that the power and thermal efficiency of this engine is estimated as 2.68 kW and 21.7%, respectively. The real value of these parameters is 2.42 kW and 21.3%, respectively. Therefore, errors in the prediction of the power and thermal efficiency of the GPU-3 engine using the CPMS model are +10.7% and + 0.4% (as a difference), respectively. If it is compared with the PSVL model, which was +25.2% error in power prediction and + 3.1% error in prediction of the thermal efficiency, it is found that a reasonable modification on the accuracy of the thermal model is obtained using the CPMS thermal model.

3.7.4 Rotational speed’s effect However, the CPMS model [80] given in Section 3.7.3 was found to be a very accurate thermal model for modeling of GPU-3 engine at nominal condition; its accuracy is drastically

169

3.7 Comprehensive combined thermal models (case study: Stirling engines)

Initialize polytropic index in working spaces nc,i and ne,i

Solution of differential equation and evaluation of loss effect

nc,i = nc,f ne,i = ne,f No

Calculation of new polytropic

Converged

index in working space

|nc,i – nc,f |< e

nc,f = –V cdP/PdV c

|ne,i – ne,f | > > > > > > > > > >     > > p ffiffi ffi > > 4 > tanh γ > > sin ðtanh ð sin ðtanh ðNT ÞÞ + cos ðNT + NMA ÞÞÞ > ffiffiffiffiffiffiffiffi p > >  e = < ln sin 2:951 (5.60) A ¼ exp   112 0 0 > > λh K > > > > sin sin e > > > > B B CC > > δk > > CC B sin B > > > > 4 @ @ A A sin ð μ Þ > > E e > > ; : e  rffiffiffiffi2 ffi      0:4932cos pffiffiffiffiffiffiffiffiffiffiffiffiffi λk ln ðαf , k Þ Thermal efficiency ¼ 28:34tanh sin e + cos ln ln K2 γ αf , h Þ  151:1eNMA 2  5149α  5149ðN Þ2  16:53e lnðαf ,h + e  + 0:4792 MA f,k    845:8 tanh cos Nsg  eγ  9:604 (5.61)

5.10 Summary As a simple but straightforward alternative for modeling the performance of the energy systems, soft computing and statistical tools were introduced here. Artificial neural network (ANN), group method of data handling (GMDH), genetic programming (GP), stepwise regression method (SRM), and multiple linear regression (MLR), which are the most common methods to develop a statistical method, were investigated. Initially, the working principle of each of them was introduced, and then the details about computer codes and toolboxes in MATLAB software program, which are employed for model development by each of them, were presented. After that, different examples of energy systems that have been investigated by the authors as case-studies during recent years were given. Cellulose direct evaporative cooler (DEC), different types of a dew-point indirect evaporative cooler, desiccant enhanced indirect evaporative (DEVap) cooler, heat pump, polymer electrolyte (proton exchange) membrane fuel cell (PEMFC), and Stirling engine are the energy systems that were investigated as examples. The studied examples showed that statistical methods are able to provide an accurate prediction for all the systems successfully, which leads to a much faster speed of calculations for further analyses such as a parametric study or optimization in both forms of single and multiobjective optimization approaches. The mentioned points lead to increasing the popularity of statistical methods among the researchers for the modeling of energy systems more and more.

319

5.11 Exercises

5.11 Exercises 1. Sohani and Sayyaadi [50] provided the experimental data reported in Table 5.28 from the performance of a 60 W polycrystalline photovoltaic solar module on a summer day in July. (a) Find the best ANN to predict ambient temperature and irradiance as a function of time. (b) Obtain the power of the module by multiplication of the current by voltage. Then, employ all the five statistical models and determine the best one to predict the power of TABLE 5.28 The recorded data from the performance of a 60 W polycrystalline photovoltaic solar module on a summer day in July, reported by Sohani and Sayyaadi [50]. Time

G (W m22)

V (V)

I (A)

Tamb (˚C)

8:00

360

19.66

0.94

25.8

8:10

420

19.59

1.09

26.3

8:20

475

19.54

1.23

26.7

8:30

530

19.49

1.38

27.0

8:40

595

19.48

1.55

27.3

8:50

630

19.53

1.65

27.7

9:00

670

19.48

1.75

28.0

9:10

720

19.41

1.89

28.2

9:20

765

19.32

2.02

28.3

9:30

805

19.27

2.09

28.5

9:40

845

19.29

2.20

28.7

9:50

880

19.20

2.30

28.8

10:00

925

19.21

2.38

29.0

10:10

955

19.26

2.46

29.3

10:20

1010

19.16

2.56

29.7

10:30

1020

19.13

2.65

30.0

10:40

1070

19.24

2.72

30.3

10:50

1095

19.22

2.82

30.7

11:00

1125

19.14

2.88

31.0

11:10

1145

19.16

2.93

31.2 Continued

320

5. Soft computing and statistical tools for developing analytical models

TABLE 5.28 The recorded data from the performance of a 60 W polycrystalline photovoltaic solar module on a summer day in July, reported by Sohani and Sayyaadi [50]—cont’d Time

G (W m22)

V (V)

I (A)

Tamb (˚C)

11:20

1160

19.14

2.95

31.3

11:30

1170

18.94

3.01

31.5

11:40

1175

18.92

2.99

31.7

11:50

1190

18.91

3.03

31.8

12:00

1205

18.98

3.04

32.0

12:10

1215

19.00

3.08

31.9

12:20

1230

18.91

3.08

32.0

12:30

1230

18.86

3.09

32.1

12:40

1195

18.75

3.06

32.2

12:50

1190

18.85

3.04

32.1

13:00

1175

18.93

2.99

32.0

13:10

1170

19.02

2.99

32.2

13:20

1155

18.91

2.97

32.3

13:30

1145

19.00

2.94

32.5

13:40

1125

18.92

2.90

32.7

13:50

1105

18.98

2.85

32.8

14:00

1080

18.91

2.79

33.0

14:10

1040

18.93

2.69

33.2

14:20

1030

18.99

2.67

33.3

14:30

990

18.90

2.61

33.5

14:40

945

18.83

2.50

33.7

14:50

915

18.94

2.43

33.8

15:00

875

18.84

2.30

34.0

15:10

840

18.92

2.24

34.2

15:20

810

18.81

2.13

34.3

15:30

760

19.10

2.03

34.5

15:40

710

19.04

1.90

34.7

15:50

665

18.97

1.78

34.8

16:00

610

19.01

1.64

35.0

TABLE 5.29 The properties for 1-alkanol alcohols determined by the methodology of Sohani et al. [51]. The values are reported in MPa0.5, TPa1, and J mol1 K1, respectively. T (K) 293.15 P (MPa)

HISP κT

298.15 Cres P

HISP κT

303.15 Cres P

HISP κT

308.15 Cres P

HISP κT

313.15 Cres P

HISP κT

318.15 Cres P

HISP κT

Cres P

1-Heptanol 0.1

20.52

785.29 90.55 20.39

804.91 94.79

20.24

831.69 98.87

20.10

856.37 102.77 19.94

882.12 106.49 19.78

908.97 110.03

10

20.65

721.06 89.07 20.52

739.98 93.21

20.38

759.58 97.18

20.24

779.90 100.98 20.09

800.97 104.59 19.93

822.80 108.01

20

20.75

668.42 87.59 20.63

684.58 91.63

20.49

701.28 95.50

20.36

718.53 99.19

20.21

736.33 102.69 20.06

754.71 106.01

30

20.83

624.58 86.12 20.71

638.70 90.06

20.58

653.23 93.83

20.45

668.21 97.42

20.31

683.62 100.82 20.16

699.50 104.03

40

20.90

587.34 84.68 20.78

599.86 88.52

20.66

612.73 92.19

20.52

625.95 95.68

20.39

639.55 98.97

20.24

653.53 102.08

50

20.95

555.20 83.24 20.83

566.44 86.99

20.71

577.98 90.56

20.58

589.82 93.95

20.45

601.99 97.15

20.31

614.47 100.16

60

20.98

527.09 81.83 20.87

537.28 85.48

20.75

547.74 88.96

20.63

558.47 92.25

20.50

569.47 95.35

20.36

580.76

98.26

70

21.01

502.24 80.43 20.90

511.57 83.99

20.78

521.14 87.37

20.66

530.94 90.57

20.53

540.98 93.57

20.40

551.29

96.38

80

21.02

480.09 79.04 20.92

488.69 82.51

20.80

497.49 85.80

20.68

506.52 88.91

20.56

515.76 91.82

20.43

525.24

94.53

90

21.03

460.17 77.67 20.92

468.15 81.05

20.81

476.31 84.26

20.70

484.67 87.27

20.57

493.23 90.09

20.45

502.01

92.71

100

21.03

442.16 76.31 20.92

449.59 79.61

20.82

457.19 82.72

20.70

464.98 85.65

20.58

472.96 88.38

20.46

481.14

90.91

0.1

21.01

758.40 99.76 20.88

779.98 104.37 20.75

802.44 108.79 20.60

825.82 113.00 20.45

850.14 117.00 20.30

875.46 120.78

10

21.14

698.50 98.35 21.01

716.77 102.87 20.88

735.69 107.19 20.74

755.28 111.30 20.60

775.55 115.20 20.45

796.53 118.87

20

21.24

648.87 96.94 21.12

664.65 101.37 20.99

680.93 105.59 20.86

697.72 109.60 20.72

715.02 113.40 20.57

732.84 116.98

30

21.32

607.27 95.55 21.21

621.13 99.88

21.08

635.38 104.01 20.95

650.03 107.92 20.81

665.08 111.62 20.67

680.54 115.10

40

21.39

571.77 94.17 21.27

584.10 98.41

21.15

596.75 102.44 21.02

609.73 106.26 20.89

623.02 109.87 20.75

636.63 113.24

1-Octanol

Continued

TABLE 5.29 The properties for 1-alkanol alcohols determined by the methodology of Sohani et al [51]. The values are reported in MPa0.5, TPa1, and J mol1 K1, respectively—cont’d T (K) 293.15

298.15

303.15

308.15

313.15

318.15

P (MPa)

HISP κT

50

21.44

541.02 92.80

21.33

552.12 96.95

21.21

563.48 100.89 21.08

575.10 104.62 20.95

586.99 108.13 20.82

599.13 111.41

60

21.48

514.08 91.44

21.37

524.15 95.50

21.25

534.45 99.36

21.13

544.97 102.99 21.00

555.70 106.41 20.87

566.66 109.60

70

21.50

490.23 90.10

21.40

499.45 94.07

21.28

508.85 97.84

21.16

518.45 101.38 21.04

528.23 104.71 20.91

538.19 107.80

80

21.52

468.94 88.77

21.41

477.43 92.66

21.30

486.08 96.33

21.19

494.90 99.79

21.06

503.87 103.02 20.94

513.01 106.03

90

21.53

449.80 87.45

21.42

457.66 91.25

21.32

465.67 94.84

21.20

473.81 98.21

21.08

482.10 101.36 20.96

490.53 104.28

100

21.53

432.47 86.15

21.43

439.79 89.87

21.32

447.24 93.37

21.21

454.81 96.65

21.09

462.50 99.71

470.32 102.54

Cres P

HISP κT

Cres P

HISP κT

Cres P

HISP κT

Cres P

HISP κT

Cres P

HISP κT

20.97

Cres P

References

323

the module on the investigated day. Ambient temperature and solar irradiance are effective (input) parameters. (c) For the best found statistical method, plot the error analysis graph similar to what expressed for heat pump and PEMFC, by showing the +10% error, 10% error, and Y ¼ X lines as well as points whose x and y values are the experimental and predicted data, respectively. 2. Use GP model for finding correlations to predict all the performance criteria simulated by ANN and SRM in the heat pump case. Introduce the functions and compare the errorrelated criteria for GP models and the best one obtained in each case in the study. 3. Table 5.28 reports the solubility data obtained by the methodology of Sohani et al. [51]. In this table, the values of the Hildebrand solubility parameter (HISP) for two alcohols are presented at a wide range of temperature and pressure. The data for isothermal compressibility coefficient (κT) and residual heat capacity (Cres P ) are also mentioned in Table 5.29. (a) Employ GP to predict HISP of 1-heptanol. (b) Use GMDH for modeling κ T of 1-octanol. (c) Find the best ANN for the prediction of Cres P for both 1-alkanols and compare the prediction accuracy of them. (d) For what cases SRM provides the mean absolute error of below 5%? Note: For all the models, assume pressure and temperate as the effective (input) data.

Acknowledgment This chapter was prepared by coauthorship received from Ali Sohani, Lab of Optimization of Thermal Systems’ Installations, Faculty of Mechanical Engineering-Energy Division, K.N. Toosi University of Technology, P.O. Box: 19395-1999, No. 15-19, Pardis St., Mollasadra Ave., Vanak Sq., Tehran 1999 143344, Iran, Email addresses: [email protected], [email protected] (A. Sohani).

References [1] Beale M, Hagan M, Demuth H. Neural network toolbox™ 8.3. User’s guide. 2015. [2] Hagan MT, Demuth HB, Beale MH, de Jesu´s O. Neural network design. 2nd ed. United States: Martin Hagan; 2014. [3] Sohani A, Sayyaadi H, Hasani Balyani H, Hoseinpoori S. A novel approach using predictive models for performance analysis of desiccant enhanced evaporative cooling systems. Appl Therm Eng 2016;107:227–52. [4] Moradi MH, Sohani A, Zabihigivi M, Wirbser H. A comprehensive approach to find the performance map of a heat pump using experiment and soft computing methods. Energ Conver Manage 2017;153:224–42. [5] Sohani A, Zabihigivi M, Moradi MH, Sayyaadi H, Hasani BH. A comprehensive performance investigation of cellulose evaporative cooling pad systems using predictive approaches. Appl Therm Eng 2017;110:1589–608. [6] Madala HR, Ivakhnenko AG. Inductive learning algorithms for complex systems modeling, Boca Raton: CRC Press; 1994. [7] Ivakhnenko A, Ivakhnenko G. The review of problems solvable by algorithms of the group method of data handling (GMDH). In: Pattern recognition and image analysis C/C of raspoznavaniye obrazov I analiz izobrazhenii. 5:1995. p. 527–35. [8] Farlow SJ. Self-organizing methods in modeling: GMDH type algorithms. CRC Press; 1984. [9] Koza JR. Genetic programming: on the programming of computers by means of natural selection. United States: MIT Press; 1992. [10] Poli R, Langdon WB, McPhee NF, Koza JR. A field guide to genetic programming. Lulu.com.

324

5. Soft computing and statistical tools for developing analytical models

[11] Wang GC, Jain CL. Regression analysis: modeling & forecasting. Institute of Business Forec; 2003. [12] Draper NR, Smith H. Applied regression analysis. United States: John Wiley & Sons; 2014. [13] Sohani A, Farasati Y, Sayyaadi H. A systematic approach to find the best road map for enhancement of a power plant with dew point inlet air pre-cooling of the air compressor. Energ Conver Manage 2017;150:463–84. [14] Jacobsons G. n.d. GMDH type polynomial neural network toolbox. http://www.cs.rtu.lv/jekabsons/ regression.html (accessed May 6, 2015). [15] Silva S. GPLAB—a genetic programming toolbox for MATLAB, version 3.0 (2007). University of Coimbra; 2009. [16] Higham DJ, Higham NJ. MATLAB guide: SIAM. SIAM; 2016. [17] Beijing Aland Welding Co. Ltd. Glaspad glasdek evaporative cooling pad. Beijing Aland Welding Co. Ltd; 2015. [18] Wu J, Huang X, Zhang H. Numerical investigation on the heat and mass transfer in a direct evaporative cooler. Appl Therm Eng 2009;29:195–201. [19] Franco A, Valera DL, Pen˜a A. Energy efficiency in greenhouse evaporative cooling techniques: cooling boxes versus cellulose pads. Energies 2014;7:1427–47. [20] He S, Guan Z, Gurgenci H, Hooman K, Alkhedhair AM. Experimental study of heat transfer coefficient and pressure drop of cellulose corrugated media, In: 19th Australasian fluid mechanics conferenceRMIT University; 2014. p. 176.1–4. [21] Camargo JR, Ebinuma CD, Silveira JL. Experimental performance of a direct evaporative cooler operating during summer in a Brazilian city. Int J Refrig 2005;28:1124–32. [22] Dowdy J, Karabash N. Experimental determination of heat and mass transfer coefficients in rigid impregnated cellulose evaporative media. ASHRAE Trans 1987;93:382–95. [23] Hosseini R, Beshkani A, Soltani M. Performance improvement of gas turbines of Fars (Iran) combined cycle power plant by intake air cooling using a media evaporative cooler. Energ Conver Manage 2007;48:1055–64. [24] Sheng C, Agwu Nnanna AG. Empirical correlation of cooling efficiency and transport phenomena of direct evaporative cooler. Appl Therm Eng 2012;40:48–55. [25] Barzegar M, Layeghi M, Ebrahimi G, Hamzeh Y, Khorasani M. Experimental evaluation of the performances of cellulosic pads made out of Kraft and NSSC corrugated papers as evaporative media. Energ Conver Manage 2012;54:24–9. [26] Sohani A, Sayyaadi H. Design and retrofit optimization of the cellulose evaporative cooling pad systems at diverse climatic conditions. Appl Therm Eng 2017;123:1396–418. [27] Sohani A, Sayyaadi H, Hoseinpoori S. Modeling and multi-objective optimization of an M-cycle cross-flow indirect evaporative cooler using the GMDH type neural network. Int J Refrig 2016;69:186–204. [28] Jradi M, Riffat S. Experimental and numerical investigation of a dew-point cooling system for thermal comfort in buildings. Appl Energy 2014;132:524–35. [29] Zhan C, Duan Z, Zhao X, Smith S, Jin H, Riffat S. Comparative study of the performance of the M-cycle counterflow and cross-flow heat exchangers for indirect evaporative cooling—paving the path toward sustainable cooling of buildings. Energy 2011;36:6790–805. [30] Pandelidis D, Anisimov S, Worek WM. Performance study of the Maisotsenko cycle heat exchangers in different air-conditioning applications. Int J Heat Mass Transf 2015;81:207–21. [31] Zhao X, Li JM, Riffat SB. Numerical study of a novel counter-flow heat and mass exchanger for dew point evaporative cooling. Appl Therm Eng 2008;28:1942–51. [32] Riangvilaikul B, Kumar S. An experimental study of a novel dew point evaporative cooling system. Energ Buildings 2010;42:637–44. [33] Hasan A. Going below the wet-bulb temperature by indirect evaporative cooling: analysis using a modified ε-NTU method. Appl Energy 2012;89:237–45. [34] Bellemo L, Elmegaard B, Reinholdt LO, Kærn MR. Modeling of a regenerative indirect evaporative cooler for a desiccant cooling system. In: 4th IIR conference on thermophysical properties and transfer processes of refrigerants. 2013. [35] Anisimov S, Pandelidis D, Danielewicz J. Numerical analysis of selected evaporative exchangers with the Maisotsenko cycle. Energ Conver Manage 2014;88:426–41. [36] Pandelidis D, Anisimov S, Worek WM. Comparison study of the counter-flow regenerative evaporative heat exchangers with numerical methods. Appl Therm Eng 2015;84:211–24. [37] MathWorks I. MATLAB: the language of technical computing. Desktop tools and development environment, version 8.1, Natick, MA: MathWorks; 2013.

References

325

[38] Kozubal E, Woods J, Burch J, Boranian A, Merrigan T. Desiccant enhanced evaporative air-conditioning (DEVap): evaluation of a new concept in ultra efficient air conditioning. contract 2011 303: 275–3000. [39] Boranian AP. An investigation of optimal control of desiccant-enhanced evaporative air conditioning. University of Colorado at Boulder; 2012. [40] Gao WZ, Cheng YP, Jiang AG, Liu T, Anderson K. Experimental investigation on integrated liquid desiccant— Indirect evaporative air cooling system utilizing the Maisotesenko-cycle. Appl Therm Eng 2015;88:288–96. [41] Kozubal E, Woods J, Judkoff R. Development and analysis of desiccant enhanced evaporative air conditioner prototype. Contract 303:275–3000. [42] Sohani A, Sayyaadi H, Azimi M. Employing static and dynamic optimization approaches on a desiccantenhanced indirect evaporative cooling system. Energ Conver Manage 2019;199:112017. [43] Nguyen-Sch€ afer H. Rotordynamics of automotive turbochargers. Switzerland: Springer; 2015. [44] The Chemours Company. 2015. Thermodynamic properties of HFC-134a, DuPont Company [45] Sohani A, Naderi S, Torabi F. Comprehensive comparative evaluation of different possible optimization scenarios for a polymer electrolyte membrane fuel cell. Energ Conver Manage 2019;191:247–60. [46] Wang L, Husar A, Zhou T, Liu H. A parametric study of PEM fuel cell performances. Int J Hydrogen Energy 2003;28:1263–72. [47] Sohani A, Naderi S, Torabi F, Sayyaadi H, Golizadeh Akhlaghi Y, Zhao X, et al. Application based multi-objective performance optimization of a proton exchange membrane fuel cell. J Clean Prod 2020;252:119567. [48] Babaelahi M, Sayyaadi H. Analytical closed-form model for predicting the power and efficiency of stirling engines based on a comprehensive numerical model and the genetic programming. Energy 2016;98:324–39. [49] Organ AJ. The regenerator and the stirling engine. London: Mechanical Engineering Publications; 1997. [50] Sohani A, Sayyaadi H. Providing an accurate way for obtaining the efficiency of a photovoltaic solar module. Renew Energy 2020;156:395–406. [51] Sohani A, Zamani Pedram M, Hoseinzadeh S. Determination of Hildebrand solubility parameter of pure 1-alkanols up to high pressures. J Mol Liq 2020;297:111847. [52] Sohani A, Sayyaadi H, Mohammadhosseini N. Comparative study of the conventional types of heat and mass exchangers to achieve the best design of dew point evaporative coolers at diverse climatic conditions. Energ Conver Manage 2018;158:327–45. [53] Sohani A, Sayyaadi H. Thermal comfort based resources consumption and economic analysis of a two-stage direct-indirect evaporative cooler with diverse water to electricity tariff conditions. Energ Conver Manage 2018;172:248–64. [54] Malli A, Seyf HR, Layeghi M, Sharifian S, Behravesh H. Investigating the performance of cellulosic evaporative cooling pads. Energ Conver Manage 2011;52:2598–603. [55] He S, Gurgenci H, Guan Z, Alkhedhair AM. Pre-cooling with Munters media to improve the performance of natural draft dry cooling towers. Appl Therm Eng 2013;53:67–77. [56] Munters. CELdek® 5090-15 evaporative cooling pad. [57] Tariq R, Sohani A, Xama´n J, Sayyaadi H, Bassam A, Tzuc OM. Multi-objective optimization for the best possible thermal, electrical and overall energy performance of a novel perforated-type regenerative evaporative humidifier. Energ Conver Manage 2019;198:111802. [58] Pandelidis D, Anisimov S. Application of a statistical design for analyzing basic performance characteristics of the cross-flow Maisotsenko cycle heat exchanger. Int J Heat Mass Transf 2016;95:45–61. [59] Woods J, Kozubal E. A desiccant-enhanced evaporative air conditioner: numerical model and experiments. Energ Conver Manage 2013;65:208–20.

This page intentionally left blank

C H A P T E R

6 Optimization basics 6.1 Preface In Chapter 1, the general form of optimization problems and the mathematical formulation of problems were given. Besides, basic elements of an optimization problem, including objective function(s), decision variables and parameters, and constraints, were defined. Different kinds of optimization problems such as single-objective optimization, multiobjective optimization, constraint and unconstraint optimizations, linear programming (optimization) known as LP problem, nonlinear programming known as NLP problem, integer programming or IP problem, and mixed-integer nonlinear programming known as MINLP problem were defined. Chapters 2–5 were dedicated to different modeling of energy systems, and their outcome is the mathematical formulation that is required for the optimization of energy systems. This chapter is dedicated to optimization basics and tools. Using concepts of optimization, it is possible to solve models of previous chapters to reach the optimal solution of energy systems. This book is not an optimization book; therefore, only general guidelines and brief descriptions are given here. More details regarding optimization must be found in related literature. In this chapter, some concepts regarding single-objective and multiobjective optimization, constraint and unconstraint optimization, and mathematical and metaheuristic optimization approaches are given. Besides, the optimization toolbox of MATLAB software is introduced. Finally, since the optimization of large systems is very time-consuming due to numerous numbers of decision variables and constraints, some methods to reduce the size of the problem are introduced as well.

6.2 Outline After preface and outline, the basic definitions that are essential in selecting optimization tools are given in Section 6.3. Unimodality, multimodality, local and global optimums, the theory of convexity, and the definition of the Hessian matrix are given in this section. Theory of optimization for constraint and unconstraint problems is presented in Section 6.4. Based on the theory of optimization, it is possible to find the optimal solution for the problem

Modeling, Assessment, and Optimization of Energy Systems https://doi.org/10.1016/B978-0-12-816656-7.00006-3

327

# 2021 Elsevier Inc. All rights reserved.

328

6. Optimization basics

analytically. Since the analytical solution of optimization is not possible for all optimization problems, in general, it is required to use numerical methods for optimization. Basics on numerical optimizations are presented in Section 6.5. Numerical methods of constraint and unconstraint optimization using mathematical algorithms are discussed in Section 6.6. All aspects of numerical algorithms required for these problems, including direct and indirect methods, linear and nonlinear LP and NLP) problems, and also integer programming and mixed-integer nonlinear programming (IP and MINLP) are discussed briefly in this chapter. Due to limitation of mathematical optimization approaches in finding the global optimal solution of multi-modal problems, metaheuristic methods such as genetic algorithm (GA), particle swarm optimization (PSO), and other similar approaches (simulated annealing, SA, ant colony, AC, and so on) are introduced in Section 6.6. Hybrid optimization approaches that may be developed for more efficiency and calculation speed are discussed in Section 6.7. Previous sections were related to single-objective optimization (SOO). In the most real problem of the energy system, it is required to consider several and even conflicting objective functions simultaneously. This is required for any sophisticated optimization of energy systems; therefore, a multiobjective optimization approach is required in such cases. Accordingly, multiobjective optimization (MOO) approaches are introduced very briefly in Section 6.8. The optimization toolbox of MATLAB software is introduced in Section 6.9. The dynamic optimization of energy systems is discussed in Section 6.10. Optimization of large systems is very time-consuming due to numerous numbers of decision variables and constraint; therefore, methods to reduce the size of the problem are needed for these kinds of problems. Some of these methods are given in Section 6.11. Some case studies of optimization of energy systems are given in Section 6.12 as examples. Chapter’s summary is given in Section 6.13, and Section 6.14 is dedicated to the exercises of this chapter.

6.3 General definition Basic definitions used in optimization are defined here. These definitions are unimodality and multimodality, local and global optimums, and theory of convexity (concavity).

6.3.1 Unimodality and multimodality An optimization problem is characterized by its relevant objective function as the main element of an optimization problem. This objective function can be unimodal or multimodal function. In general, a mathematical function in an interval [a, b] is known as the unimodal if it has only one extremum in this bracket and is multimodal if it has multiple extrema in this range. In optimization, the interval is defined by its constraints. Therefore, if an optimization problem is an unconstraint, it is unimodal if it has only one extremum in the real space of its variables. If a function has only one variable (one-dimensional problem), i.e. f(x), typical forms of uni-modal and multi-modal functions are illustrated in Fig. 6.1A and B, respectively. The most objective functions in optimization are multidimensional, that is, f(X), where XT ¼ [x1, x2, …, xn]T (X is the vector of decision variables, n is the number of decision variables,

329

6.3 General definition

f1 (X)

(A)

x*

a

b

f2 (X)

(B)

a

x1

x2

x3

x4

x5

b

FIG. 6.1 Schematic of (A) unimodal function, and (B) multimodal function in one-dimensional space in interval [a, b].

and T denotes the transpose of a vector). Schematic of unimodal and multimodal functions in multidimensional space of decision variables is illustrated in Fig. 6.2A and B, respectively. It is important to note that unimodality and multimodality should be defined in the interval defined by constraints of the problem. It is possible to have a function that is multimodal in real space, but it is unimodal in the defined interval. Such a function in optimization is considered as a unimodal function. Unimodality and multimodality of functions have a close relation to the definition of local and global optimums and the theory of convexity in optimization concepts. Definitions of local and global optimums and theory of convexity are discussed in the next sections.

6.3.2 Local and global optimums Multimodal functions have multiple extrema in their defined interval. In optimization, as mentioned before, in optimization, this interval is defined by constraints. On the other hand, optimal solutions (maximums and minimums of functions) are extremums of the functions. Some of these extremums are maximum or minimum points compared to adjustment points, but they are not maximum or minimum in the specified l interval. Global optimum is an optimal solution that is the best throughout the problem; however, local optimums are only

330

6. Optimization basics

(A)

(B)

FIG. 6.2 Schematic of (A) unimodal function, and (B) multimodal function in multidimensional space.

y

Global optimum

6 4 2 x –8

–6

–4

2

–2

4

6

Local optimum

8

–2 –4 –6

(A)

(B)

FIG. 6.3 Schematic of local and global optimums in (A) one-dimensional space; and (B) multidimensional space.

optimums compared to their adjustment solutions. Schematics of local and global optimums are illustrated for multimodal functions in one-dimensional space and multidimensional space in Fig. 6.3A and B, respectively. Since in optimization, the target is finding the global optimum, not local optimums, it is a very important issue in the optimization of multimodal functions. Since most of the optimization algorithms find extremums of functions, it is possible that these algorithms mistakenly find local optimums instead of the global optimum. In general, no mathematical optimization algorithm guarantees to find a globally optimal solution. These algorithms for multimodal functions must be employed with cautions, and sometimes they must be run several times

6.3 General definition

331

with different initial values (most of the mathematical optimization work with tray and error procedure that need initial guest of the solution in their interval). In other words, for the multimodal problem, it is required to run them several times with different initial guests distributed in the interval of the problem. By comparing the results of each run, it is possible to select the best of them as the global optimum; however, there is no guarantee that this point is the global optimum of the problem. Hence, it can be concluded that unimodality and multimodality of the problem are critical issues to deal with any optimization problem. Therefore, before any optimization, it is crucial to determine whether the problem is unimodal or multimodal. Unimodal problems are not encountered with local optimums, and optimization algorithms can be used with more certainty; however, as mentioned before, this task for multimodal problems needs to be performed with precaution. The modality of objective functions is analyzed by the theory of convexity.

6.3.3 Theory of convexity (and concavity) The theory of convexity is defined here as a standard approach for defining modality of optimization problems. By definition, mathematical functions are in different forms, including convex, concave, strictly convex, strictly concave, both convex and concave at the same time, and indefinite. To define these functions’ type, consider one-dimensional objective function in the form of f(x) in the interval of [a, b]. A function in an interval [a, b] is called convex if each selective two points of this function in the defined interval are connected with a line segment, all points of the function are located below the corresponding point of the line-segment or on it. If all points of functions are located under the corresponding point of segment (even not overlapped with each other). The reverse case is a concave or strictly concave function. Definition of these types of functions is given in Fig. 6.4 schematically. It is found that strictly convex, convex, strictly concave, and concave functions are unimodal functions that have no local optimums. Convex and concave functions may have infinite numbers of optimal solutions; however, strictly convex and strictly concave functions have a unique global optimal solution. Linear functions that are existed in linear programming (LP problem) are bot convex and concave at the same time; hence, these are unimodal functions, too. Indefinite functions are those functions that have multiple extremums in their defined interval ([a, b]); therefore, indefinite functions are multimodal and may have local optimums. Mathematically, the condition of a one-dimensional objective function (f(x)) in the interval [a, b] is specified using the second derivation of the objective function, that is, f00 (x) as follows: 8 00 x½a, b ! f ðxÞ is convex f ðxÞ  0 > > < 00 x½a, b ! f ðxÞ is strictly convex f ð xÞ > 0 (6.1) x½a, b ! f ðxÞ is concave f 00 ðxÞ  0 > > : 00 x½a, b ! f ðxÞ is strictly concave f ð xÞ < 0 If f00 (x) is positive for some point and negative in the interval [a, b], the function f(x) is indefinite and if f00 (x) ¼ 0, the function is linear.

332

6. Optimization basics

FIG. 6.4 Schematic of different functions in one-dimensional space including (A) Strictly convex function; (B) Convex function; (C) Strictly concave function; (D) Concave function; (E) both convex and concave (linear) function; (F) infinite function

(A)

(B) f (x)

Concave

xa

(C)

X

xb

(D)

f (x)

(E)

(F)

xa

xb

x

It is required to note that the aforementioned definition must be applied in the given interval. An indefinite function in real values’ space may be, for example, convex in a proposed interval. The aforementioned mathematical method given by Eq. (4.1) was only for one-dimensional problems. Most optimization problems are multidimensional with a vector of n decision variables, that is, XT ¼ [x1, x2, …, xn]T. The modality of multidimensional functions in their related interval is specified by the definition of a special matrix called the Hessian matrix. • Hessian matrix: For a multidimensional function of f(X) with the vector of decision variable including n decision variable, that is, XT ¼ [x1, x2, …, xn]T the Hessian matrix is defined as follows [1]:

333

6.3 General definition

2

∂ 2 f ðX Þ 6 ∂x2 6 1 6 ∂ 2 f ðX Þ 6 H ð X Þ ¼ r 2 f ð xÞ ¼ 6 6 ∂x2 ∂x1 6 ⋮ 6 2 4 ∂ f ðX Þ ∂xn ∂x1

∂ 2 f ðX Þ ∂x1 ∂x2 ∂ 2 f ðX Þ ∂x22 ⋮ ∂ 2 f ðX Þ ∂xn ∂x2

3 ∂ 2 f ðX Þ ∂x1 xn 7 7 ∂ 2 f ðX Þ 7 7 ⋯ 7 ∂x2 ∂xn 7 ⋱ ⋮ 7 7 2 ∂ f ðX Þ 5 ⋯ ∂x2n ⋯

(6.2)

where ∂2 f ðXÞ ∂2 f ðXÞ ¼ ∂xi ∂yj ∂yj ∂xi Therefore, the Hessian matrix is symmetrical. The modality and specification of the multidimensional objective functions are determined using the specification of this matrix. For this purpose, eigenvalues of the hessian matrix, which is formed from the objective function by Eq. (6.2), are found. For this purpose, we must have: det jH  λI j ¼ 0

(6.3)

where H, I, and λ are Hessian matrix, identity matrix (all its diagonal elements are one and other elements are zero), and eigenvalue, respectively. By solution of Eq. (6.3), all eigenvalues, that is, λi where i ¼ 1, 2, …, n are obtained. If Eq. (6.3) gives the system on nonlinear equations, it must be solved numerically to find λi. Accordingly, the following condition is possible: 8 λi > 0 i ¼ 1,2, …, n ) His positive definite ) f ðXÞis strictly convex > > > > λi  0 i ¼ 1,2, …, n ) H is positive semi  definite ) f ðXÞis convex > > < λi < 0 i ¼ 1,2, …, n ) H is negative definite ) f ðXÞis strictly concave (6.4) λi  0 i ¼ 1,2, …, n ) H is negative semi  definite ) f ðXÞis concave > > > > λ < 0andλi > 0 i ¼ 1,2, …, n ) H is indefinite ) f ðXÞ is indefinite > > : i λi ¼ 0 i ¼ 1,2, …, n ) f ðXÞ is linear If in the interval of the problem, some λi are positive, and some λi are negative, the hessian matrix is indefinite, and function is indefinite or multimodal in the proposed interval. For usage of the Hessian matrix, two issues exist. The first issue is when the function has no first or second derivative. In such a case, another method is used based on the determinant of the hessian matrix and its minor matrixes. For more details about the second method of defining modality of functions, refer to the optimization textbook, for example, Ref. [1]. The second issue arises when the objective function is not expressed according to decision variables explicitly. In such a case, the objective function is an implicit function of decision variables. This case is observed in most models of energy systems. For example, in the case study provided for the thermal model of a power plant in Chapter 2, Section 2.7, if the exergetic efficiency of the power plant is considered as an objective function, and maximum and minimum temperatures of the cycle are considered as decision variables, it is found from the example that the exergetic efficiency of the plant is not expressed as an explicit function of these two variables. Instead, the exergetic efficiency of the power plant is the implicit function of these two decision variables. In such cases, the direct derivative of the objective function to decision

334

6. Optimization basics

variables is impossible. Instead, the numerical derivative must be used. Another method is expressing the objective function as an explicit function of decision variables using soft computing and statistical tools, SCST methods presented in Chapter 5. If these regression models are employed, it is possible to convert the implicit function of the objective function to decision variables into an explicit one. • Convex region: Constraints optimization problems are characterized by the convex region. If part of this segment is located outside the region, the region is not a convex one. Their constraints that usually define a region for variation of the objective function. Based on the graphical definition, if two arbitrary points of a region are connected with a segment, and all points of the segment are located inside the region, that region is called a convex one. Typical convex and nonconvex regions are illustrated in Fig. 6.5. From the mathematical definition, the convex region is that, if we have: αx1 + ð1  αÞx2 R 0α1

(6.5)

x2 R1

Xb

Xa

(A)

x1 Convex region

x2 R2

Xa Xb

(B)

Non convex region

x1

FIG. 6.5 Schematic of different type region including (A) convex region; and (B) nonconvex region.

6.4 Theory of optimization

335

It can be proved that if a region is defined and restricted by convex constraint function in the form of gi(x)  0 or concave function in the form of gi(x) 0, their region is a convex region. If the feasible region is surrounded by a linear function, since linear functions are convex and concave simultaneously, the region is convex. • Convex optimization problems: Convex optimization problems are defined as those optimization problems that have the following form: Convex Optimization Problem : mimimize f ðXÞ ) f ðXÞ is convex s:t: hj ðxÞ ¼ 0, j ¼ 1, 2,:…, m hj ðxÞ are linear function gj ðxÞ  0, j ¼ 1,2, :…,k gj ðxÞ are convex

(6.6a)

Such a problem is called the convex optimization problem that has only one global minimum. A constraint in the form of gi(x) 0 can be converted to gi(x)  0 by multiplying into 1. Since in linear programming (LP problems), all objectives and constraints are linear functions and therefore convex, the LP problems are the concave problem, which has only global optimum and not the local one. Therefore, all LP problems are unimodal problems. The reverse case of Eq. (6.6) is and concave problem, which has only one global maximum. Therefore, we have: Concave Optimization Problem : maximize f ðXÞ ) f ðXÞ is concave s:t: hj ðxÞ ¼ 0, j ¼ 1, 2,:…, m hj ðxÞ are linear function gj ðxÞ  0, j ¼ 1,2, :…,k gj ðxÞ are concave

(6.6b)

6.4 Theory of optimization In this section, an analytical method for the optimization of unconstraint and constraint optimization problems is given. This analytical model can be proved using the first-order and the second-order Taylor series expanded for objective function around the extremum of the function. In the first section (Section 6.4.1), this analytical methodology is explained for unconstraint problem, and in the second section (Section 6.4.2), this theoretical method is extended from unconstraint problems to constraint ones.

6.4.1 Theory of unconstraint optimization Suppose that an objective function of an unconstraint optimization problem is expressed as f(X) with the vector of decision variables in the form of XT ¼ [x1, x2, …, xn]T. In theory, if a vector X∗ is an extremum of the function, it is required to have r f(X∗) ¼ 0; therefore, extrema of a function is found by the solution of the following equation:

336

6. Optimization basics

8 ∂f =∂x1 ¼ 0 > > <  T ∂f =∂x2 ¼ 0 ) Xl∗ ¼ x∗1 x∗2 … x∗n ,l ¼ 1, 2,…, m FOCRule : rf ðXÞ ¼ 0 ) ⋮ > > : ∂f =∂xn ¼ 0

(6.7)

In general, if the objective function is multimodal, X∗ is not a unique vector and as is seen from Eq. (6.7.), the function can have up to m number of extrema. These extrema include all local and global minima, maxima, and saddle points. Eq. (6.7) is known as the first-order condition, that is, FOC rule, since it can be proven by the first-order extension of the Taylor series for the objective function. The type of extrema that was found by Eq. (6.7) in order to find whether they are minima, maxima, or saddle points will be specified by the second-order extension of the Taylor series of objective function around X∗. Therefore, this is called the SOC rule, where the SOC is an abbreviation for the second-order condition. Accordingly, the Hessian matrix at extrema, that is, H(X∗) is determined. 2      3 ∂2 f X ∗ ∂2 f X ∗ ∂2 f X ∗ ⋯ 6 7 6 ∂x∗2 ∂x∗1 ∂x∗2 ∂x∗1 x∗n 7 1 6 7 6    ∗  ∗ 7 6 2 7 2 2 ∗ ∂ f X ∂ f X 7 6∂ f X 7  ∗ 6 ∗ ∗ ⋯ 2 ∂x∗2 ∂xn 7 SOCrule : H X ¼ 6 ∂x∗2 6 ∂x2 ∂x2 7 6 7 6 7 ⋮ ⋮ ⋱ ⋮ 6 7 6   (6.8)  ∗ 7 6 ∂2 f X ∗ ∂2 f X ∗  2 ∂ f X 7 4 5 ⋯ 2 ∂x∗n ∂x∗1 ∂x∗n ∂x∗2 ∂x∗n 8    H X ∗ is the positive definit, i:e:,λ∗i HðX ∗ Þ > 0 ) X ∗ isamimimum > > > <    ) H X ∗ is the negative definit, i:e:,λ∗i HðX ∗ Þ < 0 ) X ∗ isamaximum > >    > : H X ∗ is the indefinit, i:e:, λ∗  ∗ < 0 or > 0 ) X ∗ isasaddle point i H ðX Þ Therefore, using FOC and SOC, all extrema of an objective function are found and identified; since saddle points are useless, they are redundant, and we have nothing to deal with them. Nevertheless, several minima and maxima may be found in the multimodal problem. By comparison, the values of the objective function at these extrema (these are a combination of both global and local optimums), the global optimum is recognized from local ones. Example 6.1 Find extrema and their specifications for the following functions: (1) f(x1, x2) ¼ (x1  1)2 + (x2  1)2  x1x2 8 ∂f > >  < ∂x ¼ 2ðx1  1Þ  x2 ¼ 0  ∗ x1 ¼ 2 ∗ 2 1 ) X ¼ FOC : rf ðXÞ ¼ 0 ) ∗ x 2 > 2 > : ∂f ¼ 2ðx2  1Þ  x1 ¼ 0 ∂x2

6.4 Theory of optimization

    2  λ 1  λ1 ¼ 1 > 0 2 ∗  ) X SOC ) jHðx∗ Þ  λI j ¼  ¼ min 1 2  λ  λ2 ¼ 3 > 0 2

337

∗ ¼ ½ 2 2 T is a minimum point for this function (to reduce the size of the Therefore, Xmin text, vertical vector is shown by a horizontal one with superscript) and T denotes the transpose and converts the horizontal vector into vertical one; therefore,  2 T ∗ . Since we obtained only one X∗, the function was a unimodal one that Xmin ¼ ½ 2 2  ≡ 2 only has one minimum. (2) f(x) ¼ 4 + 4.5x1  4x2 + x21 + 2x22  2x1x2 + x41  2x21x2 " # 8 1:941 > > ∗ > XA ¼ > > > 3:654 8 > > ∂f > 3 > > " # > > ¼ 4:5 + 2x  2x + 4x  4x x ¼ 0 1 2 1 2 < < ∂x 1 1:053 1 ∗ ) XB ¼ FOC : rf ðXÞ ¼ 0 ) > > ∂f 1:023 > > 2 > : ¼ 4 + 4x2  2x1  2x1 ¼ 0 > > " # > ∂x2 > > 0:6117 > ∗ > > XC ¼ : 1:4929

8 2 ∗ 3 " # λA, 1 ¼ 37:03 > 0 >

1:941 > > ∗ ∗ ¼ 0:9855 ðLocal min Þ > 4 5 ∗ Þ  λI j ¼ 0 ) ) X H ð x ¼ ) f XA j > A > A > ∗ ¼ 0:97 > 0 > λ 3:654 > A, 2 > > > > 2 3 > " # > < λ∗B, 1 ¼ 1:50 > 0 1:053   ∗ 4 5 ) XB ¼ SOC ) jHB ðx∗ Þ  λI j ¼ 0 ) ) f XB∗ ¼ 0:534 ðGlobal min Þ > > 1:023 λ∗B, 2 ¼ 0:97 > 0 > > > > > 2 ∗ 3 " # > > λC, 1 ¼ 7:0 > 0 >

0:6117 > > ∗ > jHC ðx∗ Þ  λI j ¼ 0 ) 4 5)X ¼ ) f XC∗ ¼ 2:830 ðSadddle pointÞ > > C : λ∗C, 2 ¼ 2:56 < 0 1:4929

Since Function #2 was not a unimodal, it shows three extrema. Using SOC rule, it is found that XA∗ is a local minimum, XB∗ is a global minimum, and XC∗ is a saddle point (which is a useless extremum in optimization). To the contrary of the first function, the second function leads to a system of equations that are nonlinear equations that have no analytical solution and mostly must be solved using the numerical solution, and sometimes it does not lead to any results. Therefore, the theoretical, analytical model that developed here has no generality to be employed for all optimization problems. In general, due to the very limitation of this analytical method, numerical optimization approaches have been developed.

6.4.2 Theory of constraint optimization The general form of the constraint optimization problem (single-objective optimization SOO) was given in Chapter 1 by Eq. (1.2). It is recalled as follows:

338

6. Optimization basics

Optimize f ðXÞ X ¼ ½ x 1 x2 … xn  T s:t : ( hj ðXÞ ¼ 0 j ¼ 1,2,…, m

(6.9)

gk ðXÞ  0 k ¼ 1,2, …, l In the formulation of the constrained optimization problem (Eq. 1.2), hj denotes equality constraints and m is the number of equality constraints. Moreover, gk(X) represents the general form of inequality constraint and l is the number of this type constraint. In the formulation of constraint, if there are constraints in the form of gk(X) 0, those can be multiplied with 1 in order to change them to the standard form of inequality constraints (gk(X)  0 ). In order to apply the theory of constraints optimization of unconstraint problems (Section 6.4.1) to constraint problems, it is necessary to convert the constraint problem of Eq. (6.9) into the form of unconstraint problem using the definition of the Lagrange equation. The Lagrange function combines objective function and constraints of the original problem and replaced instead of the original objective and forms a new unconstraint problem as follows [1]: OptimizeLðX, W, UÞ ¼ f ðXÞ +

m X

wi hi ðXÞ +

i¼1

L X

uj gj ðXÞ

(6.10)

j¼1

where L(X, w, u) is the Lagrange function, wi are Lagrange constants of equality constraints (l number of constants), and uj are Lagrange constants of inequality constraints (number of constants). In optimization, inequality constraints (gk(X)  0 ) could be converted to equality forms by adding a positive slack variable in the form of s2k to the left-hand side of the inequality, that is, gk(X) + s2k ¼ 0 . Therefore, the constraint optimization equations (Eq. 6.9) and their Lagrange transforms (Eq. 6.10) are converted to the following forms: Optimize f ðXÞ X ¼ ½ x 1 x2 … xn  T s:t : ( hj ðXÞ ¼ 0 j ¼ 1, 2, …,m

(6.11)

gk ðXÞ + s2k ¼ 0 k ¼ 1, 2, …,l OptimizeLðX, W, U, SÞ ¼ f ðXÞ +

m X i¼1

wi hi ðXÞ +

L X   uj gj ðXÞ + s2k

(6.12)

j¼1

Eq. (6.12) is an unconstraint optimization problem that is substituted with the original constraint problem. However, L(X, W, U, S) and f(X) are two different mathematical functions; it can be proved that if wi and uj are properly selected, these two functions at extrema of the original function (f(X)) overlap each other; therefore, we must have:     L X ∗ , W ∗ , U∗ , S∗ ¼ f X ∗ (6.13)

6.4 Theory of optimization

339

where X∗, W∗, U∗, and S∗ are vectors of decision variables as ex ∗ ∗ and∗ Lagrange multipliers  T ∗ ∗ w∗ … w∗ T , ∗ trema of the original function, that is, X ¼ , W ¼ x w x … x n m 1 2 1 2    T T U∗ ¼ u∗1 u∗2 … u∗l , and S∗ ¼ s∗1 s∗2 … s∗l . ∗ Eq. (6.13) is clearly proven since if X is an optimal solution, all constraints must be satisfied; therefore, we have:     2 hj X ∗ ¼ 0 and gk X ∗ + s∗k ¼ 0 Substituting the above expressions into Eq. (6.12)     ) L X ∗ , W ∗ , U∗ , S∗ ¼ f X ∗ It can be proven that as the first-order condition (FOC rule), for the new problem gradient of the Lagrange functions respect to X, W, U, and S, i.e., rxL(X, W, U), rwL(X, W, U), ruL(X, W, U), rsL(X, W, U) and must be equal to zero in order to find X∗, W∗, and U∗; therefore, we have [1]: 8 8 ∂L=∂x1 ¼ 0 > > > > > > > > > > > > < ∂L=∂x2 ¼ 0 > > > > rx LðX, W, UÞ ¼ 0 ) > > > > > > ⋮ > > > > > > > > > : > > ∂L=∂xn ¼ 0 > > > > 8 > > ∂L=∂w1 ¼ 0 > > > > > > > > > > > > > < ∂L=∂w2 ¼ 0 > > > > r L ð X, W, U Þ ¼ 0 ) w > > > > > ⋮ > > > > > > > > > : > < ∂L=∂wm ¼ 0 (6.14) FOCRule : 8 > > ∂L=∂u ¼ 0 > 1 > > > > > > > > > > > < ∂L=∂u2 ¼ 0 > > > > r L ð X, W, U Þ ¼ 0 ) > u > > > > ⋮ > > > > > > > > > : > > ∂L=∂ul ¼ 0 > > > > 8 > > > ∂L=∂s1 ¼ 0 > > > > > > > > > > > > < ∂L=∂s2 ¼ 0 > > > > r L ð X, W, U Þ ¼ 0 ) > > > s > > > ⋮ > > > > > > > > : : ∂L=∂sl ¼ 0 Eq. (6.14) gives a system of (2 + m + 2l)  (2 + m + 2l) equation and variables, and if it is solved, Lagrange multipliers, and slack variables, i.e.,  the resultsT give all extrema,  T T X ∗ ¼ x∗1 x∗2 … x∗n , W ∗ ¼ w∗1 w∗2 … w∗m , U∗ ¼ u∗1 u∗2 … u∗l , and T S∗ ¼ s∗1 s∗2 … s∗l . The main problem is that this system of equations is nonlinear, which

340

6. Optimization basics

has no analytical solution and requires a numerical solution. Therefore, Eq. (6.14) has no generality to find extrema of the optimization problem, and we need to use numerical optimization that directly conducts us toward the optimal solution of problems. Moreover, in some cases, functions have no analytical derivatives, or those are not expressed as explicit functions of variables (however, as discussed before, these functions can be converted from the implicit form of variables into the explicit form by SCST methods described in Chapter 5). Anyway, if FOC rule is employed for constraint problem (or its unconstraint equivalent form) and extrema are obtained, the type of extrema can be defined by the condition of the Hessian matrix of the Lagrange function at these extrema that is defined as follows:     SOCrule : HL X ∗ , W ∗ , U∗ ¼ r2 L X ∗ , W ∗ , U∗ 2 3 m L X X (6.15)       w ∗ r 2 hj X ∗ + u∗ r2 gk X ∗ 5 ¼ 4r2 f X ∗ + j

j¼1

k

k¼1

If HL at X∗ is positive definite (all eigenvalues are positive), it is a minimum, and if HL is negative definite (all eigenvalues are negative), the extrema is a maximum, and if HL is indefinite (some eigenvalues are positive, and others are negative), X∗ is a saddle point. Example 6.2 Find extrema and their specifications for the following functions: Minimize f ðXÞ ¼ f ðx1 , x2 Þ ¼ x1 x2 s:t: gðx1 , x2 Þ ¼ 25  x21  x22  0 Solution Lagrange transformation function for the above equation is:   LðX, u, SÞ ¼ x1 x2 + u 25  x1 2  x2 2  S2 FOC rule:

8 ∂L > > > ∂x ¼ 0 > 1 > > > > > ∂L > > > < ∂x ¼ 0

8 > >
> > > ∂L > : 2 > ¼ 0  x2 2  s 2 ¼ 0 25  x > 1 > ∂s > > > > > > : ∂L ¼ 0 ∂u 2

341

6.4 Theory of optimization

A system of the nonlinear equation contains four equations, and four unknowns are obtained and must be solved using numerical methods such as the Newton-Raphson method. It can also be solved by graphical solution, as shown in the following illustration: x2

D

C

A

x1

B

E

Therefore, the system of the equation has five extrema indicated by A, B, C, D, and E on the illustration. Then Hessian of the Lagrange function is checked at these five extrema, and results are summarized as follows: Extrema

x1

x2

u

s

f(X)

Type of extrema

A

0

0

0

5

0

Saddle point

B

3.543.54

0.5

0

12.5

Minima

C

3.54

3.54

0.5

0

12.5

Minima

D

3.54

3.54

0.5

0

12.5

Maxima

E

3.54

3.54

0.5

0

12.5

Maxima

This example shows that, in general, it is not a practical method for optimization since it may lead to a large system of nonlinear equations (in most cases) that has no analytical solution. Therefore, direct numerical optimization approaches are used to find the optimal solution of problems directly without usage of the theory of optimization. In a few cases that this theory is applicable, there is no need to use optimization algorithms introduced hereinafter.

342

6. Optimization basics

Nevertheless, since, in most cases, the theory of optimization cannot be employed as a practical optimization method, numerical optimization algorithms that are presented in the following sections are employed.

6.5 Mathematical optimization As is observed in Section 6.4, unfortunately, the analytical theory of optimization that can find optimal solutions to optimization problems has no generality to be applied to all problems. The limitation of this analytical approach was cited in the previous section. Therefore, most optimization problems must be optimized by numerical methods. These numerical methods include mathematical and metaheuristic approaches. This section is dedicated to mathematical numerical methods of optimization. It is divided into two subsections, including unconstraint optimization and constraint optimization problems. The most challenging optimization algorithms are those developed for constraint problems. Therefore, first optimization algorithms for unconstraint problems are given (Section 6.5.1), and in the next Section 6.5.2, algorithms for constraint problems are discussed. It should be noted that most mathematical optimization algorithms use iterative calculation in which start with one or more initial guest for the optimal solution and through their algorithms they conducted from the initial guest solution toward the real solution in iterative steps.

6.5.1 Unconstraint optimization Unconstraint problems are the simplest form of optimization problems compared to constraint problems. Most of the engineering problems in the field of the energy system are constraints; however, due to some points, in this section, unconstraint problems are introduced. The first reason is that the algorithm of unconstraint problem may be modified to use for constraint problems. The second reason is that some problems unless at the vicinity of optimal point behave like they are unconstraints. Moreover, in some small problems, constraints can be neglected during optimization, and they must be checked when the optimal solution is found to ensure that constraints are not violated. In addition, sometimes, it is possible that through the usage of some procedures, the constraint problem is converted into unconstraint one. An example of this method was already discussed in Section 6.4.2 by Lagrange function that is substituted instead of the original constraint problem. The methods for unconstraint problems are divided into two categories, including direct search algorithms and indirect search algorithms. As mentioned before, numerical optimization algorithms are iterative methods that use initial guest solutions and directed toward the final solution by their iterative stepwise calculations. During iterative process, some methods use the value of the objective function in their iteration; however, others use derivatives of the objective function (first and/or second derivatives) to find a new solution from the solution of the last step in iteration. The first group of methods that use the objective function directly are known as direct search algorithms or direct optimization methods. The second group of algorithms that used first and/or second derivative of objective functions are called indirect search algorithms or indirect optimization methods.

6.5 Mathematical optimization

343

In general, indirect methods are the most effective methods compared to direct ones; but for objective functions that have no derivation throughout the search range or have kink points may crash at such areas. Therefore, in such cases, direct search algorithms are used at the location of kink points. If there is no difficulty due to derivatives of objective functions, the first choice in the selection of optimization algorithms is indirect method. In the Section 6.5.1.1, direct search algorithms are introduced, and in the next part (Section 6.5.1.2), indirect methods are presented. 6.5.1.1 Direct optimization methods Several indirect search algorithms are given in textbooks of optimization, for example, Ref. [1]. In this regard, several methods such as the univariate search method (USM), conjugate search algorithm (CSA), Powell’s methods, reduced Powell’s method, Hooke and Jeeves method, Rosenbrock’s rotating coordinate (RRC) method, and Simplex method can be pointed out. These methods, as already mentioned, use single or multiple initial guests for the optimal solution and correct the estimated solution step by step until the algorithm is converged into the final solution. Those methods that use single initial guest of the solution are known as single-point methods, too. However, if two or multiple points are used in the iteration, they are called two or multiple points. Among listed methods, (USM), conjugate search method (CSM), Powell’s methods, reduced Powell’s method, Hooke and Jeeves method (HJM), and Rosenbrock’s rotating coordinate method (RRCM) are single-point optimization algorithms; however, the Simplex method is a n + 1 points methods that use n + 1 estimated initial solution, where n is the number of decision variables or dimension of the optimization problem. Since this book is not an exclusive text of optimization, it is impossible to introduce all methods here. For more details regarding these algorithms, refer to textbooks of optimization, for example, Ref. [1]. Therefore, only basic methods are introduced, and further details must be found in related kinds of literature, that is, Refs. [1, 2]. Among them, only the univariate search method, conjugate search algorithm, and Powell’s method are introduced as examples of methods. Numerous algorithms are available that can be found in related literature of optimization. (i) Univariate search algorithm The univariate method is one of the standard direct search algorithms for the optimization of unconstraint problems. In this method, in each iteration, among a number of n decision variables, n  1 variables are kept constant, and only one variable is changed to walk toward the next iteration. In the next iteration, the variated variable of the previous step becomes fixed, and another variable from the list of n  1 fixed variables of the previous step becomes variable. Therefore, in each iteration, a variated variable of that step is selected in sequence among n elements of the vector of decision variables. Therefore, in each iteration, the n-dimensional optimization becomes a one-dimensional optimization that can be easily directed toward the next step of the iteration. When n are variated, and convergence criteria are not met, the change of variables starts from the first variable again. If convergence criteria are met at any stage, even if n is not changed, the algorithm is stopped. When the algorithm is stopped, the last point is considered as the optimal solution. Since, in each iteration, the search is performed in one direction (parallel to the unit vector of a variable), this method is called the univariate search method (USM). This algorithm on the counter of an objective function of a two-dimensional sample problem is illustrated in Fig. 6.6.

344

6. Optimization basics

x2

x1

FIG. 6.6 Schematic of the stepwise iteration of the univariate search method (UVM) in two-dimensional space in directions of orthogonal vectors.

The general algorithm of the univariate search method (USM) for a minimization problem can be summarized following the six steps: 1. Start from an initial point (X0) that is guest as the solution. The iteration number denoted by i is set to one, that is, i ¼ 1. 2. If Ui is the unit vector of search, for each iteration, this vector is defined as follows: 8 ½1, 0, 0, …, 0 ,i ¼ 1, n + 1, 2n + 1,3n + 1,… > > > > > > ½0, 1, 0, …, 0 ,i ¼ 2, n + 1, 2n + 1,3n + 1,… > < T (6.16a) Ui ¼ ½0, 0, 1, …, 0 ,i ¼ 3, n + 1, 2n + 1,3n + 1,… > > > > ⋮ > > > : ½0, 0, …, 1 , i ¼ n,2n,3n, … It is required to mention that Si is a vertical vector with n number of elements. In Eq. (6.16), transpose of these vectors is shown for the sack of reducing the space of the text. 3. Since, in each iteration, only one is changed, it is required to find that the correct direction of the walk from the current point to the next point is in the direction of + Ui or  Ui. For this purpose, a very small variable called as the checking variable denoted by ε is considered, and the objective function at three points including Xi, Xi + εUi, and Xi  εUi are calculated as follows: fi ¼ f ðXi Þ fi + ¼ f ðXi + εUi Þ fi

¼ f ðXi  εUi Þ

(6.16b)

6.5 Mathematical optimization

345

If fi+ < fi, the true direction of search toward the minimized solution is + Ui, and if fi < fi, the search must be performed in the direction of  Ui. If both fi+ and fi are greater than fi, Xi can be considered as the minimum (optimum) solution. 4. Based on the true direction of search, the optimal step of variation of the variable (λopt i ) is obtained as follows: df ðXi  λi Ui Þ opt ¼ 0 ) λi dλi

(6.16c)

In Eq. (6.16c), + or  signs depends on what sign is the true direction obtained in step #3. 5. Depending on the obtained value of λopt i and the true direction of the search obtained in step #3 (+ Ui or  Ui), for the convergence; it is required to have df/dX ’ 0; therefore, we have: opt

Xi + 1 ¼ X i  λi Ui opt

fi + 1 ¼ f Xi  λi Ui



(6.16d)

6. The iteration step is set to i ¼ i + 1 and is returned to step #2 until the convergence criteria are met. For the convergence, it is required to have df/dX ’ 0. Note: 1. The algorithm of the UVM was given for minimizing the problem. It is usual in optimization that the algorithm is developed for the minimization. For the maximization problem, it is required to minimize  f(X); therefore, we have: Maximizef ðXÞ≡Minimize ½f ðXÞ Minimizef ðXÞ≡ Maximize½f ðXÞ

(6.17)

2. In most cases, to obtain λopt i , there is no analytical solution for Eq. (6.16c). In such cases, could be obtained by the numerical solution of g(λi) ¼ df(Xi  λiUi)/dλi ¼ 0. For λopt i example, g(λi) ¼ 0 could be solved using the Newton method to find the root of this equation (λopt i ). 3. In some generation of UVM, the search is conducted by a constant walk instead of the optimized walk. For example, λ is set to 0.5 (λ ¼ 0.5), when the algorithm is converged, it is possible to run it with the find solution but with a shorter walk, that is, λ ¼ 0.1 and then λ ¼ 0.05. This algorithm is called the univariate search method with a constant walk.

Example 6.3 Find the minimum solution of the following function using the univariate search method (UVM): Minimizef ðXÞ ¼ f ðx1 , x2 Þ ¼ x1  x2 + 2x21 + 2x1 x2 + x22 

0:0 Suppose that the initial solution is X0 ¼ and the checking length is ε ¼ 0.01. 0:0

346

6. Optimization basics

Solution First iteration, i ¼ 1. 0:0 Step #1: X0 ¼ . 0:0  1 Step #2: U1 ¼ . 0 Step #3: f1 ¼ f ðX0 Þ ¼ f ð0, 0Þ ¼ 0:0 f1+ ¼ f ðX0 + εU1 Þ ¼ f ð0 + ε, 0Þ ¼ f ð0:01, 0Þ ¼ 0:0102 > f1 f1 ¼ f ðX0  εU1 Þ ¼¼ f ð0  ε, 0Þ ¼ f ð0:01, 0Þ ¼ 0:9995 < f1 Therefore, the correct search vector is in the direction of  U1. Step #4: finding the optimal walk, λopt 1 as follows:

  2 d 2λ21  λ1 df ðX0  λ1 U1 Þ df ðλ1 , 0Þ d λ1  0  2ðλ1 Þ opt ¼ ¼ ¼ ¼ 0 ) λ1 ¼ 0:25 dλ1 dλ1 dλ1 dλ1 Step #5:

" opt X2 ¼ X1  λ1 U1

¼

0:0

#

0:0

 0:25

" # 1 0

" ¼

0:25

#

0:0

f2 ¼ f ðX2 Þ ¼ f ð0:25, 0Þ ¼ 0:25  0  2ð0:25Þ2  2  ð0:25Þ  0 + 02 ¼ 0:125 Step #6: i ¼ 2 and return to step #2. Second iteration, i ¼ 2.  0:25 . Step #1: X1 ¼ 0:0  0 Step #2: U2 ¼ . 1 Step #3: f2 ¼ f ðX1 Þ ¼ f ð0:25, 0Þ ¼ 0:125 f2+ ¼ f ðX1 + εU2 Þ ¼ f ð0:25, 0 + εÞ ¼ f ð0:25, 0:01Þ ¼ 0:1399 < f2 f2 ¼ f ðX1  εU2 Þ ¼¼ f ð0:25, 0  εÞ ¼ f ð0:25,  0:01Þ ¼ 0:1099 > f1 Therefore, the correct search vector is in the direction of + U2. Step #4: Finding the optimal walk, λopt 2 as follows: df ðX1 + λ2 U2 Þ df ð0:25, λ2 Þ opt ¼ ¼ 2λ2  1:5 ¼ 0 ) λ2 ¼ 0:75 dλ2 dλ2 Step #5:

" opt X3 ¼ X2  λ2 U2

¼

0:25 0:0

# + 0:75

" # 0 1

" ¼

0:25

#

0:75

f3 ¼ f ðX3 Þ ¼ f ð0:25, 0:75Þ ¼ 0:25  0:75  2ð0:25Þ2  2  ð0:25Þ  0:75 + 0:752 ¼ 0:6875

347

6.5 Mathematical optimization

Step #6: i ¼ 3 and return to step #2. 0:25 Step #1: X3 ¼ . 0:75  1 (since the problem is two-dimensional and in iterations #1 and #2, Step #2: U3 ¼ U1 ¼ 0 searches were done in the direction of U1 and U2, respectively, in the third iteration, the search is performed again in the direction of U1). Step #3: f3 ¼ f ðX3 Þ ¼ f ð0:25, 0:75Þ ¼ 0:6875 f3+ ¼ f ðX3 + εU3 Þ ¼ f ð0:25 + ε, 0:75Þ ¼ f ð0:26, 0:75Þ ¼ 0:6723 > f3 f3 ¼ f ðX3  εU3 Þ ¼¼ f ð0:25  ε, 0:75Þ ¼ f ð0:24, 0:75Þ ¼ 0:7023 < f3 Therefore, the correct search vector is in the direction of  U3. Step #4: Finding the optimal walk, λopt 3 as follows: df ðX3  λ3 U3 Þ df ð0:25, 0:75 + λ2 Þ opt ¼ ) λ3 ¼ 0:375 dλ3 dλ3 Step #5:

" opt X4 ¼ X3  λ3 U3

¼

0:25

#

0:75

 0:375

" # 1 0

" ¼

0:625

#

0:75

f3 ¼ f ðX3 Þ ¼ f ð0:625, 0:75Þ Step #6: i ¼ 4 and return to step #2. A similar procedure is continued until no further improvement (reduction) in the objective function is observed, or the objective function starts to increase. Another convergence criterion is that df/dX ’ 0. Finally, the solution converged to the following value:    1:0 ) fmin ¼ f X ∗ ¼ f ð1:0, 1:5Þ ¼ 1:25 X∗ ¼ 1:5

(ii) Conjugate search method The univariate algorithm was presented previously as one of the standard direct search algorithms that search for an optimal solution along orthogonal vectors. The efficiency and speed of the USM are not reasonable. One method to elevate the efficiency of the algorithm is searching along conjugate vectors instead of orthogonal vectors of USM. Therefore, the conjugate search method (CSM) is developed as a more efficient algorithm. By definition, two-column vectors of Si and Sj are conjugate in respect to an n  n arbitrary matrix denoted by Q, if we only have:   ðSi ÞT Q Sj ¼ 0 (6.18a) where T denotes the transpose of the vector that converts the column vector of Si into a row vector. Both Si and Sj have n elements (it is known that multiplying an n element’s row vector

348

6. Optimization basics

by n  n matric and multiplying results by an n element’s column vector leads to a scalar value. This scalar value for the conjugate vectors is zero). In optimization using the conjugate search method (CSM), the arbitrary matrix is set to the Hessian matrix of the objective function at each point of iteration. Therefore, we have:  k T  k  k (6.18b) Si H X S j ¼ 0 where k denotes the iteration number. If the arbitrary matrix of Eq. (6.16a) is considered to be the identity matrix, I, the conjugate directions are reduced to orthogonal vectors of the univariate method. Conjugate search method uses the following stepwise algorithms: 1. Set an initial point, X0 and set an initial vector S1i , do line search in the direction of S0i with an optimal walk (λ0opt) and go from X0 to X1 so that X1 ¼ X0 + λ0optS0i . 2. Set iteration number k ¼ 1. 3. Do the line search in the direction of Ski with an optimal walk of λkopt. It can be shown that the optimal walk is obtained from the following equation [3]:

λkopt

4. 5. 6. 7.

¼

  rT f Xk Sk T

ðSk Þ HðXk ÞSk

(6.19)

Determine the Hessian of the objective function at Xk, that is, H(Xk). Determine the conjugate vector respect to Ski so that (Ski )TH(Xk)(Skj ) ¼ 0. Do the line sear in the direction of Skj with optimal walk. If convergence criterion is not met, set k ¼ k + 1, and go to step #3.

• Theorem For a quadratic objective function in the form of f(X) ¼ 1/2XTAX + BTX + C, if optimization is sequentially performed in the direction of n the conjugate direction, the optimal solution is found in the nth iteration or before that irrespective of the start point of the algorithm. Since all functions could be approximated by a quadratic function at the vicinity of its optimal solution, it proves that the speed and efficiency of the conjugate search method (CSM) are much superior to the univariate search method (USM). Note: However, the conjugate search method is a very efficient direct method compared to methods like the univariate method, it needs to calculate the Hessian matrix, where its elements are the second derivatives of the objective functions with respect to decision variables. For most problems, there are no analytical second derivatives. In such cases, numerical derivatives can be used. Nevertheless, some functions have no second derivatives over the entire space or at some location of the search space. In such cases, the CSM is failed, and other indirect methods must be used entirely or locally.

349

6.5 Mathematical optimization

Example 6.4 Find the minimum solution  of the following function using the conjugate search method if 1:0 4 and S0 ¼ X0 ¼ 1:0 2 Minimizef ðXÞ ¼ f ðx1 , x2 Þ ¼ 2x21 + x22 + 9 Solution rT f ðXÞ ¼ ½ 4x1 2x2  " # 4 0 H ðX Þ ¼ 0 2 " #9 4 0 > > > H ð xÞ ¼ > =     0 2 > T ! S0 H S1 ¼ 0 " # > 4 > > > S0 ¼ > ; 2   4 0 s11 ¼0 ½ 4 2  0 2 s12 If we suppose s11 ¼ 1, we have:    s 1 1 ½ 16 4  ¼ 0 ! s12 ¼ 4 ) S1 ¼ 11 ¼ s12 s12 4  4    ½4 2 2 20 20 4 0:1111 1 0 o   ¼ ) X1 ¼ X0 + λopt S0 ¼ ¼ λopt ¼ + 0:4444 1 72 72 2 4 0 4 ½4  2 0 2 2 First iteration, k ¼ 1

 1 ½ 0:4444 0:8888  4   ¼ 0:1111 λ1opt ¼ 1 4 0 ½ 1  4 0 2 4    0:1111 1 0 X2 ¼ X1 + λ1opt S1 ¼ + 0:1111 ¼ 0:4444 4 0

Second iteration, k ¼ 2 λ2opt

 0 ¼ 0 ) X3 ¼ X2 ) Convergence criteria ismet ) X ¼ , fmi ¼ 9:0 0 ∗

350

6. Optimization basics

Since the function was a quadratic one and function was two-dimensional, it was optimized before the second iteration based on the given theorem. It can be examined that by changing the X0 to another value and using another initial direction (S0), this figure does not change. (iii) Powell’s method Powell’s method belongs to a class of direct search methods known as pattern search methods. This class of pattern search methods consists of several methods such as Powell’s method, reduced Powell’s method, Hooke and Jeeves method (HJM), and Rosenbrock’s rotating coordinate method (RRCM). For details regarding these methods, refer to Ref. [1]. Here, only a brief explanation of Powell’s method is given. However, detail regarding this method is also referred to Ref. [1]. Powell’s method is a two-stage method. In the first stage, the search is performed like the univariate search method along primary orthogonal vectors of U ¼ ½ u1 u2 … un T . The general movement of the univariate phase gives a vector that is the resultant vector. In the next stage, one primary vector is omitted and replaced by the resultant vector, and search is performed along the remained primary vector and resultant vector. It is due to the fact that if the search is conducted along the resultants vector of the previous improvement, the iteration is directed toward the optimal point with a faster trend. In this stage, a new resultant vector is found and replaced instead of another primary vector. This process is continued until all primary vectors are omitted, and searches are conducted along obtained resultants vectors (S ¼ ½ s1 s2 … sn T ), when all primary vectors are omitted and searches conducted along resultant vectors, the next round of search is continued again with primary vectors. This process continued until convergence criteria are met. In each stage of the procedure that the convergence occurs, the calculation is stopped, and the current point is introduced as the optimal solution. Moreover, in all stages, a line search is performed along the searched vector and the optimal walk, λopt k . For more instance, regarding the procedure of Powell’s method, the procedure is illustrated for a two-dimensional function in the space of decision variables (x1, x2) in Fig. 6.7. Powell’s method is one of the most efficient indirect search algorithms that compete with the conjugate search method. It fails when the found pattern vectors are dependent, linearly. In such a case, another generation of the method called reduced Powell’s model is used. For detail regarding the reduced Powell’s method, refer to Ref. [1]. (iv) The implication of direct search methods for optimization of energy systems Direct search methods described for unconstraint problem were discussed for objective functions that are expressed as functions of the vector of decision variable explicitly. However, thermal, economic, and environmental models that were presented in Chapters 2–4 give objective functions that are implicit functions of decision variables. Regardless of the fact that these problems are usually constraint models, even though constraints are neglected, for the usage of direct search methods, they need some provisions. One method to use implicit objective functions of the energy system in optimization is to replace the procedure that gives objective function instead of the direct, explicit mathematical form of the objective function in the form of f(X). Nevertheless, those methods that need calculation of derivatives of the

6.5 Mathematical optimization

351

FIG. 6.7 Schematic of the stepwise iteration of the Powell’s method in two-dimensional space.

objective function, for example, conjugate search method that uses the Hessian matrix will face the problem. It is possible for them to use numerical derivatives of objective functions that were obtained numerically. Accordingly, we have: ∂f f ðxi + Δxi Þ  f ðxi Þ ¼ ∂xi Δxi     0 f xj + Δxj  f 0 xj ∂f fij} ¼ ¼ ∂xi ∂xj Δxj

fi’ ¼

(6.19)

where f(xi) is calculated by modeling procedure that calculates the objective function as a function of the ith decision variable (xi).

352

6. Optimization basics

Another method that can be used is converting implicit objective function to decision variable into an explicit form of the objective function using SCST models that were described in Chapter 5. 6.5.1.2 Indirect optimization methods The previous section (Section 6.5.1.1) was dedicated to direct search algorithms that use the objective function in their iteration process, directly. There is another class of algorithms that use derivative (first or second derivative) of the objective function in their iterative search process. These methods are called indirect search methods since they do not use the objective function in their iterative process, directly. Two methods are described here, including the gradient method and the Newton method. (i) Gradient method For a direct search algorithm through presenting pattern search methods, for example, Powell’s method, the search vector that directs the algorithm toward the final solution with faster convergence was acquired. Therefore, the goal was to find the most effective search vectors that lead to more efficient calculation speed. From mathematics and definition of the gradient of a function, it is known that the gradient of a function (r f(X)) shows the fasted direction of the increase of that function. Similarly, r f(X) shows the direction of the fastest reduction of the function. Therefore, it can be concluded that for maximization of the problem, r f(X) can be considered as the searched vector, and for a minimization problem, the proper search vector would be r f(X). The algorithm of the gradient method for minimizing the problem consists of the following steps: 1. Specifying an initial point as the guest solution, X0.The iteration number was set to 1, that is, k ¼ 0. 2. Calculation of f(Xk) and r f(Xk). 3. Perform a line search along the negative direction of the gradient of the function, r f(Xk).   opt Xk + 1 ¼ Xk  λk rf Xk

(6.20a)

4. Checking the convergence criteria given as follow: k+1    X  Xk < ε OR rf Xk   ε

(6.20b)

5. Set k ¼ k + 1 and return to step #3 if the convergence is not met. Note: 1. Gradient method is developed based on the first-order expansion of the Taylor series of the objective function, f(X) ffi f(Xk) + rTf(Xk)ΔXk, where ΔXk ¼ Xk+1  Xk 2. The gradient method uses the orthogonal vector in sequential iterations. 3. The improving speed of the gradient method in early iterations is fast and becomes slower and slower as the iteration progresses.

6.5 Mathematical optimization

353

 Example 6.5 1:0 Find the minimum solution of the following function using the gradient method if X0 ¼ 1:0 Minimizef ðXÞ ¼ f ðx1 , x2 Þ ¼ 10x21 + x22

 Solution 1:0 Step #1: X0 ¼ . 1:0 Step #2:

"

#  =∂x1 20x1 rf ðxÞ ¼ rf ðx1 , x2 Þ ¼ ∂f ¼ 2x2 =∂x2 ∂f

    0  0 1 20 20 0 X ¼ ! f X ¼ 11 ! S ¼ rf X ¼  ¼ 1 2 2    20 1 1  20λ0 X1 ¼ X0 + λ0 S0 ¼ ¼ + λ0 2 1 1  2λ0 0

   2   f X1 ¼ 10 1  20λ0 + 1  2λ0

¼ 0 ! 8008 λ0  404 ¼ 0 ) λ0 ¼ 0:05045     1  20ð0:05045Þ 0:009 X1 ¼ ¼ ) f X1 ¼ 0:80919 1  2ð0:05045Þ 0:8991   X2 ¼ X1 +λ1 S1 0:009 + 0:18λ1 2 ¼ ! X S1 ¼ rf X1 0:8991  1:798λ1   0:0735 df 1 2 ! dλ1 ¼ 0 ! λ ¼ 0:459 ! X ¼ 0:0738 df

dλ0

The procedure continued to reach the convergence criteria; accordingly, we must have:  0  ∗ X∗ ¼ , f X ¼ fopt ¼ 0 0 (ii) Newton method The gradient method uses the first-order approximation of the function by the Taylor series of that function. Newton method was developed to enhance the speed of the search method by the usage of the second-order expansion of the Taylor series of the objective function as follows:

354

6. Optimization basics

      T   1 f Xk + 1 ffi f Xk + rT f Xk ΔXk + ΔXk H Xk ΔXk 2 k k+1 k ΔX ¼ X X

(6.21a)

It is known that to find the optimum of the function; we must have: r f(X) ¼ 0 ) X∗. On the other hand, the gradient of the function is approximated as follows:       1 T   f Xk + 1  f Xk ¼ rT f Xk + ΔXk H Xk ¼ 0 rf ðXÞ ¼ 2 ΔXk Therefore, Eq. (6.21b) gives the direction as well as the walk of search as follows:   1  k  rf X Sk λk ¼ ΔXk ¼  H Xk Xk + 1 ¼ Xk + ΔXk

(6.21b)

(6.21c)

Algorithm of the Newton method consists of the following steps: 1. The set initial point, X0 and iteration number, k ¼ 0. 2. Calculation of f(X), r f(X), and H(X). 3. Set direction and walk for the search, Skλk ¼ ΔXk ¼  [H(Xk)]1 r f(Xk). 4. Find the new point, that is, Xk+1 ¼ Xk + λkSk ¼ Xk + ΔXk. 5. Checking the convergence criteria, that is, jr f(Xk)j  ε and return to step @2 if the condition is not met. Note: 1. Since the newton method is a second-order model, its convergence is fastest compared to the gradient method. 2. Due to the use of second-order approximation of the function, the Newton method leads to the final solution for quadratic functions irrespective of the start point of the calculation. 3. The Newton method is reduced to the gradient method when the Hessian matrix is reached to the identity matrix, that is, H ’ I 4. The Newton method is failed in an iteration that the Hessian matrix becomes the singular matrix (a matrix with all its elements as zero). In such a case or such iteration, the Gradient method must be used instead of the Newton method. 5. Since the Newton method needs calculation of the Hessian matrix and its inverse matrix ([H(Xk)]1), the calculation cost of this method, especially for large problems is high. Example 6.6



1:0 Find the minimum solution of the following function using the Newton method if X0 ¼ 1:0 Minimizef ðXÞ ¼ f ðx1 , x2 Þ ¼ 4x21 + x22  2x1 x2  Solution 1:0 and k ¼ 0. Step #1: X0 ¼ 1:0 Step #2:



6.5 Mathematical optimization

355

2

3 ∂f " # 8x1  2x2 6 ∂x1 7 6 7 ¼ rf ðXÞ ¼ 4 ∂f 5 2x2  2x1 ∂x2 2 3 ∂2 f ∂2 f 6 7  6 ∂x21 ∂x1 ∂x2 7 7 ¼ 8 2 HðxÞ ¼ 6 6 2 7 2 2 ∂2 f 5 4 ∂ f ∂x2 ∂x1 Step #3:

"

8 2 2 2

Step #4:

#"

Δx01 Δx02

#

∂x22

)  ( 0 Δx1 ¼ 1 1 6 0 0 ¼ ) ) S ¼ Δx ¼ 0 1 0 Δx ¼ 1 

2

    1 1 0 0 X ¼ X + ΔX ¼ + ¼ ) rf ð0, 0Þ ¼ 1 1 0 0 2

1

1

Therefore, convergence occurs, and hence we have: X∗ ¼

 0 ) fmin ¼ 0:0 0

Since the objective function was a quadratic function, using the Newton method, this example was converged into the final optimal solution in one iteration. It can be examined that if the different starting point is chosen, this convergence is obtained in one iteration, too. • BFGS modification on the Newton method: One difficulty in the usage of the Newton method was due to the calculation of the Hessian matrix and its inverse matrix that increases the computational cost of the method. Moreover, the objective function must have the second derivatives to obtain elements of the Hessian matrix. Based on BFGS method, the Hessian matrix can be approximated from the first derivative of the objective function in each iteration. Accordingly, the following approximation is given for the hessian matrix at the kth iteration as follows:  k T   k k ^ k ΔXk ΔXk T H ^ H ^ k+1 ¼ H ^ k + Δg Δg H  T T k ^ ΔXk ðΔgk Þ ΔXk ðΔXk Þ H (6.22a)     Δgk ¼ rf Xk + 1  rf Xk

356

6. Optimization basics

At the first iteration, where k ¼ 0, we have: ^0 ¼I H

(6.22b)

where I is the identity matrix. BFGS method for approximation of the Hessian matrix was suggested by four scientists, such as Broyden [4], Flecher [5], Goldfarb [6], and Shanno in 1970 [7], independently. (iii) The implication of indirect search methods for optimization of energy systems As mentioned before, even though models of energy systems are considered to be unconstraint, these models are implicit functions of decision variables. Since the indirect search model needs derivatives of objective functions with respect to decision variables, there is no analytical derivation to determine the gradient and Hessian matrix. Instead, the procedure that is developed by the model to calculate objective functions according to decision variables can be used to determine numerical derivatives as per Eq. (6.19). Alternatively, SCST models introduced in Chapter 5 can be used to find objective functions in the form of explicit expressions of decision variables. Hence, indirect search methods can be used for these kinds of problems in the field of optimization of energy systems.

6.5.1.3 Remarks on direct and indirect optimization methods 1. In general, indirect search methods are more efficient and faster than direct methods. 2. When objective functions have kink points and, therefore, discrete derivatives, direct search methods are the choice. 3. Direct methods that use the second-order approximation of the function’s Taylor series like the Newton method or BFGS have superior calculation speed compared to the first-order model like the gradient. 4. When the function has no second derivative of the Hessian matrix is a singular matrix, the gradient method is chosen instead of the Newton method. 5. When the objective function is quadratic or approximated by the quadratic equation, the Newton method is the best method. 6. When the starting point is far away from the optimal solution, the convergence of Newton and BFGS methods is drastically reduced. 7. Both direct and indirect methods may be trapped at local optimums or saddle points for multimodal functions. 8. For discontinues functions, both direct and indirect methods may fail at discontinuities of the function.

6.5.2 Constraint optimization The most optimization problems of the energy systems are constraints. In the previous section (Section 6.5.2), unconstraint mathematical optimization methods were discussed. However, sophisticated models of energy systems are associated with constraints. Therefore, constraint optimization models need to be used for these problems. In general, constraint optimization algorithms are rather complex and complicated compared to

6.5 Mathematical optimization

357

unconstraint ones. Among constraint problems, the simplest form is IP problem (linear programming). The NLPs (nonlinear programming) are more complex than LPs, and the most complex problems are MINLP that are nonlinear and associated with integer variables, simultaneously. In this section, first, the simplest form of constraint problems, that is, IPs, is discussed in Section 6.5.2.1. Then in Section 6.5.2.2, nonlinear programming is presented, and finally, IP and MINLP problems are discussed in Section 6.5.2.3. 6.5.2.1 Linear programming (optimization) As mentioned, the simplest form of constraint optimization problems is linear programming known as LP problem. In LP problems, all equations, including objective functions and constraints, are linear equations. Since linear equations are convex and concave functions at the same time, the LP problems match to the definition given for convex optimization problem introduced in Section 6.3.3 by Eq. (6.2a) (or it is a concave problem as per Eq. 6.2b). Therefore, LP problems are unimodal and have no local optimum. Hence, there is no concern to be trapped in local optimums or saddle points. On the other hand, it is known that the optimal solution of LP problem might be found analytically; therefore, there is no approximation of the found solution. The general form of LP problems consists of n decision variables and m constraints are given as follows [8]: Maximize ðORÞMinimize f ðXÞ ¼ c1 x1 + c2 x2 + … + cn xn s:t :

8 a11 x1 + a12 x2 + … + a1n xn ð or ¼ or Þb1 > > > > > > a21 x1 + a22 x2 + … + a2n xn ð or ¼ or Þb2 > > > > > : > > < : > > > > : > > > > > > am1 x1 + am2 x2 + … + amn xn ð or ¼ or Þbm > > >   : xj  0 feasibility condition

(6.23)

where aij ,bi , cj areconstants i ¼ 1, 2, 3,…, m j ¼ 1,2, 3, …,n Before any further process, the LP problem should be converted into either of the two formats—standard form and canonical form. Some methods of optimizing LP problem require that the problem is in the standard form, and other methods may use canonical forms. • Standard form: The standard form has the following specification: 1. The objective function can either be minimized or maximized.

358

6. Optimization basics

2. All constraints except feasibility condition (xj 0) must be expressed in the form of equality. In this regard, to the left-hand side of those constraints, which are in the form of ai1x1 + ai2x2 + … + ainxn  bi a slack variable (si), must be added to convert it into the form of ai1x1 + ai2x2 + … + ainxn + si ¼ bi. For those constraints that are in the form of ai1x1 + ai2x2 + … + ainxn bi, the slack variable (si) must be subtracted from the left-hand side of the constraint to obtain ai1x1 + ai2x2 + … + ainxn  si ¼ bi. 3. Constants of the right-hand side of all constraints, that is, bi must be positive. If for some constraint, bi is negative, that constraint must be multiplied by 1 to change bi into a positive value. 4. All decision variables must be positive. This is known as the feasibility condition that implies that the values of decision variables in the real-world cannot be negative. If, in some problems, there is a decision variable that is free in sign, it must be replaced +  with two positive variables, that is, xi ¼ x+i  x i , where xi 0, xi 0, and xi is a free variable. Accordingly, the general form of the standard LP problem is expressed as follows: Standard form : Maximize ðORÞ Minimize f ðXÞ ¼

n X c j xj j¼1

s:t : 8 n X > > < aij xj + si ¼ bi > > :

j¼1



 si  0, xj  0 feasibility condition

(6.24a)

where aij , bi , cj areconstants i ¼ 1, 2,3, …,m j ¼ 1, 2,3,…, n

• Canonical form: The canonical form has the following specifications: 1. The objective function must be only in the form of maximization. If the original is the minimization, it must be replaced with maximization of  f(X). 2. Same as the standard form, all decision variables must be positive. It is known as the feasibility condition.

359

6.5 Mathematical optimization

3. A constraint must be in the form of

n P

aij xj  bi . Those constraints that are in the form of

j¼1 n P

aij xj  bi must be multiplied by 1. Those constraints that are in the form of

j¼1

n P

aij xj ¼ bi must

j¼1

be replaced with two equivalent constraints of the following forms: 8 n 8 n X > > X > > > aij xj  bi > aij xj  bi > > > > < j¼1 < j¼1 n X ) aij xj ¼ bi ) n n > > X X > > j¼1 > > > > a x  b aij xj  bi ij j i > > : : j¼1

j¼1

Accordingly, the general form of the canonical LP problem is expressed as follows: Canonical form : Maximize f ðXÞ ¼

n X c j xj j¼1

s:t : 8 n X > > < aij xj  bi > > :

j¼1



xj  0 feasibility condition



(6.24b)

where aij ,bi , cj areconstants i ¼ 1, 2, 3,…, m j ¼ 1,2, 3, …,n

(i) Methods for optimization of LP problems The most famous method to find the optimal solution for LP problems is the Simplex method. Alternatively, there are other methods like the Dual-Simplex method and Transport method that are not discussed in this book. For details regarding these two later models, refer to Ref. [8]. Here, only a brief explanation regarding the Simplex method is given, and more detail about this method is also referred to Ref. [8]. The Simplex method is known as a standard method for optimizing LP problem. Alternatively, there are basic methods that can be used instead of Simplex methods, but the Simplex method was developed for the sake of better efficiency for large-scale LP problems (problems with numerous decision variables and constraints). Moreover, the Simplex method is a practical method for multidimensional problems where the number of decision variables is more than two variables. One earlier method to find the optimal solution of LP problem with a maximum of two decision variables is the graphical method. Since most LP problems have numerous decision variables, the graphical method is not a practical way for the optimization of these kinds of problems.

360

6. Optimization basics

However, the graphical method gives some results that can be used in developing the Simplex method. In the graphical method of two-dimensional problems, the constraint equation is drawn in the space of decision variables (x1 and x2). Therefore, interconnections of these constraints make the searchable or feasible region. Then, by drawing the objective functions for various values of f, the condition that this f is the best value and still passes within the feasible region is found. It can be shown that the optimum values of the objective function are obtained when it passes from the interconnections of constraints at the vertices of the feasible region. Fig. 6.8 shows the vertices of a feasible region obtained by constraints of a sample two-dimensional LP problem in the following forms: 8 9 > Standard Form : > Maximize f ðx1 , x2 Þ ¼ 4x1 + 3x2 > > > > Maximize f ðx1 , x2 Þ ¼ 4x1 + 3x2 > > > > s:t: : > > > > s:t: : > > > > 1Þ2x1 + 3x2  6 = < 1Þ2x1 + 3x2 + s1 ¼ 6 (6.25) ) 2Þ  3x1 + 2x2  3 > 2Þ  3x1 + 2x2 + s2 ¼ 3 > > > 3Þ2x2  5 > > > > 3Þ2x2 + s3 ¼ 5 > > > > > > 4Þ2x1 + x2  4 > > ; > 4Þ2x1 + x2 + s4 ¼ 4 > : 5Þx1 ,x2  0 5Þx1 ,x2  0 The vertices of the feasible region specified by five constraints of the problem are shown by points, A, B, C, D, and E (the constraint #3 is a redundant constraint that has no effect on the shape of the feasible region). The graphical solution of the sample problem shows that when the objective function is passed through point C, it reaches maximum values, and constraints are still satisfied. If the slope of the objective function is changed, the optimal value of the objective function is obtained when it passes through pother vertices. Table 6.1 shows the optimal values when other objective functions are coupled with constraints 1–5.

FIG. 6.8 Graphical solution and a typical feasible region and its vertices for a sample two-dimensional LP problem.

361

6.5 Mathematical optimization

TABLE 6.1 Optimal values of different objective functions if they are used in the sample LP problem represented by Eq. (6.25). Objective function

Vertices of the optimal value

Optimal results

f ¼  x1  x2

A

x∗1 ¼ 0, x∗2 ¼ 0, fmax ¼ 0

f ¼ 10x1 + x2

B

x∗1 ¼ 2, x∗2 ¼ 0, fmax ¼ 20

f ¼ 4x1 + 3x2

C

x∗1 ¼ 1.5, x∗2 ¼ 0, fmax ¼ 9

f ¼ x1 + 20x2

D

x∗1 ¼ 3/13, x∗2 ¼ 24/13, fmax ¼ 483/13

f ¼  4x1 + 2x2

E

x∗1 ¼ 0, x∗2 ¼ 3/3, fmax ¼ 3

Therefore, In LP programming, the optimal value of the objective function is obtained when it passes through vertices of the feasible region. Hence, the optimal solution does not occur within the feasible region, and it reaches the optimum value at the boundary of the feasible region at the vertices of this boundary. These vertices are called extreme points. Therefore, for the solution of LP problem, it is required to examine the values of objective functions at all extreme points of the feasible region. By comparing the values of the objective function obtained for all extreme points, the best value is selected as the optimal solution. By checking the extreme points, it is found that among all variables (decision variables plus slack variables), two variables are zero (for a two-dimensional problem) and other variables are nonzero. The nonzero variables are called basic variables denoted by BV, and zero variables are called nonbasic variables, that is, NBV. Table 6.2 shows this fact for the sample problem at extremes A, B, C, D, and E. Since the optimal solution of LP problems occurs at extreme points, to find extremes, it is required to find intersections of constraint to each other. In this regard, for a problem with n vari¼ (n + m) ! /(m !  n!) linear equations must be ables and m constraints, the number of Cn+m m solved. For the sample problem, it gives C64 ¼ 6 ! /[4 !  2!] ¼ 15 systems of linear equations; each one consists of two equations and two variables. These must be solved to find fifteen intersections (extreme points) between constraints. Among them, five extremes are in the feasible region in quarter one of x1  x2 coordinate, and the other ten extremes are located on the second, third, or fourth quarters (which are not feasible quarters). For large-scale LP problems, numerous systems of n  n linear equations must be solved. This requires a huge calculation time. TABLE 6.2 Nonbasic variables (NBV) at different extremes of the sample problem presented by Eq. (6.25). Extreme points

Nonbasic variables

Basic variables

A

x1 ¼ x2 ¼ 0

s1, s2, s3, and s4

B

x2 ¼ s4 ¼ 0

s1, s2, s3, and x1

C

s1 ¼ s4 ¼ 0

s2, s3, x1, and x2

D

s1 ¼ s2 ¼ 0

s3, s4, x1, and x2

E

x1 ¼ s2 ¼ 0

s1, s2, s3, and x2

362

6. Optimization basics

The Simplex method is a method that examines only feasible extremes, and even it does not require to check all feasible regions. It has two specifications. First, it has feasibility specification. It means that it starts with a feasible extreme and directed through an iteration into another feasible extreme. Therefore, it does not direct the calculation from a feasible extreme to infeasible extremes. On the other hand, it examines only feasible extremes and also it does not require to examine all feasible extremes, too. Therefore, it reduces the computational time drastically. The Simplex method starts with a feasible point; for example, A for the sample problem is illustrated in Fig. 6.8. It is conducted from point A to point B and then to point C as the final solution. Therefore, for the sample problem, it examines only three extremes out of fifteen extremes of the sample problem. In those type of LP problem that all slack variables have positive signs in constraint (such as the sample problem given by Eq. 6.25), the slack variables could be considered as initial basic variables. Therefore, for the sample problem, extreme A would be considered as the first selected extreme in the first iteration. When the iteration is directed from point A to point B, one BV variable (x1) becomes BV and another variable (s4) becomes NBV. The first variable is called the entering variable and the second one is called the exiting variable. Therefore, in each iteration, an entering variable and an exiting variable must be found. The process of calculation is performed by the Guess-Jordan calculation of matrix. The calculations of the matrix are simplified by a tabulated calculation known as the Simplex table. The format of the Simplex table is shown in Table 6.3. For the sample problem given by Eq. (6.25), the Simplex table at the initial solution (point A) is completed as per Table 6.4A. Before that, the objective function is converted from f(x1, x2) ¼ 4x1 + 3x2 to f  4x1  3x2 ¼ 0. Hence the problem is rewritten as follows: f  4x1  3x2 + 0s1 + 0s2 + 0s3 + 0s4 ¼ 0 s:t : 1Þ 2x1 + 3x2 + s1 + 0s2 + 0s3 + 0s4 ¼ 6 2Þ  3x1 + 2x2 + 0s1 + 1s2 + 0s3 + 0s4 ¼ 3 3Þ 0x1 + 2x2 + 0s1 + 0s2 + 1s3 + 0s4 ¼ 5 4Þ 2x1 + x2 + 0s1 + 0s2 + 0s3 + 1s4 ¼ 4   x1 , x2 ,s1 , s2 , s3 , s4  0 Feasibility Condition It is clear that the multipliers of BV variables in the Simplex table form an identity matrix. The last column in Table 6.4A is the solution column. Accordingly, at the initial solution (point A), Tables 6.4A indicated that we have:

TABLE 6.3 General form of the Simplex table of calculation. Basic

f

Decision variable

Slack variable

Solution

f

1

Multiplier of equation

Multiplier of equation

Value of objective function

BV

Multiplier of equation

Multiplier of equation

Multiplier of equation

Values of BV

363

6.5 Mathematical optimization

TABLE 6.4A

The Simplex table for the first iteration of the sample problem given by Eq. (6.25).

Basic

f

Entering variable x1

x2

s1

s2

s3

s4

Solution

f

1

4

3

0

0

0

0

0

s1

0

2

3

1

0

0

0

6

s2

0

3

2

0

1

0

0

3

s3

0

0

2

0

0

1

0

5

Exiting variable # s4 7! x1

0 # 0 2

2!1 # 2 2

1 # 1 2

0 # 0 2

0 # 0 2

0 # 0 2

1 # 1 2

4 # 4 2

f ¼ 0, s1 ¼ 6, s2 ¼ 3,s3 ¼ 5,s4 ¼ 4 For the next iteration, as mentioned when the solution directed the first iteration on extreme A into point B, entering and exiting variables must be found. • Entering variable: The entering variable is the variable that has the minimum negative value in the f-row for maximization problems. It is clear that 4 is the minimum negative value in the f-row of the Table 6.4A. Hence, x1 is the entering variable. For minimization problems, the entering variable in the f-row is the variable with the biggest positive value. If there are no negative values for maximization problems or no positive values for the minimization problem in the f-row, it means that the problem is converted to the final optimal solution. • Exiting variable: The exiting variable is that variable that has minimum positive ratio of the solution column when its elements are divided into the multiplier of entering variables. Based on Table 6.4A, we have: BV

x1

Solution

s1

4

6

6/4 ¼ 1.5

s2

2

3

3/2 ¼ 1.5

s3

3

5

3/5

s4

0

4

0

Ratio

The above auxiliary table shows that the minimum positive ratio belongs to s4. Therefore, in Table 6.4A, s4 is the exiting variable that must be replaced by entering variable (x1). Since the ratio of the new entering variable must be converted to 1 in its relevant row and 0 in other rows. It can be performed by Gauss-Jordan method rows operation of the matrix, as is observed in Table 6.4A. Therefore, the Simplex table at the second iteration (point B) of the sample problem is given in Table 6.4B.

364

6. Optimization basics

In Table 6.4B, it is observed that the minimum negative value is 1 and hence, x2 is entering variable. The exiting value is specified using the following auxiliary table: BV

x2

Solution

Ratio

s1

2

2

2/2 ¼ 1

s2

7/2

9

18/7

s3

2

5

5/2

x1

1/2

2

4

TABLE 6.4B The simplex table for the second iteration of the sample problem given by Eq. (6.25). Basic

f

x1

x2

s1

s2

s3

s4

Solution

f

1

0

1

0

0

0

2

8

s1 ! x2

0

0

2

1

0

0

1

2

s2

0

3

7 2

0

1

0

3 2

9

s3

0

0

2

0

0

1

0

5

1

1 2

0

1 2

2

x1

0

0

0

This indicates that the exiting variable is s1. Therefore, in Table 6.4B, s1 must be replaced with x2. In the row of this variable, the multiplied of x2 must be converted to 1 and in other rows must be converted to zero by the Gauss-Jordan method operation. For more detail, regarding Gauss-Jordan operation on the Simplex table, refer to Ref. [8]. Accordingly, the Simplex table at the third iteration becomes the form given by Table 6.4C. In Table 6.4C, it is observed that in the first row, no negative multiplier has remained. Therefore, the problem is converged, as seen, from solution column, in the final case, we have: 3 fmax ¼ 9, x∗1 ¼ ¼ 1:5,and x∗2 ¼ 1:0 2 TABLE 6.4C The simplex table for the third iteration of the sample problem given by Eq. (6.25). Basic

f

x1

x2

s1

s2

s3

s4

f

1

0

0

1 2

0

0

3 2

9

x1

0

0

1

1 2

0

0

- 12

1 11 2

Solution

s2

0

0

0

3 4

1

0

- 14

s3

0

0

0

-1

0

1

-1

3

x1

0

1

0

-14

0

0

- 34

3 2

365

6.5 Mathematical optimization

This is the result that was previously found by graphical solution (point C in Fig. 6.8). The aforementioned calculation given by Simplex tables could be done by matrix operation, alternatively as given, for example, in Ref. [1]. The aforementioned procedure of the Simplex method was only for those LP problems in n P which all constraints are in the form of aij xj  bi . If some constraints or even one constrain is in the form of

n P j¼1

aij xj ¼ bi or

n P

j¼1

aij xj  bi , the slack variables cannot be considered as initial basic

j¼1

variables (BVs) in the first iteration. In such cases, the Simplex method becomes more complicated. Two methods, namely the Big-M method and two-phase method, are given for such problems. n n P P In two-phase method, to all constraints in the form of aij xj ¼ bi or aij xj  bi , a virtual j¼1 variable is added to form them into the following form: j¼1 n X

aij xj  bi )

n X aij xj  si + Ri ¼ 0

j¼1

j¼1

n X

n X aij xj ¼ bi ) aij xj + Ri ¼ 0

j¼1

j¼1

where Ri is the virtual variable related to the ith constraint in the form of n P aij xj  bi .

(6.26)

n P

aij xj ¼ bi or

j¼1

j¼1

Phase-I: Then, an imaginary objective function is defined and minimized using the constraint of the real problem. This objective function must be minimized regardless of whether the main objective function is a minimization or a maximization objective. This imaginary objective function is minimized in this phase using the Simplex method with positive si and Ri as the initial basic variables (BV). At the end of this phase, the imaginary objective function must become zero. If this does not happen, the problem will have no solution [8]. The form of the imaginary problem in this phase is as follows: X Minimize r ¼ Ri s:t: : n X aij xj  si + Ri ¼ 0 j¼1

where

(6.27)

aij , bi areconstants i ¼ 1,2,3, …,m j ¼ 1, 2,3, …, n

P When at the end of the Simplex calculation of phase-I, r ¼ Ri ¼ 0, the BV of the last Simplex iteration of this stage is used as the BV of the real problem in the next stage.

366

6. Optimization basics

Phase-II: In this stage, the real problem is optimized using BV of Phase-I as the BV of the first iteration of this phase. More details regarding Big-M and two-phase methods were given in Ref. [8]. In addition, there are special cases that the Simplex method leads to no result or an infinite number of solutions (when the objective function is parallel with a constraint that contains solution), or result is infinity (not a specific optimal value). Moreover, in some problems, trouble called degeneracy occurs, which leads to an infinite number of iterations. Details regarding these special cases are also given in Ref. [8]. (ii) Software for LP problems A small LP problem can be solved by hand calculation, as described in the previous part (Part i). For large-scale LP problems, commercial software such as LINDO and LINGO can be used. LINDO that is abbreviated from the Linear, Interactive, and Discrete Optimizer is a software package for linear programming, integer programming, nonlinear programming, stochastic programming, and global optimization. First released for Lotus 1-2-3 and later also for Microsoft Excel. LINGO is also an optimization tool designed for optimizing Linear, nonlinear, quadratic, quadratically constrained, and integer optimization models. For more details, refer to the website of these two software on the Internet. In addition, to software (LINDO and LINGO), LP problem also can be solved by its own programming of users on any programming software such as MATLAB programming. (iii) The implication of LP problems on Energy systems Unfortunately, most thermal, economic, and environmental optimization models that are developed for energy systems are nonlinear. Therefore, LP programming for energy systems has a very limiting application. Moreover, for LP programming, it is required to have all linear objective functions and constraints as explicit expressions of decision variables. This case is also rare in most models of energy systems. However, converting nonlinear models to LP models and also implicit expressions to explicit expressions may be possible using SCST models presented in Chapter 5. In this regard, it is required to approximate functions by a linear function. This case is not always possible since linearization may reduce the accuracy of the model. 6.5.2.2 Nonlinear programming (optimization) As mentioned, most of the models that are developed for the optimization of energy systems are the nonlinear constraint optimization problems. Therefore, optimization methods are required for this class of problems. For this type of problem, as mentioned before, the optimal solution is not found analytically, and it is found by an approximation. Moreover, if the problem is not a convex problem, no methods guarantee to find the global optimum, and algorithms may be trapped in local optimums or saddle points. Therefore, algorithms for these types of problems must be employed with caution, and sometimes they must be run with several times with different initial solutions spreads in the search space. Then through

367

6.5 Mathematical optimization

comparing the results of different runs, the best one would be assumed to be the final solution; however, still, there is no guarantee to find the global optimum. Several optimization methods for nonlinear problems have been developed; among them, Lagrange method, Penalty function method, sequential quadratic programming known as SQP method, and the generalized reduced gradient method known as the GRG algorithm can be pointed out. In this section, a very brief introduction about Penalty function and Lagrange methods, as well as the SQP method, is given. More details about these methods and other algorithms for NLP programming can be found in optimization textbooks, such as Ref. [1]. (i) Penalty function and Lagrange methods The penalty function is one of the classical methods in NLP that convert the unconstraint problem into unconstraint one using penalty functions of constraints and hence solve the problem using optimization methods of unconstraint problem (Section 6.5.1). If the general form of unconstraint problems is given as: Minnimize f ðXÞ;X ¼ ½ x1 x2 … xn T s:t: :

(6.28)

gj ðXÞ  0 ; j ¼ 1, 2, :…, m hk ðXÞ ¼ 0;k ¼ 1,2,:…,l

In the penalty function method (PFM), each constraint is omitted; instead, a penalty function is added to the objective function, and the problem is converted to an unconstraint problem as follows:   Minnimize P f ðXÞ, gj ðXÞ, hk ðXÞ ¼ f ðX Þ + rG

m l X X   G gj ð X Þ + r H H ð hk ð X Þ Þ j¼1

k¼1

where

(6.29)

X ¼ ½ x 1 x 2 … xn  T rG ¼ cte;rH ¼ cte In Eq. (6.29), G(gj(X)) and H(hk(X)) are penalty functions. When constraints are satisfied, these function are considered to be zero; but if constraints are violated, these functions return big values (since the objective function is a minimization, the returned big value ensures that optimal solution is not found in cases that constraint is not satisfied). rH and penalty function are used and selected by the experience of experts who solve optimization. Common penalty functions that are widely used are quadratic penalty functions defined as follows [1]:     2 (6.30a) G gj ðXÞ ¼ min 0, gj ðXÞ

368

6. Optimization basics

Hðhk ðXÞÞ ¼ ½hk ðXÞ2

(6.30b)

Algorithm of the PFM consisted of the following steps: 1. Start with initial point (X0), select initial values of scalar values (r0Gand r0H), and decide about the appropriate value of the criteria of convergence, that is, ε. 2. Using the penalty functions (e.g., in forms of Eqs. (6.30a) and (6.30b)) convert the problem into an unconstraint problem as per Eq. (6.29). 3. Find the minimum solution for the obtained problem using optimization methods of unconstraint optimization problems (refer to Section 6.5.1). 4. Check convergence criteria given by the following expressions:     |P Xk + 1 , rH k , rG k  f Xk + 1 |  ε

(6.31)

5. If convergence criterion is not met, increase the values of rkG and rkH and return to step #2. Example 6.7 Minimize following optimization problem using PFM if the starting point is X0 ¼ ½ 1 3 T and also r0 ¼ r0G ¼ r0H ¼ 1, ε ¼ 0.001. Minimize f ðXÞ ¼ ðx1  1Þ2 + ðx2  2Þ2 s:t: : h ð X Þ ¼ x1 + x 2  4 ¼ 0 Solution Step #1: X0 ¼ ½ 1 3 T ,r0 ¼ r0G ¼ r0H ¼ 1, and ε ¼ 0:001. Step #2: Minnimize PðX, rÞ ¼ ðx1  1Þ2 + ðx2  2Þ2 + rðx1 + x2  4Þ2 Step #3: Since P(X, r) is a quadratic function, it has an analytical solution. Since its Hessian is positive definite, it has only one optimum, that is, the global minimum. Therefore, its extreme can be found with FOC condition, which implies that r P(X, r) ¼ 0. 8 8 ∂P 3r + 1 > > ¼ 0 ) 2 ð x  1 Þ + 2r ð x + x  4 Þ ¼ 0 > > 1 1 2 < x1 ¼ < ∂x 1 1 + 2r ) rPðX, rÞ ¼ 0 ) > > > : x2 ¼ 5r + 2 : ∂P ¼ 0 ) 2ðx2  2Þ + 2rðx1 + x2  4Þ ¼ 0 > ∂x2 1 + 2r ( 1 ( 1 x1 ¼ 4=3 ¼ 1:333 P ¼ 0:333 ;r0 ¼ 1 ) ) 1 x2 ¼ 7=3 ¼ 2:333 f 1 ¼ 0:222

369

6.5 Mathematical optimization

Step #4: P1  f1 ¼ 0.333  0.222 ¼ 0.111 > ε; hence, the convergence criterion is not met and r must be increased. In this regard, we selected r ¼ 10, and calculation is restarted from step #2. k

r

x1

x2

f

P

Δx 5 jxk+1 2 xk1 j 1

P2f

0



1.0

3.0

1

0





1

1

1.3333

2.3333

0.2222

0.3332

0.3333

0.1111

2

10

1.4762

2.4762

0.4535

0.4762

0.1429

0.0227

3

100

1.4975

1.4975

0.4950

0.4975

0.0213

0.0025

4

1000

1.4998

2.4998

0.4995

0.4998

0.0023

0.0003 f10 + rf10 ΔX ¼ 0 > > >  T > > > f20 + rf20 ΔX ¼ 0 > > > < : (6.38a) > > : > > > > > >: > > : 0  0 T fn + rfn ΔX ¼ 0

372

6. Optimization basics

Eq. (6.38a) becomes: 2

2 03 32 Δx1 3 f1 ∂f1 ∂f1 6 7 … 6 7 6 07 ∂x2 ∂x2 7 f2 7 76 Δx2 7 7 6 76 7 7 6 76 6 7 6 7 ∂f2 ∂f2 76 : 7 6:7 76 … 6 7 6 7 ∂x2 ∂xn 7 7¼6 7 76 7 6:7 76 : 7 6 7 : … : 76 7 6 7 76 6 7 6 7 76 7 7 :7 ∂fn ∂fn 54 : 5 6 4 5 … ∂xn 1 ∂x2 0 Δxn fn  1  ) G:ΔX ¼ F ) ;ΔX ¼  G :F

3 T 3 2 Δx1 rf10

2

3

2

∂f1 6 7 6 7 6 T 7 6 6 7 6 07 6 ∂x1 f2 7 6 rf20 76 Δx2 7 6 7 6 6 76 7 6 6 6 76 7 6 7 ∂f2 7 6 : 6 : 76 : 7 6 7 6 6 76 7¼6 6 ∂x ) 6 76 7 6 7 6 1 :7 6 : 76 : 7 6 7 6 6 76 7 6 6 : 6 76 7 6 7 7 6 : 6 : 76 : 7 6 6 4 54 5 4 5 4 ∂fn  0 T fn0 Δxn rf ∂x n

f10

(6.38b)

Newton-Raphson is performed based on the following iterative steps: 1-. An initial solution X0 is selected, and the iteration number is set to zero (k ¼ 0). 2-. Calculate FK ¼ F(Xk), GK ¼ G(Xk), and (GK)1. 3-. Calculate ΔXk ¼  (Gk)1. Fk, If ΔXk  εthe calculation is terminated; otherwise, go to the next step. 4-. Xk+1 ¼ Xk + ΔXk, set k ¼ k + 1, and restart from step #2. Since for SQP method, the Newton-Raphson must be applied to satisfy the FOC condition, f is replaced with rf; therefore, Eq. (6.38) becomes as follows:   ΔX ¼  H1 :rf (6.38b) where H is the Hessian matrix of f(H ¼ r2xf ). • Algorithm of SQP method: SQP algorithm consists of the following steps: 1. Consider a start point. For the start points, assume that the Hessian matrix of the Lagrange function (the equivalent Lagrange function of the main constraint problem) is the identity matrix. 2. Using Taylor expansions of objective function and constraints (second-order expansion for other objective function and first-order for constraint equations) convert the problem to quadratic programming. For the second-order expansion of the objective function, the Hessian matrix of the Lagrange function is required. For this purpose, use BFGS approximation of Hessian of the Lagrange function as per Eq. (6.22a). The usage of the BFGS guarantees that the obtained Hessian matrix is positive definite. Moreover, it enhances the calculation speed. 3. Solve the QP equations using Eqs. (6.37a)–(6.37f ) by the Newton-Raphson methods given by Eq. (6.38b). By solution, besides ΔXk, the Lagrange multipliers, wk, are also calculated as parts of the solution.

6.5 Mathematical optimization

373

4. Since the main problem is minimization, if the Lagrange multipliers of inequality or some constraints obtained in step #3 are negative, it implies that the assumption that changed those constraints from inequality to equality was not correct. In this case, obtained Lagrange functions of such constraints must be set to zero, and calculations of step #3 must be repeated with new Lagrange multipliers. 5. The new point is calculated, that is, Xk+1 ¼ Xk + ΔXk. For the new equation, check that which constraints are violated. Accordingly, a penalty function for this point is calculated from the following expression: P¼f +

viol X

w i j gi j

(6.39)

j¼1

If the obtained penalty function is less than or equal to the value of the objective function at the start of the iteration, Xk+1 is accepted as the new point. Otherwise, ΔXk must be modified by multiplying it to coefficients that are smaller than one (ΔXkcorr ¼ cΔXkold; c < 1.0). 6. If ΔXk  ε calculations are terminated; otherwise, calculations are returned to step #2.

Example 6.8 Find the optimal solution of the following constraint optimization problem using two iterations with X0 ¼ ½ 1 4 T : Minimizef ðXÞ ¼ x41  2x2 x21 + x22 + x21  2x1 + 5 s:t: : gðXÞ ¼ ðx1 + 0:25Þ2 + 0:75x2  0 First Iteration: Step #1:

Step #2:

  T ^0 ¼ 1 0 X0 ¼ ½ 1 4 T , f 0 ¼ 17:0, rf 0 ¼ ½ 8 6 , r2 L0 ¼ H 0 1  T g0 ¼ 2:4375, rg0 ¼ ½ 1:5 0:75  " #" # 1 0 Δx1 1 + ½ Δx1 Δx2  fa ¼ 17:0 + ½ 8 6  2 0 1 Δx2 Δx2 " # Δx1 ga ¼ 2:4375 + ½ 1:5 0:75  Δx2 "

Δx1

#

Step #3: The implication of FOC condition leads to the following expression: 8 8 ( 8 + Δx1  1:5w ¼ 0 > > < Δx1 ¼ 0:50 < rfa  wrga ¼ 0 ) Δx2 ¼ 2:25 ) 6 + Δx2  0:75w ¼ 0 > > ga ¼ 0 : : 2:4375 + 1:5Δx1 + 0:75Δx2 ¼ 0 w ¼ 5:00

374

6. Optimization basics

Steps #4 and 5:

 X1 ¼ X0 + ΔX1 ¼

  1 0:5 1:5 + ¼ 4 2:25 1:75

Now, we must check the constraint g(X) ¼  (x1 + 0.25)2 + 0.75x2 ¼  (0.5 + 0.25)2 + 0.75  (2.25) ¼  0.25; however, it must be g(X) ¼  (x1 + 0.25)2 + 0.75x2 0; hence, the constraint is violated, and the penalty function must be calculated. Therefore, we have:          P X1 ¼ f X1 + wg X1  ¼ 10:5 + 5:0  ð0:25Þ ¼ 11:75  f X0 ¼ 17:0 Step #6: Therefore, the obtained point, that is, X1 ¼ ½ 1:5 1:75 T is approved, and calculation is continued to the next iteration since the convergence criterion is not met (ΔX1 ≫ ε). Second Iteration:

  k9 ^ k ΔXk ΔXk T H ^ > " # H > = ^ ¼H +  H 17:7529 5:3882 T T k ^ ΔXk ) ðΔgk Þ ΔXk ðΔXk Þ H > 5:3882 1:9137 >     ; Δgk ¼ rf Xk + 1  rf Xk k+1

Step #2:

^k

 T Δgk Δgk

" #" # 17:7529 5:3882 Δx1 1 fa ¼ 10:5 + ½ 8:0 1:0  + ½ Δx1 Δx2  2 5:3882 1:9137 Δx2 Δx2 " # Δx1 ga ¼ 0:25 + ½ 2:5 0:75  0 Δx2 "

Δx1

#

Step #3: The implication of FOC condition leads to the following expression: (

8 8 Δx1 ¼ 1:6145 8:0 + 17:7529Δx1 + 5:3882Δx2  2:5w ¼ 0 > > > > < rfa  wrga ¼ 0 < ) 1:0 + 5:3882Δx1 + 1:9137Δx2  0:75w ¼ 0 ) Δx2 ¼ 5:0480 > > ga ¼ 0 > > : : 0:25 + 2:5Δx1 + 0:75Δx2 ¼ 0 w ¼ 2:6150

Lagrange multiplier becomes negative (w ¼  2.6150) that is not acceptable. Therefore, this multiplier is set to zero (w ¼ 0). Steps #4 and #5: It is observed that the obtained equation is solved once more. Hence, we have: 8 8 Δx1 ¼ 2:0070 8:0 + 17:7529Δx1 + 5:3882Δx2 ¼ 0 > > ( > > < rfa ¼ 0 < ) 1:0 + 5:3882Δx1 + 1:9137Δx2 ¼ 0 ) Δx2 ¼ 5:1310 > > ga ¼ 0 > > : : 0:25 + 2:5Δx1 + 0:75Δx2 ¼ 0 w¼0

6.5 Mathematical optimization



  1:5 2:0070 0:5070 X2 ¼ X1 + ΔX2 ¼ + ¼ 1:75 5:1310 3:3810  2  1 f X ¼ 17:48 > f X ¼ 10:5

375

It implies that the value of the objective function is not improved. Accordingly, the walk (ΔX2) must be reduced. Accordingly, we half the walk and have:    1:5 2:0070 0:5070 + ¼ X2 ¼ X1 + ΔX2 ¼ 1:75 5:1310 3:3810 Step #6: In a similar manner to iteration #1., it can be checked that this point is approved by checking either constraint or penalty function; therefore, X2 ¼ ½ 0:4965 0:8155 T is approved, and calculation is continued to the third iteration since convergence criterion is not met (ΔX2 ≫ ε). Due to the limited space of this chapter, other steps of the iteration are not repeated here. Indeed, these iterations must be performed using computer code. (iii) The implication of NLP programming for energy systems Since NLP algorithms need derivatives of objective functions with respect to decision variables, there is no analytical derivation to determine the gradient and Hessian matrix. Instead, the procedure that is developed by the model to calculate objective functions according to decision variables can be used to determine numerical derivatives as per Eq. (6.19). Alternatively, SCST models introduced in Chapter 5 can be used to find objective functions in the form of explicit expressions of decision variables. Hence, NLP algorithms can be used for these kinds of problems in the field of optimization of energy systems. 6.5.2.3 IP and MINLP problems Optimization algorithms that were cited previously were valid for cases that all decision variable are continues variables. However, in practice, some decision variables may be discrete or integer ones. One practical way is assuming that integer variables are continuous, and when results are obtained, these variables must be rounded up or down or numerically. However, this method is not always possible since it may reduce the accuracy of optimization, and sometimes it leads to an infeasible solution. In such a case, a method that is called the Branch and Bound method (BBM) is used. The BBM method consists of two steps as follows: 1. Solve the problem like the cases that all decision variables are continuous using methods given for LP and NLP problems. 2. If obtained decision variables are integer for integer variables, the solution obtained in the first step is approved. Sometimes the obtained value is not an integer, that is, j < x∗i < j + 1 where j and j + 1 are two sequential integer variables. In this case, two new problems are branched from the main problem. In one problem, a constraint in the form of x∗i > j is added to the list of the constraints of the main problem. In another problem, x∗i < j + 1 is added to the list of constraints. Two new problems are solved, and this problem is continued until

376

6. Optimization basics

the required condition is satisfied. This process is called the bounding branching process. A compliance process that is called the bounding process will be described later. This procedure is explained by an example. Example 6.9 Find the solution of the following IP problem: Minimize f ¼ 3x1 + 2x2 s:t: : x1  2 x2  2 x1 + x2  3:5   x1  0;x2  0 x1 andx2 areinteger Solution This problem is a two-dimensional LP problem that can be solved either graphically or by the Simplex method. The solution of this LP problem that is called LP1 hereinafter is not repeated here. The result of the solution for the LP1 problem is: 8 < x1 ¼ 2 LP1 : x2 ¼ 1:5 : f1 ¼ 9 x2 is not an integer; therefore, two new problems, that is, LP2 and LP3, are branched from this problem in which in LP1 x2  1 is considered as the new additional constraints and in the LP3 x2 2 is the new constraint. Hence, we have: LP2 :

LP3 :

Minimize f ¼ 3x1 + 2x2 s:t: :

Minimize f ¼ 3x1 + 2x2 s:t: :

x1  2

x1  2

x2  2 x1 + x2  3:5

x2  2 x1 + x2  3:5

x2  1 ðnewconstraintÞ   x1  0;x2  0 x1 andx2 areinteger

x2  2 ðnewconstraintÞ   x1  0;x2  0 x1 andx2 areinteger

These two LP problems are also solved either graphically or by the Simplex method. Accordingly, we have: 8 8 < x1 ¼ 2 < x1 ¼ 1:5 LP2 : x2 ¼ 1 LP3 : x2 ¼ 2 : : f2 ¼ 8 f3 ¼ 8:5

6.5 Mathematical optimization

377

As is seen from LP3 problem in which x1 ¼ 1.5 two new problems, that is, LP4 and LP5, are branched that in one x1  1 is the new constraint and in another one x1 2 is the new constraint. LP4 :

LP5 :

Minimize f ¼ 3x1 + 2x2

Minimize f ¼ 3x1 + 2x2

s:t: :

s:t: :

x1  2

x1  2

x2  2

x2  2

x1 + x2  3:5

x1 + x2  3:5

x1  1

x1  2

x2  1 ðnewconstraintÞ   x1  0;x2  0 x1 andx2 areinteger

x2  1 ðnewconstraintÞ   x1  0;x2  0 x1 andx2 areinteger

By solving LP4 and LP5 we have: 8 < x1 ¼ 1 LP4 : x2 ¼ 2 LP5 : No Feasible Solution : f4 ¼ 7 By considering results obtained in different branch and the best value of the objective function which satisfy all criteria is chosen as the result of the LP2 problem; hence, we have: 8 < x∗1 ¼ 2 LP2 : x∗2 ¼ 1 : fmin ¼ 8 Fig. 6.9 shows the branches of the Example 6.9. This figure shows three types of nodes. The root node is the beginning node (in this example, node #1). Final nods are at the end of each branch, which in the example are nodes #2, #4, and #5. Intermediate nodes are those nodes that are located between the root node and end nodes (in this example, node #3 is an intermediate node). In the structure, nodes that other branches are come out are called parent nods, and resultant nodes are offspring nodes. Note: If more than one obtained variable is non-integers, two methods may be uses. In one method, branching is dedicated to the variable with the biggest decimal. In other methods, variables are classified, and branching is started with the most important one. The priority of variables may be obtained by a sensitivity analysis that evaluates the sensitivity of the problem to variation of each variable. Accordingly, a variable that has more effect is selected as the most important one. If there is no priority between variables, it can be done by selecting either variable.

378

6. Optimization basics

FIG. 6.9 Schematic of Branching process tree for a sample LP problem given in Example 6.9.

• Bounding process: In problems with numerous integer variables, the branching methods may lead to the requirement to solve numerous problem which needs the vast amount of calculation costs. The bounding method is a process that omits some branches of calculations and reduces the size of calculations. The bounding process, based on the following criteria, terminate the calculation of some branches. 1. If values of the objective function in some nods are better than the corresponding value of the objective function at some nonparent nodes of upper levels, the branching process of those upper nodes must not be continued. 2. If some nodes have nonfeasible results, it is not required to continue branching from these type of nod should not be performed. More details regarding the Branch and bound method could be found in [1, 8]. For Example 6.9, BBM was explained for IP problems. This can be done for MILP and MINLP problems as well. Therefore, the search methods for MILP and MINLP problems are based on the combination of BBM and LP and NLP algorithms, respectively.

6.6 Metaheuristic optimization approaches Metaheuristic methods are those optimization algorithms that have not been developed from mathematics and inspired by optimal behaviors of natural systems. However, these approaches are works based on random searches of the feasible space, and they use their own innovative approaches that direct random search process toward the final solution,

6.6 Metaheuristic optimization approaches

379

intelligently. Therefore, metaheuristic approaches are stochastic, but they are deterministic ones. In optimization, a metaheuristic is a higher level procedure or heuristic designed to find, generate, or select a heuristic that may provide a sufficiently good solution to an optimization problem, especially with incomplete or imperfect information or limited computation capacity [9, 10]. These algorithms are preferred to mathematical approaches presented in the previous section where due to multimodality of the objective function and complication of problem due to other reasons such as discontinuity in variables and functions, number of constraints and so on, there is no guarantee to find the real optimal solution of the problem using mathematical approach since they are trapped in local optimums and fails when there is discontinuity along the search path. Many algorithms such as genetic algorithm (GA), particle swarm optimization (PSO), simulated annealing (SA), ant colony optimization (ACO), Bee algorithm (BA), Tabu search method (TSM), harmony search, firefly algorithm, cuckoo search, and immune optimization algorithms (IOA), and so on are invented as different metaheuristic optimization methods. This book provides only a brief introduction about GA and a very brief introduction about PSO. Other methods can be found in related kinds of literature, for example, Refs. [11–13].

6.6.1 Genetic algorithm The genetic algorithm, GA, is the most famous algorithm in the class of evolutionary algorithms. It is required to mention that despite some similarities, the GA is different from genetic programming (GP) and is presented in Chapter 5. While GP is a type of regression method, GA is used in the optimization problem. It was invented by J.H. Holland in the 1960s and matured by him and others since that time [14]. The genetic algorithm is invented by analogy to the Darwinian evolution theory that explains how species evolution to better fit and more survived generation when generation after generation emerges. GA is a kind of evolutionary algorithm that uses genetic operators in their algorithms. These genetic operators consist of four operations: selection, reproduction, crossover, and mutation. In general, evolutionary algorithms, including GA, have some difference compared mathematical (deterministic) approaches. In this regard, the following items can be pointed out: 1. Evolutionary algorithm searches based on a population of points instead of single points of most mathematical approaches. However, mathematical approaches usually start with an initial guest of solutions, and evolutionary algorithms work with a population of initial point speeded randomly throughout the feasible region. 2. The evolutionary algorithm uses only objective function(s) and fitness level of objective(s) and does not need additional information that is required by mathematical approaches such as derivatives of function(s). 3. Evolutionary algorithm uses probability concepts instead of exact and crisp rules. 4. The evolutionary algorithm works on encoded parameters of variables instead of variables themselves. 5. The evolutionary algorithm has no limitation on the type of functions and variables; however, mathematical approaches are sensitive to these facts. 6. The evolutionary algorithm finds potential solutions instead of an exact solution. They reach with an approximation to the final solution, but, in most cases, these cannot introduce the true values of solutions.

380

6. Optimization basics

7. The evolutionary algorithm can be used for a multiobjective optimization problem in a straightforward manner. As mentioned, GA is a class of evolutionary algorithms that uses genetic operation and is widely use in optimization, especially the optimization of energy systems. Therefore, GA enjoys all the advantages listed above. The only disadvantage of GA is that it cannot find the exact value of the optimal solution. On the other hand, the found solution depends on some tuning parameters that will be introduced later. In GA, the following steps are performed: 1. Setting tuning parameters such as the number of population, crossover probability, mutation probability, and the number of generations 2. Generation of a random population of initial solution throughout the feasible region 3. Encoding the entire population by the chromosome representation of the population 4. Evaluation of the population based on fitness criteria 5. Generating the new population (reproduction process) based on genetic operators, including selection, crossover, and mutation 6. Return to step #4 if converging is met or the maximum number of generations is created. 7. Decoding the final population and presenting the best individual of the last population as the optimal result Fig. 6.10 shows a schematic flowchart of the calculation process of GA as per the above steps. In the following sections, a brief review of each stage of GA process is given. 6.6.1.1 Tuning parameters Prior to any optimization process, GA must be tuned with a number of parameters. These parameters are the number of population, number of generation, probability of crossover, and probability of mutation. Tuning parameters are selected based on the experience of experts, type of problem, and sometimes the ability of computation devices. There is no straightforward method to define the values of these parameters. However, in literature, there are researches that paid attention to find optimal values of tuning parameters, for example, Ref. [15]. In most cases, these parameters are adjusted by a trial-and-error process. If GA software, for example, Genetic Toolbox of MATLAB, is employed, these tools will have default values of tuning data that are usually proper for most problems. Population size: The size of the population is the number of initial individual solutions that are speeded all over the search space (feasible region). This population is usually kept constant along the optimization process when generation after generation is reproduced. When the generation size is increased, the accuracy and quality of search and found results are increased. On the other hand, the usage of the high population reduces the calculation speed. The proper population size is chosen depending on the experience of the expert, the type of problem, and the potential and ability of computational devices. Generation Number: Another tuning parameter is the number of generations. This parameter indicates the termination criteria of the algorithm if other convergence criteria are not used or the problem is not converged. As mentioned, in GA from the current population, which is called parents, a new generation of chromosomes, which are called offspring, are generated or reproduced. Each population is a generation, and the generation number shows

6.6 Metaheuristic optimization approaches

381

FIG. 6.10 Schematic of the calculation process in the genetic algorithm (GA).

the maximum number of generations that are reproduced in the reproduction process. If the number of generations is increased, the computational time increases; but the accuracy of the final results is increased, and it boosts the possibility to find a final solution that is more close to the real optimal solution (GA does not find the solution, exactly). Sometimes increasing the number of generations does not affect the accuracy of the final results, significantly, and it just wastes the computation time. This parameter is also selected based on the experience of the expert, the type of problem, and the potential and ability of computational devices.

382

6. Optimization basics

Probabilities of crossover and mutation: These two parameters are other tuning parameters that must be adjusted prior to the run of the algorithm. The first parameters indicate the possibility that individuals of each population take apart in the crossover process. The probability of mutation shows the possibility that each genome of a chromosome mutes. These two parameters will be described more when genetic operators are introduced in Section (iii). These parameters are also selected based on the experience of the expert and the type of problem. 6.6.1.2 Encoding data to chromosome forms As mentioned, the working principle is inspired by the evolution process of species in the natural selection process given in Darwinian theory. In GA, real population that consists of individual solutions, is encoded to form artificial numerical chromosomes that are generic to real chromosomes of natural organisms. The first initial population is formed using random numbers that distribute the population as uniformly as possible in search space. One suggested method to generate the initial population is as follows: 1. Generate a vector of a random number in the form of R ¼ ½ r1 r2 … rn T where ri is a random number that is uniformly distributed between 0 and 1. n is the number of decision variables. 2. Each individual point of the initial population is made from the following formula: 2

x1

3

2

L1 + r1 ðU1  L1 Þ

3

7 6 7 6 6 x2 7 6 L2 + r2 ðU2  L2 Þ 7 7 6 7 6 7 6 7 6 7 ¼ 6… 7 Xj ¼ 6 … 7 6 7 6 7 6 7 6 7 6…7 6… 5 4 5 4 Ln + rn ðUn  Ln Þ xn

(6.40)

j ¼ 1, 2,…, m;m is the size of population where Li and Ui are the lower and upper bounds of the ith decision variable, that is, Li  xi  Ui. 3. Repeat steps #1 and #2 until the number of the generated individuals becomes equal to the size of the population defined in tuning steps of GA. Then all generated individuals must be encoded into an artificial numerical chromosome. Two types of chromosomes are used in GA, including binary chromosomes and real chromosomes. • Binary chromosome: In this type of encoding, each element of decision vector, xi, is converted to a binary variable. Then by aligning binary values of all decision variables, a string of binary numbers for each individual point of the population is formed. This string is called the chromosome in GA,

6.6 Metaheuristic optimization approaches

383

FIG. 6.11 A typical binary chromosome of a two-dimensional decision variable.

and each element of this string is a genome. For example, for a two-dimensional problem, a typical binary chromosome is illustrated in Fig. 6.11. In this example, that is shown in Fig. 6.11, the length of x1 contains 10 bits or genomes and x2 consists of 15 bits. Therefore, the shown binary chromosome contains 25 bits or genomes. When a binary chromosome is to interpret, it must be decoded from the following expression:  GT ð U i  Li Þ (6.40a) PT i ¼ Li + GT max where PTi, GT, and GTmax are phenotype, genotype, and maximum genotype of the ith variable. In addition, Li and Ui are the lower and upper bounds of the ith decision variable. Maximum genotype for a binary string of m bits is: GT max ¼ 2m  1

(6.40b)

For example, for x1 shown in Fig. 6.11, if it is in the range of ½ 5 5 , we have: x1 ¼ ð1011010011Þ2 ¼ ð723Þ10   723  ð5  ð5ÞÞ ¼ 2:067 Value of x1 ¼ 5 + 10 2 1 The binary chromosome has some disadvantages listed as follows: 1. Based on probability rules for a string with the length of l, the maximum number of population that can be reproduced is 2l. Increasing the size of the population more than this limit has no effect on the accuracy of the algorithm. This imposes a limitation on the application of binary chromosomes. 2. Increasing the length of the string (chromosome) increases the calculation time, and it consumes the vast amount of computational memory. 3. The binary chromosome reduces the accuracy of GA. Due to the following limitation, real chromosomes are also used in GA. • Real chromosome: Another method that reduces the disadvantage of binary chromosomes is the usage of real chromosomes. This type of chromosome reduces the required computational memory and the computational time since it is not required to convert chromosomes from binary to decimal. Moreover, this method was found to have a higher rate of convergence [16]. An example of a real chromosome of a two-dimensional variable (in a problem with two decision variables) where its real element is defined in the range of ½ 0 1  is depicted in Fig. 6.12. For example, for x1 shown in Fig. 6.12, if it is in the range of ½ 5 5 , from Eq. (6.40a) considering thatGTmax ¼ 1, we have:

384

FIG. 6.12

6. Optimization basics

A typical real chromosome of a two-dimensional decision variable

x1 ¼ 0:7067 Value of x1 ¼ 5 +

  0:7067  ð5  ð5ÞÞ ¼ 2:067 1

If the number of generation is m and the length of the chromosome is l, a typical population of m  l in the form of binary and real chromosomes is illustrated in Fig. 6.13A and B, respectively. 6.6.1.3 Generating new population via genetic operators The basic step in GA algorithm is the reproduction of a new population of solutions based on the current population. The current population is called parents, and a new population is called offspring. This process is performed by three steps, that is, 1-Evaluation and selection, 2-crossover and reproduction, and 3-Mutation. These processes are done by genetic operators. In this part, three processes are explained. (1) Evaluation and selection The first step for selecting the best chromosomes for the reproduction process is fitness allocation to each chromosome. This is used to evaluate the worthiness of chromosomes for ranking them and the selection of most proper chromosomes for reproduction processes that makes the next generation (offspring chromosomes). It is clear that the fitness of a chromosome must be allocated according to the objective function of optimization. Therefore, the fitness criterion of a chromosome is defined as follows [17]: FðXÞ ¼ gðf ðXÞÞ

(6.41a)

where F(X) is the fitness function of the chromosome, g is a conversion function that converts negative value, and f(X) is the objective function of optimization. Sometimes the relative fitness function is used instead of an absolute fitness function. Relative fitness function is defined as follows [17]: n

m

(A)

110001101010000 100110101000111 110010110111100 110101011101100 101100010010101 110011111100010 001101010000000 110100001011101 101110111010101 111111011010100

m

0.2365 0.5644 0.2200 0.0072 0.3325 0.1579 0.0050 0.8575 0.3317 0.0025

0.3167 0.6287 0.9916 0.7985 0.7889 0.0108 0.6485 0.9127 0.0138 0.1903

n

0.3233 0.0057 0.2847 0.5548 0.4627 0.3100 0.9987 0.6132 0.0214 0.6314

0.6584 0.8958 0.6400 0.6664 0.4548 0.0830 0.5412 0.7651 0.5115 0.2478

0.9154 0.1158 0.6497 0.1122 0.0046 0.6247 0.0001 0.2463 0.4487 0.8895

(B)

FIG. 6.13 Illustration of typical ten population of (A) binary chromosome with fifteen bits; (B) real chromosomes with five variables.

6.6 Metaheuristic optimization approaches

    ^ Xj ¼ F Xj F m X   F Xj

385 (6.41b)

j¼1

  ^ Xj are fitness function (Eq. 6.41a) and relative fitness function, respecwhere F(Xj) and F tively, of the jth individual (chromosome). In Eq. (6.41b), m is the total number of individual or size of the population. Selection is the process that selects foremost chromosomes for the matting process to reproduce offspring chromosomes. In some cases, the selection in each generation is performed only among offspring chromosomes; however, in others, selection may be conducted for a population of parents and offspring chromosomes. When foremost chromosomes are selected for mating, the best chromosomes transfer their genomes to the next generation, and it is expected that the individuals of the next generation have better fitness criteria. Therefore, when generations after generations are reproduced, this process enhances the fitness functions of the population, and hence the algorithm may converge to a better or probably optimal solution. Among different selection methods, two methods, Rolette wheel and tournament selections, are widely used. Note: For constraint optimization problems, a penalty is considered to fitness function of those solutions that violated the constraint. • Roulette wheel selection This selection method is called the Roulette wheel since its selection method is very similar to a Roulette wheel in a casino. This process is performed while a proportion of an imaginary Roulette wheel is assigned to each chromosome as a potential selection according to its fitness criterion. This can be done based on the relative fitness function of each individual, which is normalized to one according to Eq. (6.41b). Then, the relative fitnesses of all chromosomes are aligned in descending order to make an imaginary ruler that is scaled between 0 and 1. A typical imaginary ruler that is used for a sample population with ten individuals is illustrated in Fig. 6.14. Then a random selection is made similar to how the roulette wheel is rotated. In this regard, a number of m random numbers in an interval between 0 and 1, that is, ½ 0 1  is generated, and the generated random number is located on the imaginary ruler. The location of the random number on the ruler indicates which chromosome is selected for the mating process of the next generation. This process is performed m rounds, and m chromosomes are selected for the mating process (reproduction process by the crossover operator). It is clear that chromosomes that have higher relative fitness functions and,

FIG. 6.14 A typical imaginary ruler for Roulette wheel selection among a sample population with ten individuals.

386

6. Optimization basics

therefore, longer segments on the imaginary ruler have more possibility to be selected for mating. In the sample Roulette wheel selection of Fig. 6.14, if it is intended to select, for example, four chromosomes, four random numbers in the range of ½ 0 1  are produced. Suppose these random numbers are 0.81, 0.3, 0.97, and 0.05. According to the schematic shown in this figure, chromosomes #6, #2, #9, and #1 are selected. While chromosomes with more worthiness are eliminated with a lower probability, there is still a chance that they may be eliminated because their probability of selection is less than 1 (or 100%). On the other hand, there are probabilities that weak individuals are selected and transferred to the matting process. This is because even though the probability that the weaker individuals are survived is low, it is still possible that they are kept to transfer into the matting process; this is an advantage because there is a chance that even weak individuals may contain some information or characteristics that might be useful to transfer them to the next generation via recombination process. Nevertheless, Roulette wheel selection has a disadvantage from possible eliminating of good chromosomes. On the other hand, in some applications, they lead to a slow-down of the calculation process and fast convergence due to the rapid reduction of the searched space. Due to these disadvantages, sometimes another selection method called as tournament selection is used. • Tournament selection This method is one of the most useful selection methods in GA, especially when the population size is large. In this type, a set of chromosomes is selected randomly, and through a number of tournaments, the best chromosome of each tournament in the selected set is selected. If the size of the set of chromosomes is large, weak individuals have a smaller chance to be selected. Therefore, Tournament selection involves running several tournaments among a set of chromosomes that are randomly chosen from the population. The winner of each tournament, that is a chromosome with the best fitness, is selected for crossover. The chosen individual can be removed from the population that the selection is made from if desired; otherwise, individuals can be selected more than once for the next generation. The most effective parameter in this type of selection is a parameter known as tour number. The tour number is varied between two chromosomes and the entire population. The tournament selection method is based on the following algorithm: (a) Choose a set of individuals with the size of m0 from the population (with the size of m, randomly). (b) Find the best chromosome with the probability of p. (c) Choose the second-best individual with probability p(1  p). (d) Choose the third-best individual with probability p(1  p)2.

(2) Reproduction Reproduction is the process for mate-selected chromosomes (parent chromosomes) to generate offspring chromosomes. The mating process uses a genetic operator known as the crossover to exchange genomes of parents for generating offspring.

6.6 Metaheuristic optimization approaches

387

• Reproduction of binary chromosomes When two parent chromosomes are selected as parents, a genome along the string of chromosomes is selected randomly. This process is called the one-point crossover. For this purpose, one digit denoted by k is selected randomly from a set of {1, 2, …, Nvar  1}, where Nvar is the number of bits in each chromosome. Then genomes of two chromosomes after this point are exchanged to make two new strings of genomes called offspring chromosomes. This process is schematically illustrated in Fig. 6.15. One-point crossover is a special type of multipoint. A typical multipoint crossover with three points of the crossover is illustrated in Fig. 6.16. As mentioned, one tuning parameter of GA is the crossover probability. Crossover probability indicates how often the crossover process is performed. If there is no crossover, parents are sent to the next generation with no mating. If crossover probability is 100%, Parents

Offspring

One-point crossover

(A)

(B) FIG. 6.15 (A) Illustration of a typical one-point crossover of two binary chromosomes; (B) typical numerical expression of a one-point cross over of two binary chromosomes with ten bits (genomes).

FIG. 6.16

Illustration of a typical multipoint crossover of two binary chromosomes with three points of crossover.

388

6. Optimization basics

then all offspring are made by crossover. When the crossover probability is, for example, 70%, in the matting process, a random number in the interval of ½ 0 1  is generated. If the generated number is less than or equal 0.70, the crossover between two chromosomes is performed, and if the generated random number is greater than 0.70, parent chromosomes are sent to the next generation without any crossover. • Reproduction of real chromosomes Various crossover methods have been suggested for real chromosomes [18]. In this book, only a method called intermediate recombination is used. According to this method, the value of each genome of the offspring chromosome is obtained from the following expressions [18]: P1 P2 VarO i ¼ Vari :ai + Vari :ð1  ai Þ,if1, 2, …, NVar g

where ai ½d, 1 + d

(6.42)

P1 In Eq. (6.42), VarO i is the variable of the ith genome of offspring, Vari is the variable of the P2 ith genome of parent chromosome #1, and Vari is the variable of the ith genome of parent chromosome #2. Moreover, ai is a scale factor that is a random number that is uniformly generated in the range of [ d, 1 + d], where d is defined that variation of genomes of offspring is in P1 P1 which range. If d ¼ 0, the VarO i is somehow between Vari and Vari . It should be mentioned that ai must be renewed for each genome.

• Elitism Elitism is a process that the best chromosomes are transferred directly to nextgeneration since it is intended to keep their useful information on the next generations. Elite chromosomes are different from those chromosomes that are not taken apart in the crossover process when the probability of crossover imposes no crossover. For more details refer to textbooks of GA, such as Refs. [17, 18]. (3) Mutation The mutation is a process that a data of a genome of chromosomes are randomly changed similar to mutation process of natural organisms. The mutation is employed to maintain genetic diversity from one generation to the next generation. The probability of the mutation is set to a very low value since the mutation is a rare process that happens in nature; but its probability is not zero. The mutation is a process that happens after the reproduction process and changes some genomes of offspring chromosomes by chance with a very low possibility in the range of 0.01 to 1. • The mutation on binary chromosomes In this method, for each genome of offspring chromosomes, a random number in the range of ½ 0 1  is generated. For example, if the probability of mutation is 0.06 when the randomly generated number is less than or equal 0.06, the gene data are changed so that 1 is changed to 0 or vice versa. If the generated random number is greater than 0.06, the mutation is not performed.

6.6 Metaheuristic optimization approaches

389

• The mutation on real chromosomes For real chromosomes, mutation means the addition of a random number to the chromosome’s value. The mutation of a genome of a real chromosome is obtained from the following expression [18]: ¼ Vari + si :ri :ai ,if1, 2, …, ng VarMut i si f1, +1g, ai ¼ 2u:k ,ri ¼ r:domaini where   r 0:1, 1016

(6.43)

u½0, 1 kf4, 5, …, 20g and Vari are mutated value and value of the ith genome, si is the diIn Eq. (6.43), VarMut i rection of mutation, ri is the mutation range, k is mutation precision, and ai is mutation walk. For more detail, refer to Ref. [18]. 6.6.1.4 Decoding the final population to reach the value of the optimal solution In this stage, when the convergence occurs, or the generation reaches the maximum number of generations, the best chromosome of the final population is selected, and its data are converted or decoded to obtain the vector of decision variables. For decoding, Eq. (6.40a) may be used. 6.6.1.5 General remarks regarding GA As was seen, GA needs to be tuned with a number of parameters. Besides tuning parameters that were cited earlier in part (i) of this section (Section 6.6.1), other factors including the type of crossover (single-point or multipoint), selection method (Roulette wheel or tournament), and tournament size (if it is the selection method). On the other hand, in the process, as was explained in many instances, processes are performed using randomly generated values either in specifying the initial population, the selection process of chromosomes, crossover, mutation, and so on. Therefore, this method is a stochastic method (not deterministic method like mathematical methods) on the one hand and dependent on setting values of tuning parameters on the other hand. Therefore, when a problem is run several times (even with the same tuning parameters), it is possible to have a different final solution at the end of each run. This is natural for GA, and none of the obtained results is the true final solution. However, if the algorithm is properly tuned, final solutions fluctuate in a narrow range around the real solution. As mentioned, in most sophisticated GA, optimized values of tuning parameters may be obtained and used. On the other hand, GA has the advantage that it can work with discrete and continuous variables, linear or nonlinear equation, constraint or unconstraint problem, continuous or noncontinuous function, and they do not usually trap in a local optimum. In addition, GA does not require to work with derivatives of the objective function. Therefore, GA is a very favorite optimization tool for ill-advised optimization problems. For large optimization problems that have a vast number of decision variables, the calculation speed of GA is much lower

390

6. Optimization basics

than similar mathematical approaches, especially when the size of the population is big, and due to low convergence, a high number of generations must be chosen. 6.6.1.6 The implication of GA for energy systems Since many models of the energy system are either constrained and are nonlinear and multimodal, GA is an optimistic tool for these problems. On the other hand, in most cases, the model of the problem is an MINLP one. For such kind of problem, GA is a proper optimization method, too. Moreover, GA does not require to have objective functions in the form of an explicit expression of decision variables. In such cases, the procedure that computes objective function can be used to determine the fitness function of solutions. For large-scale energy systems, when the numerous decision variables and constraints are used, the speed of GA is drastically reduced, and sometimes, it is not possible to optimize these kinds of problems using an ordinary personal computer. In Section 6.11 of this chapter, methods to reduce the size of such kind of problem are required. Example 6.10 Consider the following problem: Minimize

gðx1 , x2 , x3 , x4 Þ ¼ absðx1 + 2x2 + 3x3 + 4x4  30Þ

subject to 0  x1  30 0  x2  30 0  x3  30 0  x4  30 Find the optimal answer using the genetic algorithm (GA). Go one step completely and find the chromosomes of the second generation. All the decision variables can only have the integer values in the range. Assume the six chromosomes as the population size, 75% as the probability of crossover, and 10% as mutation probability. Solution In order to understand better, each chromosome can be shown in the following schematic. Each chromosome is composed of four genes. Each gene is representing one of the considered decision variables, which has a value between 0 and 30, based on the mentioned constraints.

6.6 Metaheuristic optimization approaches

391

The number of chromosomes, crossover, and mutation rates are considered as 6%, 25%, and 10%, respectively. Iteration #1: Stage #1: Creating the first-generation chromosomes and giving the initial values to them: Using the random numbers in the range of constraints, that is, 0 to 30, the genes for each chromosome are built: ch½1 ¼ ½x1 , x2 , x3 , x4  ¼ ½12, 05, 23, 08 ch½2 ¼ ½x1 , x2 , x3 , x4  ¼ ½02, 21, 18, 03 ch½3 ¼ ½x1 , x2 , x3 , x4  ¼ ½10, 04, 13, 14 ch½4 ¼ ½x1 , x2 , x3 , x4  ¼ ½20, 01, 10, 06 ch½5 ¼ ½x1 , x2 , x3 , x4  ¼ ½01, 04, 13, 19 ch½6 ¼ ½x1 , x2 , x3 , x4  ¼ ½20, 05, 17, 01 Stage #2: Obtaining the value of the objective functions for chromosomes: g1 ¼ gðch½1Þ ¼ gð½12, 05, 23, 08Þ ¼ 93 g2 ¼ gðch½2Þ ¼ gð½02, 21, 18, 03Þ ¼ 80 g3 ¼ gðch½3Þ ¼ gð½10, 04, 13, 14Þ ¼ 83 g4 ¼ gðch½4Þ ¼ gð½20, 01, 10, 06Þ ¼ 46 g5 ¼ gðch½5Þ ¼ gð½01, 04, 13, 19Þ ¼ 94 g6 ¼ gðch½6Þ ¼ gð½20, 05, 17, 01Þ ¼ 55 Stage #3: Evaluation of the chromosomes for producing the next generation. Based on the Darwin evolutionary principle, the chromosomes that have better values of the objective functions have more chances to be in the next generation. Considering this point, a criterion, called fitness criterion, is introduced for each chromosome. For the investigated chromosome, it is obtained as follows: fiti ¼ fitðch½iÞ ¼

1 gi + 1

1 ¼ 0:0106 93 + 1 1 fit2 ¼ ¼ 0:0123 80 + 1 1 fit3 ¼ ¼ 0:0119 83 + 1 1 fit4 ¼ ¼ 0:0213 46 + 1 1 ¼ 0:0105 fit5 ¼ 94 + 1 1 fit6 ¼ ¼ 0:0179 55 + 1

fit1 ¼

392

6. Optimization basics

After determining the fitness criterion for all the chromosomes, a parameter, called total, is calculated: tot ¼

numX chromosomes

fiti

i¼1

tot ¼ 0:0106 + 0:0123 + 0:0119 + 0:0213 + 0:0105 + 0:0179 ¼ 0:0845 Then, the probability index is computed for each chromosome: fiti tot 0:0106 ¼ 0:1254 P1 ¼ 0:0845 0:0123 P2 ¼ ¼ 0:1456 0:0845 0:0119 P3 ¼ ¼ 0:1408 0:0845 0:0213 P4 ¼ ¼ 0:2521 0:0845 0:0105 P5 ¼ ¼ 0:1243 0:0845 0:0179 P6 ¼ ¼ 0:2118 0:0845 Pi ¼

As it can be observed, the probability index has the highest values for chromosome #4. Therefore, it has the highest chance of being in the next generation. In order to select the chromosomes, which are going to take part in creating the next generation, a process called roulette wheel is employed. The process is described during its implementation for the investigated generation. Calculating the cumulative probability function for chromosomes: CP1 ¼ 0:1254 CP2 ¼ 0:1254 + 0:1456 ¼ 0:2710 CP3 ¼ 0:2710 + 0:1408 ¼ 0:4118 CP4 ¼ 0:4118 + 0:2521 ¼ 0:6639 CP5 ¼ 0:6639 + 0:1243 ¼ 0:7882 CP6 ¼ 0:7882 + 0:2118 ¼ 1:0000 Now, random numbers are generated as many as the chromosomes: R1 ¼ 0:201 R2 ¼ 0:284 R3 ¼ 0:099 R4 ¼ 0:822 R5 ¼ 0:398 R6 ¼ 0:501

6.6 Metaheuristic optimization approaches

393

If R1 is greater than CP1, and smaller than CP2, chromosome #2 is selected, which can be generalized for other chromosomes as well. After performing the process, the following combination is obtained for updating the chromosomes: newch½1 ¼ ch½2 newch½2 ¼ ch½3 newch½3 ¼ ch½1 newch½4 ¼ ch½6 newch½5 ¼ ch½3 newch½6 ¼ ch½4 Therefore, the updated chromosomes are: ch½1 ¼ ½02, 21, 18, 03 ch½2 ¼ ½10, 04, 13, 14 ch½3 ¼ ½12, 05, 23, 08 ch½4 ¼ ½20, 05, 17, 01 ch½5 ¼ ½10, 04, 13, 14 ch½6 ¼ ½20, 01, 10, 06 Since the goal here is showing the implementation way of the algorithm as easily as possible, it is assumed that in order to do the genetic processes, each chromosome is broken into two parts (not necessarily equal), and a new chromosome is created by combining the separated parts of the previously broken chromosomes. The selection of the parents is made randomly. Considering the crossover rate of 25%, initially, the random number for this stage is produced: r1 ¼ 0:191 r2 ¼ 0:259 r3 ¼ 0:760 r4 ¼ 0:006 r5 ¼ 0:159 r6 ¼ 0:340 Therefore, the chromosomes, which have random values lower than the selection rate, are selected for the cross-over process. They are chromosomes #1, #4, and #5. Then, the next chromosomes are obtained from the cross-over process of the chromosome, that is, a combination of two chromosomes together: ch½1  ch½4 ch½4  ch½5 ch½5  ch½1

394

6. Optimization basics

The place from which each gene is broken is also determined by producing random integer numbers, between 1 and number of genes-1: rn1 ¼ 1 rn2 ¼ 1 rn3 ¼ 2 The first cross-over process: ch½1 ¼ ch½1  ch½4 ½02, 21, 18, 03  ½20, 05, 17, 01 ¼ ½02, 05, 17, 01 The second cross-over process: ch½4 ¼ ch½4  ch½5 ½20, 05, 17, 01  ½10, 04, 13, 14 ¼ ½20, 04, 13, 14 The third cross-over process: ch½5 ¼ ch½5  ch½1 ½10, 04, 13, 14  ½02, 21, 18, 03 ¼ ½10, 04, 18, 03 As a result, by replacing newly produced chromosomes with their parents and keeping the remaining ones, the population after the cross-over process is: ch½1 ¼ ½02, 05, 17, 01 ch½2 ¼ ½10, 04, 13, 14 ch½3 ¼ ½12, 05, 23, 08 ch½4 ¼ ½20, 04, 13, 14 ch½5 ¼ ½10, 04, 18, 03 ch½6 ¼ ½20, 01, 10, 06 Stage #4: Mutation The number of chromosomes, which experiences the mutation, is determined by the mutation rate. The mutation process is done by replacing a random number by the value of a gene. For this purpose, first, the number of genes is obtained, which is the multiplication of the number of genes for each chromosome by the population. Then, the number of genes, which is going to be changed by the mutation process, is computed by multiplication of the mutation rate by the number of genes: Number of changed genes in mutation ¼ numgenes  ρm ¼ 24  0.1 ¼ 2.4 ’ 2 After that, the place of changes is determined by generating random numbers between 1 and numbers. Assigning numbers is started from the first gene of chromosome #1, and then, it goes on continuously to the last gene of the last chromosome.

6.6 Metaheuristic optimization approaches

395

For this example, the random values suggest that genes 12 and 18 should be the changed ones based on the mutation process. The values, which are going to be replaced with the current ones, are also determined by generating random numbers. Consequently: ch½1 ¼ ½02, 05, 17, 01 ch½2 ¼ ½10, 04, 13, 14 ch½3 ¼ ½12, 05, 23, 02 ch½4 ¼ ½20, 04, 13, 14 ch½5 ¼ ½10, 05, 18, 03 ch½6 ¼ ½20, 01, 10, 06 The changed genes and their values are in bold. Now, one generation is generated. However, the iteration does not reach an end. Going to further iteration is done only when the found generation provides better values for the objective function. As a result, the values of the objective function for the found generation are evaluated: g1 ¼ gðch½1Þ ¼ gð½02, 05, 17, 01Þ ¼ 37 g2 ¼ gðch½2Þ ¼ gð½10, 04, 13, 14Þ ¼ 77 g3 ¼ gðch½3Þ ¼ gð½12, 05, 23, 02Þ ¼ 47 g4 ¼ gðch½4Þ ¼ gð½20, 04, 13, 14Þ ¼ 93 g5 ¼ gðch½5Þ ¼ gð½10, 05, 18, 03Þ ¼ 56 g6 ¼ gðch½6Þ ¼ gð½20, 01, 10, 06Þ ¼ 46 As seen, the values of the objective function are improved, so the iteration comes to an end. The second iteration is done by considering the following generation: ch½1 ¼ ½02, 05, 17, 01 ch½2 ¼ ½10, 04, 13, 14 ch½3 ¼ ½12, 05, 23, 02 ch½4 ¼ ½20, 04, 13, 14 ch½5 ¼ ½10, 05, 18, 03 ch½6 ¼ ½20, 01, 10, 06 Following the iterations will result in finding the following set as the chromosome with the optimal answer: ½07, 05, 03, 01

6.6.2 Other metaheuristic optimization methods Metaheuristic optimization methods are not limited to an evolutionary algorithm (EA). Since the 1960s that EA and GA were invented by analogy from the evolution of natural systems, researchers inspired by this methodology to develop other algorithms by analogy to

396

6. Optimization basics

other natural systems. In this regard, particle swarm optimization (PSO), simulated annealing (SA), ant colony optimization (ACO), Bee algorithm (BA), Tabu search method (TSM), harmony search, firefly algorithm, cuckoo search, and immune optimization algorithms (IOA) can be pointed out. Since this book is not a sole reference for optimization, it is impossible to explain all methods, and readers must refer to related references (e.g., Refs. [12, 13]) for more details about these algorithms. In this section, brief explanations about two other metaheuristic methods, particle swarm optimization, also known as PSO, and simulated annealing, SA, are given. 6.6.2.1 Particle swarm optimization, PSO Particle swarm optimization (PSO) is an exciting new methodology in the evolutionary computation that is somewhat similar to the genetic algorithm in that the system is initialized with a population of random solutions [19]. Unlike other algorithms, however, each potential solution (called a particle) is also assigned a randomized velocity and then flown through the problem hyperspace. This algorithm is inspired by gregarious flying birds that are looking for food. When foods are distinguished by one bird among the group, its action that aims the food which changes its flying direction and speed is immediately transferred to other members of the group, and all member adjust their speed vector accordingly. In PSO, the population of the initial solution in a similar manner to GA is generated. Each solution is considered as a particle or a bird in the group. Hence, the algorithm defines a population of particles (swarm) as random guesses in the variables’ search space. Then, an iterative process is set by changing the position of particles within the search space to improve the fitness function quality. The particles evaluate the fitness function value iteratively and remember the location of their best success. This location is called PBest for each particle. In each iteration, the particles are also able to connect to the particle that contains the best fitness function value, that is, GBest and try to follow it. As indicated, each n dimensional particle within a swarm is a representative candidate solution,Xi ¼ (xi1, xi2, …, xin), which contains the following information: (1) Personal best position (PBest): The best position of a particle which is obtained so far and includes the best fitness value of the objective function. (2) Global best position (GBest): The position of a particle that includes the best fitness value in the swarm Pg ¼ (pg1, pg2, …, pgn). (3) Particle’s current velocity: The velocity of each particle that is the amount of change in its position, Vi ¼ (vi1, vi2, …, vin). Eq. (6.44) is used to calculate the new velocity of a particle in the next generation:     (6.44) vij ðt + 1Þ ¼ wk vij ðtÞ + c1 r1 pij ðtÞ  xij ðtÞ + c2 r2 pgj ðtÞ  xij ðtÞ where i ¼ 1, 2, …, m is the size of the swarm population; w is the inertia weight factor which is often used as a parameter to control exploration and exploitation in the search space, c1 and c2 are two positive constant coefficients to specify particles’ tendencies of using their cognitive and social experiences; and r1 and r2 are two random numbers within the range ½ 0 1 . The constant coefficients of c1 ¼ 2 and c2 ¼ 2 can be applied to consider both the social and cognitive characteristics of each particle equally. Moreover, the inertia

6.6 Metaheuristic optimization approaches

weight factor, wk, proposed in Ref. [20], is adjusted dynamically throughout the optimization process.   wmax  wmin k wk ¼ wmax  kmax

397

(6.45)

where k and kmax are current and maximum iteration numbers, respectively, and wmax and wmin are set to 0.9 and 0.1. In some applications, instead of dynamic inertia weight factor (wk), which is changed throughout the iteration, a constant value is used for all iterations, for example, w ¼ 1. To control the magnitude of velocity, the maximum amount of velocities is adjusted to the subtraction of lower boundaries from upper boundaries multiplied by 0.1. If a particle goes beyond the variables’ boundaries, then its value is reintegrated into the lower or upper boundary, and its velocity is multiplied by 1 having the effect of searching in the opposite direction. The new position of an individual particle in the search space is given by the following expression:   (6.46) xij ðt + 1Þ ¼ xij ðtÞ + vij ðt + 1Þ  1 In PSO, the size of the swarm population is fixed, and the members of the swarm can only be adjusted by their PBest and GBest to produce the offspring. Each off-spring replaces its parent if its fitness is better than its parent’s fitness at each iteration. When calculation reaches to the last iteration, the best particle (GBest) of all generation is considered as the final solution. Flowchart of PSO is given in Fig. 6.17. 6.6.2.2 Simulated annealing, SA This type of metaheuristic optimization is inspired by the annealing process of metals in which metals are heated and, consequently, cooled to increase the size of its crystals and reduce their defects. These required features of metals depend on its thermodynamic free energy, while both heating and cooling processes of the metal not only affect the temperature but also the thermodynamic free energy is dependent on these processes (heating and cooling processes). Based on statistical thermodynamics, for the free energy of molecules, the following correlation is considered according to probability distribution function:   1 E (6.47) exp  PðEÞ ¼ ZðTÞ kB T In Eq. (6.47), T is the absolute temperature (K), kB is Boltzmann constant (1.38064852  1023 m2. kg. s-2. K-1), E is the energy, and Z(T) is the dividing or partition function which transforms the P(E) to a value in the range of [0, 1]. Simulated annealing optimization method was invented in 1983 by Kirkpatrick et al. [21]. They developed this method to approximate the global minimum for problems that have numerous decision variables when search space is discrete and wide.

398

FIG. 6.17

6. Optimization basics

Flowchart of particle swarm optimization method.

In the simulated annealing algorithm, the cooling process is simulated with a gradual decrease in the probability of accepting worse solutions while the feasible space is searched. Accepting worse solutions is a crucial step in this method since it provides a more sophisticated search for the global optimal solution. In general, in simulated annealing algorithms, a hypothetical temperature consciously decreases from the start temperature (an initial positive value) to zero. In each iteration, the algorithm randomly selects a solution close to the current one. Then, it measures the quality of the found solution and replaces it with the previously selected solution. In this regard, depending on the temperature-dependent probabilities of selecting better or worse solutions (which during the search respectively remain at 1 or positive and decrease), the solution is selected while the temperature approaches to zero. A similar equation to the Boltzmann equation is used in SA, which is expressed as follows:   1 fi Pð EÞ ¼ exp  (6.48) QðcÞ c

399

6.6 Metaheuristic optimization approaches

where Q(c) is a constant that normalizes the P(E) (it is equivalent to the partition function of the Boltzmann function, Z(T)). Moreover, c is the virtual temperature (equivalent with T in Boltzmann equation). It is a tuning parameter which, as a specific value, should be set for that in each problem, and it must be reduced in iteration with a specified rate. It must be specified according to the experience of the user or by trial and error. In Eq. (6.48), fi is the value of the objective function in each iteration that is equivalent to energy, E, in the Boltzmann equation. For the iterative process of SA, c must be gradually reduced with a specific rate until equilibrium condition or frozen based on objective function is satisfied. Flowchart of SA is given in Fig. 6.18.

Start

Repeat Repeat Perturb the parameters randomly

Yes

Improved? No

exp(DCij/c)>Random [0,1]

Yes

No Don’t accept

Accept

Equilibrium? No Yes Modify control parameter c

Yes

System frozen?

Finish

FIG. 6.18 Flowchart of the simulated annealing optimization method.

No

400

6. Optimization basics

6.7 Hybrid optimization approaches Mathematical optimization is a deterministic method with very high convergence efficiency, especially the indirect mathematical methods, which uses derivatives of the objective function. Nevertheless, they are very sensitive to the type of problem, and in most cases, when problems are multimodal, they trap in local optimum and saddle points. Moreover, they mostly require to acquire equations in the form of an explicit impression of decision variables. Therefore, their effectiveness is limited to a very narrow diverse range of problems, and when a problem is out of their application range, their effectiveness is drastically dropped, and they may fail to find a solution. For MINLP problem, they are very complicated as well. Metaheuristic approaches such as GA and PSO are used for a wide range of problems, and they are not trapped in local optimums. On the other hand, they are stochastic and highly depend on initial tuning, and they do not find the exact value of optimums. They only reach a solution that may be close to real optima. Hybrid approaches are developed based on a combination of two approaches. In the first step, a metaheuristic method is used to find a solution. The found solution is used in the next phase as an initial solution of an iterative mathematical method. This hybrid algorithm may lead to very accurate results that cannot be obtained by each separate component of the algorithm independently. Some hybrid algorithms may be created by combining two metaheuristic methods, for example, GA-SA combined algorithm. Such hybrid methods are developed and used by the innovation of users depending on the type of the problem.

6.8 Multiobjective optimization Many complex optimization problems in engineering are multiobjective, in which several objectives must be optimized simultaneously. In the field of energy systems, this condition is usual where thermoeconomic, energetic, and environmental objectives must be optimized simultaneously. A multiobjective optimization problem requires the simultaneous satisfaction of a number of different and often conflicting objectives. It is required to mention that no combination of decision variables can optimize all objectives simultaneously. Multiobjective optimization problems generally show a possibly uncountable set of solutions, whose evaluated vectors represent the best possible trade-offs in the objective function space [22]. Pareto optimality is the key concept to establish a hierarchy among the solutions of a multiobjective optimization problem, in order to determine whether a solution is really one of the best possible tradeoffs [22]. The general mathematical form of a multiobjective optimization problem is expressed as follows: Minimize=Maximize fm ðXÞ; m ¼ 1, 2, …,M s:t: : gj ðXÞ  0;j ¼ 1,2, …, J hk ðXÞ ¼ 0; k ¼ 1,2, …, K X ¼ ½ x1 x2 … xn  T

(6.49)

401

6.8 Multiobjective optimization

In multiobjective optimization, a concept that is called dominancy is important. In one-dimensional space, the comparison of numbers is easily possible using the principle of the sequencing of real numbers. For example, between three values of 1, 1.5, and 2, it is easy to say, and 1 is the smallest option. But in more than one-dimensional space, vectors cannot be compared similarly to the one-dimensional space simply and with different operational strategies. For a further explanation, consider a two-dimensional minimization problem whose space for its objective functions is as per Fig. 6.19. From this figure, if we compare an arbitrary point like S in the space of the objective functions with the points around it, we can easily say that any point whose values of all objective functions are greater than the corresponding objective functions of S point is more inappropriate than the S point (such as F in Fig. 6.19). On the other hand, any point whose values of all objective functions are smaller than the corresponding values of S is a better point (point such as D). However, one cannot comment on points where one of their target functions is better than point S, and the other is worse than point S (points like E and H). To solve this problem, a concept called dominancy is used. In the minimization space of all objective functions, this notion states that the answer D is a dominant response to S, if and only if values of all the objective functions at point D are smaller than or equal to corresponding objective functions of points S and D, having at least one objective function whose value is substantially smaller than S. For example, the point E dominates the point F, and the point J dominates H. Thus, in a multiobjective optimization problem, instead of a unique optimal solution, a series of nondominated solutions are obtained, this set is called the Pareto optimal front. The Pareto optimal front for the two-objective minimization problem discussed is schematically illustrated in Fig. 6.19. There is no dominancy between all solutions located on the Pareto front, and therefore, all points of this front are equivalent. For solving multiobjective optimization problems, there are two approaches— mathematical and metaheuristic.

Non-ideal solution E S

F S

D Ideal solution Obj1,min

H J

Obj1,max

Obj1 Solution infeasible area Solution feasible area

FIG. 6.19 Definition of dominancy and Pareto optimal front in a sample two-objective space.

402

6. Optimization basics

6.8.1 Mathematical multiobjective optimization In the mathematical approach of multiobjective optimization (MOO), the multiobjective problem is first converted to one or number of single-objective optimization (SOO). Then single-objective problems are solved using the mathematical methods described previously for the single-objective problems. Three mathematical MOO methods include the weighted sum method, weighted metric method, and ε-constraint method. 6.8.1.1 Weighted sum method This method considers a weight factor for each objective and converts the MOO problem to following SOO problem: Minimize=Maximize FðXÞ ¼

M X

wm fm ðXÞ, where

m¼1

s:t: : gj ðXÞ  0;j ¼ 1,2, …, J hk ðXÞ ¼ 0; k ¼ 1,2, …,K X ¼ ½ x1 x 2 … x n  T

M X wm ¼ 1:0 m¼1

(6.50)

In Eq. (6.50), wm is the corresponding weight factor of the mth objective. Since different objective functions ( fm(X)) may have different units, it is better to normalize them in the form of f nm(X) where superscript n denotes the normalization. It is clear that the summation of weight factors of all objectives becomes 1.0. To obtain Pareto optimal front, weight factors M P are changed in a range so that we always have wm ¼ 1:0. Then each obtained SOO problem m¼1

is solved using SOO optimization methods. The difficulty of this method is that it cannot find the true shape of the Pareto front when the feasible region is not convex. This problem is illustrated in schematics shown in Fig. 6.20 that compares the convex and nonconvex feasible regions for a two-objective problem. Moreover, this method consumes a vast amount of computational time since instead of on MOO problem, several SOO problems must be solved. This problem is significant in largescale problems. f2

f2 Feasible objective space w1

Feasible objective space Pareto optimal frontier

w2

(A)

Pareto optimal frontier

f1

f1

(B)

FIG. 6.20 Behaviour of weighted sum method to find Pareto from of two-dimensional problem for (A) convex feasible region; (B) nonconvex feasible region

403

6.8 Multiobjective optimization

6.8.1.2 Weighted metric method This method is very similar to weighted sum methods, but weight factors are multiplied in the power of difference between each objective and ideal solution. The general form of this problem is as follows: " # M M 1 X X p p wm ðj fm ðXÞ  Im jÞ ,where wm ¼ 1:0 Minimize=Maximize Fp ðXÞ ¼ m¼1

s:t: : gj ðXÞ  0;j ¼ 1,2, …, J hk ðXÞ ¼ 0; k ¼ 1,2, …,K X ¼ ½ x 1 x2 … xn  T

m¼1

(6.50)

where Im is the ideal point of mth objective. This the best value of mth objective if only the mth objective function is optimized in an SOO problem when other objectives are disregarded. In Eq. (6.50), p is arbitrary value for power in the line of the objective function. If a small value for p is selected, it cannot find all part of the Pareto front in the non-convex problem, and if a very big value is allocated to p it may lead to no results. Therefore, proper selection of p is the most challenging step that must be chosen from experience or by try and error. 6.8.1.3 ε-Constraint method In this method, one of the objective functions is kept, and the rest of the objective functions are supposed to be an additional constraint. Converting objective functions to constraints is done by converting them into nonequality constraint n form of  ε, where ε is a fixed value that must be chosen for each objective (new constraint) based on the judgment of experts. Hence, the m-objective optimization problem is transformed into a single-objective problem, while m-1 inequality constraints are added to the primary constraints of the original problem. The formulation of this type of problem is as follows: Minimize=Maximize fμ ðXÞ s:t: : fm ðXÞ  εm ; m ¼ 1, 2,…, M;m 6¼ μ gj ðXÞ  0;j ¼ 1,2, …, J

(6.51)

hk ðXÞ ¼ 0; k ¼ 1,2, …, K X ¼ ½ x1 x 2 … xn  T The most challenging step in usage of this method is the proper selection of εm which needs the experience of experts to be used. If this is done properly, it can find all parts of the Pareto front in even nonconvex problems. This ability is illustrated schematically for a two-objective problem in the objective’s space as per Fig. 6.21.

6.8.2 Metaheuristic multiobjective optimization Metaheuristic multiobjective optimization approaches are also used in MOO, and most of them are able to find the Pareto front once in only one run of the code. One of the most famous

404

6. Optimization basics

Typical performance of ε ¼ constraint method to find Pareto front of a nonconvex feasible region for a two ¼ objective problem.

FIG. 6.21

f2 Feasible objective space a b

e1a

f1

e1b

metaheuristic MOO methods that is widely used for multiobjective optimization of energy systems is the nondominated sorting genetic algorithm known as NSGA-II. In this algorithm, solutions are categorized based on the Pareto concept and sorting nondominated solutions into nondominated layers as schematically shown in Fig. 6.22. In other words, if NP is the number of the population, it is categorized into NL layers in which the intersection of each two arbitrary selected layers is empty set and union of all layers L is NP set (8i 6¼ j : Pi \ Pj ¼ φ ^ Np ¼ [N i¼1 Pi ). Elitism or the virtual fitness of each individual is equal to its layer. Parent selection for crossover operation is performed based on the tournament selection between two randomly selected layers. Therefore, individuals that are located on layer 1 have more chances to be selected for the next generation. Uniform distribution of solution along layers is controlled with introducing of crowding distance index for each solution. This index is defined as a ratio of subtraction of objective functions for two neighboring solutions around the current solution to the subtraction of the maximum and minimum values of the same objective. Therefore, for the kth objective of the jth solution, we have:   fk, j1  fk, j + 1 (6.51) idis:, j, k ¼

fk, max  fk, min For boundary solutions (solutions with the smallest and largest function values) are assigned an infinite distance index. FIG. 6.22 Schematic of solution layering in NSGA-II

(min) f2

algorithm.

F3 F2 F1 (min) f1

405

6.8 Multiobjective optimization

The overall crowding distance value is calculated as the sum of individual distance values corresponding to each objective. Accordingly, we have: Idis:, j ¼

M X

idis:, j, k

(6.52)

k¼1

where M is the number of objectives and j is the individual index. Fig. 6.23 shows a schematic of the evaluation of the distance index. Fig. 6.24A and B show examples of well distributed, and the unsatisfactory distributions of solutions is a layer, respectively. In NSGA-II, two parameters are calculated for each solution. (min) f2 Cuboid

i

(min) f1

FIG. 6.23 Schematic of distance indexing of individuals in the NSGA-II algorithm.

f2

f1

(A) f2

f1

(B) FIG. 6.24 (A) Well distributed of individuals along a layer; (B) unsatisfactory distribution of individual in a layer.

406

6. Optimization basics

(i) Dominant number, NL: This is the number of solutions that dominated the current solution. Detail of dominancy concept and definition is explained well in multiobjective optimization text (e.g., Refs. [22, 23]). The dominant number for nondominated individuals of the current population is zero; therefore, these solutions are placed in layer 1. Nondominated solutions for a set of the individuals excluding layer #1 members are placed in layer #2. For an M objective’s problem with N populations, the number of comparisons is MN2. This procedure continued until all population are accommodated in their appropriate layer. Consequently, irank index for each individual is assigned as its dominant number (layer number), NL. (ii) Crowded comparison operator: This operator, shown by n, is defined as follows: A n B if ð rankA < rankB Þ OR ð rankA ¼ rankB Þ AND ðIdist:, A > Idist:, B Þ

(6.53)

It means that for two individuals with differing nondominated ranks (different layers), the solution with the lower rank (layer) is preferred. Otherwise, for two solutions of the same layer, the solution placed in the region with a lower concentration of solutions is selected. This is the “concept of dominated sorting algorithm.” • Constraints consideration strategy In the case of constrained multiobjective optimization, we have three possible cases for two arbitrary selected individuals A and B. (1) Both A and B belong to the feasible space. (2) A belongs to the feasible space and B is infeasible. (3) Both A and B are infeasible. In this case, A is called to have constraint dominancy over B if: (1) A and B are feasible and A dominates B. (2) A is feasible and B is infeasible. (3) Both A and B are infeasible, but A has a lower deviation from the feasible space. Fig. 6.25 shows the flow chart of NSGA-II algorithm. This algorithm consists of the following steps: (1) In NSGA-II, chromosomes (phenotypes) are generated using the real coding instead of the binary coding. The initial population is a set of randomly generated individuals between 0 and 1. These members form a matrix in which its number of columns is the number of decision variables, and its number of rows is equal to the number of population. (2) After the decoding of individuals, the fitness function and feasibility of each individual are calculated. Then, the entire population is sorted based on the Pareto dominance criteria [22, 23], and a dominance index, which is equal with the corresponding layer of individuals, is assigned for members. (3) Numbers of NP parents are selected based on the dominancy index of individual and the tournament size (e.g., 2). In this stage, it is possible to have multiple selections of each individual since selection is performed between two arbitrary random selected individuals.

6.8 Multiobjective optimization

407

FIG. 6.25 Flow chart of the NSGA-II algorithm [24].

(4) A number of NP offspring are generated from parents using the cross-over and mutation operators of the genetic algorithm. (5) The new populations are generated using NP parents and NP offspring with the total size of 2NP. Since both previous and current population members are included, the elitism is ensured. (6) The new generation is sorted using the dominated sorting algorithm. (7) Now solutions belonging to the best nondominated sets (layer 0) should be preferred more than any other solution in the new population. If the size of layer 0 is smaller than NP, all members of the layer 0 are selected for the new population. The remaining

408

6. Optimization basics

members of the new population are selected from the subsequent nondominated layers in the order of their ranking. This procedure is continued until no more layers can be accommodated. To choose exactly NP individuals, sometimes we need to sort the solution of the last layer using the operator specified by Eq. (6.53). (8) The new population for the evolutionary process is ready, and the procedure is repeated from step 2 until the number of generation becomes greater than the maximum number of the generation specified at the beginning of optimization. NOTE: In multiobjective optimization, a Pareto optimal front is obtained instead of a single optimal solution of SOO problem. Therefore, there are an infinite number of solutions that are located on the Pareto front. In engineering applications, it is impractical since one solution is desired. Therefore, one out of numerous optimal solutions of the Pareto front must be selected as a final solution. Since all solutions of the Pareto frontier are equivalent from the optimization point of view, selecting one of them requires a decision-making process. Therefore, MOO problem must be employed along with decision-making methods. Chapter 7 of this book is dedicated to various decision-making methods.

6.9 Optimization toolbox of the MATLAB software As noted, optimization methods based on different methods find the optimal solution in such a way that they require numerous iterations. On the other hand, for large-scale problems, they need a vast amount of required calculations. Therefore, optimization methods have a high potential for using the computer to accelerate and facilitate their process. Accordingly, various software packages have been developed in recent years to solve optimization problems. Two optimization software, including LINDO and LINGO, was previously introduced in Section 6.5.2.1. In addition, the MATLAB Software Optimization toolbox is one of the best and most powerful options or alternatives that is widely used in optimization. It was employed for optimization of energy systems in most literature related to single objective and multiobjective optimization of energy systems. This is a brief overview of this section. Toolbox Optimization in MATLAB software is available by default when you install the software and is available after the installation process is completed. This toolbox is accessible in two ways: 1. Type the optimtool command into the software command window. 2. Call using the application toolbar and clicking on the optimization section, as shown in Fig. 6.26. The first thing to do after opening the toolbox is to select an algorithm to optimize. This is done by selecting the algorithm in the solver section as per Fig. 6.27. Thereafter, depending on the selected solver, all or a few of the following items must be entered into the software and then run with the toolbox. For example, Fig. 6.28 presents cases where the solver of the genetic algorithm is selected as the solver space. The cases are divided into two categories, including the definition of the problem’s parameters (problem section) and tuning parameters (options section).

6.9 Optimization toolbox of the MATLAB software

FIG. 6.26 Access to MATLAB optimization toolbox from the Applications toolbar.

FIG. 6.27 Selection to MATLAB optimization solver using the Applications toolbar.

FIG. 6.28 Items to define in an optimization problem in the optimization toolbox of MATLAB.

409

410

6. Optimization basics

As fully discussed in the previous sections, each optimization problem has three basic elements, namely, objective function, decision variables, and constraints. In MATLAB software, in order to use the toolbox, a separate code must be written problem’s model so that it calculates the value of the objective function as well as constraints based on the decision variables. Therefore, having such a code is a prerequisite for using the toolbox. Fig. 6.28 illustrates the cases that need to be introduced to the toolbox for an optimization problem, which is as follows: 1. Function or objective Functions: In this section, a function or a code that returns values of objective functions, as well as constraints that are expressed as functions of decision variables and parameters, must be introduced. The objective function is usually the returned value of the code. The “@” sign must be inserted before the name of the code. 2. The number of decision variables: In this section, the number of decision variables as an integer number greater than or equal to one must be entered. Depending on the type of solver, such part can be one of them might have a different form. For some type of solver, the initial starting point(s) must be entered. 3. Linear inequality constraints: In this section, inequality linear constraints in the form of AX  B are introduced. In the first blank space, multipliers of decision variables are entered (matrix A) while in the second blank space, constant values (vector B) are given. 4. Linear equality constraints: In this section, equality linear constraints in the form of AX ¼ B are introduced. 5. The variation range of decision variables: In this section, lower bound and upper bounds of variation of each decision variable in the form of [L1, L2, …, Ln] (lower bounds) and [U1, U2, …, Un] (upper bounds) must be given. 6. Non-linear constraints: In this section, nonlinear constraints in the form of mathematical functions are introduced. Toolbox assumes that constraints are in the form of gi(X)  0. 7. Integer decision variables: In this section, integer decision variables (if there are any) must be introduced in the form of indexes. 8. Start: When this tab is clicked, the algorithm is started. 9. Indicator of iteration number: In this section, the iteration number is shown. 10. Optimal solution: In this section, the obtained optimal solution for SOO problems is given. For MOO problems, the Pareto frontier is illustrated. Although optimized responses are visible within the toolbox after the solver runs, they are not yet stored and need to be stored so that they can be used in the future. To do this, it is sufficient to transfer the data to the software workspace in accordance with Fig. 6.29 by going to the file language and selecting the Send to Workspace option and then to save the answer by right-clicking and selecting the appropriate name. Example 6.11 Find the optimal solution of following two-dimensional optimization problem using MATLAB toolbox if the variation range of each decision variable is in between ½ 5:0 5:0  min

f ¼ x41 + x42 + x21 x2  x21  3x22

s:t: : x31  x1 x2 + x22  8

6.9 Optimization toolbox of the MATLAB software

411

FIG. 6.29 Transfer of optimal results from the toolbox to MATLAB’s workspace.

Step #1: In this step, a MATLAB code that computes objective function and constraints is written as follows: Objective function: function n ¼ Objective(X). n ¼ X(1)^4 + X(2)^4 + 4*X(1)^2*X(2)-X(1)^2–3*X(2)^2; end Constraint: function m ¼ Constraint(X). m ¼ X(1)^3-X(1)*X(2) + X(2)^2–8; end Constraints must be introduced in MATLAB code is an especial presentation as follows: function [c,ceq] ¼ Cons(X). c(1) ¼ Constraint(X). ceq ¼ []. end Step #2: Data are entered into the toolbox’s window of Fig. 6.28, as shown in Fig. 6.30.

412

FIG. 6.30

6. Optimization basics

Examples of entered data to optimization toolbox of MATLAB (Example 6.11).

6.10 Dynamic optimization of energy systems In optimal control, the concept of dynamic optimization is widely used. Dynamic optimization was developed by Richard Bellman in the 1950s [25]. For energy systems that their performances are changed within a period of time, it refers to simplifying the complex time-dependent behaviors of the system by breaking it down into a number of sequential problems, which are supposed to be simpler than the original problem in a repetitive fashion. In the field of optimization and computer science, if a problem can be solved by breaking it into subproblems and consequent finding the optimal solutions to the subproblems, repetitively, such a problem is referred to have substructure optimal. If subproblems can be nested recursively inside larger problems so that dynamic programming methods are applicable, then there is a relation between the value of the larger problem and the values of the subproblems [26]. In terms of mathematical optimization, dynamic programming usually refers to simplifying a decision by breaking it down into a sequence of decision steps over time.

6.10 Dynamic optimization of energy systems

413

In optimal control of the system, dynamic programming by determining the value function, that is, V1, V2, …, Vn. Index i indicates the performance of the system in the first time interval. Value functionVi in early times, that is, i ¼ n  1, n  2, …, 3, 2, 1 can be found by backward calculations, using an iterative relation known as the Bellman equation. For i ¼ 1, 2, …, n value function at i  1 is obtained from Vi by maximizing the sum of the gain obtained from the decision at i  1 the function Vi at the new state of the system if this decision is made. Since Vi has already been calculated for the calculated states, the above yields for those states; consequently, V at the initial state of the system is the optimal solution value. By tracking the computations, you have done before, the optimal values of the decision variables can be recovered by backward calculation one by one. This kind of dynamic optimization, also known as parametric optimization used in optimal control engineering, is not intended to be discussed in this book. For more details regarding this type of optimization, it must be referred to related literature, for example, Refs. [27, 28]. For energy systems, in some cases, the performance of the system is changed over a period of time, for example, a year due to load change, the variation of weather conditions, and so on. In such a case, the performance of the system can be optimized in some interval of time, for example, an hour; and the problem is broken to several static optimization problems in each time interval. Then, each static problem for a time interval is optimized using ordinary optimization methods (mathematical or metaheuristic methods). For example, if a power plant is to optimize and its performance is changed over a working year, it can be broken to 8760 static problems for each hour of the time interval. Therefore, for each decision variable, 8760 values are obtained during a year. There are two kinds of decision variables in such cases. A group of decision variables like temperature, pressure, and flow rate, which is among the operating parameters of the systems. These kinds of decision variables are functions of time and can be altered during the annual operation of the system. Another group of decision variables is those kinds of variables that are not among the operating parameters of the system during the system operation. The geometrical specifications of the system are among this kind of decision variable. It is impossible to change the geometrical specification of a system by time. For a power plant as an example, if the number of feedwater heater and geometrical specification of these heat exchangers (tube diameter, tube length, number of tubes, tubes’ pitch, shell diameter, and so on) is considered as decision variables, it is impossible to change these parameters during a year when operating condition of the power plant is changed. For such kind of problem, in a similar manner to the first group of decision variables, for each time interval, a specific optimal value is obtained by breaking the problem into several static optimization problems for each time interval. When optimization is performed for all subproblems, the final optimal value of each decision variable is obtained by averaging between all obtained optimal values as follows [29]: T  X

Z xi, eq ¼

xi ðtÞ dt τ



xij :Δtj

j¼1

τ

 (6.54)

In Eq. (6.54), xi stands for ith decision variable while the subscript eq denotes equivalent. Moreover, Δtj is the jth time interval (e.g., one hour), and τ is the period of time that system is optimized during that (e.g., a year equal to 8760 h).

414

6. Optimization basics

6.11 Optimization of large energy systems In most cases, it is intended to optimize large-scale energy systems such as refineries, petrochemical plants, huge energy industries, energy sectors at large scale in the scale of the area, country, continental, or word. Such energy systems not only have very complicated models but also, if a model for them is obtained, in optimization, enormous numbers of parameters, decision variables, and constraints are involved. Such large optimization problem due to having very complex calculation processes in their model on the one hand and an enormous number of involved decision variables are very hard to be optimized since their optimization requires a vast computational potential that can be provided by supercomputers. Therefore, in practical application in energy engineering, it is essential to simplify their optimization process by, for example, reducing their numerous decision variables to a reduced list of decision variables that are more effective and essential. One classical method that can be used to classified decision variables into several groups, including very effective, effective, moderate parameters, and the less effective group is a method called the Taguchi method. Taguchi method is a statistical method introduced in the 1940s by Genichi Taguchi to improve the quality of manufactured goods, and more recently, also applied to engineering, biotechnology, marketing, advertising, and also the design of the experiment. Therefore, using this method, it is possible to classified decision variables based on their degree of importance, and hence, it is possible to reduce the number of decision variables by putting away less important variables. Taguchi developed a set of tables called orthogonal arrays to design and run experiments. The orthogonal arrays allow for the least number of experiments to examine the main effects and interactions. Two factors in two levels are combined with four methods such as (1,1), (2,1), (1,2), and (2,2). When two columns of an array show these compounds at the same number of times, they are called orthogonal or balanced columns. The most common orthogonal array models are L8 (mean eight experiments), L16 (mean sixteen experiments), and L18 (mean eighteen experiments). There are other arrays such as L4, L8, L9, L12, L16, L’16, L18, L25, L27, L32, L50, L54, L64, and L81. Each of these arrays is a model for performing experiments, and the index of each array represents the number of tests required in this pattern. For each study, depending on the number of agents and the levels selected for it, one or more arrays may be appropriate, and the other arrays may be unusable or unnecessary because of increased testing. One of the most important steps of the Taguchi scheme is how to arrange the factors in the orthogonal array columns. Each orthogonal array column refers to a particular factor with two or more levels, and each row represents an experiment. The main purpose of Taguchi’s design is to study the main effects of the factors, but can sometimes be used to estimate binary interactions if needed. In this case, the layout of the orthogonal array will be different. In this case, like the factors, the interaction is placed in a column of the orthogonal array. The L4 orthogonal array is shown in Table 6.5. The numbers inside this array are the number of levels of each factor. For example, the first row of the L4 array describes an experiment in which all factors are at their level 1.

415

6.11 Optimization of large energy systems

TABLE 6.5 Typical L4 Taguchi analysis for three effective parameters, that is, A, B, and C. Experiment No.

Factor A

Factor B

Factor C

1

1

1

1

2

1

2

2

3

2

1

2

4

2

2

1

A closer look at these arrays shows that each array has a certain capacity in terms of a number of factors and levels. For example, the L4 array is maximally used to study 3 two-level factors. If the number of agents or their levels is greater than this number, another array should be used. In Taguchi, factors or variables are divided into three groups such as control factors, noise factors, and signal factors. • Control factors: Process factors that can be controlled. In other words, the factors that are considered during the design, which can be changed by changing the properties of the product and by adjusting them to obtain the desired properties in the product under consideration, are called control factors. Examples of control factors include the type of equipment used to perform the tests or the type of material used in manufacturing the product or the controllable operating conditions such as temperature, pressure, and concentration. • Noise factor: Factors that are difficult or expensive to control in the ordinary course of the process are beyond the control of the individual. For example, ambient temperature is a factor that is difficult to control. In the Taguchi method, the objective is to determine a set of controllable factors that minimize the amount of variability caused by perturbation factors. • Signal factor: These are factors that affect the core performance of a process and are used in dynamic or repetitive experiments. The purpose of these experiments is to improve the relationship between signal factor and response. In the Taguchi method, optimization means determining the best level for control factors, that is, the level that maximizes the signal-tonoise ratio. In the usage of the Taguchi method for the optimization system, factors are indeed decision variables. Hence, in running a Taguchi experiment, the following steps are followed: 1. Since the success of an experiment depends on a thorough understanding of the nature of the problem, the problem must first be formulated. 2. Identify the main purpose of the problem and the answer that needs to be optimized.

416

6. Optimization basics

3. Specify control factors (control variables), perturbation or noise factors (decision variables), and signal factors (if any). Anything that seems to influence the results of the tests is considered a factor. 4. Select the level of variables and degrees of freedom of them and their interactions. The number of levels of each factor should be taken into account, given the resources and financial and time constraints. 5. Design a proper orthogonal array. 6. Prepare and execute experiments after arranging variables in the orthogonal array columns, by systematically modifying the control, perturbation, or signal factors. According to the composition in the array, the tests are performed at least once, and if possible, to minimize disturbance error, the tests are repeated two or three times. 7. Statistically analyze and interpret their results and ultimately optimal conditions. 8. Perform an experiment to confirm optimal results. In general, Taguchi offers two methods for analyzing results: 1. The standard method, which is based on calculating the effect of factors and performing analysis of variance. 2. The second method that Taguchi has highly recommended for repetitive experiments is the Signal to Noise Ratio method. This analysis determines the best and most powerful working conditions by changing the results. In other words, this ratio expresses the dispersion around a certain value. The higher this ratio, the less dispersion, and the effect of the variable will be more important. In the standard method, after performing the experiments, the analysis of results can be similar to other classical methods of designing experiments using the method of determining the main effects and forming a variance analysis table to determine the significance of these effects and then factor response regression. The effects of the control factors and their interference are calculated at this stage, and the results are analyzed to obtain an optimal set of control factors. This method is recommended when the experiments are repeated. Analysis of variance generally does not determine the best level but identifies the factors whose mean results vary with the level of change. In this section, a very brief explanation about Taguchi methods that can be used to classified decision variables into groups that can be categorized based on the importance of variables was given. More details regarding this method can be found in related references, such as Ref. [30]. Besides the Taguchi method that is a general method for the classification of effective parameters of the systems, another method that is developed for the energy system by a group of Brazilian researchers can also be pointed out. They called their method as iterative Exergoeconomic Improvement integrated with a Simulator abbreviated as EIS method [31–33]. EIS is an efficient method that is introduced for complex power generation systems, which has the following capabilities: 1. Identification of the decision variables that have a major impact on the overall cost and exergetic efficiency of the system 2. Hierarchical Classification of System Elements 3. Identification of the dominant terms at the total cost of the elements

6.12 Case studies

417

4. Selection of the main decision variables in the iteration process The group worked to determine the influential decision variables from two paths, first using the improved bond structure coefficients method and the second based on the sensitivity of the two variables exogenous, relative cost difference, and exergetic efficiency. By the given criteria, the set elements are also divided into three main, sub, and reminder sections that only the main and subelements are involved in the optimization process. It should be noted that the initial assumption in using the model presented by this group is the specification of the physical, thermodynamic, and economic models of the system. For more details regarding EIS method of the energy system, refer to original EIS papers given in Refs. [31–33]. The aforementioned methods, however, can be useful to reduce the size of the problem; nevertheless, it reduces the potential to be an optimal system as much as possible. In Chapter 8, through the soft computing approaches based on a fuzzy inference system, FIS, and artificial neuro-fuzzy inference system known as ANFIS, a more sophisticated and fast optimization algorithm for large-scale problems as well as real-time optimization of energy systems will be given.

6.12 Case studies Several case studies are presented in this section in order to give more insight regarding the application of single-objective and multiobjective optimization for energy systems. The first two case studies are revisiting the case studies that were presented in Chapter 4, Section 4.6. These case studies include a cogeneration power plant that combines a gas turbine cycle to a heat recovery steam generator for cogeneration of the power and saturated steam a nuclear PWR power plant. The third case study is the GPU-3 Stirling engine that was introduced in Table 3.1 and discussed in Chapter 3.

6.12.1 Case study (I): A gas turbine-based cogeneration plant This case study is the recall of the case study (I) given in Section 4.6.1 of Chapter 4. This problem was optimized in two multi-objective optimization scenarios. In the first scenario, thermoeconomic objective and exergy objective were optimized in two-objective optimization. This optimization scenario is as per Ref. [34], and optimization is performed using NSGA-II. In the second scenario, it was optimized in three objective optimizations in which exergoeconomic, exergetic, and pollutant emission objectives were optimized simultaneously. This scenario is as per research given in Ref. [35], and optimization is performed by the multiobjective PSO algorithms. • First optimization scenario: Objective function: The three objective functions of the multicriteria optimization problem are the total exergetic efficiency (to be maximized), the total cost rate of products (to be minimized), and the “environmental impact” (to be minimized). The third objective function expresses the environmental impact as the total pollution damage cost ($. s-1) due to CO and NOx

418

6. Optimization basics

emissions by multiplying their respective flow rates by their corresponding unit damage cost. cCO and cNOX were assumed to be 0.02086 $ kgCO 1 and 6.853 $ kgNOx 1 , respectively [34]. In this scenario, the cost of pollution damage is assumed to be added directly to the expenditures that must be paid for the production of system products. The mathematical formulation of objective functions is as follows: _ NET + m _ steam ðex9  ex8 Þ W (6.55a) _ fuel exfuel m X X _ CO + cNOX m _ NOX Þ (6.55b) Z_ + C_ env ¼ C_ F + Z_ + ðcCO m Thermoenvironomic : C_ Ptot ¼ C_ F + k k k k Exergetic : εtot ¼

Decision variables: • • • • •

Decision variables have been selected as follows: The compressor pressure ratio rP Isentropic efficiency of the compressor ηsc Isentropic efficiency of the turbine ηst The temperature of the air entering the combustion chamber T3 The temperature of the combustion products entering the gas turbine T4 Constraints: Following constraints were imposed on the problem [34]:

(i) Constraint on the range of decision variables: 6  rP  16

(6.56a)

0:6  ηsc  0:9

(6.56b)

0:6  ηst  0:92

(6.56c)

700  T3  1000K

(6.56d)

1200  T4  1550K

(6.56e)

(ii) Constraint on for air preheater, aph: T5 > T3

(6.56f)

T6 > T2

(6.56g)

(iii) Constraint on for air heat recovery steam generator, hrsg: ΔTP ¼ T7P  T9 > 0

(6.56h)

T6  T9 + ΔTP

(6.56i)

419

6.12 Case studies

T7  T8 + ΔTP

(6.56j)

T7P > T8P

(6.56k)

T7  378:15K

(6.56l)

The last constraint is an additional constraint with respect to the original CGAM problem imposed on the exhaust gas temperature, which must not fall below 378.15 K (105 °C). This limitation is considered to prevent the condensation of the water vapor that exists in the combustion products at the outlet section of the economizer. The condensation of water vapor in the presence of carbon dioxide may lead to the formation of carbonic acid, which is corrosive material and can damage the economizer surface. Optimization algorithms: Optimization is performed by NSGA-II using MATLAB optimization toolbox using tuning parameters given in Table 6.6. • Second optimization scenario: Objective function: In the first scenario, the thermoeconomic objective and environmental cost impact of emission were integrated together to form a unique objective function called thermoenvironomic objective as given by Eq. (6.55b). In the second scenario, three objective functions are considered independently, and a three objective problem is formed. Objective functions of this scenario are: _ NET + m _ steam ðex9  ex8 Þ W _ fuel exfuel m X Thermoeconomic : C_ Ptot ¼ C_ F + Z_ k k

Exergetic : εtot ¼

_ CO2 + cNOX m _ NOX + cCO m _ CO Cost of environmental impact : C_ env ¼ cCO2 m

TABLE 6.6 The tuning parameters of the NSGA-II for the first scenario of the case study (I). Tuning parameters

Value

Population size

500

Maximum No. of Generations

300

Pc (Probability of crossover)

70%

Pm (Probability of mutation)

1%

No. of the crossover point

2

Selection process

Tournament

Tournament size

2

(6.57a) (6.57b) (6.57c)

420

6. Optimization basics

Decision variables and constraints: Decision variables and constraints of this scenario are completely equivalent to what were considered in the first scenario. Optimization algorithms: Optimization is performed by multiobjective particle swarm optimization, MOPSO. Details of the algorithms are given in Ref. [35]. Results of two scenarios: Pareto optimal front of the first and second scenarios is given in Fig. 6.31A and B, respectively.

12000

Total cost rate of products

11000 10000 9000

Closest point of Pareto frontier to the equilibrium point

8000 7000

Equilibrium point (Weak equilibrium)

6000 5000 4000 3000 0.48

(A)

0.49

0.5

0.51

0.52

0.53

0.54

tot

1 Pareto optimal frontier obtained by MOPSO

Environment

0.8 0.6 0.4 0.2 0 0

(B) FIG. 6.31

0.2

0.4

0.6

0.8

1

0.46

0.48

0.5

0.52

0.54

0.56

0.58

Efficiency

Pareto optimal front of the case study (I) given (A) for the first scenario; (B) second scenario.

421

6.12 Case studies

Since the first scenario had two objective functions, its Pareto front was a two-dimensional front, as depicted in Fig. 6.31A. The second scenario had three objectives and, therefore, a 3-D Pareto front that was given in Fig. 6.31B. As mentioned, in the multiobjective optimization problem, instead of one final optimal solution, a set of optimal solutions known as Pareto front are obtained that for case studied problem, the Pareto fronts of two scenarios were illustrated in Fig. 6.31A and B. Therefore, in order to give a final optimal solution in a similar way to SOO problem, for these kinds of problems, decision-making tools must be employed to select one solution among the set of solutions. Decision-making methods will be discussed in Chapter 7. Here, it is assumed that these tools are employed, and selected final solutions of two scenarios are given in Table 6.7.

6.12.2 Case study (II): A nuclear power plant with pressurized water reactor, PWR This case study is the recall of the case study (II) given in Section 4.6.2 of Chapter 4. This problem was optimized in two optimization scenarios. In the first scenario, the thermoeconomic objective is optimized in a single-objective optimization as per Ref. [36]. In the second scenario, the same problem is optimized in a multiobjective optimization scenario, while thermoeconomic and exergy objectives were optimized simultaneously. • First scenario: Single-objective thermoeconomic optimization of PWR power plant Objective function: Thermoeconomic (exergoeconomic) objective function, which shows the cost of power generation of the PWR nuclear power plant, was considered as the objective function of

TABLE 6.7 Comparison of values in the base case design of the CGAM problem with those obtained at the optimum solution in this paper. Objective functions and decision variables

Base casea

First scenario

Second scenario

Exergetic objective: εtot (%)

50.31

51.07

51.8

3586.60

3329.45

3618.0

573.6

637.8

457.9

T3 (K)

850.00

874.00

851.58

T4 (K)

1520.00

1476.76

1479.22

ηsc

0.86

0.8364

0.8287

ηst

0.86

0.8702

0.8765

rP

10.00

8.59

14.19

  Thermoeconomic objective: C_ P $ h1   Environmental objective: C_ env: $ h1 Decision variables

a

The base case system is the original basic design of the system given in Chapter 4, Section 4.6.1.

422

6. Optimization basics

this scenario. This objective function was obtained using detail exergoeconomic models that were presented in Section 4.6.2 of Chapter 4. Accordingly, we have: Thermoeconomic :

X

Z_ k +

_ cQ Q |fflffl{zfflfflR}

_ net ¼ cw W |fflfflffl{zfflfflffl}

(6.58)

CF ðCostrate

CF ðCostrate of fuel Þ

of ProductÞ

where cQ is the fuel cost per thermal exergy of the reactor and is obtained as   CF cQ ¼ Bu243600 ¼ 4  107 }24:kJ1 [36]. Decision variables and their variation range (constraints): Following the decision variables and constraint were considered for the proposed 1000 MW PWR nuclear power plant [36]: 1. P8: Pressure of stream 8; Pressure of the fist steam extraction from the high-pressure turbine (2600 < P8 < 2675 kPa) 2. P9: Pressure of stream 9; Pressure of the second steam extraction from the high-pressure turbine (1200 < P9 < 2000 kPa) 3. P16: Pressure of stream 16; Pressure of the fist steam extraction from the low-pressure turbine (190 < P16 < 225 kPa) 4. P17: Pressure of stream 17; Pressure of the second steam extraction from the low-pressure turbine (85 < P17 < 120 kPa) 5. P18: Pressure of stream 18; Pressure of the third steam extraction from the low-pressure turbine (32 < P18 < 40 kPa) 6. T24: Temperature of stream 24; Outlet temperature of the LP.1 heat exchanger (60 < T24 < 66 °C) 7. T26: Temperature of stream 22; Outlet temperature of the LP.2 heat exchanger (79 < T26 < 90°C) 8. T29: Temperature of stream 29; Outlet temperature of the LP.3 heat exchanger (100 < T29 < 114.5°C) 9. T31: Temperature of stream 31; Outlet temperature of the LP.4 heat exchanger (160 < T31 < 164°C) 10. T37: Temperature of stream 37; Outlet temperature of the HP.5 heat exchanger (200 < T37 < 222.5°C) • Second scenario: Multiobjective optimization of PWR power plant Objective function: Thermoeconomic (exergoeconomic) objective function, as given by Eq. (6.58), was also considered in this scenario, too. Besides, exergetic efficiency as a thermodynamic optimization was also considered to form a two-objective optimization problem as follows [37]: Thermodynamic : εPWR ¼

_ net W _ Q R

(6.59)

423

6.12 Case studies

Decision variables and their variation range (constraints): The same decision variables and constraints that were previously introduced in the first scenario are considered in the second scenario, too. Optimization algorithms: Optimization process is performed by NSGA-II toolbox of MATLAB while tuning parameters are set to values given in Table 6.6. Results of two scenarios: Pareto optimal front of the second scenario is given in Fig. 6.32. As mentioned, in the multiobjective optimization problem, instead of one final optimal solution, a set of optimal solutions known as Pareto front are obtained that for scenario (II) of the case studied the problem, Here, it is assumed that these tools are employed, and selected final solutions of two scenarios are given in Table 6.8. Besides Table 6.8, values of objective functions were compared for different scenarios in Fig. 6.33.

6.12.3 Case study (III): GPU-3 Stirling engine In Chapter 3, the Grand Power Unit, known as the GPU-3 Stirling engine, was introduced. As mentioned, this engine is a benchmark Stirling engine with a 3 kW nominal power that was designed and built for the US Army by General Motors. GPU-3 is a beta type and single-cylinder engine with the rhombic drive mechanism. The general specifications of this

30.5

Cost of power generation ($/MW.h)

30.4 30.3 30.2 30.1 30 29.9 29.8 29.7 29.6 29.5 37.5

37.7

37.9

38.1

38.3

38.5

Exergetic efficiency (%)

FIG. 6.32 Pareto optimal front of the case study (II) given in second scenario of the PWR nuclear power plant [37].

424

6. Optimization basics

Comparison of the values of decision variables the base cases and various optimization approaches.

TABLE 6.8

Decision variables

P8

P9

P16

P17

P18

T24

T26

T29

T31

T37

Base case (See Section 4.6.2)

2600

1500

196

120

40

65

80

107

164

222.5

Thermodynamic optimization

2600

1200

190

85

32

66

90

114.5

164

221

Thermoeconomic optimization (1st scenario)

2654

1201

219.6

119.8

34.22

60

70.06

100

160

200.1

Multi objective optimization (2nd scenario)

2615

1200

219

110

32

60

75

100

162

221

39 Exergy efficiency ( % )

38.5 38.25 38

37.86 37.69

37

Base case

Thermodynamic optimization Thermoeconomic optimization

Multi objective optimization

Cost of power generation ( $/MW.h )

(A)

(B)

31 30.8 30.6 30.4 30.2 30 29.8 29.6 29.4 29.2 29

30.44

30.6 30.14 29.79

Base case

Thermodynamic Thermoeconomic optimization optimization

Multi-objective optimization

FIG. 6.33 (A) Exergetic efficiency (%); (B) cost rate of power generation for the base case, thermodynamics, thermoeconomic, and multiobjective optimized designs.

425

6.12 Case studies

engine were given in Table 3.1 of Chapter 3. Various thermal models for the Stirling engine were given in Chapter 3. In this case study, one of the thermal models known as CAFS model introduced in Section 3.7.1 of Chapter 3 is used to optimize the thermal performance of this engine. • Objective function Two objective functions are thermal efficiency (to be maximized) and shaft power (to be maximized). These objectives were obtained as outputs of the CAFS thermal model given in Chapter 3 and also in Ref. [38]. • Decision variables and constraints The primary geometrical and operational features of the GPU-3 Stirling engine were considered the design parameters for optimization. Accordingly, decision variables and their lower and upper bounds as constrains of optimization are given in Table 6.9. • Optimization scenarios As mentioned, two objective functions, including power and thermal efficiency, are defined. Optimization is performed in three scenarios. In the first two scenarios, each objective is considered in SOO. Therefore, power and efficiency are maximized in TABLE 6.9 Decision variables and constraints for the case study (III)-the GPU-3 Stirling engine. Optimization constraints No

Decision variables

Lower bound

Upper bound

1

Hot source temp. (K)

866

1023

2

Cylinder dia. (mm)

50

90

3

Crank radius (mm)

8

20

4

Engine speed (rpm)

1000

3500

5

Mean effective pressure (MPa)

1.36

6.80

6

Heater tube’s length (mm)

200

300

7

Number of tubes in heater

20

60

8

Heater tubes dia. (mm)

2

4

9

Cooler tube’s length (mm)

20

60

10

Number of tubes in cooler

150

500

11

Cooler tube’s dia. (mm)

0.8

2

12

Regenerator dia. (mm)

20

60

13

Wire dia. (μm)

40

80

14

Number of regenerators

4

12

15

Regenerator length (mm)

20

60

16

Eccentricity (mm)

10

30

426

6. Optimization basics

scenarios 1 and 2 separately. In the third scenario, both objectives are maximized in MOO process simultaneously. • Optimization method The optimization process is performed by NSGA-II toolbox of MATLAB while tuning parameters are set to values given in Table 6.6.

6.13 Results The two-dimensional Pareto optimal front of this case study is given in Fig. 6.34. As mentioned, in the multiobjective optimization problem, instead of one final optimal solution, a set of optimal solutions known as Pareto front are obtained for scenario (II) of the case studied in the problem. Here, it is assumed that one of these tools known as LINMAP method is employed and selected and final solutions of this case study are given in Table 6.10. Table 6.10 shows that when optimization is performed only based on one objective in an SOO process, the value of another objective that is not optimized becomes even worse than the base case. Hence, when, for example, only power is maximized, the thermal efficiency of the optimized engine is even lower than the corresponding thermal efficiency of the base case system prior to optimization and vice versa. Only when MOO process is performed, both objectives become better than the corresponding objective function of the base system. This

0.55 Ideal point

h

0.5

0.45

LINMAP solution

0.4

2000

4000

6000

8000

10000

12000

14000

16000

Power [W]

FIG. 6.34

Pareto optimal front of the case study(III)—the GPU-3 Stirling engine [38].

427

6.14 Summary

TABLE 6.10 Comparing objective functions and decision variables for three optimized and base case conditions of the GPU-3 Stirling engine.

Parameter

Base case

Lower bound

Upper bound

Scenario #1 Max power

Scenario #2 Max efficiency

Scenario #3 Multiobjective

Power output (W)

4107





21,147.8

441.5

15,885.9

Efficiency (%)

36.2





34.4

60.5

43.8

Power loss (W)

1104





7750

28.6

3496

Hot source temp. (K)

977

866

1023

1005.9

973.2

988.9

Cylinder dia. (mm)

69.9

50.0

90.0

89.7

50.0

89.3

Eccentricity (mm)

20.8

10

30

14.3

10.0

14.4

Crank radius (mm)

13.8

8

20

19.5

8.1

18.6

Engine speed (rpm)

2500

1000

3500

2920

1207

2414

Mean effective pressure (MPa)

4.13

1.36

6.80

6.79

5.84

6.73

Heater tubes length (mm)

245.3

200.0

300.0

255.2

291.5

240.1

Number of tubes in the heater

40

20

60

40

38

40

Heater tube’s dia. (mm)

3.0

2.0

4.0

3.2

3.5

3.1

Cooler tube’s length (mm)

46.1

20.0

60.0

44.8

45.4

44.4

Number of tubes in the cooler

312

150

500

289

254

338

Cooler tube’s dia. (mm)

1.08

0.80

2.00

1.0

1.5

1.2

Regenerator dia. (mm)

22.6

20

60

34.5

60.0

42.4

Wire dia. (μm)

40.0

40.0

80.0

56.7

70.0

61.5

Number of regenerator

8

4

12

10

12

11

Regenerator length (mm)

22.6

20

60

28.7

20.9

29.4

shows why MOO is more sophisticated than SOO process, especially for energy systems that conflicting objectives must be optimized at the same time.

6.14 Summary A comprehensive review of various optimization methods was given in this chapter. The review considered most aspects and types of problems and methods. Both mathematical, metaheuristic, and hybrid approaches were given. In addition, methods for various kinds

428

6. Optimization basics

of problems, including unconstraint and constraint optimization, linear and nonlinear problems, integer optimization, MILP, and MINLP problems were discussed. When required, several examples of elaborate methods were given. In addition to single-objective optimization (SOO), multiobjective optimization (MOO) was also discussed, and Pareto optimality for this kind of problem was introduced. Moreover, static optimization and dynamic optimization were compared and discussed. Applicability of each method in the field of energy systems was cited, and it was emphasized that some models need an explicit expression of objective function based on decision variables. This need is crucial in cases that derivatives of objective functions respect to decision variables are needed. This is a rare case in models of energy systems since, in most models, objective functions are expressed in explicit dependency to decision variables. In such cases, numerical derivative might be useful, or it is necessary to conform problem from implicit expressions to explicit ones using SCST methods given in Chapter 5. Methods to reduce the size of the problem for large-scale systems are also introduced in this chapter. The optimization toolbox of MATLAB software was introduced. Finally, three case studies for SOO and MOO optimization of energy systems were provided. It was discussed that since most of the models of energy systems are constraint NLP or MINLP problems, to avoid trapping in local optima, metaheuristic approaches or hybrid approaches (combined mathematical–metaheuristic methods) are very desirable.

6.15 Exercises 1. Find the minimum solution of the following two-dimensional objective function using conjugate search method with the start point of X0 ¼ ½ 3:0 2:0 T and initial vector of S0 ¼ ½ 1:0 1:0 T :Minimize f(X) ¼ x1  x2 + 2x21 + 2x1x2 + x22 2. Optimize the following function using the Newton method with the start point of X0 ¼ ½ 1:0 1:0 T : Minimize f(X) ¼ (x1  2)4 + x21(x1  2)4 + (x2 + 1)2. 3. Find extremum points and their types (minima, maxima, or saddle point) of the following problem using FOC and SOC condition: f ðXÞ ¼ x21 + x22  2x1  2x2 s:t: : 2x21 + x22 ¼ 4 4. For the refinery problem that was given by Example (1.1) in Chapter 1, an LP model was obtained as per Eq. (1.11). Solve this problem using the Simplex method. 5. Solve following constraint optimization problem by start point of X0 ¼ ½ 2:0 1:0 T (a) using SQP method, (b) using the penalty function method: 2 f ðXÞ ¼ 6x1 x1 2 + x2 x1 s:t: : x1 x 2  2 ¼ 0 x1 + x2  1  0

References

429

6. Consider exergoeconomic formulation of the optimization problem for the cogeneration plant given in Section 4.6.1 of Chapter 4 and optimized in Section 6.12.1 of this chapter. By genetic programming and also GMDH, first, provide two explicit exergoeconomic optimization models based on given decision variables (introduced in Section 6.12.1). Then, examine that obtained problems are convex or nonconvex. 7. Solve the solution of obtained explicit optimization models in problem #1 using: (i) Penalty function method that combined with Newton methods on unconstraint problems. (ii) Find the optimal solution using SQP method. (iii) Find the solution of the obtained problem using GA of MATLAB toolbox. Compare obtained results with given results of the case study (i) given in Section 6.12.1. 8. Investigate that GMDH models that found for problem 1 have a theoretical solution by FOC and SOC condition. 9. If the exergetic objective is added to the exergoeconomic objective of problem 1, it is converted to the case study (I) given in Section 6.12.1. First, convert the exergetic efficiency of the cogeneration system into an explicit representation of decision variables based on GMDH method. By considering two objectives (exergoeconomic and exergy), solve the multiobjective problem using the weighted metric method. 10. For cogeneration problem of the case study (I) given in Sections 4.6.1 and 6.12.1 of Chapter 4 and this chapter, (a) perform multiobjective optimization by two objective functions, including exergoeconomic and exergoenvironmental one. (b) Then perform a single-objective optimization using exergoenvironomic objective, (c) compare the result of part (a) and (b).

References [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]

Rao SS. Engineering optimization: theory and practice. New York: John Wiley & Sons; 2019. Williams HP. Model building in mathematical programming. Chichester: John Wiley & Sons; 2013. Rao SS. Engineering optimization: theory and practice. New York: John Wiley & Sons; 2009. Broyden C. The convergence of a class of double-rank minimization algorithms. Part 1 and Part 2. J Inst Math Appl. 6, 1970, 76–90. Fletcher R. A new approach to variable metric methods. Comput J 1970;13:317–22. Goldfarb D. A family of variable-metric methods derived by variational means. Math Comput 1970;24:23–6. Shanno D. A family of variable-metric methods derived by variational means. Math Comput 1970;24:647–56. Taha HA. Operations research: an introduction. USA: Pearson/Prentice Hall; 2011. Balamurugan R, Natarajan A, Premalatha K. Stellar-mass black hole optimization for biclustering microarray gene expression data. Appl Artif Intell 2015;29:353–81. Bianchi L, Dorigo M, Gambardella LM, Gutjahr WJ. A survey on metaheuristics for stochastic combinatorial optimization. Nat Comput 2009;8:239–87. Yang X-S. Engineering optimization: an introduction with metaheuristic applications. USA: John Wiley & Sons; 2010. Gendreau M, Potvin J-Y. Handbook of metaheuristics. Switzerland: Springer; 2010. Dreo J, Petrowski A, Siarry P, Taillard E. Metaheuristics for hard optimization: methods and case studies. Berlin: Springer Science & Business Media; 2006. Holland JH. Adaptation in natural and artificial systems: an introductory analysis with applications to biology, control, and artificial intelligence. USA: MIT Press; 1992. Grefenstette JJ. Optimization of control parameters for genetic algorithms. IEEE Trans Syst Man Cybern 1986;16:122–8.

430

6. Optimization basics

[16] Pohlheim H. Evolutionary algorithms: overview, methods and operators. In: Documentation for genetic evolutionary algorithm toolbox for use with Matlab version: toolbox. 1:1999. [17] Goldberg DE. Genetic algorithms in search. In: Optimization, and machine learning. 1989. [18] Michalewicz Z. Genetic algorithms+ data structures¼ evolution programs. Berlin: Springer Science & Business Media; 2013. [19] Kennedy J, Eberhart R, Shi Y. Swarm intelligence. San Francisco: Morgan Kaufmann Publishers; 2001. [20] Hart CG, Vlahopoulos N. An integrated multidisciplinary particle swarm optimization approach to conceptual ship design. Struct Multidiscipl Optim 2010;41:481–94. [21] Kirkpatrick S, Gelatt CD, Vecchi MP. Optimization by simulated annealing. Science 1983;220:671–80. [22] B€ ack T, Fogel DB, Michalewicz Z. Handbook of evolutionary computation. Boca Raton, FL: CRC Press; 1997. [23] Van Veldhuizen DA, Lamont GB. Multiobjective evolutionary algorithms: analyzing the state-of-the-art. Evol Comput 2000;8:125–47. [24] Sayyaadi H, Aminian HR. Design and optimization of a non-TEMA type tubular recuperative heat exchanger used in a regenerative gas turbine cycle. Energy 2010;35:1647–57. [25] Bellman R. On the theory of dynamic programming. Proc Natl Acad Sci U S A 1952;38:716. [26] Cormen T, Leiserson CE, Rivest R, Stein C. SC Introduction to algorithms. USA: The MIT Press; 2001. [27] Bank B, Guddat J, Klatte D, Kummer B, Tammer K. Non-linear parametric optimization. Basel AG: Springer; 1982. [28] Guddat J, Vazquez FG, Jongen HT. Parametric optimization: singularities, pathfollowing and jumps. Fachmedien Wiesbaden: Springer; 1990. [29] Sohani A, Sayyaadi H, Azimi M. Employing static and dynamic optimization approaches on a desiccantenhanced indirect evaporative cooling system. Energ Conver Manage 2019;199:112017. [30] Ealey LA. Quality by design: Taguchi methods and US industry. Dearborn, Michigan: ASI Press; 1988. [31] Vieira L, Donatelli J, Cruz M. Integration of a mathematical exergoeconomic optimization procedure with a process simulator: application to the CGAM system. Rev Engen Term 2005;4:163–72. [32] Vieira LS, Donatelli JL, Cruz ME. Mathematical exergoeconomic optimization of a complex cogeneration plant aided by a professional process simulator. Appl Therm Eng 2006;26:654–62. [33] Vieira LS, Donatelli JL, Cruz ME. Exergoeconomic improvement of a complex cogeneration system integrated with a professional process simulator. Energ Conver Manage 2009;50:1955–67. [34] Sayyaadi H. Multi-objective approach in thermoenvironomic optimization of a benchmark cogeneration system. Appl Energy 2009;86:867–79. [35] Sayyaadi H, Babaie M, Farmani MR. Implementing of the multi-objective particle swarm optimizer and fuzzy decision-maker in exergetic, exergoeconomic and environmental optimization of a benchmark cogeneration system. Energy 2011;36:4777–89. [36] Sayyaadi H, Sabzaligol T. Exergoeconomic optimization of a 1000 MW light water reactor power generation system. Int J Energy Res 2009;33:378–95. [37] Sayyaadi H, Sabzaligol T. Various approaches in optimization of a typical pressurized water reactor power plant. Appl Energy 2009;86:1301–10. [38] Hosseinzade H, Sayyaadi H. CAFS: the combined adiabatic–finite speed thermal model for simulation and optimization of Stirling engines. Energ Conver Manage 2015;91:32–53.

C H A P T E R

7 Decision-making in optimization and assessment of energy systems 7.1 Preface In energy engineering, there are many instances that a system must be selected among similar potential systems, or an optimal solution of a system must be chosen from a set of optimal solutions. In Chapter 6, in case of multiobjective optimization problems, it was discussed that instead of having an optimal solution of single-objective problems, there is a set of optimal solutions, namely Pareto optimal frontier, that contains many or infinite number of solutions. All solutions located on Pareto front are equivalent from the optimization point of view, and none of them dominate other solutions. In practical application, such as the case of multiobjective optimization of energy systems, it is impossible to deal with numerous solutions, and one optimal solution must be selected for the optimal condition of the energy system. On the other hand, there are cases in energy engineering that designers must choose one system among several alternatives. In such cases, decision-making tools must be used to select one system or one solution among potential systems or solutions. Several decision-making tools have been developed that select one system or solution among many based on different criteria or objective functions. Some methods consider equivalent weigh for all criteria or objective functions; however, there are other methods that use weight factors for different criteria. Therefore, this chapter is dedicated to introduce decision-making methods for the aforementioned purposes. Both methods that consider equivalent weigh for criteria and those methods that work based on different weights of criteria are discussed. Discussed methods can be encoded into a form of computer code; however, for small decision-making processes, in some methods, calculations can also be performed by hand calculation. There is also software for decision-making that is introduced in this chapter.

Modeling, Assessment, and Optimization of Energy Systems https://doi.org/10.1016/B978-0-12-816656-7.00007-5

431

# 2021 Elsevier Inc. All rights reserved.

432

7. Decision-making in optimization and assessment of energy systems

7.2 Outline After prefacing of this chapter and its outline that are given in Sections 7.1 and 7.2, LINMAP decision-making, which is abbreviated from linear programming techniques for multidimensional analysis preference, is provided in Section 7.3. This is a straightforward decision-making model that works based on the equal weight of decision criteria. The Technique for Order Preference by Similarity to Ideal Situation, also known as TOPSIS, is a similar method to LINMAP that is discussed in Section 7.4. Section 7.5 is dedicated to a fuzzy-based method called fuzzy Bellman-Zadeh. This method also works based on equal weights of decision criteria. In Section 7.6, methods that work according to the different weights of criteria are discussed. Analytical Hierarchy Process known as AHP method as one of this kind of method is described in Section 7.7. The combined fuzzy and AHP methods, that is, fuzzy AHP is also introduced in this section. A decision-making software called Expert Choice is introduced in Section 7.8. Some case studies are given in Section 7.8. Summary and exercises for this chapter are given in Sections 7.9 and 7.10, respectively.

7.3 LINMAP method One standard decision-making method that is used in combination with multiobjective optimization problems and other decision problems is from linear programming techniques for multidimensional analysis preference called LINMAP method. In LINMAP method, an ideal solution or alternative is a hypothetical solution and systems that have all criteria or objectives at the best possible feature. For example, in a two-objective optimization problem, the ideal solution is a hypothetical solution that its two objectives are at their own optimized value regardless of another one. Suppose that the objectives of two-objective optimization, f1 and f2, are two conflicting objectives that must be minimized. Conflicting between these two objectives means that when one objective is reduced, the other one increases and vice versa. Therefore, it is impossible to have both objectives at their minimum possible values at the same time. The ideal solution is an imaginary solution that cannot exist in the real world. For this solution, bot objectives are at their minimum values simultaneously. The value of each objective at the ideal solution is equal to the minimized value of that objective if another objective is neglected. Pareto optimal solution contains a set of solutions that are not as optimistic as the ideal solution. For solutions located on this front, when one objective is the minimum, the other one is at maximum. This shows two extremes on the Pareto front in which in one extreme f1 ¼ f1,min and f2 ¼ f2,max and for another extreme, the case is vice versa, that is, f1 ¼ f1,max and f2 ¼ f2,min. For other solutions of the Pareto front, the condition is somewhat between these two extremes. Hence, there is no solution on the Pareto front in which at the same time we have: f1 ¼ f1,min and f2 ¼ f2,min. Hence, the ideal solution cannot be located on the Pareto front for any real system. Fig. 7.1 schematically shows a Pareto front of a two-objective optimization problem. The ideal solution and two extremes of the Pareto front are indicated in this figure.

433

7.3 LINMAP method

FIG. 7.1 A typical Pareto front in twoobjective space and definition of the ideal solution when two objectives must be minimized, simultaneously.

In LINMAP method, the nearest solution of the Pareto front to the ideal point is selected as the final selected solution. However, since different objectives may have different units, before doing this process, all objectives must be nondimensioned. Three methods are available for nondimensioning objective functions (or criteria in decision problems). These methods are linear nondimensioning, Euclidian nondimensioning, and fuzzy nondimensioning. If the index i (i ¼ 1, 2, …, n) is given for each individual solution on Pareto front (or alternative in decision problems) and j is index given for objective functions or criteria (j ¼ 1, 2, …, m), we have: • Linear nondimensioning

^f ¼ ij

8 fij > >   For maximizing objective ðcriteriaÞ > > > < max fij > > > > > :

(7.1) 1=fij   For minimizing objective ðcriteriaÞ min 1=fij

• Euclidian nondimensioning

^f ¼ " ij

fij n  X i¼1

fij

2

#0:5 For maximizing=minimizing objective ðcriteriaÞ

(7.2)

434

7. Decision-making in optimization and assessment of energy systems

• Fuzzy nondimensioning    8 fij  min fij > >     For maximizing objective ðcriteriaÞ > > < max fij  min fij ^f ¼     ij > > max fij  fij > >     For minimizing objective ðcriteriaÞ : max fij  min fij

(7.3)

If, for the sample two-objective problem, nondimensional objectives are denoted by ^f 1 and ^f , the principle of the LINMAP method is schematically depicted in Fig. 7.2. 2 What presented graphically in Fig. 7.2 must be expressed mathematically since, in many cases, the number of objectives or criteria is more than three, the graphical method is not practical for such decision problems. Mathematically, the LINMAP method consists of the following steps: 1. In the first step, objectives or criteria must be nondimensioned. It is usually performed by Euclidian nondimensioning in LINMAP. 2. The ideal solution in which all objectives or criteria are at their best value is obtained. It is a vector where its dimension is equal to the number of objective functions (criteria), that is, h ideal ideal i ideal T ideal . The magnitude of each element of ^f j can be m. Therefore, Fideal ¼ ^f 1 ^f 2 … ^f m found when the jth objective function is optimized while other objectives are not considered. It can also be obtained if the best values of each vector of jth objective among all solutions h iT ideal ideal (i ¼ 1, 2, …, n), that is, Fj ¼ ^f 1 ^f 2 … ^f n are dedicated to ^f j . In a decision problem, ^f j

is the best value of ^f j among all alternatives (i ¼ 1, 2, …, n). 3. The spatial distance of each solution (alternative) in the nondimensioned space of objective from the ideal point is determined. If di denotes the spatial distance of the

FIG. 7.2 Graphical representation of LINMAP decision-making in nondimensioned space of two objectives.

435

7.3 LINMAP method

ith solution (alternative) from the ideal point, it can be calculated from the following equation: 2

30:5 m   X ideal 2 ^f  ^f 5 di ¼ 4 j ij

(7.4)

j¼1

4. The final selected solution or alternative is the one that has minimum spatial distance, that is, min (di); i ¼ 1, 2, …, n. Example 7.1 In a decision problem, It is intended to select one energy system among six alternatives with three criteria: the cost in US $ (criterion A), efficiency (criterion B), and NOx emission in ppm (criterion C). The specifications of six alternatives for three criteria are indicated in Table 7.1. If criteria are nondimensioned, by LINMAP method, find the best alternative among cases 31 to #6. Solution The ideal case for criteria A and C is the minimum cost and emission, while for criterion B is the maximum efficiency. Therefore, the best values for criteria A and C are 129,300 $ and 18.5 ppm. For criterion B, the best value is 0.85. Therefore, the cost, efficiency, and emission of the ideal solution (ideal point) are 129,300 $, 0.85, and 18.5 ppm, respectively. Steps #1 and #2: In this stage, criteria are nondimensioned using the Euclidian method by Eq. (7.2). Then we have: Steps #3 and 4: In this stage, the spatial distance of each solution (alternative) in the nondimensioned space of objective from the ideal point is determined from Eq. (7.4). The result is given in the last TABLE 7.1

Values of all criteria for alternatives of Example 7.1.

Alternative

Criterion A (Cost $)

Criterion B (Efficiency)

Criterion C (Emission ppm)

1

163,000

0.77

23.0

2

152,000

0.75

25.0

3

139,500

0.68

32.0

4

141,700

0.72

38.0

5

129,300

0.65

20.0

6

187,900

0.85

18.5

436

7. Decision-making in optimization and assessment of energy systems

TABLE 7.2 Nondimensioned criteria and distance of each alternative from the ideal condition in Example 7.1. Alternative

Criterion A (f^A )

Criterion B (f^B )

Criterion C (f^A )

di

1

0.4337

0.4251

0.3482

0.1209

2

0.4045

0.4140

0.3784

0.1280

3

0.3712

0.3754

0.4844

0.2265

4

0.3770

0.3975

0.5752

0.3056

5

0.3441

0.3588

0.3027

0.1127

6

0.5000

0.4692

0.2800

0.1559

Ideal

0.3441

0.4692

0.2800

0.0000

column of Table 7.2. The minimum di is 0.1127, which belongs to alternative #5, which is bolded in the table. Therefore, the selected alternative is system #5. This calculation for distance using Eq. (7.4) can be easily programmed in Microsoft Excel. The aforementioned example was given for a small decision problem. A similar calculation can be performed for decision-making using LINMAP in multiobjective optimization in Microsoft Excel environment where vectors of criteria are replaced with vectors of solutions on each objective. Combining all vectors for m objectives, a matrix in the following form is obtained: 2^ ^ 3 f 11 f 12 … ^f 1m 6 7 ^ ¼ 6 ^f 21 ^f 22 … ^f 2m 7 F (7.5) 4… … … … 5 ^ ^f ^f n1 n2 … f nm

7.4 TOPSIS method The Technique for Order Preference by Similarity to Ideal Situation, also known as TOPSIS, is another generation of the LONMAP method, which was developed based on a similar basis. In TOPSIS besides the ideal solution, a nondesirable point that is the worst condition is considered and called the nonideal solution or point. The nonideal solution is another hypothetical solution that has the worst value of criteria (objective functions). For the sample twoobjective problem, if two minimizing objectives in the nondimensional form are ^f 1 and ^f 2 , for h i the nonideal solution, we have Fnonideal ¼ ^f 1, max ^f 2, max . For the ideal solution in h i LINMAP, we had Fideal ¼ ^f 1, min ^f 2, min . Fig. 7.3 schematically shows a Pareto front of a two-objective optimization problem and the ideal and nonideal solutions. In LINMAP, a solution that has the minimum spatial distance from the ideal solution in nondimensioned objectives’ space is considered as the final selected solution. In TOPSIS, a

7.4 TOPSIS method

437

FIG. 7.3 A typical Pareto front in two-objective space and definition of the ideal and nonideal solutions when two objectives must be minimized, simultaneously.

solution that has minimum spatial distance to the ideal solution and maximum spatial distance from the nonideal solution is considered as the final solution. Therefore, it works based on a factor that is determined based on the combination of these two parameters (closest distance to ideal and maximum distance to nonideal solutions). Mathematically, the TOPSIS method consists of the following steps: 1. In the first step, objectives or criteria must be nondimensioned. It is usually performed by Euclidian nondimensioning in TOPSIS. 2. The ideal and nonideal solutions in which all objectives or criteria are at their best and worst values are obtained, respectively. These are vectors where their dimension is equal to the number of objective functions (criteria), that is, m. Therefore, h iT h iT ideal ^f ideal … ^f ideal and Fnonideal ¼ ^f nonideal ^f nonideal … ^f nonideal . These Fideal ¼ ^f 1 2 m 1 2 m hypothetical solutions are obtained if the best and worst values of each vector of jth h iT objective among all solutions (i ¼ 1, 2, …, n), that is, Fj ¼ ^f 1 ^f 2 … ^f n are dedicated to ^f ideal and ^f nonideal . In decision problems, ^f ideal and ^f nonideal are the best and worst values of ^f j j j j j among all alternatives (i ¼ 1, 2, …, n), respectively. 3. The spatial distance of each solution (alternative) in the nondimensioned space of objective from the ideal point and nonideal solutions are determined. If d+i and d i denote the spatial distances of the ith solution (alternative) from the ideal and nonideal points, these parameters are obtained from the following equations: 2

30:5 m  2 X ideal ^f  ^f 5 di+ ¼ 4 ij j j¼1

(7.6a)

438

7. Decision-making in optimization and assessment of energy systems

2

30:5 m  2 X nonideal ^f  ^f 4 5 d i ¼ j ij

(7.6b)

j¼1

4. Nondimensional criteria of distances from the ideal and nonideal solutions are obtained from the following equation:

ci ¼

d i di+ + d i

(7.7)

5. The final selected solution or alternative is the one that has a maximum value of ci, that is, max (ci); i ¼ 1, 2, …, n. Example 7.2 Repeat Example 7.1 with the TOPSIS method. Solution Ideal values for criteria A, B, and C is the minimum were 129,300 $, 0.85, and 18.5 ppm. The nonideal case of this criterion contains the worst value of criteria among six alternatives, that is, 187,900 $, 0.65, and 38.0 ppm, respectively. The calculation is performed based on the procedure given for TOPSIS, and results are summarized in Table 7.3. Results are given in the last column of the Table 7.3. The maximum ci is 0.7359, which belongs to alternative #5, which is bolded in the table. Therefore, again, the selected alternative is system #5, too. In this case, Both LINMAP and TOPSIS selected the same alternative. In some problems, these two methods might choose different solutions.

TABLE 7.3 Nondimensioned criteria and distance of each alternative from the ideal condition in Example 7.2. Alternative

Criterion A (f^A )

Criterion B (f^B )

Criterion C (f^A )

d+i

d2 i

ci

1

0.4337

0.4251

0.3482

0.1209

0.2456

0.6701

2

0.4045

0.4140

0.3784

0.1280

0.2256

0.6381

3

0.3712

0.3754

0.4844

0.2265

0.1585

0.4116

4

0.3770

0.3975

0.5752

0.3056

0.1289

0.2967

5

0.3441

0.3588

0.3027

0.1127

0.3139

0.7359

6

0.5000

0.4692

0.2800

0.1559

0.3151

0.6691

Ideal

0.3441

0.4692

0.2800

0.0000

1.0000

1.0000

Non-Ideal

0.5000

0.3588

0.0001

1.0000

0.0000

0.0000

7.5 Fuzzy Bellman-Zadeh method

439

7.5 Fuzzy Bellman-Zadeh method Fuzzy Bellman-Zadeh is a fuzzy decision-making method that was invented in 1970 by Bellman and Zadeh [1]. This method works based on a fuzzy membership function that is allocated to each alternative or solution. If the best optimistic option (ideal solution) is indicated by 1.0 and the worst condition (nonideal solution) is indicated by 0.0, the ith alternative has a membership function denoted by μi in which, 0  μi  1.0 (i ¼ 1, 2, …, n). Then for all solutions or alternatives, a vector of the membership function is obtained, that is, Μ ¼ ½ μ1 μ2 … μn T . The best alternative among n alternatives is that alternative, which has the biggest fuzzy membership function, that is maxμi for i ¼ 1, 2, …, n. Therefore, then using the Bellman–Zadeh approach, each fj(X) is replaced by a fuzzy objective function or a fuzzy set as follows [2]:  (7.8) Aj ¼ X, μAj ðXÞ j ¼ 1, 2,…, m where μAj(X) is a membership function of Aj. A final decision is defined by the Bellman and Zadeh model as the intersection of all fuzzy criteria and constraints and is represented by its membership function. A fuzzy solution D with setting up the fuzzy sets as per Eq. (7.7) is turned out as a result of the intersection D ¼ \kj¼1Aj with a membership function. Accordingly, we have: μ i ðX Þ ¼ \ m j¼1 μAj ðX Þ ¼ min μAj ðX Þ j¼1, :…, m

(7.9)

Using Eq. (7.9), it is possible to obtain the solution proving the maximum degree as follows:   (7.10) max μi ðXÞ ¼ max min μAj ðXÞ j¼1, :…, m To obtain Eq. (7.10), it is necessary to build membership functions μAj(X ), j ¼ 1, 2, …, m we have [3]: For minimized objective functions 8 0 if fi ðXÞ > fimax , > > > > < f max  f i i if fimin < fi  fimax , (7.11a) μAi ðXÞ ¼ > fimax  fimin > > > : 1 if fi ðxÞ  fimin For maximized objective functions 8 1 if fi ðXÞ > fimax , > > > > < f  f min i i if fimin < fi  fimax , μAi ðXÞ ¼ max > f  fimin > i > > : 0 if fi ðxÞ  fimin

(7.11b)

where fimin ¼ min fj ðXi Þ , i ¼ 1, :…,n j

fimax ¼ max fj ðXi Þ , i ¼ 1, :…, n j

(7.11c)

440

7. Decision-making in optimization and assessment of energy systems

Calculation steps of the fuzzy Bellman-Zadeh decision-making can be summarized in the following steps. 1. Fuzzy membership functions of all solutions (alternatives) for all objective functions (alternatives) are calculated from Eq. (7.11a) or (7.11b) (depending on the type of criteria or objective function), and the following matrix of membership functions is obtained. 2

μ11 6 μ21 Μ¼6 4… μn1

μ12 μ22 … μn2

… … … …

3 μ1m μ2m 7 7 …5 μnm

(7.12)

2. For each row of the matrix indicated by Eq. (7.12), the minimum membership function is found and is dedicated to each solution or alternative. It gives the following vector of the minimum membership function for each solution (alternative):  T Μmin ¼ μ1, min μ2, min … μn, min where μi, min ¼ min ðμ1i , μ2i , …, μmi Þ

(7.13)

3. The selected alternative or solution is that alternative which has the maximum value in the vector given by Eq. (7.13); therefore, we have:   μ min , jmax ¼ μ min , max ¼ max μ1, min , μ2, min , …, μn, min ) jmax is the index for selected altenative

(7.14)

• Implementing weight factors for criteria The described fuzzy Bellman-Zadeh method was given when the same weight for all criteria (objective functions) is considered. It is possible to consider different weight factors for each criterion as follows: W ¼ ½ ω1 ω2 … ωm T

(7.15)

It is not necessary that the sum of these weight factors is equal to one. This only shows the order of priority of each criterion compared to others. When all criteria have the same priority, we have: ω1 ¼ ω2 ¼ … ¼ ωm ¼ 1, but it is possible to have, for example, criteria.

7.5 Fuzzy Bellman-Zadeh method

441

When different weighs are considered for criteria (objective functions), their membership functions must be multiplied into the corresponding weight factor of the related criterion as follows: 2

μω11 6 μω21 Μ¼6 4… μωn1

μω12 μω22 … μωnn

… … … …

3 μω1m μω2m 7 7 …5 μωnm

(7.16)

where

1 μωij ¼ μ ωj ij

Example 7.3 Repeat Example 7.1 with the fuzzy Bellman-Zadeh method for two cases: (a) same weight factor is considered for each criterion, (b) the weight factors of criterion are W ¼ [ωA, ωB, ωC ] ¼ [3, 2, 1]. Solution For criteria A and C which their least values are desirable, the membership function is calculated by Eq. (10.7a). For criterion B that must be maximized, the membership function is determined using Eq. (10.7b). For the three criteria, we have: ( A: ( B: ( C:

fA, min ¼ 129300$

fA, max ¼ 187900$

fB, min ¼ 0:65

fB, max ¼ 0:85

) μA, i ¼

) μB, i ¼

fC, min ¼ 18:5ppm

fC, max ¼ 38:0ppm

187900  fA, i 187900  fA, i ¼ 187900  129300 58600

fB,i  0:65 fB, i  0:65 ¼ 0:85  0:65 0:20

) μC, i ¼

38:0  fC, i 38:0  fC, i ¼ 38:0  18:5 19:5

(a) Therefore, the matrix of fuzzy membership function of criteria, the vector of minimum membership function, and the maximum element of the minimum vector are as follows: 2 A #1 0:425 6 #2 6 0:613 6 0:826 6 Μ ¼ #3 6 0:788 #4 6 6 #5 4 1:000 #6 0:000

B 0:600 0:500 0:150 0:350 0:000 1:000

C 3 3 2 0:769 #1 0:425 7 7 0:667 7 #2 6 6 0:500 7 6 0:150 7 0:308 7 7 #3 7)μ 6 7 ) Mmin ¼ min , max ¼ 0:500 ) Alternative#2 is 7 6 0:000 7 #4 6 0:000 7 7 5 4 #5 0:000 0:923 5 #6 0:000 1:000

selected:

It is seen that using fuzzy Belman-Zadeh, a different alternative (alternative #2) than what selected by LINMAP and TOPSIS (alternative #5), is selected.

442

7. Decision-making in optimization and assessment of energy systems

(b) Considering different weights for criteria (W ¼ [ωA, ωB, ωC ] ¼ [3, 2, 1]), we have:

2 A #1 0:142 6 #2 6 0:204 6 0:275 6 Μ ¼ #3 6 0:263 #4 6 6 #5 4 0:333 #6 0:000

B 0:300 0:250 0:075 0:175 0:000 0:500

C 3 2 3 0:769 #1 0:142 7 0:667 7 #2 6 7 6 0:204 7 6 0:308 7 7 #3 6 0:075 7 7)μ 7 ) Mmin ¼ min , max ¼ 0:204 ) Alternative #2 is 6 7 0:000 7 #4 6 0:000 7 7 4 5 #5 0:000 0:923 5 #6 0:000 1:000

selected:

7.6 AHP and fuzzy-AHP methods As the relationships used in the TOPSIS and LINMAP methods show, these two decisionmaking approaches to selecting the optimal endpoint do not prioritize any of the target functions relative to each other and do not consider all of them to be equally important. If the planner is interested in considering the degree of different importance for the objective functions, the hierarchical method is one of the best options. This method is developed by Saaty [4]. Another class of AHP method is the fuzzy-AHP method that resolves uncertainties of the linguistic judgment of the ordinary AHP. In this section, AHP and fuzzy-AHP decisionmaking are discussed.

7.6.1 Conventional AHP method In this method, the criteria that are important in selecting the final optimal point are determined, and their importance to each other is obtained through pairwise comparisons. These pairwise comparisons are performed using the suggested numbers (Saaty’s scale) given in Table 7.4. TABLE 7.4 The proposed scale for pairwise comparison of criteria. Value

Judgment

1

Equal importance

3

Moderate importance

5

Strong importance

7

Very strong importance

9

Extreme importance

Even intermediate scale (2, 4, 6, 8)

The level of importance is between the lower and upper odd scales

7.6 AHP and fuzzy-AHP methods

443

The analytical hierarchical process or AHP decision-making method consists of the following steps: 1. In the beginning, the criteria that are important for selecting the final option are determined. 2. Then, the subcriteria are defined for each of the criteria (of course, if any). For example, in an optimization, two functions, NOX, and CO2, maybe minimized as two functions in optimization. A criterion called environmental pollution can be defined, and both of these criteria can be considered as subcriteria of pollution. 3. Next, using the proposed scale, the degree of importance of the two members in comparison to each other is determined by comparison. In general, there are three types of comparisons in the hierarchical method: options for each of the subcriteria, subcriteria for each of the criteria, and criteria for the main goal, which is to select the final optimal point. Of course, if there is no subcriterion, the options are compared to each of the criteria for which the subcriterion is intended. Also, it should be noted that if the degree of importance A to B is equal to wAB, it is evident that the degree of importance of B to A in the matrix comparison pair will be wBA ¼ 1=wAB . Expert opinions should be used to make the right couple comparisons and reach the right final choice. If more than one expert wants to compare two similar members, there are two possibilities. The first possibility is that they will agree. Another possibility is the disagreement; in such a case, it is suggested that each judge (expert) announce his or her judgment and then, using the geometric mean, the final result of the comparison be obtained. wj ¼

N Y

!1

N

wij

(7.17)

i¼1

where N, i, and w are the number of experts, the index for each expert, and the weight factor, respectively. It should be noted that only pairwise matrix comparisons are accepted that have a low incompatibility index. This index is introduced at the end of this section. 4. Then, using mathematical operations of matrices, a number is obtained for each of the options as an index of preference. Obviously, the option with the highest preference index is selected as the final option. If the general form of the pairwise comparison matrix is as follows: 2 3 1 a12 … a1n 6 a21 1 … a2n 7 7 A¼6 4 ⋮ ⋮ ⋱ ⋮ 5 an1 an2 … 1

(7.18)

The weight factors are calculated from the following procedure: (i) In the first step, the sum of elements of each row of the matrix A is obtained as follows: si ¼

n X j¼1

aij i ¼ 1, 2,…, n

(7.19a)

444

7. Decision-making in optimization and assessment of energy systems

(ii) Elements of the matrix A are normalized by the following equation: ¼ rnormal ij

aij si

(7.19b)

(iii) Weight of each alternative is obtained from the following equation: n X

wi ¼

rnormal ij

i¼1

n

(7.19c)

(iv) The weight obtained for each option is multiplied by the criterion on which the pairwise comparison matrix of options is based, and the local weights of each option are obtained relative to each subcriterion. Then, the local weights obtained in the matrix of the corresponding standard weight are multiplied. If the weight of ith alternative related to the jth criterion is denoted by wij and the weight of the jth criterion is wj, the preference index for each alternative is obtained from the following expression: wi ¼

m X

wij  wj

(7.19d)

j¼1

As can be seen, in this method, comparisons and calculations are started from the options, and the process is followed by following the subcriteria, criteria, and goal. Thus, the problem of decision-making with this method can be shown as a tree structure, according to Fig. 7.4. Based on this and the mentioned explanations, finding the best answer is done through hierarchical comparisons and calculations. It is known as the hierarchy.

FIG. 7.4 Schematic of the hierarchical tree in AHP decision-making process.

7.6 AHP and fuzzy-AHP methods

445

• Checking the inconsistency index in AHP decision-making As it turns out, the accuracy of the decision-making process of the hierarchical chain has an intense and direct relationship with couple comparisons. The process of pairwise comparisons is a process performed by individuals, and since the human error may occur in any human activity, the degree of human error of the pairwise comparison matrix should be examined, and the matrixes with the high human error corrected. For this purpose, an indicator called the incompatibility index is proposed and examined by the watch. The main idea of the incompatibility index is that if, for example, in comparison, A with respect to B has a value of 4 and B with respect to C has a value of 2, the value of significance of index A with respect to C should be proportional to the previous two comparisons. If the value of this comparison does not match the previous two comparisons, the incompatibility index will start to increase, and the greater the difference, the higher the incompatibility index will be. If the pairwise comparison matrix, A, is given by Eq. (7.18), the inconsistency index is calculated from the following procedure: 1. First of all, based on step #4 of the AHP process, the vector of weight factor that its elements are calculated from Eq. (7.19d). 2. Then, using matrix A and a weight vector, W, the weight sum vector of the matrix A is calculated as follows: 2

3 2 3 WSV 1 w1  1 + w2  a12 + … + wn  a1n 6 w1  a21 + w2  1 + … + wn  a2n 7 6 WSV 2 7 7¼6 7 WSV ¼ AW ¼ 6 4 5 4 ⋮ 5 ⋮ w1  an1 + w2  an2 + … + wn  1 WSV n

(7.20)

3. The consistency vector is obtained by dividing elements of weight sum vector to the corresponding weight of the element as follows: 2

3 WSV 1 3 6 w1 7 2 CV 1 6 7 6 7 6 7 6 WSV 2 7 6 6 7 6 CV 2 7 7 7 CV ¼ 6 7 6 w2 7 ¼ 6 6 7 ⋮ 6 7 4 5 6 ⋮ 7 6 7 CV n 4 WSV n 5

(7.21)

wn 4. The average of the elements of the vector, CV, is calculated as follows: CV ave ¼

CV 1 + CV 2 + ⋯ + CV n n

(7.22)

446

7. Decision-making in optimization and assessment of energy systems

5. The consistency index is obtained from the average value obtained in step #4 and the dimension of the matrix A, that is, n is as follows: CI ¼

CV ave  n n1

(7.23)

6. Finally, the inconsistency matrix is obtained. If the inconsistency index is less than 0.1, judgments are approved. Otherwise, judgments must be improved until this condition is met. The inconsistency index is given as follows: ICR ¼

CI RI

(7.24)

where RI is called the random inconsistency parameter. Depending on the dimension of the matrix A, this parameter is given in Table 7.5. More details regarding AHP decision-making method can be found in Ref. [5].

7.6.2 Fuzzy-AHP method In the conventional AHP method [4], linguistic comparison of criteria is converted into a pairwise comparative matrix. The element of this matrix,aij, is obtained by comparing the ith to jth criteria. Due to uncertainty in converting linguistic judgments of expression into numeral values as in Table 7.4, a new class of AHP called the fuzzy-AHP method was developed [6–9]. The functional principles of the fuzzy-AHP method are exactly the same as the hierarchical method described, except that instead of a definite number, a fuzzy number is used using the Saati’s criterion to express the degree of importance in the pairwise comparison matrix. Among the various forms used to express fuzzy numbers, the use of a triangular fuzzy number to express comparisons is the most common form, where the same form is used. Triangular fuzzy numbers are shown in the form of (a1, a2, a3) that is schematically shown in Fig. 7.5 and expressed mathematically by Eq. (7.25). 8 0 x  a1 > > > > x  a > 1 > > < a  a a1  x  a2 2 1 (7.25) μeðxÞ ¼ A a  x > 3 > > a2  x  a3 > > a3  a2 > > : 0 a3  x For example, if the value of A is relative to B as (5, 4, 3), it means that instead of a definite number, the importance is expressed as a triangular fuzzy number with uncertainty, which is TABLE 7.5 The random inconsistency parameter based on the number of rows of the matrix A. n

1

2

3

4

5

6

7

8

RI

0

0.58

0.90

1.12

1.24

1.32

1.41

1.45

7.6 AHP and fuzzy-AHP methods

447

FIG. 7.5 Triangular fuzzy number.

the highest degree of membership. Its elements are related to the number 4. In other words, the designer believes that the degree of importance is between 3 and 5, where the percentage of certainty begins to increase linearly from 3, reaches its maximum value in 4, and then decreases linearly to 5. A different class of the fuzzy-AHP decision-making has been developed so far that can be found in related literature. Among them, two methods, minimum logarithmic square root (MLSR) and Wang method, are introduced. • Minimum logarithmic square root method, MLSR: In this method, judgment matrixes are developed based on the triangular fuzzy number. Then using extended AHP method of Graan [10] and the usage of the logarithmic regression method of Lootsma [11], the evaluation of fuzzy weight is given. In this method, it is possible to have different judgments of different experts, and the judgment matrix is provided in the following form: 2 0 1 0 1 3 a1n1 a121 6 B C B C 7 6 ð1, 1, 1Þ @ a122 A ⋯ @ a1n2 A 7 6 7 ⋮ ⋮ 6 a12P12 a1nP1n 1 7 60 7 1 0 6 a211 7 a2n1 6 7 6 B a212 C B a2n2 C 7 [email protected] 7 ð Þ 1, 1, 1 ⋯ A @ A ⋮7 (7.26) 6 ⋮ ⋮ 6 7 a2nP2n 6 a21P21 7 6 7 ⋮ 60 ⋮ 1 0 ⋮ 1 ⋮ 7 6 an11 7 an21 6 7 6 B an12 C B an22 C 7 A @ A ⋯ ð1, 1, 1Þ 5 [email protected] ⋮ ⋮ an1Pn1 an2Pn2 In this matrix, aijPij is the priority of ith factor to jth factor that is judged by an expert person indexed as Pij in the form of a triangular fuzzy number, that is, aijPij ¼ (Lij, Mij, Uij).

448

7. Decision-making in optimization and assessment of energy systems

When no expert reports his judgment, the relevant element is considered to be zero. When more than one person reports their judgment, Pij > 1. Then following expressions are presented: 2 3 Pij n n n X X X X   Pij 5  Pij Uj ¼ ln Lijk Li 4 (7.27a) j¼1, j6¼i j¼1, j6¼i j¼1, j6¼i k¼1 2 3 Pij n n n X X X X   Pij 5  Pij Mj ¼ ln Mijk (7.27b) Mi 4 j¼1, j6¼i j¼1, j6¼i j¼1, j6¼i k¼1 2 3 Pij n n n X X X X   Pij 5  Pij Lj ¼ ln Uijk Ui 4 (7.27c) j¼1, j6¼i j¼1, j6¼i j¼1, j6¼i k¼1 Since ln(Lijk) and ln(Uijk) are lower and upper bounds of ln(aijk), we have: ln(aijk) ¼ ln (ajik); therefore, we must have ln(Lijk) + ln (Ljik) ¼ ln (Uijk) + ln (Ujik). Therefore, Eq. (7.27a) and (7.27c) are linearly dependent. System of linear equations that are given by Eqs. (7.27a)–(7.27c) is solved. Then the normalized weight is obtained in the following form: rij ¼ Wi ¼ ½ðλ1 exp ðLi ÞÞ, ðλ2 exp ðMi ÞÞ, ðλ3 exp ðUi ÞÞ where

" λ1 ¼ " λ2 ¼

4 X

" λ3 ¼

# exp ðUi Þ

1

exp ðmi Þ

1

i¼1 4 X

¼ 0:1067

(7.28b)

¼ 0:1304

(7.28c)

¼ 0:1416

(7.28d)

#

i¼1 4 X

(7.28a)

# exp ðLi Þ

1

i¼1

The final weight of each alternative is obtained from the following equation: Ui ¼

m X

wj rij

(7.29)

j¼1

Therefore, this method consists of the following steps: 1. The hierarchical tree of alternative and criteria similar to Fig. 7.4 are drawn. 2. The related pairwise matrix of alternatives and criteria are formed according to the judgment of different expert in the form of Eq. (7.26).

7.6 AHP and fuzzy-AHP methods

449

3. The initial weights are calculated by solving the system of linear equations that are given by Eqs. (7.27a)–(7.27c). 4. Normalized weights are obtained using Eqs. (7.28a)–(7.28d). 5. The final weights of alternatives are calculated by Eq. (7.29).

• Wang method: One of the most recent methods of fuzzy-AHP methods was introduced by Wang et al. [12], who developed their methods to solve the shortcomings of early fuzzy AHPs. Among the shortcomings of early methods, inaccuracy in the normalization of local fuzzy weights, infeasibility in deriving the local fuzzy weights of a fuzzy comparison matrix when the lower bound value of a nonnormalized fuzzy weight is higher than its upper bound value, the uncertainty of local fuzzy weights for incomplete fuzzy comparison matrices, and unreality of global fuzzy weights can be pointed out. In this regard, a modified fuzzy LLSM has been introduced to calculate local and global weights in a way that the aforementioned shortcomings do not appear [12]. This method is formulated as a constrained nonlinear optimization model. Also, it can directly derive normalized triangular fuzzy weights for both complete and incomplete triangular fuzzy comparison matrices; thus, it is suggested to tackle all the aforementioned problems. In this regard, an objective function is constructed based on the logarithmic least square difference of weights and fuzzy arrays of judgment matrix and this objective function is minimized, while local fuzzy weights, aijk, are considered as decision variables (k is the index for the number of judgment matrix). Using optimization algorithms such as the genetic algorithm, the objective function (LLSM: logarithmic least square method) is minimized, and local fuzzy weights are computed. Pairwise judgment matrix in this method is given according to the following format: 2 6 ð1, 1, 1Þ 6 6 6 6 6 0 ðl , m , u Þ 1 6 211 211 221 6 B ðl , m , u Þ C [email protected] 212 212 212 A 6 ⋮ 6 6 ðl 21δ12 , m21δ12 , u21δ12 Þ 6 6 ⋮ 1 60 ðln11 , mn11 , un11 Þ 6 6 6 B ðln12 , mn12 , un12 Þ C A [email protected] ⋮ ðln1δ12 , mn1δ12 , un1δ12 Þ

1 0 1 3 ðl121 , m121 , u121 Þ ðl1n1 , m1n1 , u1n1 Þ B ðl122 , m122 , u122 Þ C B ðl1n2 , m1n2 , u1n2 Þ C 7 @ A ⋯ @ A 7 7 ⋮ ⋮ 7 ðl12δ12 , m12δ12 , u12δ12 Þ ðl1nδ12 , m1nδ12 , u1nδ12 Þ 7 1 7 0 ðl2n1 , m2n1 , u2n1 Þ 7 B ðl2n2 , m2n2 , u2n2 Þ C 7 ð1, 1, 1Þ ⋯ @ A ⋮7 7 ⋮ 7 7 ðl2nδ12 , m2nδ12 , u2nδ12 Þ 7 7 ⋮ ⋮ 0 1 ⋮ 7 ðln21 , mn21 , un21 Þ 7 7 B ðln22 , mn22 , un22 Þ C 7 ð1, 1, 1Þ @ A ⋯ 5 ⋮ ðln2δ12 , mn2δ12 , un2δ12 Þ 0

(7.30)

450

7. Decision-making in optimization and assessment of energy systems

This method is formulated as follows [12]:

2     2       2 3  L δij U  ln aL M  ln wM  ln aM n m X X X  ln w ln w + ln w i j i j ijk ijk 7 6 Minimize J ¼ 5 4       2 U L U i¼1 j¼1, j6¼i k¼1 + ln wi  ln wj  ln a ijk s:t: : m X wLi + wU j 1 j¼1, j6¼i m X wLj  1 wU i + j¼1, j6¼i m X wM j ¼1 j¼1

m  X

 wLi + wU i ¼2

i¼1

M L wU i  wi  wi > 0

(7.31)

where aijk ¼ (lijk, mijk, uijk) are triangular fuzzy judgments for i, j ¼ 1, …, n, i 6¼ j, k ¼ 1, …, δij and δij ¼ δji, δij is the total number of decision makers (judgment matrices), and k is an index dedicated to the number of decision makers. If δij ¼ 0, then, there is no judgment that has been M, U made about aijk, which is denoted as “-.” Also, wL, are the normalized triangular fuzzy i, j weights. The optimum solution to the above model directly forms normalized fuzzy weights U wi ¼ (wLi , wM i , wi ), i ¼ 1, …, n.. Also, the global fuzzy weights are obtained by solving two linear programming (LP) models. Therefore, for each alternative, Ai(i ¼ 1, …, n), the following can be given [12]: Min

wLAi ¼ WΩW Max

wU Ai ¼ WΩW wM Ai ¼

m X

wLij wj i ¼ 1,2, …, n

(7.32a)

wU wj i ¼ 1, 2, …,n ij

(7.32b)

j¼1 m X j¼1

m X

wM ij wj i ¼ 1,2, …,n

j¼1

( T

where ΩW ¼ W ¼ ½ w1 w2 … wm 

, wLj

 wj  wU j ,

m P j¼1

(7.32c) )

wj ¼ 1, j ¼ 1, 2, …, m

is a set of

U weights. Finally, an option that has the highest values of global weights (wLj , wM j , wj ) is selected as the final selected option. Therefore, this method consists of the following steps:

451

7.6 AHP and fuzzy-AHP methods

1. The hierarchical tree of alternative and criteria similar to Fig. 7.4 is drawn. 2. The related pairwise matrix of alternatives and criteria are formed according to the judgment of different expert in the form of Eq. (7.30). 3. The formulation of the problem is given by a nonlinear constraint optimization problem, according to Eq. (7.31). The optimization is performed to obtain optimal values of weights. 4. Combined weight is obtained using Eqs. (7.32a)–(7.32c). U 5. The alternative, which has the highest values of global weights (wLj , wM j , wj ), is selected as the final selection.

Example 7.4 Suppose that in a four-criteria decision problem with four alternatives (teach alternative can be a typical energy system), the decision is made. Suppose that fuzzy pairwise that are suggested by experts for criterion #1, #2, #3, and #4 are given by Eqs. (7.33a)–(7.33d), respectively. Select the foremost alternative among four systems using MLSR method. Pairwise comparison matrix of alternatives respect to criteria #1: 13 ð2=9, 1=4, 2=7Þ 6 ð1, 1, 1Þ ð2=3, 1, 3=2Þ @ ð2=9, 1=4, 2=7Þ A 7 6 7 6 7 0 ð2=7, 1=3, 2=5Þ 1 7 6

6

ð2=5, 1=2, 2=3Þ 7 6 ð3=2, 2, 5=2Þ 7 ð5=2, 3, 7=2Þ @ 6 ð2=3, 1, 3=2Þ A 7 ð1, 1, 1Þ 6 ð3=2, 2, 5=2Þ 7 ð 5=2, 3, 7=2 Þ 6 7 6



ð2=3, 1, 3=2Þ 7 6 ð2=7, 1=3, 2=5Þ ð2=5, 1=2, 2=3Þ 7 6 ð2=3, 1, 3=2Þ 7 ð1, 1, 1Þ 6 7 ð2=5, 1=2, 2=31 Þ ð2=3, 1, 3=2Þ 60 7 1 0 6 ð7=2, 4, 9=2Þ 7

ð3=2, 2, 5=2Þ 6 7 ð 2, 5=2 Þ 3=2, 4 @ ð7=2, 4, 9=2Þ A @ ð2=3, 1, 3=2Þ A 5 ð1, 1, 1Þ ð3=2, 2, 5=2Þ ð5=2, 3, 7=2Þ ð2=3, 1, 3=2Þ 2



ð2=5, 1=2, 2=3Þ ð2=5, 1=2, 2=3Þ



0

(7.33a)

Pairwise comparison matrix of alternatives respect to criteria #2: 1 3 ð2=7, 1=3, 2=5Þ ð3=2, 2, 5=2Þ @ 6 ð1, 1, 1Þ ð2=9, 1=4, 2=7Þ A ð2=3, 1, 3=2Þ 7 7 6 ð3=2, 2, 5=2Þ 7 6 ð 2=9, 1=4, 2=7 Þ

7 6

7 6 ð2=5, 1=2, 2=3Þ ð 2=5, 1=2, 2=3 Þ 7 6 ð1, 1, 1Þ ð2=5, 1=2, 2=3Þ 7 6 ð2=5, 1=2, 2=3Þ ð 2=5, 1=2, 2=3 Þ 7 6 7 6 0 1 0 1 6 ð5=2, 3, 7=2Þ ð5=2, 3, 7=2Þ 7 7 6 6 @ ð7=2, 4, 9=2Þ A @ ð5=2, 3, 7=2Þ A 7 ð3=2, 2, 5=2Þ ð1, 1, 1Þ 7 6 6 ð7=2, 4, 9=2Þ ð3=2, 2, 5=2Þ 7 7 6 0 1 7 6

ð2=7, 1=3, 2=5Þ 7 6 ð3=2, 2, 5=2Þ @ 5 4 ð2=3, 1, 3=2Þ A ð2=7, 1=3, 2=5Þ ð1, 1, 1Þ ð2=3, 1, 3=Þ ð2=5, 1=2, 2=3Þ 2





0

(7.33b)

452

7. Decision-making in optimization and assessment of energy systems

Pairwise comparison matrix of alternatives respect to criteria #3: 2

ð1, 1, 1Þ

ð5=2, 3, 7=2Þ ð5=2, 3, 7=2Þ

ð5=2, 3, 7=2Þ

ð2=3, 1, 3=2Þ

3

7 6

7 6

6 ð2=7, 1=3, 2=5Þ ð3=2, 2, 5=2Þ 7 7 6 ð1, 1, 1Þ ð2=3, 1, 3=2Þ 6 ð2=7, 1=3, 2=5Þ ð3=2, 2, 5=2Þ 7 7 6 7 6 ð2=3, 1, 3=2Þ ð1, 1, 1Þ ð2=7, 1=3, 2=5Þ 7 6 ð2=7, 1=3, 2=5Þ 7 6 7 6

5 4 ð2=3, 1, 3=2Þ ð 1, 1, 1 Þ ð2=5, 1=2, 2=3Þ ð5=2, 3, 7=2Þ ð2=5, 1=2, 2=3Þ

(7.33c)

Pairwise comparison matrix of alternatives respect to criteria #4:



3 ð 2=5, 1=2, 2=3 Þ 7 6 7 6 7 6 0 1 7 6 7 6 ð 3=2, 2, 5=2 Þ 7 6 @ ð5=2, 3, 7=2Þ A ð2=3, 1, 3=2Þ 7 6 ð2=3, 1, 3=2Þ ð 1, 1, 1 Þ 7 6 7 6 ð5=2, 3, 7=2Þ 7 6 0 1 6

7 ð 2=5, 1=2, 2=3 Þ 6 ð2=9, 1=4, 2=7Þ 7 @ ð2=7, 1=3, 2=5Þ A 6 ð1, 1, 1Þ ð2=7, 1=3, 2=5Þ 7 6 ð2=7, 1=3, 2=5Þ 7 6 7 ð 2=7, 1=3, 2=5 Þ 4 5 2

ð1, 1, 1Þ

ð3=2, 2, 5=2Þ

ð2=3, 1, 3=2Þ

ð2=3, 1, 3=2Þ

ð7=2, 4, 9=2Þ ð5=2, 3, 7=2Þ

ð5=2, 3, 7=2Þ

(7.33d)

ð1, 1, 1Þ

In addition, pairwise comparison matrix for comparison of criteria respect to each other is given as follows: 0 1 3 2 ð3=2, 2, 5=2Þ @ ð3=2, 2, 5=2Þ A ð7=2, 4, 9=2Þ 6 ð1, 1, 1Þ ð2=3, 1, 3=2Þ 7 7 6 7 6 ð 2=3, 1, 3=2 Þ 7 60 1 6 ð2=5, 1=2, 2=3Þ

7 6 ð2=5, 1=2, 2=3Þ 7 7 6 @ ð2=5, 1=2, 2=3Þ A (7.34) ð1, 1, 1Þ ð3=2, 2, 5=2Þ 6 ð2=3, 1=3=2Þ 7 7 6 ð2=3, 1=4, 2=7Þ 7 6 6 ð2=9, 1=4, 2=7Þ Þ ð1, 1, 1Þ ð2=9, 1=4, 2=7Þ 7 7 6

ð2=5, 1=2, 2=3 5 4 ð3=2, 2, 5=2Þ ð2=3, 1, 3=2Þ ð7=2, 4, 9=2Þ ð1, 1, 1Þ ð2=3, 1, 3=2Þ Solution Here, for example, in order to avoid lengthening the text, the calculation of the primary weights from the first matrix (the pairwise comparison matrix of options based on the first criterion) is described. Obviously, the calculations for the rest of the matrices can be done in a similar way.

453

7.6 AHP and fuzzy-AHP methods

For each row of this matrix, it is necessary to write the equations and then solve them in the form of a multidimensional equation. For the first line, the equations are formulated as follows: First equation (Eq. 7.27a): 2 3 Pij 4 4 4 X X X X   Pij 5  Pij Uj ¼ ln L1jk L1 4 j¼2

j¼2

j¼2 k¼1

If this equation is expanded, we have: L1 ðP12 + P13 + P14 Þ  ðP12 U2 + P13 U3 + P14 U4 Þ ¼

P12 X

ln ðL12k Þ +

P13 X

k¼1

ln ðL13k Þ +

P14 X

k¼1

ln ðL14k Þ

k¼1

where it is assumed that P12 ¼ 2 (two decision makers), P13 ¼ 1 (one decision maker), and P14 ¼ 3 (three decision makers). Accordingly, the above equation becomes:









2 2 2 2 2 + ln + ln + ln + ln 6L1  2U2  U3  3U4 ¼ ln 5 5 9 9 7 ) 6L1  2U2  U3  3U4 ¼ 6:4989 Second equation (Eq. 7.27b):

2

M1 4

4 X

3 P1j 5 

j¼2

4 X

P1j Mj ¼

j¼2

Pij 4 X X

  ln L1jk

j¼2 k¼1

M1 ðP11 + P13 + P14 Þ  ðP12 M2 + P13 M3 + P14 M4 Þ ¼

P12 X

ln ðL12k Þ +

k¼1

P13 X

ln ðL13k Þ +

k¼1

P14 X

ln ðL14k Þ

k¼1









1 1 1 1 1 + ln + ln ð1Þ + ln + ln + ln 2 2 4 4 3 ) 6M1  2M2  M3  3M4 ¼ 5:2574

6M1  2M2  M3  3M4 ¼ ln Third equation (Eq. 7.27c):

2 U1 4

4 X j¼2

3 P1j 5 

4 X

P1j Lj ¼

j¼2

U1 ðP11 + P13 + P14 Þ  ðP12 L2 + P13 L3 + P14 L4 Þ ¼

Pij 4 X X

  ln U1jk

j¼2 k¼1 P12 X k¼1

ln ðU12k Þ +

P13 X k¼1

ln ðU13k Þ +

P14 X k¼1

ln ðU14k Þ











2 2 3 2 2 2 + ln + ln + ln + ln + ln 3 3 2 7 7 5 ) 6U1  2L2  L3  3L4 ¼ 3:8272

6U1  2L2  L3  3L4 ¼ ln

454

7. Decision-making in optimization and assessment of energy systems

these equations are developed for the second, third, and fourth rows of the matrix given by Eq. (7.33a). Accordingly, twelve linear equations are obtained as follows: 6L1  2U2  U3  3U4 ¼ 6:4989 7L2  2U1  2U3  3U4 ¼ 0:4054 5L3  U1  2U2  2U4 ¼ 3:8962 8L4  3U1  3U2  2U3 ¼ 3:0163 6M1  2M2  M3  3M4 ¼ 5:2574 7M1  2M2  2M3  3M4 ¼ 0:4054 5M1  M2  2M3  2M4 ¼ 3:8962 8M1  3M2  3M3  2M4 ¼ 3:0163 6U1  2L2  L3  3L4 ¼ 3:8272 7U2  2L1  2L3  3L4 ¼ 4:4071 5U3  L1  2L2  2L4 ¼ 0:9162 6U4  3L1  3L2  2L4 ¼ 7:3098 This system of equation is solved, and the results are indicated in Table 7.6. Normalized weight (from Eq. 7.28a) for this matrix is found as follows: r11 ¼ ½ðλ1 exp ðL1 ÞÞ, ðλ2 exp ðM1 ÞÞ, ðλ3 exp ðU1 ÞÞ where

" λ1 ¼ " λ2 ¼

4 X

# exp ðUi Þ

1

exp ðmi Þ

1

i¼1 4 X

¼ 0:1067 # ¼ 0:1304

i¼1

TABLE 7.6 Solution of solving the system of equations obtained for the first matrix given by Eq. (7.28a). i

Li

Mi

Ui

1

0

0

0.1443

2

0.7870

0.8918

1.1028

3

0.1936

0.2849

0.5216

4

0.9751

1.0629

1.2572

7.6 AHP and fuzzy-AHP methods

" λ3 ¼

4 X

455

# exp ðLi Þ

1

¼ 0:1416

i¼1

Therefore, the weights of the first matrix become: r11 ¼ ð0:1076, 0:1304, 0:1635Þ r12 ¼ ð0:2343, 0:3181, 0:4265Þ r13 ¼ ð0:1294, 0:1733, 0:2385Þ r14 ¼ ð0:2829, 0:3774, 0:4977Þ If this procedure is repeated for the other three matrixes, we obtain:

2

ð0:1067, 0:1304, 0:1635Þ 6 ð0:2343, 0:3181, 0:4265Þ 6 4 ð0:1295, 0:1733, 0:2385Þ ð0:2829, 0:3774, 0:4977Þ

ð0:1434, 0:1793, 0:2225Þ ð0:1035, 0:1288, 0:1680Þ ð0:4457, 0:5049, 0:5568Þ ð0:1413, 0:1868, 0:2495Þ

ð0:3498, 0:4363, 0:53652Þ ð0:1708, 0:2190, 0:2787Þ ð0:1042, 0:1313, 0:1685Þ ð0:1641, 0:2130, 0:2827Þ

3 ð0:2018, 0:2729, 0:3730Þ ð0:1868, 0:2760, 0:4037Þ 7 7 ð0:0855, 0:0974, 0:1139Þ 5 ð0:2556, 0:3530, 0:4772Þ

Finally, we have: W ¼ ½ð0:2579, 0:3509, 0:4703Þ, ð0:1609, 0:2199, 0:3054Þ, ð0:0812, 0:0932, 0:1101Þ, ð0:2418, 0:3354, 0:4612Þ

Then, from Eq. (7.29), we have: U1 ¼ ð0:1277, 0:2173, 0:3759Þ U2 ¼ ð0:1361, 0:2529, 0:4687Þ U3 ¼ ð0:1342, 0:2167, 0:3532Þ U4 ¼ ð0:1708, 0:3117, 0:5614Þ Therefore, the selected alternative is alternative #4. The above procedure for solving this example is a little bit different from Wang’s method [12] that was given by Eqs. (7.26) and (7.27a–c), since it was more suitable for hand calculation. Example 7.5 Suppose that in a four-criteria decision problem with three alternatives, that is, alternative A, B, and C (each alternative can be a typical energy system) is judged by three experts based on four criteria. Suppose that fuzzy pairwise that are suggested by experts for criterion #1, #2, #3, and #4 are given by Eqs. (7.35a)–(7.35d), respectively. The pairwise comparison of alternatives to criteria is given by Eq. (7.36). Select the foremost alternative among four systems using Wang’s method.

456

7. Decision-making in optimization and assessment of energy systems

Pairwise comparison matrix of alternatives respect to criteria #1: 2

A



6 ð1, 1, 1Þ A6 6 6

6 ð2=3, 1, 3=2Þ 6 B6 6 ð2=3, 1, 3=2Þ 6

4 ð2=3, 1, 3=2Þ C ð3=2, 2, 5=2Þ

B ð2=3, 1, 3=2Þ ð2=3, 1, 3=2Þ



ð1, 1, 1Þ ð3=2, 2, 5=2Þ

0

C 13 ð2=3, 1, 3=2Þ @ ð2, 1, 2Þ A7 7 ð2=5, 1=2, 2=3Þ 7 7 7 ð2=5, 1=2, 2=3Þ 7 7 7 7 5 ð1, 1, 1Þ

(7.35a)

Pairwise comparison matrix of alternatives respect to criteria #2:

A

A

2

ð1, 1, 1Þ

6 B6 4 ð2=7, 1=3, 2=5Þ

B

C

ð5=2, 3, 7=2Þ ð3=2, 2, 5=2Þ ð1, 1, 1Þ





ð1, 1, 1Þ

C ð5=2, 1=2, 2=3Þ

3 7 7 5

(7.35b)

Pairwise comparison matrix of alternatives respect to criteria #3: B C 3 1 ð5=2, 3, 7=2Þ A6 7 B C 6 ð1, 1, 1Þ @ ð5=2, 3, 7=2Þ A ð5=2, 3, 7=2Þ 7 7 6 7 6 7 6 ð3=2, 2, 5=2Þ 7 6 7 60 1 7 6 ð2=7, 1=3, 2=5Þ 7 B6 C 6B ð1, 1, 1Þ ð2=3, 1, 3=2Þ 7 7 6 @ ð2=7, 1=3, 2=5Þ A 7 6 7 6 ð2=5, 1=2, 2=3Þ 5 4 C ð2=7, 1=3, 2=5Þ ð2=3, 1, 3=2Þ ð1, 1, 1Þ 2

A

0

(7.35c)

Pairwise comparison matrix of alternatives respect to criteria #4:

A

2

A

B

ð1, 1, 1Þ  6 6 6 6  ð1, 1, 1Þ B6 6 6 ! 6 ð2=5, 1=2, 2=3Þ 4 ð2=3, 1, 3=2Þ C ð3=2, 2, 5=2Þ

C ð3=2, 2, 5=2Þ

!3

7 ð2=5, 1=2, 2=3Þ 7 7 7 ð3=2, 2, 5=2Þ 7 7 7 7 5 ð1, 1, 1Þ

(7.35d)

457

7.6 AHP and fuzzy-AHP methods

Pairwise comparison judgment matrix of criteria respect to each other is given by Eq. (7.36). C#4 13 ð2=7, 1=3, 2=5Þ C#1 6 ð1, 1, 1Þ ð2=3, 1, 3=2Þ @ ð2=7, 1=3, 2=5Þ A 7 7 6 6 Þ 7 0ð2=5, 1=2, 2=31 7 60

7 6 ð2=3, 1, 3=2Þ ð2=3, 1, 3=2Þ 7 6 ð 5=2, 3, 7=2 Þ @ ð2=3, 1, 3=2Þ A 7 C#2 6 @ ð3=2, 2, 5=2Þ A ð 1, 1 Þ 1, 7 (7.36) 6 ð 5=2, 3, 7=2 Þ 7 6 ð2=5, 1=2, 2=3Þ ð3=2, 2, 5=2Þ 7 6

7 6 ð2=7, 1=3, 2=5Þ 7 6 ð 2=3, 1, 3=2 Þ ð 1, 1, 1 Þ ð 2=5, 1=2, 2=3 Þ 7 6 C#3 ð2=7, 1=3, 2=5Þ 1 7 6 0 0 1 7 6 ð5=2, 3, 7=2Þ ð2=3, 1, 3=2Þ 7 6 5 4 ð1, 1, 1Þ C#4 @ ð5=2, 3, 7=2Þ A @ ð2=3, 1, 3=2Þ A ð3=2, 2, 5=2Þ ð2=5, 1=2, 2=3Þ ð3=2, 2, 5=2Þ 2

C#1

0

C#2 1 ð2=3, 1, 3=2Þ @ ð2=5, 1=2, 2=3Þ A ð3=2, 2, 5=2Þ 1

C#3

0

where C # 1, C # 2, C # 3, and C # 4 indicate for criteria #1, #2, #3, and #4, respectively. Solution In this stage, the nonlinear optimization model as per Eq. (7.31) is developed as follows: 2      L 2   M     M  2 3 ln wL1  ln wU + ln w1  ln wM 2  ln a121 2  ln a121 6    7 6 + ln wU  ln wL   ln aU 2 7 6 7 2 1 121 Minimize J ¼6    7 6 + ln wL  ln wU   ln aL 2 +  ln wM   ln wM   ln aM 2 7 4 5 1 122 2 1 2 122   U  L  U  2 + ln w1  ln w2  ln a122 a12 2    U  L  2   M   M  M 2 3 L ln w1  ln w3  ln a131 + ln w1  ln w3  ln a131 6    7 6 + ln wU  ln wL   ln aU 2 7 6 7 3 1 131 +6    7 6 + ln wL  ln wU   ln aL 2 +  ln wM   ln wM   ln aM 2 7 4 5 1 132 3 1 3 132   U  L  U  2 + ln w1  ln w3  ln a132 a13 2    U  L  2   M   M  M 2 3 L ln w2  ln w1  ln a211 + ln w2  ln w1  ln a211 6    7      6 + ln wU  ln wL  ln aU 2 7 6 7 1 2 211 +6    7              2 27 M M M 6 + ln wL  ln wU  ln aL + ln w2  ln w1  ln a211 5 4 2 211 1     L  U  2 + ln wU 2  ln w1  ln a211 a21 "    U  L 2   M   M  M  2 # L ln w2  ln w2  ln a231 + ln w2  ln w2  ln a231 +         2 L U + ln wU 2  ln w2  ln a231 a23 2    U  L  2   M   M  M 2 3 L + ln w3  ln w1  ln a311 ln w3  ln w1  ln a311 6    7 6 + ln wU  ln wL   ln aU 2 7 6 7 1 3 311 +6    7 6 + ln wL  ln wU   ln aL 2 +  ln wM   ln wM   ln aM 2 7 4 5 3 312 1 3 1 312   U  L  U  2 + ln w3  ln w1  ln a312 a31 "    U  L 2   M   M  M  2 # L ln w3  ln w2  ln a321 + ln w3  ln w2  ln a321 +         2 L U + ln wU 3  ln w2  ln a321 a32 (7.37a)

458

7. Decision-making in optimization and assessment of energy systems

This objective function must be minimized subject to the following constraints:   U wL1 + wU 2 + w3  1   U wL2 + wU 1 + w3  1   U wL3 + wU 1 + w2  1  L  L wU 1 + w2 + w3  1  L  L wU 2 + w1 + w3  1  L  L wU 3 + w1 + w2  1

(7.37b)

M M wM 1 + w2 + w3 ¼ 1  L     L  L U U w1 + wU 1 + w2 + w2 + w3 + w3 ¼ 2 M L wU 1  w1  w1 > 0 M L wU 2  w2  w2 > 0 M L wU 3  w3  w3 > 0

The nonlinear optimization problem that its objective function is given by Eq. (7.37a) and its constraints are given by Eq. (7.37b) are solved to obtain local weights of alternatives and criteria, and the outputs are given in Table 7.7. Then using local weights given in Table 7.7, global weights are calculated using Eqs. (7.32a)– (7.32c) as follows: Min

wLA ¼ Minimize z ¼ WΩW

m X

wLij

wj i ¼1, 2,…, n

j¼1

¼ 0:226w1 + 0:260w2 + 0:566w3 + 0:221w4 s:t: : 0:150  w1  0:223

(7.38a)

0:260  w2  0:397 0:139  w3  0:144 0:314  w4  0:344 w1 + w2 + w3 + w4 ¼ 1

TABLE 7.7 Local weights of alternatives and criteria obtained for Example 7.5. Alternatives

Criteria #1 (0.150,0.194,0.223)

Criteria #2 0.260,0.318,0.397)

Criteria #3 0.139,0.139,0.144)

Criteria #4 0.150,0.194,0.223)

A

(0.26,0.289,0.365)

(0.484,0.546,0.593)

(0.566, 0.579,0.579)

(0.221,0.250,0.287)

B

(0.224,0.265,0.312)

(0.169,0.182,0.194)

(0.181,0.219,0.265)

((0.428,0.500,0.557)

C

(0.397,0.446,0.475)

(0.237,0.273,0.323)

(0.168,0.203,0.240)

(0.223,0.250,0.285)

7.7 Decision-making software

459

TABLE 7.8 Final global weights of alternatives of Example 7.5. Alternative

Final global weights

A

(0.340, 0.397, 0.461)

B

(0.260, 0.314, 0.366)

C

(0.246, 0.287, 0.333)

Min

wU A ¼ Maximize z ¼ WΩW

WΩW m X wU wj i ¼ 1, 2,…,n ij j¼1

¼ 0:365w1 + 0:593w2 + 0:579w3 + 0:287w4 s:t: : 0:150  w1  0:223

(7.38b)

0:260  w2  0:397 0:139  w3  0:144 0:314  w4  0:344 w1 + w2 + w3 + w4 ¼ 1 wM A ¼

m X wM ij wj i ¼ 1,2, …,n j¼1

¼ 0:289  0:194 + 0:564  0:318 + 0:579  0:139 + 0:250  0:349 ¼ 0:397

(7.38c)

Eqs. (7.38a) and (7.38b) are LP optimization problems that must be solved, for example, using the Simplex method (see Chapter 6). But, Eq. (7.38c) directly gives the value of wM A that was obtained as 0.397. Similar equations can be given for the other two alternatives, that is, alternatives B and C. The final values of global weights of three alternatives are obtained as given in Table 7.8. It is found that alternative A has higher values of weights; therefore, this is the final selected alternative. Wang [12] compared results obtained by his method and MSLR methods and claims that his methods give the narrower ranges for fuzzy numbers and provide a better separability between different alternatives.

7.7 Decision-making software Example 7.4 shows that the usage of AHP or fuzzy AHP is difficult for hand calculation, and these decision-making tools need computer code. However, LINMAP, TOPSIS, and fuzzy Bellman-Zadeh can be easily programmed in Microsoft Excel. One engineering software suitable for decision problems is Expert Choice. This software is introduced here briefly.

460

7. Decision-making in optimization and assessment of energy systems

Finding the best alternative in the AHP method is accompanied by a lot of matrix calculations, which is a complicated process. If the matrix calculations are done manually, the possibility of making mistakes increases drastically. Therefore, software programs to perform the calculations in an easier, more user-friendly way have been developed. One of the most popular software programs to select the best alternative by the AHP method is the Expert Choice [13]. It has been employed in several studies, such as Refs. [14–18] to find the best item among a number of potential alternatives. In this part, a guide for this software program is provided. The explanations are given for version 11.0 of this program. In order to find the best alternative by the Expert Choice software, the steps which are introduced here should be followed: Initially, the software program is opened, and the window is shown in Fig. 7.6 appears. Here, the “create a new model” item should be chosen to start a new decision-making process. After that, the place in which the file is going to be stored should be chosen. Next, as illustrated in Fig. 7.7, the goal of using the AHP method should be described, for example, finding the best alternative for a purpose, and so on. Then, by right-clicking on the described goal in the main window, the nodes and the alternatives are defined. In addition, by right-clicking on each created node, which represents a decision criterion, the subcriteria for it can be defined, as well (Fig. 7.8).

FIG. 7.6 The window that is shown when the program is opened.

FIG. 7.7 A window that asks to describe the goal of using the AHP method.

7.7 Decision-making software

461

FIG. 7.8 Defining (A) nodes (decision criteria) and (B) alternatives in the Expert Choice program.

Having defined the decision criteria and subcriteria (if they exist), by clicking on each criterion or subcriterion, the alternatives can be compared based on that. For having an easier comparison, three scales can be used by the user, which are indicated in Fig. 7.9A–C. The matrix of the pairwise comparison is also available in the window where the comparisons are made (Fig. 7.10 shows the matrix of pairwise comparison when “A” and “B” are the alternatives.). Following the same fashion, the criteria and subcriteria can also be compared with each other. Fig. 7.11 shows an example of comparing the decision criteria, where there are four decision criteria in a case. After performing all the aforementioned stages, the final weights of the alternatives are determined by clicking on the synthesized menu, the “with respect to the goal” part (Fig. 7.12).

462

7. Decision-making in optimization and assessment of energy systems

FIG. 7.9

The three scales by which the pairwise comparisons can be made more easily: (A) number scale, (B) descriptive scale, (C) color scale.

FIG. 7.10

The matrix of pairwise comparisons when “A” and “B” are the alternatives, as an example.

FIG. 7.11

An example of comparing the decision criteria where there are four decision criteria in a case.

FIG. 7.12

The way to obtain the final weights by the Expert Choice software.

Example 7.6 There are seven optimization scenarios for a polymer electrolyte membrane fuel cell (PEMFC), as reported in Table 7.9. The goal is the selection of the best one for the stationary application, in which the following priority level is considered: The highest level of priority is for both the levelized cost and efficiency. After them, power density and size are in the next rank of importance.

463

7.7 Decision-making software

The matrices of pairwise comparisons of the alternatives for efficiency, power density, levelized cost of electricity (LCOE), and size based on the experts’ judgment are given in Tables 7.10–7.13. Moreover, experts introduced Table 7.14 as the matrix of pairwise comparisons of the decision criteria. Employ the Expert Choice software and find the final weights of the alternatives. Which optimization scenario is the best? Solution By applying the Expert Choice software and entering the values of matrices of pairwise comparisons, the following scores for the alternatives are obtained, which are indicated in Fig. 7.13. It shows that the best optimization scenario is SC #6, with a score of 19.4 out of 100.

TABLE 7.9

The values of the decision criteria for the seven investigated optimization scenarios [19].

Scenario name

Efficiency

Power density (kW m22)

Levelized cost ($ (kWh)21)

Size (m2)

SC #1

0.684

2.00

1.990

25.112

SC #2

0.601

10.18

0.623

5.390

SC #3

0.634

10.00

0.633

5.206

SC #4

0.639

9.50

0.629

5.511

SC #5

0.648

9.24

0.658

5.422

SC #6

0.633

10.00

0.628

5.249

SC #7

0.649

9.78

0.635

5.233

Matrix of pairwise comparison of the alternatives respect to the efficiency [19].

TABLE 7.10

SC #1

SC #2

SC #3

SC #4

SC #5

SC #6

SC #7

SC #1

1

6

4

3

3

4

3

SC #2

1 6

1

1 3

1 3

1 4

1 3

1 4

SC #3

1 4

3

1

1

1 2

1

1 2

SC #4

1 3

3

1

1

1 2

1

1 2

SC #5

1 3

4

2

2

1

2

1

SC #6

1 4

3

1

1

1 2

1

1 2

SC #7

1 3

4

2

2

1

2

1

TABLE 7.11 Matrix of pairwise comparison of the alternatives respect to the power density [19]. SC #1

SC #2

SC #3

SC #4

SC #5

SC #6

SC #7

SC #1

1

1 9

1 9

1 9

1 9

1 9

1 9

SC #2

9

1

2

4

5

2

3

SC #3

9

1 2

1

2

3

1

2

SC #4

9

1 4

1 2

1

2

1 3

1 2

SC #5

9

1 5

1 3

1 2

1

1 5

1 4

SC #6

9

1 2

1

3

5

1

2

SC #7

9

1 3

1 2

2

4

1 2

1

TABLE 7.12 Matrix of pairwise comparison of the alternatives respect to the levelized cost [19]. SC #1

SC #2

SC #3

SC #4

SC #5

SC #6

SC #7

SC #1

1

1 9

1 9

1 9

1 9

1 9

1 9

SC #2

9

1

3

2

4

2

3

SC #3

9

1 3

1

1 2

3

1 3

1

SC #4

9

1 2

2

1

3

1 2

2

SC #5

9

1 4

1 3

1 3

1

1 5

1 3

SC #6

9

1 2

3

2

5

1

3

SC #7

9

1 3

1

1 2

3

1 3

1

TABLE 7.13 Matrix of pairwise comparison of the alternatives respect to the size [19]. SC #1

SC #2

SC #3

SC #4

SC #5

SC #6

SC #7

SC #1

1

1 9

1 9

1 9

1 9

1 9

1 9

SC #2

9

1

1 2

2

1

1 2

1 2

SC #3

9

2

1

3

2

1

1

SC #4

9

1 2

1 3

1

1

1 3

1 3

SC #5

9

1

1 2

1

1

1 2

1 2

SC #6

9

2

1

3

2

1

1

SC #7

9

2

1

3

2

1

1

465

7.8 Case studies

TABLE 7.14

Matrix of pairwise comparison of the decision criteria [19]. Efficiency

Power density

LCOE

Size

Efficiency

1

6

1 2

4

Power density

1 6

1

1 6

1 2

LCOE

2

4

1

3

Size

1 4

2

1 3

1

FIG. 7.13 The final weights of alternatives obtained by the Expert Choice software [19].

7.8 Case studies To show the application of the decision-making method is multi-objective optimization and solving decision problems of energy systems, two case studies are discussed in this section. In the first case study in part 7.8.1, a multiobjective optimization problem of a regenerative gas cycle will be given and using various decision-making methods including, LINMAP, TOPSIS, and fuzzy Bellman-Zadeh, the final optimal solution is selected from the Pareto optimal front. In the second case study that will be given in part 7.8.2, using the fuzzy-AHP decision-making method, the foremost air conditioning system is chosen among several alternatives for an apartment in different weather conditions.

7.8.1 Case study (I): Recuperative gas cycle In this case study, a recuperative heat exchanger is designed to be integrated into a gas cycle to being used as the air preheater. A simple gas turbine cycle with 60 MW nominal power and 26.0% thermal efficiency is considered for efficiency enhancement. A typical tubular vertical recuperative heat exchanger is designed in order to integrate into the cycle as an air preheater for thermal efficiency improvement. Thermal and geometric specifications of

466

7. Decision-making in optimization and assessment of energy systems

the recuperative heat exchanger are obtained in a multiobjective optimization process. The exergetic efficiency of the gas cycle is maximized while the payback time for the capital investment of the recuperator is minimized. Optimization programming is performed using NSGA-II algorithm and Pareto optimal frontiers, and the final optimal solution was selected using three decision-making approaches: the fuzzy Bellman-Zadeh, LINMAP, and TOPSIS methods. This case study was discussed in a paper given by Sayyaadi and Mehrabipour [20]. More details regarding the modeling and optimization of this system can be found in that reference. The schematic of the regenerative gas cycle that is equipped with a vertical shell and tube heat exchanger as the air preheater is depicted in Fig. 7.14. The schematic of the particular type of vertical shell and tube heat exchanger used in this cycle is illustrated in Fig. 7.15. The objective functions of this problem are two objective functions. One objective function is the payback period for capital investment paid for the recuperative heat exchanger that is added to the primary gas cycle to be used as the air preheater. This leads to increased efficiency and, therefore, the reduction of fuel consumption. Therefore, the capital investment of the recuperator can be return by saving the fuel cost. This payback period is intended to be minimized while the exergetic efficiency of the gas cycle is maximized, simultaneously. Therefore, the problem is a two-objective optimization problem.

FIG. 7.14

Schematic of the regenerative gas turbine cycle equipped with a recuperative air preheater [20].

7.8 Case studies

467

FIG. 7.15

Schematic of tubular recuperator: (A) General arrangement, (B) Schematic of shell side flow pattern, (C) Tube bundle layout [21].

• Objective functions: The exergetic efficiency of the gas cycle is determined as follows [20]: εtot ¼

_ net W _ f exCH m f

(7.39a)

_ net is the net generated power, m _ f is the mass flow rate of consumed fuel, and exCH where W f is the chemical exergy of the fuel assumed as 53,155.8 kJ kg1 for methane. The net power and mass flow rate of fuel calculated from the detailed thermal model are given in Ref. [20].

468

7. Decision-making in optimization and assessment of energy systems

The payback period for capital investment paid for the recuperative heat exchanger is given as follows [20]: !

X BL TRRj 1k   kð1  kBL Þ j¼1 1 + ieff j ! Payback ¼  1  _ f , SimpleCycle  m _ f , RecuperativeCycle m 365  86400cf0 (7.39b) ρf where 1 + ri k¼ 1 + ieff where ri, ieff, BL, and TRRj are inflation rate, interest rate, booked life of the plant, and total _ f , SimpleCycle , and revenue requirement (see Chapter 4), respectively. Moreover, cf0, ρf, m _ f , RecuperativeCycle are the unit cost of fuel (natural gas per each cubic meter assumed as0.05 m $.m3), density of fuel, mass flow rate of the simple gas cycle, and mass flow rate of the gas cycle, respectively, when the recuperator is integrated into that. The detailed economic model used to determine TRRj was given in Ref. [20]. It is intended to maximize Eq. (7.39a) and minimize Eq. (3.38b) in a multiobjective optimization using NSGA-II algorithm (see Chapter 6). • Decision variables: Following geometrical and thermal specifications of the recuperative heat exchanger are considered as decision variables: 1. 2. 3. 4. 5. 6. 7. 8.

Lt: Tube length (m) Dto: Tube outside diameter (m) Dti: Tube inside diameter (m) Ltp: Tube pitch in the tube bundle (center to center distance of tubes in m) Dotl: Outer tube limit in the tube bundle (m) Ditl: Inner tube limit in the tube bundle (m) Nb: Total number of baffles (including disk and doughnut baffles) T3: The outlet temperature of the preheated air from the recuperator (K)

• Constraints: Following limitations are considered for the regenerative gas turbine cycle: 3  vair  6m s1

(7.40a)

where vair is the air velocity in the circular cross-section area of doughnut baffles and the annular area limited between the outer tube limit of the tube bundle and shell inside surface. T3  1420K

(7.40b)

T6  378:15K

(7.40c)

7.8 Case studies

469

6  Lt  12m

(7.40d)

Ltp f1:25, 1:33, 1:50g Dto

(7.40e)

Nb f3, 5, 7, 9, 11, 13, 15g

(7.40f)

2  Dsi  4m

(7.40g)

0:25 

Ditl  0:45 Dsi

(7.40h)

0:80 

Dotl  0:97 Dsi

(7.40i)

T3 < T4 < T5

(7.40j)

ΔPs  3:5kPa

(7.40k)

ΔPt  5kPa

(7.40l)

εtot, reg > εtot,SimpleCycle + 0:01

(7.40m)

Since implementing the air preheater in some cases may cause efficiency reduction of the gas cycle even lower than the simple gas turbine with no air preheater, in order to avoid such unreasonable conditions, last constraint (Eq. 7.40m) was imposed on the problem. The problem is solved using the NSGA-II algorithm described in Chapter 6 with 500 individuals as the size of the population in the tuning of the algorithms (see Chapter 6 for the genetic algorithm). Optimization was performed using “optimtool” which is the optimization toolbox of the MATLAB software (see Chapter 6, Section 6.9). The related Pareto front in twodimensional space of objective functions is illustrated in Fig. 7.16. The matrix of two objectives and five hundred solutions that has two columns and five hundred rows, that is, with 2  500 dimension, was exported from the MATLAB software into Microsoft Excel. Then decision-making processes as per Sections 7.3, 7.4, and 7.5 were programmed for decision-making based on LINMAP, TOPSIS, and fuzzy Bellman-Zadeh methods in Excel, respectively. The selected solutions by each method, as well as ideal and nonideal solutions, are indicated in Fig. 7.16. In this case, both LINMAP and TOPSIS selected the same solution as is seen from Fig. 7.16. Specifications of optimal solutions that were selected by each decision-making method are given in Table 7.15.

7.8.2 Case study (II): The best air conditioning system at different weathers The objective of this case study is to select the best cooling system for a small-scale residential apartment with a floor area of 100 m2 in diverse climatic conditions. The selection is conducted between several alternatives for the cooling system, including the vapor compression (VC) system, direct evaporative cooler (DEC), dew point indirect evaporative cooler (IDPEC or M-cycle), and desiccant enhanced evaporative cooler (DEVap). For IDPEC, two configurations with and without returned air (RA) were considered. Therefore, the selection

470

7. Decision-making in optimization and assessment of energy systems

T0=18.8°C 10.40 10.20

Payback (years)

10.00

Non-ideal solution

9.80 Selected by the fuzzy desicion-maker

9.60 9.40 9.20 9.00

Selected by TOPSIS & LINMAP desicion-makers

Ideal solution

8.80 8.60 0.2668

0.2666

0.2664

0.2662

0.2660

0.2658

0.2656

0.2654

Efficiency

FIG. 7.16

Pareto optimal front at average annual temperature (18.8°C) of the power plant site [20].

TABLE 7.15 Specifications of the recuperator and the regenerative gas cycle specified by each decision-making method. Parameters

LINMAP

TOPSIS

Fuzzy Bellman-Zadeh

Tube arrangement

Triangle (30–60)

Triangle (30–60)

Triangle (30–60)

Tube outside/inside diameter di/do (m)

0.0173/0.01905

0.0173/0.01905

0.0173/0.01905

Tube pitch ratio in the tube bundle

1.33

1.33

1.33

Tube length (m)

7.671

7.671

8.688

Number of tubes (Nt)

5978

5978

6569

Number of baffles (Nb)

7

7

7

Shell inside diameter Ds (m)

2.140

2.140

2.240

Outer tube limit Dotl (m)

1.825

1.825

1.843

Inner tube limit Ditl (m)

0.963

0.963

1.005

Outlet temp. of the recuperator (°C)

412

412

413

Effectiveness

0.5887

0.5887

0.5953

Recuperator cost ($)

424,200

424,200

457,340

Payback time (years)

8.65

8.65

9.00

Exergetic efficiency (%)

26.58

26.58

26.64

Improvement in the exergetic efficiency compared to the simple cycle (%)

+1.75

+1.75

+1.81

471

7.8 Case studies

Selecting suitable system in each region

PEC

DEC

CDE

IDPEC without RA

ACC

IDPEC with RA

DEVap

TCI

VC

FIG. 7.17 Hierarchical structure for the selection of a suitable system in each location.

was made between five cooling systems. Some details regarding DEC, IDPEC (M-cycle), and DEVap systems were discussed in case studies of Chapter 5. This case study is as per research conducted in Ref. [22]. In that reference, for each cooling system, the 3E analysis (energy, economic, and environmental analyses), as well as a comprehensive comfort analysis, was performed. Accordingly, quantitative values of four criteria including primary energy consumption (PEC; as an energy criterion), annualized cost of cooling (ACC; as an economic criterion), carbon dioxide emission (CDE0; as an environmental criterion), and thermal comfort condition (TCI) were obtained and considered as criteria of decision-making. Decisionmaking was performed using the fuzzy AHP based on the judgments of five decision makers (experts) who linguistically defined the degree of preference of four criteria. Their judgments were transformed into five pairwise comparative matrices with triangular fuzzy arrays. Then, the local and global weights of alternatives and criteria were by Wang’s method. Therefore, the most appropriate cooling system with the highest global weights fitting all the criteria was introduced to be used in each region for small-scale residential applications. Details for models that calculated each criterion (PEC, CDE, ACC, and TCI) for each alternative at each weather condition were given in [22] and are not repeated here for lack of space. The hierarchical tree of this decision problem is given in Fig. 7.17. Decision-making, as mentioned, was performed based on the judgment of five experts using Wang’s method. It was assumed that the linguistic judgments for each pair of criteria that were suggested by five experts are as follows: 1. The judgment of the 1st decision maker: TCI is the most important criterion, ACC is the next important criterion followed by CDE, and PEC is less important criterion so that TCI is relatively more important than ACC and much more important than CDE followed by PEC. 2. The judgment of the 2nd decision maker: ACC is the very important criterion, TCI is the next important criterion followed by TCI and CDE criteria so that ACC is more important

472

7. Decision-making in optimization and assessment of energy systems

than PEC, much more important than CDE (PEC and CDE have the same value), and relatively more important than TCI 3. The judgment of the 3rd decision maker: PEC and CDE are the most important criteria, TCI and ACC with the same values are less important criteria so that PEC and CDE have the same values and are relatively more important than ACC and TCI; however, ACC and TCI have the same value. 4. The judgment of the 4th decision maker: TCI is the most important criteria, CDE and PEC with the same value are the next important criteria followed by ACC so that TCI is relatively more important than PEC and CDE and more important than ACC. In addition, PEC and CDE with the same values are relatively more important than ACC. 5. The judgment of the 5th decision maker: All the criteria have the same value. Linguistic judgments of the five experts (decision makers) were converted into triangular fuzzy pairwise judgment matrices, as shown in Tables 7.16A–7.16E, respectively. TABLE 7.16A Fuzzy comparison matrix of the four criteria based on the opinion of first decision maker [22]. PEC

CDE

ACC

TCI

PEC

(1,1,1)

(1/3,1/1,1)

(1/5,1/4,1/3)

(1/7,1/6,1/5)

CDE

(1,2,3)

(1,1,1)

(1/6,1/5,1/4)

(1/8,1/7,1/6)

ACC

(3,4,5)

(4,5,6)

(1,1,1)

(1/4,1/3,1/2)

TCI

(5,6,7)

(6,7,8)

(2,3,4)

(1,1,1)

TABLE 7.16B

Fuzzy comparison matrix of the four criteria based on the opinion of second decision maker [22]. PEC

CDE

ACC

TCI

PEC

(1,1,1)

(1,1,1)

(1/8,1/7,1/6)

(1/6,1/5,1/4)

CDE

(1,1,1)

(1,1,1)

(1/8,1/7,1/6)

(1/6,1/5,1/4)

ACC

(6,7,8)

(6,7,8)

(1,1,1)

(5,6,7)

TCI

(4,5,6)

(4,5,6)

(1/7,1/6,1/5)

(1,1,1)

TABLE 7.16C

Fuzzy comparison matrix of the four criteria based on the opinion of third decision maker [22]. PEC

CDE

ACC

TCI

PEC

(1,1,1)

(1,1,1)

(2,3,4)

(2,3,4)

CDE

(1,1,1)

(1,1,1)

(2,3,4)

(2,3,4)

ACC

(1/4,1/3,1/2)

(1/4,1/3,1/2)

(1,1,1)

(1,1,1)

TCI

(1/4,1/3,1/2)

(1/4,1/3,1/2)

(1,1,1)

(1,1,1)

473

7.9 Summary

TABLE 7.16D

Fuzzy comparison matrix of the four criteria based on the opinion of fourth decision maker [22]. PEC

CDE

ACC

TCI

PEC

(1,1,1)

(1,1,1)

(2,3,4)

(1/4,1/3,1/2)

CDE

(1,1,1)

(1,1,1)

(2,3,4)

(1/4,1/3,1/2)

ACC

(1/4,1/3,1/2)

(1/4,1/3,1/2)

(1,1,1)

(1/6,1/5,1/4)

TCI

(2,3,4)

(2,3,4)

(4,5,6)

(1,1,1)

TABLE 7.16E Fuzzy comparison matrix of the four criteria based on the opinion of fifth decision maker [22]. PEC

CDE

ACC

TCI

PEC

(1,1,1)

(1,1,1)

(1,1,1)

(1,1,1)

CDE

(1,1,1)

(1,1,1)

(1,1,1)

(1,1,1)

ACC

(1,1,1)

(1,1,1)

(1,1,1)

(1,1,1)

TCI

(1,1,1)

(1,1,1)

(1,1,1)

(1,1,1)

Global fuzzy weights were calculated based on Wang’s fuzzy-AHP method using Expert Choice software. The final global fuzzy weights of alternatives at each city (weather condition) were given in Table 7.17. Finally, Table 7.18 gives the final selected cooling system among five alternatives for each city of the case study (each weather condition).

7.9 Summary Different decision-making methods were discussed in this chapter. Discussed methods include both methods that work based on the same weights of criteria and methods that consider different weights of criteria. Decision-making was discussed to be required in both multiobjective optimization and decision problems of energy systems. Applications of methods were explained by several examples and some case studies in the field of energy systems. In addition, an engineering software that can be useful in decision problems was introduced. In this chapter, only some decision-making methods among several decisionmaking methods were introduced. More methods can be found in related literature of decision-making. Decision-making is a critical process in modeling, assessment, and optimization of energy systems.

TABLE 7.17 Global fuzzy weights of the candidates obtained by Wang’s fuzzy-AHP method [22]. Global fuzzy weights (%) City

Cooling options

First decision maker

Second decision maker

Third decision maker

Fourth decision maker

Fifth decision maker

Final

Tabriz

DEC

(28.9,30.6,33.3)

(48.5,49.4,51.7)

(36.4,38.7,41.8)

(26.2,29.1,30.9)

(40.1,41.6,43.5)

(35.1,38.0,40.6)

IDPEC without RA

(25.5,26.9,27.4)

(15.3,16.7,17.6)

(23.8,25.3,26.5)

(28.3,28.9,29.9)

(21.5,22.6,23.5)

(23.0,23.9,25.3)

IDPEC with RA

(25.7,27.44,28.5)

(15.1,16.8,18.0)

(25.7,28.2,29.9)

(29.5,30.7,32.5)

(23.1,24.5,25.6)

(24.0,25.6,27.4)

VC

(14.1,15.1,16.6)

(16.5,17.2,18.3)

(7.2,7.7,8.2)

(10.6,11.3,12.6)

(10.6,11.2,11.7)

(11.8,12.5,13.6)

DEVap

(42.9,45.3,46.6)

(31.9,33.9,34.7)

(56.9,67.5,71.9)

(53.9,56.1,57.5)

(47.7,53,55.2)

(48.1,50.3,52.4)

VC

(52.8,54.7,57.0)

(64.3,66.1,68.1)

(27.1,32.4,43.0)

(42.5,43.9,46.1)

(43.6,47,52.3)

(47.5,49.7,51.9)

DEVap

(44.4,46.8,48.2)

(33.9,35.9,36.6)

(66.6,68.9,71.0)

(57.6,59.8,60.5)

(53.9,57,59.9)

(51.8,54.1,55.6)

VC

(51.3,53.2,55.5)

(63,64.1,66.1)

(29,31.1,34.0)

(39.4,40.2,42.4)

(40.1,43,46.2)

(44.3,45.9,48.1)

DEC

(27.5,29.6,32.4)

(44.8,45.6,47.6)

(43.8,45.7,47.6)

(27.1,30.4,32.3)

(40.5,41.9,43.1)

(34.8,37.8,39.9)

IDPEC without RA

(20.6,21.8,22.2)

(13.7,14.9,15.4)

(19.1,20.1,22.4)

(23.1,23.8,24.8)

(19,19.9,21.1)

(19.5,20.5,21.7)

IDPEC with RA

(21.4,22.6,24.1)

(14.9,16.2,17.2)

(21.5,23.4,25.4)

(24.3,25.2,27.1)

(20.7,21.9,23.5)

(20.9,22.1,24.0)

VC

(24.2,26.1,27.4)

(21.9,23.3,24.1)

(9.3,10.2,10.5)

(19.3,20.6,22.2)

(15.1,16.3,16.8)

(18.5,19.6,20.9)

DEC

(28.9,30.5,33.2)

(48.0,49.1,51.1)

(39.5,43.0,45.5)

(25.6,28.8,30.6)

(38.7,41,42.6)

(34.3,37.6,40.2)

IDPEC without RA

(26,27.4,27.7)

(15.4,16.9,17.5)

(21.3,22.6,24.5)

(28.8,29.4,30.6)

(21.7,22.9,23.5)

(23.4,24.3,25.6)

IDPEC with RA

(26.7,28.4,29.7)

(16.4,17.9,19.3)

(24.5,26.8,29.4)

(30.4,31.7,33.8)

(24.1,25.8,27.8)

(25.1,26.5,28.7)

VC

(12.7,13.6,14.9)

(15.4,16.1,17.9)

(7.0,7.5,7.9)

(9.6,10.2,11.0)

(9.9,10.4,11)

(10.8,11.5,12.6)

DEVap

(44.1,46.3,47.2)

(33.6,35.5,36.1)

(58.0,61.9,64.7)

(56.7,58.5,59.1)

(55.1,56.3,57.3)

(50.1,52.8,54.2)

VC

(51.9,53.7,55.9)

(62.3,64.5,66.4)

(35.2,38.1,42.0)

(40.8,41.5,43.3)

(42.6,43.7,44.9)

(45.7,47.2,49.0)

DEVap

(35.1,36,37.0)

(22.8,24.2,26.4)

(20.2,21.4,22.7)

(34.3,34.5,36.2)

(23.4,25.1,27.4)

(28.7,28.9,30.1)

VC

(63,64,64.8)

(73.5,75.8,77.2)

(77.1,78.6,79.8)

(63.7,65.5,65.7)

(71.5,74.9,76.6)

(69.0,71.1,71.2)

Rasht

Azadshahr

Tehran

Zahedan

Ahvaz

BandarAbbas

DEC: Direct Evaporative Cooling; IDPEC: Indirect Dew Point Evaporative Cooling; VC: Vapor Compression; DEVap: Desiccant Enhanced-eVAPorative.

475

7.10 Exercises

TABLE 7.18 The best choice for the cooling system of small-scale residential building based on fuzzy AHP [22]. The best cooling alternative

City

Weather category

First decision maker

Second decision maker

Third decision maker

Fourth decision maker

Fifth decision maker

Final decision

Tabriz

Temperate and dry

DEC

DEC

DEC

IDPEC with RA

DEC

DEC

Tehran

Hot and semi-dry

DEC

DEC

DEC

DEC

DEC

DEC

Zahedan

Hot and very dry

DEC

DEC

DEC

IDPEC with RA

DEC

DEC

Rasht

Temperate and wet

VC

VC

DEVap

DEVap

DEVap

DEVap

Azadshahr

Temperate and humid

VC

VC

DEVap

DEVap

DEVap

DEVap

Ahvaz

Very hot and semihumid

VC

VC

DEVap

DEVap

DEVap

DEVap

BandarAbbas

Hot and wet

VC

VC

VC

VC

VC

VC

DEC: Direct Evaporative Cooling; IDPEC: Indirect Dew Point Evaporative Cooling; VC: Vapor Compression; DEVap: Desiccant EnhancedeVAPorative.

7.10 Exercises 1. In a decision problem, it is intended to find the foremost energy system among five alternatives. The selection is made based on four criteria: the initial cost, efficiency, annual carbon dioxide emission, and availability. These factors for alternatives are given in the following table: Alternative

Cost (1000 $)

Efficiency (%)

CO2 emission (ton)

Availability (%)

A

163

50.30

10.5

92.0

B

178

52.30

12.3

89.5

C

191

54.70

8.5

87.5

D

216

51.20

14.30

90.5

E

240

56.60

11.7

93.5

Select the foremost alternative among systems A, B, C, D, and E based on: (a) LINMAP method (b) TOPSIS method (c) Fuzzy Bellman-Zadeh with same weight factor for each alternative

476

7. Decision-making in optimization and assessment of energy systems

(d) Fuzzy Bellman-Zadeh with this weight factor, W ¼ ½ ωC ωE ωCO2 ωA T ¼ ½ 4 2 1 3 T 2. In a decision problem given in exercise 1, If we assume that the cost and availability are strongly important than the efficiency and carbon dioxide emission, the cost is moderately important than the availability, and the efficiency and carbon dioxide emission are equivalent. (a) Perform AHP decision-making for this problem. (b) Perform fuzzy-AHP decision-making based on MLSR model. (c) Perform fuzzy-AHP decision-making based on Wang’s model. (d) Perform consistency analysis for the judgment. 3. For the PWR power plant that was presented in Section 6.12.2 of Chapter 6, check the final solution if it is selected by either TOPSIS or fuzzy Bellman-Zadeh. 4. For the GPU-3 Stirling engine that was discussed in Section 6.12.3 of Chapter6, find the optimal solution by the fuzzy Bellman-Zadeh decision-making if the weight of power is 1.5 times of the weight of efficiency.

References [1] Bellman RE, Zadeh LA. Decision-making in a fuzzy environment. Manag Sci 1970;17:B-141–B-164. [2] Mazur V. Fuzzy thermoeconomic optimization of energy-transforming systems. Appl Energy 2007;84:749–62. [3] Yu P-L. Multiple-criteria decision making: concepts, techniques, and extensions. New York: Springer Science & Business Media; 2013. [4] Saaty TL. A scaling method for priorities in hierarchical structures. J Math Psychol 1977;15:234–81. [5] Vaidya OS, Kumar S. Analytic hierarchy process: an overview of applications. Eur J Oper Res 2006;169:1–29. [6] Buckley JJ, Feuring T, Hayashi Y. Fuzzy hierarchical analysis revisited. Eur J Oper Res 2001;129:48–64. [7] Csutora R, Buckley JJ. Fuzzy hierarchical analysis: the lambda-max method. Fuzzy Set Syst 2001;120:181–95. [8] Kwiesielewicz M, Van Uden E. An optimization approach to estimating ratios in Saaty’s priority theory. CEJOR 2001;9:237. [9] Xu R. Fuzzy least-squares priority method in the analytic hierarchy process. Fuzzy Set Syst 2000;112:395–404. [10] De Graan J. Extensions to the multiple criteria analysis of TL Saaty. Report National Institute of Water Supply 1980. [11] Lootsma FA. Saaty’s priority theory and the nomination of a senior professor in operations research. Eur J Oper Res 1980;4:380–8. [12] Wang Y-M, Elhag TM, Hua Z. A modified fuzzy logarithmic least squares method for fuzzy analytic hierarchy process. Fuzzy Set Syst 2006;157:3055–71. [13] Expert Choice Inc. Expert choice software https://www.expertchoice.com/2020; Accessed on April 15, 2020. [14] Sohani A, Zamani Pedram M, Hoseinzadeh S. Determination of Hildebrand solubility parameter of pure 1-alkanols up to high pressures. J Mol Liq 2020;297:111847. [15] Sohani A, Sayyaadi H, Azimi M. Employing static and dynamic optimization approaches on a desiccantenhanced indirect evaporative cooling system. Energ Conver Manage 2019;199:112017. [16] Boukhari S, Djebbar Y, Amarchi H, Sohani A. Application of the analytic hierarchy process to sustainability of water supply and sanitation services: the case of Algeria. Water Sci Technol Water Supply 2018;18:1282–93. [17] Sohani A, Sayyaadi H. Providing an accurate way for obtaining the efficiency of a photovoltaic solar module. Renew Energy 2020;156:395–406.

References

477

[18] Sohani A, Sayyaadi H. Design and retrofit optimization of the cellulose evaporative cooling pad systems at diverse climatic conditions. Appl Therm Eng 2017;123:1396–418. [19] Sohani A, Naderi S, Torabi F. Comprehensive comparative evaluation of different possible optimization scenarios for a polymer electrolyte membrane fuel cell. Energ Conver Manage 2019;191:247–60. [20] Sayyaadi H, Mehrabipour R. Efficiency enhancement of a gas turbine cycle using an optimized tubular recuperative heat exchanger. Energy 2012;38:362–75. [21] Sayyaadi H, Aminian HR. Design and optimization of a non-TEMA type tubular recuperative heat exchanger used in a regenerative gas turbine cycle. Energy 2010;35:1647–57. [22] Balyani HH, Sohani A, Sayyaadi H, Karami R. Acquiring the best cooling strategy based on thermal comfort and 3E analyses for small scale residential buildings at diverse climatic conditions. Int J Refrig 2015;57:112–37.

This page intentionally left blank

C H A P T E R

8 Real-time optimization of energy systems using the soft-computing approaches 8.1 Introduction In the previous chapters, it was discussed that in the optimization of large-scale energy systems, which encounter the infinite numbers of decision variables and complicated models, using traditional optimization tools like genetic algorithm is highly calculative, timeconsuming and sometimes, it needs potent calculative abilities that mostly are not available in many cases. One option for reducing the computational time is reducing the number of decision variables using methodologies that were described in Chapter 6. Nevertheless, it may cause a reduction in optimization’s potential of the system. Moreover, sometimes, it may not lead to a significant reduction of the computational costs of the optimization. Therefore, it is desirable if there are some methods to be used for the optimization of complex energy systems with a whole number of decision variables and their complete form of the model. On the other hand, in some cases, the real-time optimization of the energy system is required; even the system is a complex system or not. For example, if it is required to control an energy system when its load is subject to changes through the specifying optimal values of operating parameters (as decision variables) in response to such changes, there is no enough time for evaluating these optimum parameters using traditional optimization approaches. In such cases, it is desirable to find optimal values of controlling parameters in response to changes. Such an optimization approach that enables to do optimal control of the system is called as the real-time optimization. Therefore, fast optimization tools are acquired by either complex energy systems and real-time optimization approaches. Accordingly, in this chapter, methodologies are described for these purposes. Two soft computing methods include the fuzzy inference system (FIS) and adaptive neuro-fuzzy inference system (ANFIS); they are presented here for the real-time optimization of energy systems. FIS and ANFIS are described based on the researches

Modeling, Assessment, and Optimization of Energy Systems https://doi.org/10.1016/B978-0-12-816656-7.00008-7

479

# 2021 Elsevier Inc. All rights reserved.

480

8. Real-time optimization of energy systems

of the author and his teams for real-time optimization of energy systems; however, this subject is open for further development in any possible future studies.

8.2 Outline of this chapter As described in the introduction, in this chapter, two soft computing optimization methods, including the FIS and ANFIS, are discussed for real-time optimization of energy systems. Since these methods were developed based on iterative approaches of exergoeconomic optimization, first, in Section 8.3, a general description of iterative exergoeconomic optimization of energy systems is given. Then, in Section 8.4, a brief review of FIS concepts is given, and methodologies of the FIS for optimization of energy systems are described. Two case studies are used to be optimized using the real-time optimization method of the FIS in Section 8.5. Assessment of the FIS based on reviewed case studies is performed in Section 8.6. In Section 8.7, more efficient methodology of real-time optimization is given and described. In this section, first, the concept of the ANFIS is given briefly, and then the algorithm of the ANFIS optimization is discussed later. Two case studies of Section 8.5 are revisited by employing the new methodology of the ANFIS in Section 8.7. Section 8.8 is dedicated to the assessment of ANFIS for real-time optimization of energy systems. In Section 8.9, a general conclusion by comparing the FIS and ANFIS and also traditional optimization is given. In Section 8.10, the chapter’s summary is given.

8.3 Iterative exergoeconomic optimization Iterative exergoeconomic optimization, developed by Tsatsaronis and Pisa [1], and also Tsatsaronis and Moran [2], has been used to be encoded via soft-computing methods (FIS and ANFIS) in this chapter. However, the method was developed for hand calculation of simple cycles in Refs. [1, 2], the methodology was developed to be encoded based on the fuzzy inference system (FIS) in Refs. [3, 4] and later it was utilized by the artificial neuro-fuzzy inference system (ANFIS) in Refs. [5, 6]. In this section, the general concepts of iterative exergoeconomic optimization are described. In future sections, its encoding using FIS and ANFIS will be discussed. In iterative optimization provided by Tsatsaronis and Pisa [1] and also Tsatsaronis and Moran [2], the overall performance of an energy system is optimized based on their components’ optimal criteria. In this case, for each component of the energy systems, optimal values for some criteria at the component level are defined and based on the deviation of real values of those criteria from optimal values, the optimization process of the entire system is directed toward the final optimal solutions. In this regard, two criteria, including exergetic efficiency (εk) and relative cost difference (rk) at the component level (kth component), are used to direct the iterative optimization process. Recall of expressions that already were given for exergetic efficiency (εk), and relative cost difference (rk) in Chapters 2 and 4 of this book, for a kth component in the energy system, we have: εk ¼

_ P, k Ex _ F, k Ex

(8.1)

8.3 Iterative exergoeconomic optimization

rk ¼

ðcP, k  cF,k Þ cF,k

481 (8.2)

_ F, k are product exergy and fuel exergy for the kth component. Besides, in _ P, k and Ex where Ex Eq. (8.2), cP, k and cF, k are unit costs of product and fuel (cost of each unit of transferred exergy) for the kth component, respectively. For the unit cost of product and fuel exergies, we have [7]: _ P, k cP, k ¼ C_ P, k =Ex

(8.3a)

_ F, k cF, k ¼ C_ F, k =Ex

(8.3b)

The expression of exergetic efficiency of the kth component (Eq. 8.1) might be rewritten according to the exergy cost balance equation defined based on the definitions of fuel and product as follows [7]: ! _ D + Ex _ L Ex k k (8.4) εk ¼ 1  _ F, k Ex On the other hand, the cost balance equation defined based on the product and fuel of a component in Chapter 3, Eq. (8.2) can be rewritten as follows [7]:   D   _ + Ex _ L + Z_ CI + Z_ OM cF, k Ex k k k k (8.5) rk ¼ P, k _ cF, k Ex P;k

_ D and Ex _ L are exergy destruction and loss for the kth component, respectively. where Ex k k CI OM _ In Eq. (8.4), Z k and Z_ k are the related cost rate of capital investment and operating plus maintenance cost, respectively (see Chapter 3, Section 3.3), respectively. Combining Eqs. (8.4) and (8.5) leads to the following expressions [7]: !  !    CI OM Z_ k + Z_ k Z_ k 1  εk 1  εk + + rk ¼ ¼ (8.6) _ P,k _ P,k εk εk cF, k Ex cF, k Ex Tsatsaronis et al. [1, 7] show that the cost rate of capital investment plus operating and CI OM maintenance cost of a component (Z_ k ¼ Z_ + Z_ ) can be approximated as follows [1, 7]: k

CI Z_ k ¼ ðβk + γ k ÞZ_ k

k

_ P,k + Rk + wk Ex τ

(8.7)

where βk is the recovery factor (in Section 3.3, it was shown for the overall plant by CRF), γ k is coefficient of operating and maintenance (assumed as 1.06 in simple economic models), wk is the coefficient for levelized capital and investment cost, Rk is associated with other costs that have not been considered on the first two terms on the right hand of Eq. (8.7), and τ is annual operating hours of the system. Furthermore, it is known that the capital investment cost of a component is usually proportional to the exergetic efficiency of that component. It means that equipment with higher exergetic efficiency is usually more expensive than similar equipment with lower exergetic efficiency. This is because a higher exergetic efficiency requires higher manufacturing cost because of more precision in the manufacturing process. Accordingly, Tsatsaronis et al. [1, 7]

482

8. Real-time optimization of energy systems

presented a correlation for approximating the cost rate of capital investment based on the exergetic efficiency of the kth component as follows: m k !  nk  _ ExP, k εk _Z CI ¼ Bk (8.8) k 1  εk τ where Bk, nk, and mk are constants, the magnitudes of which depend on the type of component. These constants are determined based on the cost data of various components using the least square method. For components of the CGAM problem (a cogeneration plant, see Chapter 4), these coefficients were given in Refs. [1, 7]. Substituting Eq. (8.8) into Eq. (8.7) leads to the following expression: mk !  nk  _ ExP, k εk _ P,k + Rk _Z k ¼ ðBk ðβk + γ k ÞÞ (8.9) + wk Ex 1  εk τ τ Substituting Eq. (8.9) into Eq. (8.6), for the relative cost difference of the kth component, we have: " !# " ðmk 1Þ !#     nk  _ ExP, k 1  εk wk Rk Bk ð β k + γ k Þ εk rk ¼ + + + (8.10) _ P,k εk cF, k 1  εk τ cF, k τcF, k Ex In iterative optimization of the energy system, the total product cost of the overall system is minimized by minimizing the product cost of its all subcomponent. Therefore, for each component (kth component), we have: Minimize cP, k ¼

_ F, k + Z_ k cF, k Ex _ P, k Ex

If Eq. (8.9) is substituted to the right-hand side of Eq. (8.11), we obtain: ! ðmk 1Þ !    _ cF, k εk nk Ex RK P, k + ð Bk ð β K + γ K Þ Þ + wK + Minimize cP, k ¼ _ P, k εk 1  εk τ τEx

(8.11)

(8.12)

During optimization, it can be assumed that most parameters of Eq. (8.12) (Bk, βK, γ K, nk, mk, τ, wK, and RK) remain constants; therefore, cP, k changes as functions of εk. Hence, to minimize the production cost of the kth component, it can be written: dcP, k ¼0 dεk

(8.13)

Therefore, the derivation of Eq. (8.12) into εk is equaled to zero. The solution of the obtained equation gives [1, 7]: 1 (8.14a) εk, opt ¼ ð1 + F k Þ   1 ! Bk nk ðβk + γ k Þ ðnk + 1Þ Fk ¼ (8.14b) _ ð1mk Þ τcF, k Ex P, k

8.3 Iterative exergoeconomic optimization

483

Using the values of optimum exergetic efficiency and considering Eq. (8.10) for the relative cost difference, the optimal value of the relative cost difference is obtained as follows [1, 7]: rk, opt ¼

ðnk + 1Þ Fk nk

(8.15)

Similar optimal values of the cost rate of the capital investment cost (Z_ k,opt ) and exergoeconomic factor ( fk, opt) at the component level (kth component) were given in Refs. [7] as follows:   _Z k, opt ¼ cF, k Ex _ P, k Fk (8.17) nk fk, opt ¼

1 ð nk + 1 Þ

(8.18)

Iterative exergoeconomic optimization uses optimal values of exergetic efficiency and relative cost difference (Eqs. 8.14a and 8.15) to direct the optimization process. In this regard, real values of exergetic efficiency (εk) and relative cost difference (rk) are calculated and compared with their optimal values (and rk, opt). Therefore, the deviation of real values of two parameters (exergetic efficiency and relative cost difference) from corresponding optimal values is obtained as follows:

  (8.19a) Δεk ¼ εk  εk, opt =εk, opt  100

  Δrk ¼ rk  rk, opt =rk, opt  100 (8.19b) From Eq. (8.6), it is known that the relative cost difference and exergetic efficiency of a component are proportional. If the relative cost difference is plotted as a function of the exergetic efficiency, based on Eq. (8.6), a schematic graph as per Fig. 8.1 could be obtained.

r (%)

r=

. 1–e Z + . e CFEp

FIG. 8.1 Scheme of the relationship between the relative cost difference and exergetic efficiency of the kth component given by Ref. [1]. Modified from Sayyaadi H, Baghsheikhi M, Babaie M. Improvement of energy systems using the soft computing techniques. Int J Exergy 2016;19:315–51. 1–e e

45° . ED 1–e . = e EP

. Z . CFEp

484

8. Real-time optimization of energy systems

Fig. 8.1 indicates that Δrk is always positive. On the other hand, this figure shows that the magnitude of Δεk is positive when εk is on the left side of the optimum point and negative while εk is placed on the right-hand side of the optimum. Therefore, when Δεk is negative, the capital investment for that component should be increased to direct the system toward the optimal condition. When Δεk is positive, the capital investment must be reduced to move toward the optimum. In the iterative optimization process, an expert could evaluate magnitudes of rk for various components of the system and asses how far these magnitudes are from their optimum values. During the iteration steps, more attention must be paid to components operating far from optimum conditions. Then expert trade-off decision variables were related to each component to adjust its performance near optimal condition (optimum point of Fig. 8.1). This process will be performed for all subcomponents, and it hopes that if the same modification is done on all subcomponents, the performance of the overall energy system becomes optimum or at least much better to its initial state. This process was conducted by Tsatsaronis and Pisa [1] on the CGAM problem based on hand calculation. However, the adjustment of decision variables needs to be evaluated by computer code. The fuzzy inference system is an optimistic tool to computerize this iteration process. The difficulty of iterative optimization for usage in hand calculation arises from some difficulties. First, consider that optimization of a component dictates to increasing of a specific decision variable and optimization of another component directs the same variable to be decreased. The question is that finally, this decision variable must be increased or decreased. Another question is that how much decrease or increase for each decision variable must be done to direct the system toward optimal condition. These questions can be answered using a fuzzy inference system, FIS. In the next section, the concept of FIS, its methodology for iterative optimization, and two case studies that are optimized by the FIS will be discussed.

8.4 Fuzzy inference system, FIS, for real-time optimization This section is dedicated to the methodology for encoding the iterative optimization approach that was briefly explained in Section 8.3. It is tried to convert the knowledge data base of experts who are used in iterative optimization into computer code using the fuzzy inference system, FIS. First, in Section 8.4.1, a brief review of the FIS is given. Further details regarding FIS could be found in related books. In Section 8.4.2, a methodology for iterative optimization based on the FIS is described.

8.4.1 The concept of the fuzzy inference system, FIS Fuzzy logic starts from the concept of a fuzzy set. In the theory of the fuzzy set, an element belongs to a fuzzy set with a certain degree of membership. A real number between 0 and 1 is allocated to this degree of membership. This degree is usually taken as a real number in the interval [0, 1] and is defined by its appropriate membership function [8]. At the root of the fuzzy set theory lies the idea of linguistic variables. A linguistic variable is a fuzzy variable. A membership function (MEMFUN) is a curve that defines how each point in the input space is mapped to a membership value or degree of membership between 0 and 1 [9, 10]. In order

485

8.4 Fuzzy inference system, FIS, for real-time optimization

to represent a fuzzy set, first, the membership functions and the universe of discourse must be determined. Fuzzy inference is the process of formulating the mapping from a given input to an output using the fuzzy logic [9]. The process of fuzzy inference involves the definition of membership function using fuzzy logic operators and if-then rules descriptions. Two types of fuzzy inference systems that are more applicable in the fuzzy systems are Mamdani-type and Sugeno-type. Mamdani’s fuzzy inference method is the most popular methodology of fuzzy [11, 12]. The FIS system utilized for iterative optimization of an energy system that is presented here was developed based on Mamdani’s fuzzy inference system. Therefore, only Mamdani FIS is described here. Regarding Sugeno-type FIS, readers are encouraged to refer to fuzzy textbooks, for example, Refs. [8, 9, 13, 14]. The process of the Mamdani-FIS process comprises the following four steps: 1. 2. 3. 4.

Fuzzification of the inputs Rule evaluation Aggregation of the rule outputs Defuzzification of outputs

1-Fuzzification of inputs: The first step is to take inputs and determine the degree that they belong to each fuzzy set according to membership functions. Input is always a crisp numerical, and the output is a fuzzy degree of membership in the qualifying linguistic set, which is always the interval between 0 and 1. FIS works based on fuzzy rules as well as membership functions. Fuzzy rules expressed with linguistic IF-THEN expression. A typical fuzzy rule in the form of a simple two-input one-output is: IF“x”is“A1”OR“y”is“B1”THEN“z”is“C1:” where A1, B1, and C1 are linguistic values defined by fuzzy sets on the ranges (universes of discourse) x, y, and z, respectively. IF-THEN rule statements are the conditional statements that used to comprise fuzzy logic and defined by the expert previously. 2-Evaluation of fuzzy rules: Fig. 8.2 shows how well the y at our rule that is on a scale of 0 to 10, as the linguistic variable B1. In this case, we rated the y, for example, 8, which, given our

Typical membership function 0.7

B1

Result of fuzzification

y is B1

y=8 As an input

FIG. 8.2 Fuzzified input variables.

486

8. Real-time optimization of energy systems

graphical definition of B1, corresponds to μ ¼ 0.7 for its membership function. As mentioned before, besides fuzzy rules, membership functions are another essential element of the FIS. Various shapes for membership functions include triangle, trapezoid, and bell shape. The shape of membership functions, along with fuzzy rules for a system, is defined by experts who design the FIS for the proposed case study. In Fig. 8.2, a typical trapezoidal membership function is used. Once the inputs are fuzzified, the degree to which each part of the antecedent has been satisfied for each rule is found. If the antecedent of a given rule consists of more than one part, the fuzzy operator is employed to achieve a numeral value that reflects the consequence of the antecedent of the same rule. In the next step, this numeral value will be employed on the output function. The input to the fuzzy operator is membership values that come from fuzzified input variables, while the output is a single numeral value. Generally, three types of operators are defined in kinds of literature, which are known as the fuzzy intersection or conjunction (AND), fuzzy union or disjunction (OR), and fuzzy complement (NOT) [9]. For each of the three operations, there exists a broad class of functions whose members qualify as fuzzy generalizations of the classical operations as well [8, 9, 13, 14]. Functions that qualify as fuzzy intersections and fuzzy unions are usually referred to in the literature as t-norms and s-norms, respectively [11]. Among these various functions, three types are more considerable in problems known as “classical operators” for these functions: AND ¼ min, OR ¼ max, and NOT ¼ additive complement. Fig. 8.3 is an example of the OR operator, also known as the max operator. We are evaluating the antecedent of the previous rule. The two different pieces of the antecedent (x is A1 OR y is B1) gave 0.0 and 0.7 for the fuzzy membership values, respectively. The fuzzy OR operator selects the maximum of the two values, 0.7, and the fuzzy operation of this rule is complete. 1. Fuzzified inputs

2. Apply OR operator (max)

0.7 0.7 0.0

0.0

x is A1

OR

x=3

FIG. 8.3 Example of the OR operator (max).

Result of the fuzzy operator y is B1

y=8

487

8.4 Fuzzy inference system, FIS, for real-time optimization

Antecedent

1. Fuzzified inputs

x is A1

Consequent

2. Apply OR operator (max)

OR

x=3

y is B1

then

z=C1

3. Apply implicaon operator (min)

Result of implicaon

y=8

FIG. 8.4 Implication process (min).

After introducing fuzzy operators, the implication method is used. A consequence is a fuzzy set represented by a membership function, which weights appropriately the linguistic characteristics that are attributed to it [9]. The consequent is interpreted by a function associated with the antecedent as a numeral value. The input to the implication process is a single number given by the antecedent, and the output is a fuzzy set. The implication is employed for each rule. Two built-in implication methods are supported by the MATLAB software, and they are the same functions that are used by the AND method: min (minimum), which truncates the fuzzy output set, and prod (product), which scales the output fuzzy set [9]. The selection of the proper implication method is based on the preferences and experiences of experts who design the FIS. In this book, the “min” method is presented and used for iterative optimization. Fig. 8.4 illustrates the schematic of “min” implication method for a typical single fuzzy rule. 3-Aggregation of the rule outputs: Since decisions are based on the testing of all the rules in a fuzzy inference system, rules are integrated so that it could be used to make a decision. Aggregation is defined as a process that the fuzzy sets, which are the outputs of each rule, are integrated into a single fuzzy set. Aggregation is performed once for each output variable, just before the defuzzification process as the last step. The input of the aggregation process is output functions obtained by the implication process of each rule. The aggregation process gives a fuzzy set for each output variable. It is important to note that since the aggregation process is a commutative process, then the order in which the rules are employed is unimportant [9]. Three built-in aggregation methods are supported by MATLAB software: max (maximum), probor (probabilistic OR), and sum (merely the sum of each rule’s output set). In this book, for the iterative optimization, the “max” method of aggregation is used. In Fig. 8.5, aggregation of three fuzzy rules based on the “max” method is employed to indicate the way that the output of each rule is integrated or aggregated into a single fuzzy set. The aggregation

488

8. Real-time optimization of energy systems

1. Fuzzified inputs

2. Apply OR operator (max)

3. Apply implica on operator (min)

x is A1

OR

y is B1

then

z=C1

then

z=C2

then

z=C3

2.

x is A2

Applying the aggrega on process

1.

3.

x is A3

x=3

OR

y is B3

y=8

FIG. 8.5 Aggregation process (max) [10].

method is also selected by designers of the FIS based on their experiences. In this book, the FIS for iterative optimization was designed based on the “max” method. 4-Defuzzification of outputs: The input to the defuzzification process is a fuzzy set that comes from the aggregation of the fuzzy output set, while the output is a numeral value. One of the most popular defuzzification methods is the centroid calculation. In this method, the center of the area under the curve is returned as the output. There are five built-in methods supported by MATLAB: centroid, bisector, middle of maximum, largest of maximum, and smallest of the maximum [9]. The proper method is selected by experts. In this book, the middle of the maximum method (mom) is used for designing the FIS of iterative optimization. The middle of the maximum takes the mean of those points where the membership function is at a maximum. Fig. 8.6 illustrates a typical defuzzification based on the middle of the maximum method.

8.4.2 The FIS method for real-time optimization of energy systems In Section 8.4.1, it was mentioned that for iterative optimization of two issues is essential. The first one is related to the judgment of experts to alter the values of decision variables in order to adjust the operation of components (εk and rk) as close as possible to their

8.4 Fuzzy inference system, FIS, for real-time optimization

489

FIG. 8.6

Defuzzified aggregation output (middle of maximum or “mom” method).

corresponding optimal operation (εk, opt and rk, opt). In this regard, an expert should alter the values of decision variables and decide about their increasing and or decreasing from the current values. This process, which is a qualitative judgment, can be encoded to qualitative changes using FIS. Moreover, linguistic rules of expert for such modification can be translated into fuzzy rules. In the linguistic judgment of experts in iterative hand calculation, it is not clear the exact value that each decision variable should be altered; however, using the process of defuzzification of the FIS, crisp values for changing the values of decision variables can be obtained. The second issue in iterative hand calculation is about how to integrate orders for changings of decision variables that come from different components. For example, optimizing a component dictates to increase the value of a specified decision variable; however, another component of the system requires that same variable to be decreased. In hand calculation, the issue is the integration method of these conflicting orders for the final adjustment of decision variables. Once more, considering FIS described in Section 8.4.1, it is found that this issue could be responded by the aggregation process of the FIS. Finally, it seems that the FIS has elements that might be useful in encoding iterative optimization in the form of computer code. In this section, a general methodology for implementing the FIS for this purpose is given; however, the comprehensive presentation of the method will be given by two case studies in the next section (Section 8.5). The FIS methodologies for iterative exergoeconomic optimization of energy systems include the following steps: 1. Developing a model for energy system: In this step, a computer code based on models that were explained in the previous chapter must be prepared. 2. Evaluating the system and its subcomponents: Using the computer codes, first, Δεk and Δrk for all subcomponents of the energy system are evaluated. Then, subcomponents of the system are sorted in descending order. Moreover, the effects of decision variables on Δεk and Δrk are found using the model. In this step, by examining the computer code (model), it

490

8. Real-time optimization of energy systems

is found that how the variation of each decision variable affects Δεk and Δrk of the particular of subcomponent. 3. Defining fuzzy rules and membership functions for the system: Using information comes from step #2 as well as the experience of an expert, the required fuzzy rules that govern the system are defined. Moreover, the shape of fuzzy membership functions that are used in the antecedent, and consequents are selected by experts. This process is wholly performed according to the experience and preferences of an expert. In designing the FIS system, an expert may check various shapes for membership functions (triangular, trapezoidal, bell-shape, etc.) by trial and error. This step is the most challenging task in computerizing iterative optimization of energy system and one of the most severe issues in using the FIS for iterative optimization of an energy system that makes it a complicated tool for optimization of energy system respite to its advantage in fast optimization of the system. In Section 8.7, it will be shown that this issue could be partly overcome by the adaptive neuro-fuzzy inference system, ANFIS. 4. Designing the proper iterative optimization code: Based on the designed FIS in step #3, a flow chart for the iterative optimization process is designed and encoded into the computer code that includes the FIS model as well as the associated code of the model developed for the system. The FIS model’s codes are a subprogram of the general iterative optimization code. 5. Employing the iterative optimization code: Finally, the developed code of step #4 is employed for iterative optimization of the system, and its results are judged by an expert when it is run for various base-case systems (each base-case is an initial design of the system prior any optimization). This is required to ensure that the code could reach the optimal solution regardless of the initial design of the system (base-case). At this moment, the procedure of the FIS iterative optimization might be a bit vague for readers. In the next section (Section 8.5), this procedure is more clarified through implementing it on two case studies.

8.5 Case studies for real-time optimization using the FIS In this section, FIS is applied to two different case studies. The first case study is the CGAM problem that has already investigated in previous chapters and optimized so far in many studies using conventional optimization approaches as a benchmark energy system for examining different optimization methods. For example, refer to Refs. [1, 2, 15–21] as examples of works that have been conducted on optimization of this benchmark energy system using various conventional optimization methods (mathematical optimization, genetic algorithm, etc.). The second case study is a typical steam power plant that must be optimized in order to reach its maximum beneficial potential during operation. In this regard, a real-time optimization process is required to optimize the power plant at each moment in response to the variation of operating parameters of the power plant (e.g., the variation of the electricity demand).

491

8.5 Case studies for real-time optimization using the FIS

8.5.1 Case study (I)—The CGAM problem The first case study that is covered for examining the FIS iterative optimization approach is the CGAM problem. The CGAM problem is a benchmark energy system that was defined by the number of researchers [16] to examine various exergoeconomic optimization approaches in order to compare the results of those methods on a standard problem. This is a hypothetical energy system, which is a cogeneration plant, including a gas-turbine cycle equipped with an air preheater at upstream and a heat recovery steam generator (HRSG) at the downstream of the cycle. The gas cycle produces 20 MW of the net power as the main product of the cycle, while the HRSG generates 14 kg s1 of the saturated steam at 20 bar (2 MPa) as the by-product of the cycle. The exhaust gas of the upstream cycle at the outlet of the air preheater is directed into the HRSG (downstream cycle) to produce this amount of saturated steam. Indeed, the CGAM plant is the recall of the cogeneration case study that was already given in Chapter 4, Section 4.6.1. A schematic of the CGAM problem is depicted in Fig. 8.7. Other specifications of the CGAM problem are [16]: T1 ¼ 298:15 K, P1 ¼ 1:01325 bar, T8 ¼ 298:15 K, P8 ¼ 20 bar, T10 ¼ 298:15 K, P10 ¼ 12 bar, T3 ¼ 850 K, T4 ¼ 1520 K, rp ¼ P2 =P1 ¼ 10,ηac ¼ 0:86, ηgt ¼ 0:86

• Decision variables: In the CGAM problem, five decision variables are defined as follows [16]:

Compressor

1. The isentropic efficiency of the compressor, ηac 2. The isentropic efficiency of the turbine, ηgt

2

12

Turbine

11

10 Fuel

1

4

Air Preheater

7 Exhaust gases

3

Combustor

5

6 9

Saturated steam

Boiler

Feed water 8

FIG. 8.7 Schematic flow diagram of the CGAM cogeneration plant.

492

8. Real-time optimization of energy systems

3. The temperature of the air entering the combustion chamber, T3 4. The temperature of the combustion products entering the gas turbine, T4 5. The pressure ratio of the compressor, rP ¼ P2/P1 It is required to note that these five decision variables are sample decision variables for a hypothetical problem. In real cases of engineering problems as decision variables are selected among adjustable parameters of the system, isentropic efficiencies are unsuitable parameters to be selected as decision variables. Nevertheless, since the CGAM problem is just a benchmark system for the examination of different optimization methods, isentropic efficiencies were assumed to be decision variables. • Constraints: Like any other optimization problem in engineering, the CGAM problem is subject to the following constraints: 0:6  ηac  0:9

(8.20a)

0:6  ηgt  0:9

(8.20b)

700  T3  1000K

(8.20c)

1200  T4  1550K

(8.20d)

6  rP  16

(8.20e)

As mentioned in Section 8.4.2, the FIS optimizes an energy system in five steps. These five steps are applied to the CGAM problem here. First, an exergoeconomic model based on the concept of exergoeconomics given in Chapter 4 was developed for the CGAM problem and in continue auxiliary exergoeconomic calculation based on iterative exergoeconomic approach given in Section 8.3 were performed at components’ level of the CGAM problem. These calculations and the exergoeconomic model were prepared in the form of computer code. The calculations mentioned above and computer code cover step #1 and step #2 of Section 8.4.2. In step #3, Δrk of each component is compared with recommended values for that component, and if Δrk is beyond the recommended range, the values of Δεk and Δrk are adjusted using defined fuzzy rules. The recommended values of Δrk for the components of the CGAM problem are given in Table 8.1. The combustion chamber (CC) usually has the highest relative cost TABLE 8.1 Appropriate values of Δεk and Δrk for each component of the CGAM problem [3]. Component

Δrk

Air compressor

Less than 3%

Air preheater

Less than 3.5%

Gas turbine for controlling its isentropic efficiency Gas turbine for controlling its inlet temperature

Less than 3% Less than 27%

H recovery steam generator (HRSG)

Less than 82%

8.5 Case studies for real-time optimization using the FIS

493

difference value as a result of substantial exergy destruction; therefore, it has a wide range of variance in each design. As a result, it has less flexibility for reducing irreversibilities and investment costs; so, it is neglected in Table 8.1. The logical conclusion would be to try to decrease the exergy destruction in the combustion chamber by increasing the air-preheating temperature T3. If Δrk is out of the recommended range of Table 8.1, depending on the positive or negative sign of Δεk as well as the value of Δεk, the corrective order on effective decision variable must be implemented by fuzzy rules. Hence, depending on the magnitude of Δεk and Δrk, which are judged by linguistic (qualitative) expression by experts like “high,” “low,” “medium,” “appropriate,” the corrective order on related decision variables must be issued. Since these linguistic values have no crisp boundary, these must be expressed by fuzzy membership function before defining fuzzy rules. As mentioned earlier in Section 8.4, different shapes of fuzzy membership function, including triangle, trapezoid, bell shape, are used, and in this stage, shapes of membership function for Δεk and Δrk are defined by experts based on their experience or their trial-and-error examinations. This is one challenging task in employing the FIS for optimization of energy systems that makes it a difficult tool (this challenge will be resolved later by introducing the ANFIS tool). As an example, the appropriate membership functions for and Δrk of the gas turbine section gas-turbine problem are illustrated in Fig. 8.8. In Fig. 8.8, values of Δ εgt are plotted into seven membership functions, including “negative big (nb),” “negative medium (nm),” “negative small (ns),” “positive small (ps),” “positive medium (pm),” “positive big (pb),” and “positive very big (pvb).” The fuzzification process of the FIS finds the value of membership for a calculated value of Δ εgt. For example, Δ εgt ¼ 1.5 belongs to the “pm (positive medium)” and “pb (positive big)” fuzzy sets, simultaneously with a membership value of 0.50 for each fuzzy set. Similarly, Δ rgt ¼ 7.8 belongs to “pm (positive medium)” and “pb (positive big)” fuzzy sets, simultaneously. Another thing that must be responded by the FIS is the magnitude that each decision variable must be altered to adjust Δrk. Once more, fuzzy membership functions are needed to decide about the quantity of alternation of decision variables. On the other hand, it is aimed to adjust decision variables based on Δεk and Δrk, it can be done by fuzzy rules that their antecedents are values of Δεk and Δrk while consequents are the adjusted value of the relevant decision variable. As discussed earlier, fuzzy rules are in the form of logical IF-THEN expression, for example, IF A is “High” AND B is “Low” THEN C should be “Medium.” In this stage, fuzzy rules should be defined by an expert, and in this stage, there is no specific algorithm to develop the required rules, and this is another challenge on employing the FIS for optimization of energy systems (another challenge was related to the selection of the shape of membership function). Two challenges of the FIS might be resolved by the ANFIS that will be presented later. In the CGAM problem, according to of authors of Ref. [3], 149 fuzzy rules were defined to control five decision variables of the CGAM problem. For example, for controlling the isentropic efficiency of the air-compressor as one decision variable in the CGAM problem following 24 fuzzy rules that are mentioned in Table 8.2 along with membership functions that are illustrated in Fig. 8.9 were defined [3]. Fuzzy rules of Table 8.2 are given for controlling the isentropic efficiency of the aircompressor (ηac) only. For the other four decision variables of the CGAM problem, similar fuzzy rules were defined in Ref. [3]. Accordingly, 56 rules were given for controlling the

494

8. Real-time optimization of energy systems

nb

Degree of membership

1

nm

ns ps pm

pb

pvb

0.8 0.6 0.4 0.2 0 −10

Degree of membership

1

Hrm

−8

−2

0 Degt

h

vh

vl

100

150

−6

m

−4

2

4

6

8

10

350

400

wh

0.8 0.6 0.4 0.2 0 0

50

200

250

300

Degt

FIG. 8.8 Typical membership functions for Δεgt and Δrgt of the gas turbine section of the CGAM problem [3].

isentropic efficiency of turbine section (ηgt), 30 rules were used for inlet temperature of the combustion chamber (T3), 56 rules were given for inlet temperature of the turbine section (T4), and finally, 36 fuzzy rules were defined for controlling the pressure ratio (rP ¼ P2/P1). Therefore, 202 fuzzy rules are required for the optimization of the CGAM problem. A complete list of fuzzy rules, as well as entire membership functions that were used in exergoeconomic optimization of the CGAM problem, was given in Appendix A of Ref. [3]. Besides, 13 types of

8.5 Case studies for real-time optimization using the FIS

TABLE 8.2

495

Typical fuzzy rules for controlling isentropic efficiency of the air-compressor.

Rule’s number

Fuzzy rule

1

IF(Δεac ¼ nb) AND (Δrac ¼ l) THEN (Δηac ¼ps)

2

IF (Δεac ¼nm) AND (Δrac ¼ l) THEN (Δηac ¼ps)

3

IF (Δεac ¼ns) AND (Δrac ¼ l) THEN (Δηac ¼pvs)

4

IF (Δεac ¼ ps) AND(Δrac ¼l) THEN (Δηac ¼nvs)

5

IF(Δεac ¼pm) AND (Δrac ¼l) THEN (Δηac ¼ns)

6

IF (Δεac ¼pb) AND (Δrac ¼l) THEN (Δηac ¼ns)

7

IF (Δεac ¼nb) AND (Δrac ¼ m) THEN (Δηac ¼pm)

8

IF (Δεac ¼nm) AND (Δrac ¼m) THEN (Δηac ¼ps)

9

IF (Δεac ¼ns) AND (Δrac ¼m) THEN (Δηac ¼ps)

10

IF (Δεac ¼ps) AND (Δrac ¼m) THEN (Δηac ¼ns)

11

IF (Δεac ¼pm) AND (Δrac ¼m) THEN (Δηac ¼ns)

12

IF (Δεac ¼pb) AND (Δrac ¼m) THEN (Δηac ¼ nm)

13

IF (Δεac ¼nb) AND (Δrac ¼ h) THEN (Δηac ¼pm)

14

IF (Δεac ¼nm) AND (Δrac ¼h) THEN (Δηac ¼pm)

15

IF (Δεac ¼ns) AND (Δrac ¼h) THEN (Δηac ¼ps)

16

IF (Δεac ¼ps) AND(Δrac ¼h) THEN (Δηac ¼ ns)

17

IF (Δεac ¼pm) AND (Δrac ¼h) THEN (Δηac ¼nm)

18

IF(Δεac ¼pb) AND (Δrac ¼h) THEN (Δηac ¼nm)

19

IF (Δεac ¼nb) AND (Δrac ¼ vh) THEN (Δηac ¼pb)

20

IF (Δεac ¼nm) AND (Δrac ¼vh) THEN (Δηac ¼pb)

21

IF (Δεac ¼ns) AND(Δrac ¼vh) THEN (Δηac ¼pm)

22

IF (Δεac ¼ps) AND (Δrac ¼vh) THEN (Δηac ¼ nm)

23

IF(Δεac ¼pm) AND (Δrac ¼vh) THEN (Δηac ¼ nb)

24

IF (Δεac ¼pb) AND (Δrac ¼vh) THEN (Δηac ¼nb)

Abbreviation of linguistic parameters: h, high; l, low; m, medium; nb, negative big; nm, negative medium; ns, negative small; nvs, negative very small; pb, positive big; pm, positive medium; ps, positive small; pvs, positive very small; rh, relatively high; rl, relatively low; vh, very high; vl, very low.

membership functions were defined for Δεkand Δrk of components (air-compressor, turbine, air preheater, and HRSG) as well as five decision variables. These membership functions were also given in Appendix A of Ref. [3]. Defining these 202 fuzzy rules and 13 membership functions were performed thoroughly based on authors’ experiences for the CGAM problem in Ref. [3]. This is the most challenging step in the application of the FIS for the optimization of the energy system. That makes it a

496

8. Real-time optimization of energy systems

nb

Degree of membership

1

nm

ns ps

pm

pb

0.8 0.6 0.4 0.2 0 −10

l

1 Degree of membership

−8

−6

−4

m

−2

0 Deac

2

4

h

6

8

10

80

90

100

vh

0.8 0.6 0.4 0.2 0 0

Degree of membership

1

10

nb

20

30

40

nm

ns

50 Drac

60

pvs ps

70

pm

pb

0.8 0.6 0.4 0.2 0 −0.04 −0.03 −0.02 −0.01

0 Dhac

0.01

0.02

0.03

0.04

FIG. 8.9 Membership functions used for controlling isentropic efficiency of the air compressor of the CGAM problem for usage in fuzzy rules of Table 8.2 [3].

8.5 Case studies for real-time optimization using the FIS

497

very complicated process compared to the conventional optimization approach. This challenge will be resolved by introducing the ANFIS in Section 8.7. The fourth step, according to Section 8.4, is preparing the FIS code. In this regard, a calculation flowchart, as illustrated in Fig. 8.10, was considered [3]. According to Fig. 8.10, in the first step, initial values are considered for all decision variables. Using these quantities, values of exergetic and exergoeconomic variables were calculated and delivered to the FIS as input variables. Modification of those decision variables, which had a positive effect on the total product cost of the system, was suggested by the FIS and applied to the proposed decision variables. Modified values of decision variables were calculated, and new decision variables were introduced in the next step of the iteration. This procedure was continued until no significant improvement was made or a physical constraint was met. For improving the process convergence, this procedure was applied to all decision variables in each step. The priority of the components was clarified using the knowledge, which was earned during the trial handbased calculation. Some variables, like the isentropic efficiency of the air compressor and gas turbine, have a small effect on the total cost of the system. Therefore, these variables were considered first, and their inefficiencies were removed with a particular priority. For more details, refer to Ref. [3]. Now, the FIS is ready to apply for iterative optimization of the CGAM problem. As an initial design of the CGAM problem (the base case system), Table 8.3 provides initial values of decision variables: The product cost of this initial design was calculated by the exergoeconomic code, and it was obtained to be 1963.8 US$ h1. This value was obtained considering the simple economic model. If a more sophisticated economic model such as the total revenue requirement is used, a different value for the product cost of the CGAM problem is calculated (simple economic model and TRR model were discussed in Chapter 3, Section 3.3). This initial design was used as an input to iterative FIS optimization code. The FIS code optimized the problem within 31 iterations and minimized the product’s cost of the CGAM problem to 1324.9 US$ h1. It is very close to the optimal values reported in other references [1, 2, 17, 19] using other optimization approaches. For a better instance, iterative steps of the FIS optimizer are given in Table 8.4. To understand the working logics of the FIS, one iteration of Table 8.3 was visualized according to four steps of fuzzy calculation (see Section 8.4.1) in Fig. 8.11. This figure illustrates how the FIS offers +100 K for ΔT4 based on the input values of 6.34 and 171 for Δεgt and Δrgt, respectively. This figure was prepared based on considered shapes of membership functions given in Appendix A of Ref. [3]. The robustness of the FIS optimizer is examined by considering different initial values of decision variables (different base cases). In this regard, the final optimal solution should not be dependent on initial values. In Ref. [3], it was examined with six different initial designs, and as it can be seen in Table 8.5, in all cases, the final solutions fluctuate around a similar value. In other word, the final solution is independent of the initial design. Table 8.5 shows that the best value for the objective function of the six cases was 1308.8 US$ h1. According to the mathematical optimization method, the optimum value for the product cost of the CGAM system was 1303.4 US$ h1 [1]. Therefore, the error of calculation compared to conventional optimization is +0.41%, which is in the acceptable range.

498

FIG. 8.10

8. Real-time optimization of energy systems

Calculation flowchart of the FIS [3].

499

8.5 Case studies for real-time optimization using the FIS

TABLE 8.3

Initial values of decision variables for the base case design of the CGAM problem.

Decision variable

Symbol

Value

The isentropic efficiency of the compressor

ηac

0.860

The isentropic efficiency of the turbine section

ηgt

0.800

The temperature of the air entering the combustion chamber

T3

750.0 K

The temperature of the combustion products entering the gas turbine

T4

1250.0 K

The pressure ratio of the compressor

rP

7.0

TABLE 8.4 solution [3].

Iteration steps performed by the FIS from the initial design of Table 8.3 toward the optimal Value

Effective component

Δrk

Δεk

Decision variable (first step) T3 (K)

750.0

AC

6.8

0.41

T4 (K)

1250.0

APH

115.00

15.29

ηac

0.860

CC

2958.00

28.91

ηgt

0.800

GT

233.00

6.21

7.00

HRSG

112.00

29.27

P2/P1 1

Cost (US$ h )

1963.8

FIS offer

ΔT4 ¼ + 15.26 K, Δ(P2/P1) ¼ + 0.235, Δηac ¼  0.00035, ΔT3 ¼ + 23.67 K

Decision variable (second step) T3 (K)

776.7

AC

6.9

0.49

T4 (K)

1265.3

APH

93.2

12.99

ηac

0.8597

CC

2616.5

27.91

ηgt

0.800

GT

213.7

6.07

7.23

HRSG

101.00

27.67

P2/P1 1

Cost (US$ h )

1881.5

FIS offer

ΔT4 ¼ + 15.92 K, Δ(P2/P1) ¼ + 0.235, Δηac ¼  0.00064, ΔT3 ¼ + 27.43 K

Decision variable (10th step) T3 (K)

886.09

AC

5.2

0.57

T4 (K)

1386.3

APH

44.2

8.02

ηac

0.854

CC

1137.8

23.85 Continued

500

8. Real-time optimization of energy systems

TABLE 8.4 Iteration steps performed by the FIS from the initial design of Table 8.3 toward the optimal solution [3]—cont’d ηgt P2/P1 1

Value

Effective component

Δrk

Δεk

0.860

GT

92.7

4.51

7.71

HRSG

71.5

23.32

Cost (US$ h )

1588.4

FIS offer

ΔT4 ¼ + 15.00 K, Δηac ¼  0.00066, ΔT3 ¼ + 7.17 K

Decision variable (11th step) T3 (K)

893.26

AC

5.00

0.56

T4 (K)

1401.3

APH

43.90

8.07

ηac

0.8537

CC

1034.10

23.56

ηgt

0.860

GT

81.4

4.28

7.71

HRSG

71.7

23.44

P2/P1 1

Cost (US$ h )

1572.4

FIS offer

ΔT4 ¼ + 15.92 K, Δηac ¼  0.00066, ΔT3 ¼ + 6.97 K

Decision variable (12th step) T3 (K)

900.24

AC

4.77

0.55

T4 (K)

1417.2

APH

44.03

8.17

ηac

0.853

CC

934.74

23.27

ηgt

0.860

GT

70.17

4.03

P2/P1

7.71

HRSG

72.27

23.63

Cost (US$ h1)

1557.5

FIS offer

ΔT4 ¼ + 15.00 K, Δηac ¼  0.00066, ΔT3 ¼ + 7.05 K

Decision variable (31st step) T3 (K)

980.67

AC

2.91

0.40

T4 (K)

1509.2

APH

16.13

4.80

ηac

0.846

CC

484.00

20.48

ηgt

0.839

GT

12.92

0.91

7.71

HRSG

31.08

13.90

P2/P1 1

Cost (US$ h )

1324.9

FIS offer

Δηgt ¼  0.00066, ΔT3 ¼ + 2.53 K 1

Cost (US$ h )

One of the constraints was violated.

FIS offer

STOP and Go back to the last design (step 31st) as the optimum design

8.5 Case studies for real-time optimization using the FIS

501

FIG. 8.11 Visualization of the first iteration step of the FIS optimizer for evaluation of Δ T4 (see Table 8.3) [3].

502

8. Real-time optimization of energy systems

TABLE 8.5 Examination of the robustness of the FIS optimizer for six different initial designs of the CGAM problem [3]. (Case A)

Initial design

Optimum

(Case B)

Initial design

Optimum

T3 (K)

850.0

938.9

T3 (K)

750.0

887.9

T4 (K)

1520.0

1520.0

T4 (K)

1300.0

1437.6

ηac

0.860

0.838

ηac

0.870

0.839

ηgt

0.860

0.864

ηgt

0.870

0.883

8.00

8.00

P2/P1

9.00

9.00

P2/P1 1

1

Cost (US$ h )

1409.6

1317.4

Cost (US$ h )

1577.8

1323.9

(Case C)

Initial design

Optimum

(Case D)

Initial design

Optimum

T3 (K)

900.0

934.1

T3 (K)

860.0

867.0

T4 (K)

1485.0

1485

T4 (K)

1495.0

1471.1

ηac

0.850

0.850

ηac

0.880

0.855

ηgt

0.875

0.877

ηgt

0.900

0.900

7.00

7.00

P2/P1

9.00

9.00

P2/P1 1

1

Cost (US$ h )

1351.7

1308.8

Cost (US$ h )

1364.6

1326.1

(Case E)

Initial design

Optimum

(Case F)

Initial design

Optimum

T3 (K)

750.0

935.7

T3 (K)

750.0

980.7

T4 (K)

1450.0

1499.4

T4 (K)

1250.0

1509.2

ηac

0.800

0.824

ηac

0.860

0.846

ηgt

0.800

0.865

ηgt

0.800

0.841

14.00

11.40

P2/P1

7.00

7.70

1965.6

1324.9

P2/P1 1

Cost (US$ h )

2028.2

1335.6

1

Cost (US$ h )

8.5.2 Case study (II)—A steam power plant In Section 8.5.1, application of the FIS for iterative exergoeconomic optimization of the CGAM problem was presented. This approach was used for the optimal design of a benchmark energy system, and it was found to be robust in the optimization of the proposed system. A similar FIS approach might be used for the optimal design of other energy systems. Another application of the FIS optimization approach might be in real-time optimal control of an energy system due to very high computational speed compared to the traditional optimization method (this superiority will be discussed in Section 8.6). Since it is a significant lag between responses of traditional optimization methods and changes in operating parameters, it is difficult to employ them for real-time optimization of energy systems. In this section, the FIS is examined again for real-time optimization of a steam power plant. The objective of the

8.5 Case studies for real-time optimization using the FIS

503

optimal control is to maximize the profit of the plant by controlling the extracted steam flow rate in response to variations of the plant’s load. A fossil-fueled steam power unit with 250 MW nominal capacity is considered as the case study. This unit consists of seven turbines, including three high-pressure (HP) and four low pressure (LP). The condenser pressure is 0.02 MPa. The feedwater leaves the condenser and passes through three low-pressure feedwater heaters, one deaerator, and two high-pressure feedwater heaters. The schematic flow diagram of the power plant was illustrated in Fig. 8.12. Detail regarding energy and material streams as well as thermodynamic states at different locations (as per Fig. 8.12) of the power plant was given in Appendix A of Ref. [11]. The objective function is the net profit (the difference between revenues and costs) of the power plant that must be maximized by regulating flow rates of extracted steam from turbines that are directed to feedwater heaters. As previously mentioned, the goal is maximizing the net profit of the power plant at various loading regimes of the plant by proportional, controlling some essential operating parameters. The objective function is: Pro ¼ Rimproved  Cincreased

(8.21)

where Pro is the profit of the power plant that must be increased while Rimproved in the increase in revenue of the power plant through increasing the net generated power. The term Cincreased refers to increasing the fuel consumption of the power plant due to decreasing the preheating of the main water stream. Rimproved and Cincreased are evaluated as:   _ net,design _ net  W Rimproved ¼ Celec W (8.22a) ! _ f m _ f , design m Cincreased ¼ Cf (8.22b) ρf

FIG. 8.12 Schematic flow diagram of the 250 MW fossil-fueled steam power plant [11].

504

8. Real-time optimization of energy systems

In these equations, Celec andCf are the price of the sold electricity per kWh ($ kWh1) and the purchased cost of the fuel of the power plant (natural gas) per cubic meters ($ m3), respec_ net, design are net generated power after modification of flow rates _ net and W tively. Moreover, W of extracted steams, and the net generated power at design condition (without changing flow _ f , design are mass flow _ f and m rates of extracted streams) in kW, respectively. In Eq. (8.22b), m rate of fuel (natural gas) after and before modification of mass flow rates of extracted streams in kg s1, respectively. Five indicators for flow rates of extracted steam from turbines were supposed as decision variables or controlling variables as follows: 1. 2. 3. 4. 5.

An An An An An

indicator indicator indicator indicator indicator

of of of of of

the the the the the

mass mass mass mass mass

flow flow flow flow flow

of the of the of the of the of the

extracted extracted extracted extracted extracted

steam steam steam steam steam

from from from from from

HP1 turbine, EXTHP1 HP2 turbine, EXTHP2 LP1 turbine, EXTLP1 LP2 turbine, EXTLP2 LP3 turbine, EXTLP3

These variables (indicators) could vary in the optimization process, but each decision variable is required to be within the range of 0.0–9.0. The extraction value of 0.0 implies that the flow rate of extracted steam was set at its design value specified at a nominal operating condition by the plant’s designer. In other words, when the power plant works in design mode, all EXTs are set to 0.0. The extraction value of 9.0 means the flow rate of extraction is 90% lower than the designed value of the extracted mass flow rate. The goal of this section is designing the FIS to find optimal EXTs while the load of the power plant is changed in order to have a maximum profit of the power plant as per Eq. (8.21), which is the objective function of this optimization. For designing the FIS, in the first step, a thermodynamic model based on mass and energy conservation laws, as well as the exergy balance and thermoeconomic analysis, should be developed for the proposed power plant and should be encoded in the form of computer code. This code must be able to evaluate the net generated power, exergy destructions of each feedwater heater, the fuel consumption of the power plant. More details on these calculations were given in Ref. [11]. In the second step, evaluation of the effect of decision variables on the cost of exergy destruction of each feedwater heater (C_ D, k ) is evaluated using the generated code (indeed, the profit of the power plant is dependent on C_ D, k in this problem). In the next step, fuzzy rules and relevant membership functions are defined. In this step, C_ D, k of each feedwater heater is compared with tits appropriate range, which is given in Table 8.6. TABLE 8.6 Appropriate values of C_ D, k for each feedwater heater of the power plant [11]. Component

  C_ D, k }24s1

HPFWH1

, axb > >

> > , cxd > > > :dc 0, d